Expressions
A technical manual for variable expressions in InfiniteOpt
. See the respective guide for more information.
Parameter Functions
Definition
InfiniteOpt.@parameter_function
— Macro@parameter_function(model::InfiniteModel, func_expr, kwargs...)
Add an anonymous parameter function to the model model
described by the keyword arguments kw_args
and returns the object reference.
@parameter_function(model::InfiniteModel, var_expr == func_expr, kwargs...)
Add a parameter function to model
described by the expression var_expr
, the function expression func_expr
, and the keyword arguments kwargs
. The expression var_expr
is used to define the parameter function references of the form varname[...]
where the indexing matches the container syntax of other macros.
The expression func_expr
determines the concrete Julia function that defines the behavior of parameter function and also specifies the infinite parameters it depends on. The accepted forms are:
func(params...)
: wherefunc
is the function that takes supports of the infinite parametersparams
as input and outputs a scalar value.(params...) -> my_func_expr
: whereparams
are the infinite parameters andmy_func_expr
is the source code of the anonymous function.
The recognized keyword arguments in kwargs
are the following:
base_name
: Sets the name prefix used to generate object names. It corresponds to the object name for scalar parameter function, otherwise, the object names are set tobase_name[...]
for each index...
of the axesaxes
.container
: Specify the container type. Defaults to:Auto
.
Examples
julia> @parameter_function(model, sin(t))
sin(t)
julia> func_vect = [sin, cos];
julia> @parameter_function(model, [i = 1:2] == func_vect[i](t))
2-element Array{GeneralVariableRef,1}:
sin(t)
cos(t)
julia> f(t_val, x_vals) = t_val + sum(x_vals)
f (generic function with 1 method)
julia> @parameter_function(model, pf == f(t, x))
pf(t, x)
julia> g(t_val, a; b = 0) = t_val + a + b
g (generic function with 1 method)
julia> @parameter_function(model, pf2[i = 1:2] == t -> g(t, i, b = 2 * i ))
2-element Array{GeneralVariableRef,1}:
pf2[1](t)
pf2[2](t)
InfiniteOpt.parameter_function
— Functionparameter_function(func::Function,
pref_inputs::Union{GeneralVariableRef, AbstractArray{GeneralVariableRef}, Tuple};
[name::String = [the name of `func`]]
)::GeneralVariableRef
Make a parameter function and return a GeneralVariableRef
that can be embedded in InfiniteOpt expressions. This serves as a convenient wrapper for build_parameter_function
and add_parameter_function
. For an even more convenient definition method see @parameter_function
.
Here func
denotes the function that will take a support of infinite parameters as input (formatted like pref_inputs
) and will return a scalar value. Specifically, func
should be of the form:
func(paramvals...)::Float64
where the formatting of paramvals
is analagous to point variables (and will be based on the tuple of infinite parameter references given in parameter_refs
). Moreover, func
must be a function that returns a scalar numeric value.
Errors if func
will not take a support formatted like pref_inputs
in combination with the fargs
and fkwargs
specified. Also errors if pref_inputs
follow an invalid input format.
Example
julia> p_func = parameter_function(sin, t)
sin(t)
julia> p_func3 = parameter_function((t_supp) -> 2 * sin(2 * t_supp), t, name = "mysin")
mysin(t)
julia> p_func4 = parameter_function(t, name = "mysin") do t_supp
if t_supp <= 5
return sin(t_supp)
else
return 2 * sin(2 * t_supp)
end
end
mysin(t)
InfiniteOpt.build_parameter_function
— Functionbuild_parameter_function(
_error::Function,
func::Function,
parameter_refs::Union{GeneralVariableRef, AbstractArray{<:GeneralVariableRef}, Tuple}
)::ParameterFunction
Build an ParameterFunction
object that employs a parameter function func
that takes instances of the infinite parameter(s) as input. This can ultimately by incorporated into expressions to enable nonlinear infinite parameter behavior and/or incorporate data over infinite domains.
Here func
should be of the form:
func(paramvals...)::Float64
where the formatting of paramvals
is analagous to point variables (and will be based on the tuple of infinite parameter references given in parameter_refs
).
Errors if the infinite parameter tuple is formatted incorrectly. The allowed format follows that of infinite variables. Also errors if the function doesn't accept a support realization of the parameter_refs
as input.
Example
julia> f = build_parameter_function(error, sin, t);
InfiniteOpt.ParameterFunction
— TypeParameterFunction{F <: Function, VT <: VectorTuple}
A DataType
for storing known functions of infinite parameters. These equate to arbitrary functions that take support instances of infinite parameters parameter_refs
in as input and compute a scalar value as output via func
. These can then can incorporated in expressions via ParameterFunctionRef
s.
Fields
func::F
: The function the takes infinite parameters as input and provide a scalar number as output.parameter_refs::VT
: The infinite parameter references that serve as inputs tofunc
. Their formatting is analagous to those of infinite variables.parameter_nums::Vector{Int}
: The parameter numbers ofparameter_refs
.group_int_idxs::Vector{Int}
: The parameter group integer indices associated withparameter_refs
.
InfiniteOpt.add_parameter_function
— Functionadd_parameter_function(model::InfiniteModel, pfunc::ParameterFunction,
[name::String])::GeneralVariableRef
Add an ParameterFunction
pfunc
to the model
using name
for printing and return a GeneralVariableRef
such that it can be embedded in expressions. Errors if the parameter function pfunc
points to do not belong to model
. Note that pfunc
should be created using build_parameter_function
.
Example
julia> f = build_parameter_function(error, sin, t);
julia> fref = add_parameter_function(model, f)
sin(t)
InfiniteOpt.ParameterFunctionData
— TypeParameterFunctionData{F <: ParameterFunction} <: AbstractDataObject
A mutable DataType
for storing ParameterFunction
s and their data.
Fields
func::F
: The parameter function.name::String
: The name used for printing.measure_indices::Vector{MeasureIndex}
: Indices of dependent measures.constraint_indices::Vector{InfOptConstraintIndex}
: Indices of dependent constraints.semi_infinite_var_indices::Vector{SemiInfiniteVariableIndex}
: Indices of dependent semi-infinite variables.derivative_indices::Vector{DerivativeIndex}
: Indices of dependent derivatives.
InfiniteOpt.ParameterFunctionIndex
— TypeParameterFunctionIndex <: ObjectIndex
A DataType
for storing the index of a ParameterFunction
.
Fields
value::Int64
: The index value.
InfiniteOpt.ParameterFunctionRef
— TypeParameterFunctionRef <: DispatchVariableRef
A DataType
for infinite parameter function references.
Fields
model::InfiniteModel
: Infinite model.index::ParameterFunctionIndex
: Index of the infinite parameter function.
Queries
JuMP.name
— MethodJuMP.name(fref::ParameterFunctionRef)::String
Extend JuMP.name
to return the base name of fref
.
Example
julia> name(fref)
"func_name"
InfiniteOpt.raw_function
— Methodraw_function(fref::ParameterFunctionRef)::Function
Returns the raw function behind fref
that takes a particular support of fref
's infinite parameters as input.
InfiniteOpt.call_function
— Functioncall_function(fref::ParameterFunctionRef, support...)::Float64
Safely evaluates the raw_function
of fref
at a particular support support
point that matches the format of the infinite parameter tuple given when the fref
was defined. This is essentially equivalent to raw_function(fref)(supps...)
.
call_function(fref::GeneralVariableRef, support...)::Float64
Call the parameter function of fref
at support
. An ArgumentError
is thrown if fref
is not a parameter function.
InfiniteOpt.parameter_refs
— Methodparameter_refs(fref::ParameterFunctionRef)::Tuple
Return the parameter references associated with fref
. This is formatted as a Tuple of containing the parameter references as they inputted to define fref
.
Example
julia> parameter_refs(p_func)
(t,)
InfiniteOpt.parameter_list
— Methodparameter_list(fref::ParameterFunctionRef)::Vector{GeneralVariableRef}
Return a vector of the parameter references that fref
depends on. This is primarily an internal method where parameter_refs
is intended as the preferred user function.
InfiniteOpt.raw_parameter_refs
— Methodraw_parameter_refs(fref::ParameterFunctionRef)::VectorTuple
Return the raw VectorTuple
of the parameter references that fref
depends on. This is primarily an internal method where parameter_refs
is intended as the preferred user function.
InfiniteOpt.is_used
— Methodis_used(fref::ParameterFunctionRef)::Bool
Return a Bool
indicating if fref
is used in the model.
Example
julia> is_used(fref)
true
InfiniteOpt.used_by_semi_infinite_variable
— Methodused_by_semi_infinite_variable(fref::ParameterFunctionRef)::Bool
Return a Bool
indicating if fref
is used by a semi-infinite infinite variable.
Example
julia> used_by_semi_infinite_variable(fref)
false
InfiniteOpt.used_by_derivative
— Methodused_by_derivative(fref::ParameterFunctionRef)::Bool
Return a Bool
indicating if fref
is used by a derivative.
Example
julia> used_by_derivative(vref)
true
InfiniteOpt.used_by_measure
— Methodused_by_measure(fref::ParameterFunctionRef)::Bool
Return a Bool
indicating if fref
is used by a measure.
Example
julia> used_by_measure(fref)
true
InfiniteOpt.used_by_constraint
— Methodused_by_constraint(fref::ParameterFunctionRef)::Bool
Return a Bool
indicating if fref
is used by a constraint.
Example
julia> used_by_constraint(fref)
false
InfiniteOpt.parameter_group_int_indices
— Methodparameter_group_int_indices(fref::ParameterFunctionRef)::Vector{Int}
Return the list of infinite parameter group integer indices used by fref
.
Modification
JuMP.set_name
— MethodJuMP.set_name(fref::ParameterFunctionRef, name::String)::Nothing
Extend JuMP.set_name
to set the name of a parameter function.
Example
julia> set_name(fref, "func_name")
julia> name(fref)
"func_name"
JuMP.delete
— MethodJuMP.delete(model::InfiniteModel, fref::ParameterFunctionRef)::Nothing
Extend JuMP.delete
to delete parameter functions and their dependencies. Errors if fref
is invalid, meaning it has already been deleted or it belongs to another model.
Nonlinear Expressions
DataTypes
InfiniteOpt.NLPOperator
— TypeNLPOperator{F <: Function, G <: Union{Function, Nothing},
H <: Union{Function, Nothing}}
A type for storing new nonlinear operators and their information that is ultimately for automatic differentiation. The constructor is of the form:
NLPOperator(name::Symbol, dim::Int, f::Function,
[∇f::Function, ∇²f::Function])
Fields
name::Symbol
: The name of the operator that is used.dim::Int
: The number of function arguments.f::F
: The function to evaluate the operator.∇f::G
: The gradient function if one is given.∇²f::H
: The hessian function if one is given.
Methods
JuMP.add_nonlinear_operator
— FunctionJuMP.add_nonlinear_operator(
model::InfiniteModel,
dim::Int,
f::Function,
[∇f::Function,]
[∇²f::Function];
[name::Symbol = Symbol(f)]
)
Extend add_nonlinear_operator
for InfiniteModel
s.
Add a new nonlinear operator with dim
input arguments to model
and associate it with the name name
. Alternatively, @operator
can be used for a more convenient syntax.
The function f
evaluates the operator. The optional function ∇f
evaluates the first derivative, and the optional function ∇²f
evaluates the second derivative. ∇²f
may be provided only if ∇f
is also provided.
julia> @variable(model, y);
julia> g(x) = x^2;
julia> new_op = add_nonlinear_operator(model, 1, g)
NonlinearOperator(g, :g)
julia> @expression(model, new_op(y))
g(y)
InfiniteOpt.all_nonlinear_operators
— Functionall_nonlinear_operators(model::InfiniteModel)::Vector{Symbol}
Retrieve all the operators that are currently added to model
.
InfiniteOpt.name_to_operator
— Functionname_to_operator(model::InfiniteModel, name::Symbol)::Union{Function, Nothing}
Return the nonlinear operator that corresponds to name
. Returns nothing
if no such operator exists.
Currently, this does not return functions for default operators.
InfiniteOpt.added_nonlinear_operators
— Functionuser_defined_operators(model::InfiniteModel)::Vector{NLPOperator}
Return all the operators (and their associated information) that the user has added to model
. Each is stored as a NLPOperator
.
InfiniteOpt.add_operators_to_jump
— Functionadd_operators_to_jump(opt_model::JuMP.Model, inf_model::InfiniteModel)::Nothing
Add the additional nonlinear operators in inf_model
to a JuMP
model opt_model
. This is intended as an internal method, but it is provided for developers that extend InfiniteOpt
to use new JuMPBackend
s.
Expression Methods
InfiniteOpt.parameter_refs
— Methodparameter_refs(expr)::Tuple
Return the tuple of parameter references that determine the infinite dependencies of expr
.
Example
julia> parameter_refs(my_expr)
(t,)
InfiniteOpt.restrict
— Methodrestrict(expr::JuMP.AbstractJuMPScalar, supps...)::JuMP.AbstractJuMPScalar
Restrict an infinite expression expr
to be enforced over infinite parameter supports supps
. This is limited to expressions only contain infinite variables with the same kind of infinite parameter dependencies. Note that more conveniently the expression can be treated as a function for the syntax expr(supps...)
.
Example
julia> ex = @expression(model, 3y - 2)
3 y(t) - 2
julia> restrict(ex, 0)
3 y(0) - 2
julia> ex(0)
3 y(0) - 2
InfiniteOpt.map_expression
— Functionmap_expression(transform::Function,
expr::JuMP.AbstractJuMPScalar)::JuMP.AbstractJuMPScalar
Map and return a new expression of expr
where each variable is transformed via transform
. This can be helpful for writing user extensions.
InfiniteOpt.map_expression_to_ast
— Functionmap_expression_to_ast(var_mapper::Function, [op_mapper::Function,] expr::JuMP.AbstractJuMPScalar)::Expr
Map the expression expr
to a Julia AST expression where each variable is mapped via var_mapper
and is directly interpolated into the AST expression. Any nonlinear operators can be mapped if needed via op_mapper
and will be inserted into the AST expression. This is only intended for developers and advanced users.
InfiniteOpt.all_expression_variables
— Functionall_expression_variables(expr::JuMP.AbstractJuMPScalar)::Vector
Returns a vector of all the variable references contained in expr
.
Example
julia> all_expr_variables(y^2 + z - t)
3-element Array{GeneralVariableRef,1}:
y(t)
z
t
InfiniteOpt.parameter_group_int_indices
— Methodparameter_group_int_indices(expr::JuMP.AbstractJuMPScalar)::Vector{Int}
Return the list of infinite parameter group integer indices used by expr
.
GeneralVariableRef User Methods
InfiniteOpt.GeneralVariableRef
— TypeGeneralVariableRef <: JuMP.AbstractVariableRef
A DataType
that serves as the principal variable reference in InfiniteOpt
for building variable expressions. It contains the needed information to create a variable type specifc reference (e.g., InfiniteVariableRef
) via dispatch_variable_ref
to obtain the correct subtype of DispatchVariableRef
based off of index_type
. This allows us to construct expressions using concrete containers unlike previous versions of InfiniteOpt
which provides us a significant performance boost.
A convenient constructor is:
GeneralVariableRef(model::InfiniteModel, index::ObjectIndex)
Fields
model::InfiniteModel
: Infinite model.raw_index::Int64
: The raw index to be used in theindex_type
constructor.index_type::DataType
: The concreteAbstractInfOptIndex
type/constructor.param_index::Int
: The index of a parameter inDependentParameters
. This is ignored for other variable types.
InfiniteOpt.DispatchVariableRef
— TypeDispatchVariableRef <: JuMP.AbstractVariableRef
An abstract type for variable references that are created from GeneralVariableRef
s and are used to dispatch to the appropriate methods for that particular variable/parameter/measure type.
InfiniteOpt.FiniteRef
— TypeFiniteRef <: DispatchVariableRef
An abstract type for variable references that are finite.
JuMP.owner_model
— MethodJuMP.owner_model(vref::GeneralVariableRef)::InfiniteModel
Extend JuMP.owner_model
to return the model where vref
is stored.
Example
julia> owner_model(vref)
An InfiniteOpt Model
Minimization problem with:
Finite parameters: 0
Infinite parameter: 1
Variables: 3
Derivatives: 0
Measures: 0
Objective function type: GenericAffExpr{Float64, GeneralVariableRef}
`GenericAffExpr{Float64, GeneralVariableRef}`-in-`MathOptInterface.GreaterThan{Float64}`: 1 constraint
`GenericAffExpr{Float64, GeneralVariableRef}`-in-`MathOptInterface.EqualTo{Float64}`: 1 constraint
`GeneralVariableRef`-in-`MathOptInterface.GreaterThan{Float64}`: 3 constraints
Names registered in the model: c1, c2, t, y, z
Transformation backend information:
Backend type: TranscriptionBackend
`t` transcribed over 10 supports
Solver: Ipopt
Transformation built and up-to-date: true
JuMP.owner_model
— MethodJuMP.owner_model(vref::DispatchVariableRef)::InfiniteModel
Extend JuMP.owner_model
to return the model where vref
is stored.
JuMP.index
— MethodJuMP.index(vref::GeneralVariableRef)::AbstractInfOptIndex
Extend JuMP.index
to return the appropriate index of vref
.
Example
julia> index(vref)
FiniteVariableIndex(1)
JuMP.index
— MethodJuMP.index(vref::DispatchVariableRef)::AbstractInfOptIndex
Extend JuMP.index
to return the appropriate index of vref
.
InfiniteOpt.dispatch_variable_ref
— Methoddispatch_variable_ref(vef::GeneralVariableRef)::DispatchVariableRef
Return the concrete DispatchVariableRef
this associated with vref
. This relies on dispatch_variable_ref
being extended for the index type, otherwise an MethodError
is thrown.
InfiniteOpt.dispatch_variable_ref
— Functiondispatch_variable_ref(model::InfiniteModel, index::AbstractInfOptIndex)
Return the variable reference associated the type of index
. This needs to be defined for each variable reference type.
JuMP.name
— MethodJuMP.name(vref::GeneralVariableRef)::String
Extend JuMP.name
to return the name of vref
. It relies on JuMP.name
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown.
JuMP.set_name
— MethodJuMP.set_name(vref::GeneralVariableRef, name::String)::Nothing
Extend JuMP.set_name
to set the name of vref
. It relies on JuMP.set_name
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown.
JuMP.is_valid
— MethodJuMP.is_valid(model::InfiniteModel, vref::GeneralVariableRef)::Bool
Extend JuMP.is_valid
to return Bool
if vref
is a valid reference.
Example
julia> is_valid(model, vref)
true
JuMP.is_valid
— MethodJuMP.is_valid(model::InfiniteModel, vref::DispatchVariableRef)::Bool
Extend JuMP.is_valid
to return Bool
if vref
is a valid reference.
InfiniteOpt.used_by_infinite_variable
— Methodused_by_infinite_variable(vref::GeneralVariableRef)::Bool
Define used_by_infinite_variable
for general variable references. It relies on used_by_infinite_variable
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.used_by_point_variable
— Methodused_by_point_variable(vref::GeneralVariableRef)::Bool
Define used_by_point_variable
for general variable references. It relies on used_by_point_variable
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.used_by_semi_infinite_variable
— Methodused_by_semi_infinite_variable(vref::GeneralVariableRef)::Bool
Define used_by_semi_infinite_variable
for general variable references. It relies on used_by_semi_infinite_variable
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.used_by_parameter_function
— Methodused_by_parameter_function(vref::GeneralVariableRef)::Bool
Define used_by_parameter_function
for general variable references. It relies on used_by_parameter_function
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.used_by_derivative
— Methodused_by_derivative(vref::GeneralVariableRef)::Bool
Define used_by_derivative
for general variable references. It relies on used_by_derivative
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.used_by_measure
— Methodused_by_measure(vref::GeneralVariableRef)::Bool
Define used_by_measure
for general variable references. It relies on used_by_measure
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.used_by_objective
— Methodused_by_objective(vref::GeneralVariableRef)::Bool
Define used_by_objective
for general variable references. It relies on used_by_objective
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.used_by_constraint
— Methodused_by_constraint(vref::GeneralVariableRef)::Bool
Define used_by_constraint
for general variable references. It relies on used_by_constraint
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.is_used
— Methodis_used(vref::GeneralVariableRef)::Bool
Define is_used
for general variable references. It relies on is_used
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.has_derivative_constraints
— Methodhas_derivative_constraints(vref::GeneralVariableRef)::Bool
Define has_derivative_constraints
for general variable references. It relies on has_derivative_constraints
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.parameter_value
— Methodparameter_value(prefs; [kwargs...])
Define parameter_value
for general variable references. It relies on parameter_value
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
JuMP.set_value
— MethodJuMP.set_value(vref::DispatchVariableRef, value::Real)::Nothing
Extend JuMP.set_value
to set the value of vref
. It relies on JuMP.set_value
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown.
InfiniteOpt.infinite_domain
— Methodinfinite_domain(prefs; [kwargs...])
Define infinite_domain
for general variable references. It relies on infinite_domain
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.infinite_domain
— Methodinfinite_domain(prefs; [kwargs...])
Define infinite_domain
for general variable references. It relies on infinite_domain
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.set_infinite_domain
— Methodset_infinite_domain(pref::GeneralVariableRef, domain::InfiniteScalarDomain)::Nothing
Specify the scalar infinite domain of the infinite parameter pref
to domain
. Note this will reset/delete all the supports contained in the underlying parameter object. Also, errors if pref
is used by a measure. An ArgumentError
is thrown if pref
is not an infinite parameter.
InfiniteOpt.set_infinite_domain
— Methodset_infinite_domain(prefs::AbstractArray{<:GeneralVariableRef},
domain::InfiniteArrayDomain)::Nothing
Specify the multi-dimensional infinite domain of the dependent infinite parameters prefs
to domain
. Note this will reset/delete all the supports contained in the underlying DependentParameters
object. This will error if the not all of the dependent infinite parameters are included or if any of them are used by measures. An ArgumentError
is thrown if prefs
are not dependent infinite parameters.
InfiniteOpt.num_supports
— Methodnum_supports(prefs; [kwargs...])
Define num_supports
for general variable references. It relies on num_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.num_supports
— Methodnum_supports(prefs; [kwargs...])
Define num_supports
for general variable references. It relies on num_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.has_supports
— Methodhas_supports(prefs; [kwargs...])
Define has_supports
for general variable references. It relies on has_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.has_supports
— Methodhas_supports(prefs; [kwargs...])
Define has_supports
for general variable references. It relies on has_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.supports
— Methodsupports(
expr::JuMP.AbstractJuMPScalar;
[label::Type{<:AbstractSupportLabel} = PublicLabel,
kwargs...]
)
Return the support associated with expr
. Errors if expr
is not associated with the constraint mappings stored in the transformation backend.
The keyword arguments label
is what TranscriptionOpt
employs and kwargs
denote extra ones that user extensions may employ in accordance with their implementation of expression_supports
. Errors if such an extension has not been written.
By default only the public supports are returned, the full set can be accessed via label = All
. Where possible, all the supports of an infinite expression are returned as an n-dimensional array where each dimension is determined by the each independent group of infinite parameters it depends on.
Example
julia> supports(cref)
2-element Array{Tuple{Float64},1}:
(0.0,)
(1.0,)
supports(prefs; [kwargs...])
Define supports
for general variable references. It relies on supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.supports
— Methodsupports(prefs; [kwargs...])
Define supports
for general variable references. It relies on supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.set_supports
— Methodset_supports(
pref::GeneralVariableRef,
supports::Union{Real, Vector{<:Real}, UnitRange{<:Real}, StepRange{<:Real}, NTuple, Base.Generator};
[force::Bool = false]
)::Nothing
Set the support points associated with a single infinite parameter pref
. An ArgumentError
is thrown if pref
is not an independent infinite parameter.
InfiniteOpt.set_supports
— Methodset_supports(
prefs::Union{Vector{GeneralVariableRef}, AbstractArray{<:GeneralVariableRef}},
supports::Union{Array{<:Real, 2}, Vector{<:AbstractArray{<:Real}}};
[force::Bool = false]
)::Nothing
Set the support points associated with dependent infinite parameters prefs
. An ArgumentError
is thrown if prefs
is are not dependent infinite parameters.
InfiniteOpt.add_supports
— Methodadd_supports(
pref::GeneralVariableRef,
supports::Union{Real, Vector{<:Real}, UnitRange{<:Real}, StepRange{<:Real}, NTuple, Base.Generator}
)::Nothing
Add the support points supports
to a single infinite parameter pref
. An ArgumentError
is thrown if pref
is not an independent infinite parameter.
InfiniteOpt.add_supports
— Methodadd_supports(
prefs::Union{Vector{GeneralVariableRef}, AbstractArray{<:GeneralVariableRef}},
supports::Union{Array{<:Real, 2}, Vector{<:AbstractArray{<:Real}}}
)::Nothing
Add the support points supports
to the dependent infinite parameters prefs
. An ArgumentError
is thrown if prefs
is are not dependent infinite parameters.
InfiniteOpt.delete_supports
— Methoddelete_supports(prefs; [kwargs...])
Define delete_supports
for general variable references. It relies on delete_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.delete_supports
— Methoddelete_supports(prefs; [kwargs...])
Define delete_supports
for general variable references. It relies on delete_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.fill_in_supports!
— Methodfill_in_supports!(prefs; [kwargs...])
Define fill_in_supports!
for general variable references. It relies on fill_in_supports!
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.fill_in_supports!
— Methodfill_in_supports!(prefs; [kwargs...])
Define fill_in_supports!
for general variable references. It relies on fill_in_supports!
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.raw_parameter_refs
— Methodraw_parameter_refsc(vref::GeneralVariableRef)
Define raw_parameter_refs
for general variable references. It relies on raw_parameter_refs
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.parameter_refs
— Methodparameter_refsc(vref::GeneralVariableRef)
Define parameter_refs
for general variable references. It relies on parameter_refs
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.parameter_list
— Methodparameter_listc(vref::GeneralVariableRef)
Define parameter_list
for general variable references. It relies on parameter_list
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.raw_function
— Methodraw_function(prefs; [kwargs...])
Define raw_function
for general variable references. It relies on raw_function
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.infinite_variable_ref
— Methodinfinite_variable_refc(vref::GeneralVariableRef)
Define infinite_variable_ref
for general variable references. It relies on infinite_variable_ref
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.eval_supports
— Methodeval_supportsc(vref::GeneralVariableRef)
Define eval_supports
for general variable references. It relies on eval_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.raw_parameter_values
— Methodraw_parameter_valuesc(vref::GeneralVariableRef)
Define raw_parameter_values
for general variable references. It relies on raw_parameter_values
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.parameter_values
— Methodparameter_valuesc(vref::GeneralVariableRef)
Define parameter_values
for general variable references. It relies on parameter_values
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.significant_digits
— Methodsignificant_digits(prefs; [kwargs...])
Define significant_digits
for general variable references. It relies on significant_digits
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.measure_function
— Methodmeasure_function(mref::GeneralVariableRef)
Define measure_function
for general variable references. Errors if mref
does not correspond to a MeasureRef
. See the underlying docstrings for more information.
InfiniteOpt.measure_data
— Methodmeasure_data(mref::GeneralVariableRef)
Define measure_data
for general variable references. Errors if mref
does not correspond to a MeasureRef
. See the underlying docstrings for more information.
InfiniteOpt.is_analytic
— Methodis_analytic(mref::GeneralVariableRef)
Define is_analytic
for general variable references. Errors if mref
does not correspond to a MeasureRef
. See the underlying docstrings for more information.
InfiniteOpt.derivative_argument
— Methodderivative_argument(dref::GeneralVariableRef)
Define derivative_argument
for general variable references. Errors if dref
does not correspond to a DerivativeRef
. See the underlying docstrings for more information.
InfiniteOpt.operator_parameter
— Methodoperator_parameter(dref::GeneralVariableRef)
Define operator_parameter
for general variable references. Errors if dref
does not correspond to a DerivativeRef
. See the underlying docstrings for more information.
InfiniteOpt.derivative_order
— Methodderivative_order(dref::GeneralVariableRef)
Define derivative_order
for general variable references. Errors if dref
does not correspond to a DerivativeRef
. See the underlying docstrings for more information.
InfiniteOpt.derivative_method
— Methodderivative_method(prefs; [kwargs...])
Define derivative_method
for general variable references. It relies on derivative_method
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.evaluate
— Methodevaluate(dref::GeneralVariableRef)
Define evaluate
for general variable references. Errors if dref
does not correspond to a DerivativeRef
. See the underlying docstrings for more information.
InfiniteOpt.derivative_constraints
— Methodderivative_constraints(dref::GeneralVariableRef)
Define derivative_constraints
for general variable references. Errors if dref
does not correspond to a DerivativeRef
. See the underlying docstrings for more information.
InfiniteOpt.delete_derivative_constraints
— Methoddelete_derivative_constraints(dref::GeneralVariableRef)
Define delete_derivative_constraints
for general variable references. Errors if dref
does not correspond to a DerivativeRef
. See the underlying docstrings for more information.
InfiniteOpt.add_generative_supports
— Methodadd_generative_supports(prefs; [kwargs...])
Define add_generative_supports
for general variable references. It relies on add_generative_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.set_derivative_method
— Methodset_derivative_method(pref::GeneralVariableRef,
method::AbstractDerivativeMethod
)::Nothing
Specify the numerical derivative evaluation technique associated with pref
. An ArgumentError
is thrown if pref
is not an infinite parameter.
InfiniteOpt.has_generative_supports
— Methodhas_generative_supports(prefs; [kwargs...])
Define has_generative_supports
for general variable references. It relies on has_generative_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
InfiniteOpt.has_internal_supports
— Methodhas_internal_supports(prefs; [kwargs...])
Define has_internal_supports
for general variable references. It relies on has_internal_supports
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information. Note that this is a auto generated wrapper and the underlying method may or may not use kwargs
.
JuMP.delete
— MethodJuMP.delete(model::InfiniteModel, vref::GeneralVariableRef)::Nothing
Extend JuMP.delete
to delete vref
and its dependencies. It relies on JuMP.delete
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown.
JuMP.delete
— MethodJuMP.delete(model::InfiniteModel,
prefs::AbstractArray{<:GeneralVariableRef})::Nothing
Extend JuMP.delete
to delete a group of dependent infinite parameters and their dependencies. An ArgumentError
is thrown if prefs
are not dependent infinite parameters.
JuMP.has_lower_bound
— MethodJuMP.has_lower_bound(vref::GeneralVariableRef)
Define JuMP.has_lower_bound
for general variable references. It relies on JuMP.has_lower_bound
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.lower_bound
— MethodJuMP.lower_bound(vref::GeneralVariableRef)
Define JuMP.lower_bound
for general variable references. It relies on JuMP.lower_bound
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.set_lower_bound
— MethodJuMP.set_lower_bound(vref::GeneralVariableRef, value::Real)::Nothing
Define JuMP.set_lower_bound
for general variable references. It relies on JuMP.set_lower_bound
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.LowerBoundRef
— MethodJuMP.LowerBoundRef(vref::GeneralVariableRef)
Define JuMP.LowerBoundRef
for general variable references. It relies on JuMP.LowerBoundRef
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.delete_lower_bound
— MethodJuMP.delete_lower_bound(vref::GeneralVariableRef)
Define JuMP.delete_lower_bound
for general variable references. It relies on JuMP.delete_lower_bound
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.has_upper_bound
— MethodJuMP.has_upper_bound(vref::GeneralVariableRef)
Define JuMP.has_upper_bound
for general variable references. It relies on JuMP.has_upper_bound
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.upper_bound
— MethodJuMP.upper_bound(vref::GeneralVariableRef)
Define JuMP.upper_bound
for general variable references. It relies on JuMP.upper_bound
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.set_upper_bound
— MethodJuMP.set_upper_bound(vref::GeneralVariableRef, value::Real)::Nothing
Define JuMP.set_upper_bound
for general variable references. It relies on JuMP.set_upper_bound
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.UpperBoundRef
— MethodJuMP.UpperBoundRef(vref::GeneralVariableRef)
Define JuMP.UpperBoundRef
for general variable references. It relies on JuMP.UpperBoundRef
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.delete_upper_bound
— MethodJuMP.delete_upper_bound(vref::GeneralVariableRef)
Define JuMP.delete_upper_bound
for general variable references. It relies on JuMP.delete_upper_bound
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.is_fixed
— MethodJuMP.is_fixed(vref::GeneralVariableRef)
Define JuMP.is_fixed
for general variable references. It relies on JuMP.is_fixed
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.fix_value
— MethodJuMP.fix_value(vref::GeneralVariableRef)
Define JuMP.fix_value
for general variable references. It relies on JuMP.fix_value
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.fix
— MethodJuMP.fix(vref::GeneralVariableRef, value::Real; force::Bool = false)::Nothing
Define JuMP.fix
for general variable references. It relies on JuMP.fix
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.FixRef
— MethodJuMP.FixRef(vref::GeneralVariableRef)
Define JuMP.FixRef
for general variable references. It relies on JuMP.FixRef
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.unfix
— MethodJuMP.unfix(vref::GeneralVariableRef)
Define JuMP.unfix
for general variable references. It relies on JuMP.unfix
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.start_value
— MethodJuMP.start_value(vref::GeneralVariableRef)
Define JuMP.start_value
for general variable references. It relies on JuMP.start_value
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.set_start_value
— MethodJuMP.set_start_value(vref::GeneralVariableRef, value::Real)::Nothing
Define JuMP.set_start_value
for general variable references. It relies on JuMP.set_start_value
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.start_value_function
— Methodstart_value_functionc(vref::GeneralVariableRef)
Define start_value_function
for general variable references. It relies on start_value_function
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.set_start_value_function
— Methodset_start_value_function(vref::GeneralVariableRef, start::Union{Real, Function})::Nothing
Set the start value function of vref
. It relies on set_start_value_function
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown.
InfiniteOpt.reset_start_value_function
— Methodreset_start_value_functionc(vref::GeneralVariableRef)
Define reset_start_value_function
for general variable references. It relies on reset_start_value_function
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.is_binary
— MethodJuMP.is_binary(vref::GeneralVariableRef)
Define JuMP.is_binary
for general variable references. It relies on JuMP.is_binary
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.set_binary
— MethodJuMP.set_binary(vref::GeneralVariableRef)
Define JuMP.set_binary
for general variable references. It relies on JuMP.set_binary
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.BinaryRef
— MethodJuMP.BinaryRef(vref::GeneralVariableRef)
Define JuMP.BinaryRef
for general variable references. It relies on JuMP.BinaryRef
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.unset_binary
— MethodJuMP.unset_binary(vref::GeneralVariableRef)
Define JuMP.unset_binary
for general variable references. It relies on JuMP.unset_binary
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.is_integer
— MethodJuMP.is_integer(vref::GeneralVariableRef)
Define JuMP.is_integer
for general variable references. It relies on JuMP.is_integer
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.set_integer
— MethodJuMP.set_integer(vref::GeneralVariableRef)
Define JuMP.set_integer
for general variable references. It relies on JuMP.set_integer
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.IntegerRef
— MethodJuMP.IntegerRef(vref::GeneralVariableRef)
Define JuMP.IntegerRef
for general variable references. It relies on JuMP.IntegerRef
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
JuMP.unset_integer
— MethodJuMP.unset_integer(vref::GeneralVariableRef)
Define JuMP.unset_integer
for general variable references. It relies on JuMP.unset_integer
being defined for the underlying DispatchVariableRef
, otherwise an ArgumentError
is thrown. See the underlying docstrings for more information.
InfiniteOpt.constant_over_collocation
— Methodconstant_over_collocation(vref::GeneralVariableRef, pref::GeneralVariableRef)::Nothing
Define constant_over_collocation
for general variable references. It wraps around the method defined for InfiniteVariableRef
s.
InfiniteOpt.core_object
— Functioncore_object(vref::DispatchVariableRef)::Union{InfOptParameter, InfOptVariable, Measure}
Return the core object that vref
points to. This needs to be extended for type of vref
. This should use _data_object
to access the data object where the variable object is stored.
InfiniteOpt.core_object
— Methodcore_object(vref::GeneralVariableRef)::Union{InfOptParameter, InfOptVariable, Measure}
Return the core object that vref
points to. This is enabled with appropriate definitions of core_object
for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
InfiniteOpt.parameter_group_int_indices
— Methodparameter_group_int_indices(vref::GeneralVariableRef)::Vector{Int}
Return the list of infinite parameter group integer indices used by vref
.
InfiniteOpt.parameter_group_int_index
— Functionparameter_group_int_index(pref::DispatchVariableRef)::Int
Return the parameter group integer index for pref
assuming it is an infinite parameter. This needs to be defined for the type of pref
. This should use the _data_object
to get the number.
InfiniteOpt.parameter_group_int_index
— Methodparameter_group_int_index(pref::GeneralVariableRef)::Int
Return the group integer index for pref
assuming it is an infinite parameter. It relies on parameter_group_int_index
being properly defined for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
Developer Internal Methods
InfiniteOpt._add_data_object
— Function_add_data_object(model::InfiniteModel, object::AbstractDataObject)::ObjectIndex
Add object
to the appropriate CleverDict
in model
and return the its index. This needs to be defined for the type of object
. These definitions need to use MOIUC.add_item
to add the object to the CleverDict
.
InfiniteOpt._data_dictionary
— Function_data_dictionary(vref::DispatchVariableRef)::MOIUC.CleverDict
Return the CleverDict
that stores data objects for the type of vref
. This needs to be defined for the type of vref
.
InfiniteOpt._data_object
— Function_data_object(vref::DispatchVariableRef)::AbstractDataObject
Return the data object associated with vref
, in other words the object its index points to in the InfiniteModel
. This needs to be defined for the type of vref
. This should use _data_dictionary
to access the CleverDict
that the object is stored in.
InfiniteOpt._delete_data_object
— Function_delete_data_object(vref::DispatchVariableRef)::Nothing
Delete the concrete AbstractDataObject
associated with vref
.
InfiniteOpt._set_core_object
— Function_set_core_object(vref::DispatchVariableRef, object)::Nothing
Sets the core object that vref
points to object
. This needs to be extended for types of vref
and object
. This should use _data_object
to access the data object where the variable object is stored.
InfiniteOpt._infinite_variable_dependencies
— Function_infinite_variable_dependencies(vref::DispatchVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This needs to be extended for type of vref
. This should use _data_object
to access the data object where the name is stored if appropriate.
InfiniteOpt._infinite_variable_dependencies
— Method_infinite_variable_dependencies(vref::GeneralVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This is enabled with appropriate definitions of _infinite_variable_dependencies
for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
InfiniteOpt._semi_infinite_variable_dependencies
— Function_semi_infinite_variable_dependencies(vref::DispatchVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This needs to be extended for type of vref
. This should use _data_object
to access the data object where the name is stored if appropriate.
InfiniteOpt._semi_infinite_variable_dependencies
— Method_semi_infinite_variable_dependencies(vref::GeneralVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This is enabled with appropriate definitions of _semi_infinite_variable_dependencies
for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
InfiniteOpt._point_variable_dependencies
— Function_point_variable_dependencies(vref::DispatchVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This needs to be extended for type of vref
. This should use _data_object
to access the data object where the name is stored if appropriate.
InfiniteOpt._point_variable_dependencies
— Method_point_variable_dependencies(vref::GeneralVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This is enabled with appropriate definitions of _point_variable_dependencies
for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
InfiniteOpt._derivative_dependencies
— Function_derivative_dependencies(vref::DispatchVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This needs to be extended for type of vref
. This should use _data_object
to access the data object where the name is stored if appropriate.
InfiniteOpt._derivative_dependencies
— Method_derivative_dependencies(vref::GeneralVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This is enabled with appropriate definitions of _derivative_dependencies
for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
InfiniteOpt._measure_dependencies
— Function_measure_dependencies(vref::DispatchVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This needs to be extended for type of vref
. This should use _data_object
to access the data object where the name is stored if appropriate.
InfiniteOpt._measure_dependencies
— Method_measure_dependencies(vref::GeneralVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This is enabled with appropriate definitions of _measure_dependencies
for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
InfiniteOpt._generative_measures
— Function_generative_measures(vref::DispatchVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This needs to be extended for type of vref
. This should use _data_object
to access the data object where the name is stored if appropriate.
InfiniteOpt._generative_measures
— Method_generative_measures(vref::GeneralVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This is enabled with appropriate definitions of _generative_measures
for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
InfiniteOpt._constraint_dependencies
— Function_constraint_dependencies(vref::DispatchVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This needs to be extended for type of vref
. This should use _data_object
to access the data object where the name is stored if appropriate.
InfiniteOpt._constraint_dependencies
— Method_constraint_dependencies(vref::GeneralVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This is enabled with appropriate definitions of _constraint_dependencies
for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
InfiniteOpt._derivative_constraint_dependencies
— Function_derivative_constraint_dependencies(vref::DispatchVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This needs to be extended for type of vref
. This should use _data_object
to access the data object where the name is stored if appropriate.
InfiniteOpt._derivative_constraint_dependencies
— Method_derivative_constraint_dependencies(vref::GeneralVariableRef)::Vector{AbstractInfOptIndex}
Return the indices of these entities that depend on vref
. This is enabled with appropriate definitions of _derivative_constraint_dependencies
for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.
InfiniteOpt._parameter_number
— Function_parameter_number(pref::DispatchVariableRef)::Int
Return the parameter creation number for pref
assuming it is an infinite parameter. This needs to be defined for the type of pref
. This should use the _data_object
to get the number.
InfiniteOpt._parameter_number
— Method_parameter_number(pref::GeneralVariableRef)::Int
Return the parameter creation number for pref
assuming it is an infinite parameter. It relies on _parameter_number
being properly defined for the underlying DispatchVariableRef
, otherwise an MethodError
is thrown.