You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@variables x y
@parameters a b
loss = (a - x)^2+ b * (y - x^2)^2
cons = [
x^2+ y^2~0,
y *sin(x) - x ~0
]
sys =OptimizationSystem(loss, [x, y], [a, b], name =:sys, constraints = cons)
prob =OptimizationProblem(sys, [x =>0.0, y =>0.0], [a =>1.0, b =>100.0],
lcons = [-1.0, -1.0], ucons = [500.0, 500.0])
Proper handling of variable bounds, see Adds support for inequalities #1799
Again this is decoupled from the system modelling and is specified during construction of the OptimizationProblem. However, MTK has already a way of specifiying box constraints on variables via e.g., @variables x [bounds=(-1.0, 1.0)].
OptimizationProblem
#1660, see Adds support for inequalities #1799 and adds Inequality JuliaSymbolics/Symbolics.jl#717The definition of inequality constraints is decoupled from the definition of the actual bounds. Also one has to specify an equality constraint first even if it ends up as inequality. As much as possible should be specified during the modelling phase.
Again this is decoupled from the system modelling and is specified during construction of the
OptimizationProblem
. However, MTK has already a way of specifiying box constraints on variables via e.g.,@variables x [bounds=(-1.0, 1.0)]
.@variables x [binary=true]
. see Adds binary and integer options to variable metadata #1798 and Addint
field toOptimizationProblem
SciMLBase.jl#270MathOptInterface.AbstractOptimizer
that do not supportMathOptInterface.NLPBlock
. If a problem is linear or quadratic why use an NLP solver? However, I see this more of an issue forOptimizationMOI.jl
. This is important for MPCs which are typically QPs. Support for MathOptInterface.AbstractOptimizer that do not support MathOptInterface.NLPBlock Optimization.jl#369ODEProblem
one can dosol[x]
.The text was updated successfully, but these errors were encountered: