Expressions
Linear
DynOptInterface.LinearDynamicTerm — TypeLinearDynamicTerm{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.
DynOptInterface.LinearDynamicFunction — TypeLinearDynamicFunction{T}(terms::Vector{LinearDynamicTerm{T}}) where {T}Represent the expression $c^\top \boldsymbol{y}(\cdot)$, that is, a sum of LinearDynamicTerms.
It is a subtype of AbstractDynamicFunction. All dynamic variables must be defined on the same phase, otherwise a NonUniquePhaseError error is thrown.
Pure Quadratic
DynOptInterface.PureQuadraticDynamicTerm — TypePureQuadraticDynamicTerm{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.
DynOptInterface.PureQuadraticDynamicFunction — TypePureQuadraticDynamicFunction{T}(terms::Vector{PureQuadraticDynamicTerm{T}}) where {T}Represent the expression $\boldsymbol{y}(\cdot)^\top C \boldsymbol{y}(\cdot)$, that is, a sum of PureQuadraticDynamicTerms.
It is a subtype of AbstractDynamicFunction. All dynamic variables must be defined on the same phase, otherwise a NonUniquePhaseError error is thrown.
Nonlinear
DynOptInterface.NonlinearDynamicFunction — TypeNonlinearDynamicFunction(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:
RealMOI.AbstractScalarFunctionAbstractDynamicFunction, including otherNonlinearDynamicFunctions
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.