OptimizationSystem
System Constructors
ModelingToolkit.OptimizationSystem
— Typestruct OptimizationSystem <: ModelingToolkit.AbstractSystem
A scalar equation for optimization.
Fields
op
Vector of equations defining the system.
states
Unknown variables.
ps
Parameters.
observed
equality_constraints
inequality_constraints
name
Name: the name of the system
systems
systems: The internal systems
default_u0
default_u0: The default initial conditions to use when initial conditions are not supplied in
ODEProblem
.
default_p
default_p: The default parameters to use when parameters are not supplied in
ODEProblem
.
Examples
@variables x y z
@parameters σ ρ β
op = σ*(y-x) + x*(ρ-z)-y + x*y - β*z
os = OptimizationSystem(eqs, [x,y,z],[σ,ρ,β])
Composition and Accessor Functions
sys.eqs
orequations(sys)
: The equation to be minimized.sys.states
orstates(sys)
: The set of states for the optimization.sys.parameters
orparameters(sys)
: The parameters for the optimization.
Transformations
Applicable Calculation and Generation Functions
calculate_gradient
calculate_hessian
generate_gradient
generate_hessian
hessian_sparsity
Problem Constructors
SciMLBase.OptimizationProblem
— Typefunction DiffEqBase.OptimizationProblem{iip}(sys::OptimizationSystem,
parammap=DiffEqBase.NullParameters();
u0=nothing, lb=nothing, ub=nothing,
grad = false,
hess = false, sparse = false,
checkbounds = false,
linenumbers = true, parallel=SerialForm(),
kwargs...) where iip
Generates an OptimizationProblem from an OptimizationSystem and allows for automatically symbolically calculating numerical enhancements.