Extensions
A technical manual for extension packages natively hosted by InfiniteOpt. See the respective guide for more information.
InfiniteInterpolations
Enabled via import InfiniteOpt, Interpolations.
JuMP.value — MethodJuMP.value(
ref::Union{GeneralVariableRef, JuMP.AbstractJuMPScalar, InfOptConstraintRef},
method::Union{Interpolations.InterpolationType, Interpolations.Degree};
[kwargs...]
)::Interpolations.ExtrapolationExtend JuMP.value to return ref as an interpolation object from Interpolations.jl, based on method which specifies the interpolation method. Currently supported method(s) are:
constant_interpolationorConstant()linear_interpolationorLinear()cubic_spline_interpolationorCubic()
All methods support equidistant grid points. However, nonequidistant discretization grids are not compatible with cubic splines.
Examples
julia> y_interp_func = value(y, cubic_spline_interpolation)
julia> y_interp_func(5.4);
42.0
julia> y_interp_func2 = value(y, Cubic())
julia> y_interp_func2(5.4)
42.0InfiniteMathOptAI
Enabled via import InfiniteOpt, MathOptAI.
MathOptAI.add_variables — Functionfunction MathOptAI.add_variables(
model::InfiniteModel, x::Vector{GeneralVariableRef},
n::Int,
base_name::String,
)::Vector{GeneralVariableRef}Extend MathOptAI.add_variables to properly support infinite variables (i.e., ensure the output variables of a predictor have the necessary infinite parameter dependencies). This method should not be directly used by users, it is used to enable the use of MathOptAI.add_predictor.