Reference
ParametricOptInterface.ConstraintsInterpretation
— TypeConstraintsInterpretation <: MOI.AbstractOptimizerAttribute
Attribute to define how POI.Optimizer
should interpret constraints.
POI.ONLY_CONSTRAINTS
: Only interpretScalarAffineFunction
constraints as linear constraints If an expression such asx >= p1 + p2
appears it will be trated like a new constraint. This is the default behaviour ofPOI.Optimizer
POI.ONLY_BOUNDS
: Only interpretScalarAffineFunction
constraints as a variable bound. This is valid for constraints such asx >= p
orx >= p1 + p2
. If a constraintx1 + x2 >= p
appears, which is not a valid variable bound it will throw an error.POI.BOUNDS_AND_CONSTRAINTS
: InterpretScalarAffineFunction
constraints as a variable bound if they are a valid variable bound, i.e.,x >= p
orx >= p1 + p2
and interpret them as linear constraints otherwise.
Example
MOI.set(model, POI.InterpretConstraintsAsBounds(), POI.ONLY_BOUNDS)
MOI.set(model, POI.InterpretConstraintsAsBounds(), POI.ONLY_CONSTRAINTS)
MOI.set(model, POI.InterpretConstraintsAsBounds(), POI.BOUNDS_AND_CONSTRAINTS)
ParametricOptInterface.Optimizer
— TypeOptimizer{T, OT <: MOI.ModelLike} <: MOI.AbstractOptimizer
Declares a Optimizer
, which allows the handling of parameters in a optimization model.
Keyword arguments
evaluate_duals::Bool
: Iftrue
, evaluates the dual of parameters. Users might want to set it tofalse
to increase performance when the duals of parameters are not necessary. Defaults totrue
.save_original_objective_and_constraints
: Iftrue
saves the orginal function and set of the constraints as well as the original objective function insidePOI.Optimizer
. This is useful for printing the model but greatly increases the memory footprint. Users might want to set it tofalse
to increase performance in applications where you don't need to query the original expressions provided to the model in constraints or in the objective. Note that this might break printing or queries such asMOI.get(model, MOI.ConstraintFunction(), c)
. Defaults totrue
.
Example
julia> ParametricOptInterface.Optimizer(GLPK.Optimizer())
ParametricOptInterface.Optimizer{Float64,GLPK.Optimizer}
ParametricOptInterface.ParameterDual
— TypeParameterDual <: MOI.AbstractVariableAttribute
Attribute defined to get the dual values associated to parameters
Example
MOI.get(model, POI.ParameterValue(), p)
ParametricOptInterface.ParameterValue
— TypeParameterValue <: MOI.AbstractVariableAttribute
Attribute defined to set and get parameter values
Example
MOI.set(model, POI.ParameterValue(), p, 2.0)
MOI.get(model, POI.ParameterValue(), p)