Expressions

Linear

DynOptInterface.LinearDynamicTermType
LinearDynamicTerm{T}(coefficient::T, dyn_var::DynamicVariableIndex) where {T}

Represent the term $c_j \boldsymbol{y}_j(\cdot)$, where $c_j$ is a coefficient of type T.

source

Pure Quadratic

DynOptInterface.PureQuadraticDynamicTermType
PureQuadraticDynamicTerm{T}(
    coefficient::T
    dyn_var_1::DynamicVariableIndex
    dyn_var_2::DynamicVariableIndex
) where {T}

Represent the term $c_{jk} \boldsymbol{y}_j(\cdot) \boldsymbol{y}_k(\cdot)$, where $c_{jk}$ is a coefficient of type T.

source

Nonlinear

DynOptInterface.NonlinearDynamicFunctionType
NonlinearDynamicFunction(head::Symbol, args::Vector{Any}, phase::PhaseIndex)

Represent a general dynamic function $d(\dot{\boldsymbol{y}}(t^{(i)}), \boldsymbol{y}(t^{(i)}), t^{(i)}, x)$.

It is a subtype of AbstractDynamicFunction. All dynamic variables must be defined on the same phase, otherwise a NonUniquePhaseError error is thrown.

Similar to MOI.ScalarNonlinearFunction, this function is represented by an expression tree, using the following fields:

head

The symbol head must be an operator that is supported by the model. The model attribute MOI.ListOfSupportedNonlinearOperators provides a list of supported operators. If the optimizer does not support head, an MOI.UnsupportedNonlinearOperator error is thrown.

args

The vector args contains the arguments to the nonlinear operator. The arguments must be subtypes of:

Additionally, the optimizer must indicate support of argument types through the supports_objective_argument and supports_constraint_argument functions. Otherwise UnsupportedObjectiveArgument and UnsupportedConstraintArgument errors are thrown.

source