OptimizationSystem

System Constructors

ModelingToolkit.OptimizationSystemType
struct OptimizationSystem <: AbstractTimeIndependentSystem

A scalar equation for optimization.

Fields

  • op

    Vector of equations defining the system.

  • states

    Unknown variables.

  • ps

    Parameters.

  • var_to_name

    Array variables.

  • observed

  • equality_constraints

  • inequality_constraints

  • name

    Name: the name of the system. These are required to have unique names.

  • systems

    systems: The internal systems

  • defaults

    defaults: The default values to use when initial conditions and/or parameters are not supplied in ODEProblem.

Examples

@variables x y z
@parameters σ ρ β

op = σ*(y-x) + x*(ρ-z)-y + x*y - β*z
@named os = OptimizationSystem(op, [x,y,z],[σ,ρ,β])
source

Composition and Accessor Functions

  • get_eqs(sys) or equations(sys): The equation to be minimized.
  • get_states(sys) or states(sys): The set of states for the optimization.
  • get_ps(sys) or parameters(sys): The parameters for the optimization.

Transformations

Analyses

Applicable Calculation and Generation Functions

calculate_gradient
calculate_hessian
generate_gradient
generate_hessian
hessian_sparsity

Problem Constructors

SciMLBase.OptimizationProblemType
function 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.

source