@@ -4,60 +4,90 @@ CurrentModule = DynOptInterface
44
55# Dynamic Optimization
66
7- ## Phases and Dynamic Variables
7+ This section describes the formulation of a generic multi-phase dynamic optimization problem (DOP).
8+ This formulation extends MathOptInterface's [ Function-in-Set formulation] (@extref Standard-form-problem) for * finite-dimensional* optimization problems.
89
9- Phases represent intervals $t \in [ t_0, t_f ] $ on which dynamic variables $t \mapsto \boldsymbol y(t)$ are defined.
10+ ## Finite-Dimensional Optimization
1011
11- ![ dynamic variable] ( assets/dynamic_variable.png )
12+ A finite-dimensional optimization problem is defined as finding the variables `` x `` that
13+ ``` math
14+ \begin{equation*}
15+ \begin{aligned}
16+ \text{minimize} \quad &f_o(x),\\
17+ \text{subject to} \quad &f_c(x) \in \mathcal{S},
18+ \end{aligned}
19+ \end{equation*}
20+ ```
21+ where `` f_o `` is the objective function, `` f_c `` is the constraints function, and `` \mathcal{S} `` is the constraints set.
22+
23+ ## Phases
24+
25+ A * phase* is an interval (e.g., a time segment) whose boundaries can be optimization variables.
26+ The `` i `` -th phase of a DOP is the interval between `` t_0^{(i)} `` and `` t_f^{(i)} `` .
27+ Moreover, `` t^{(i)} `` is a parameter that takes values in the `` i `` -th phase.
28+
29+ | Symbol | Description | Element Type |
30+ | :-:| :--| :--|
31+ | `` t_0 `` | Vector of initial boundaries of phases | [ ` Initial ` ] ( @ref ) ` { ` [ ` PhaseIndex ` ] ( @ref ) ` } ` |
32+ | `` t_f `` | Vector of final boundaries of phases | [ ` Final ` ] ( @ref ) ` { ` [ ` PhaseIndex ` ] ( @ref ) ` } ` |
33+
34+ ## Dynamic Variables
35+
36+ A * dynamic variable* is an optimizable function defined on a phase.
37+ The `` j `` -th dynamic variable of a DOP, defined on the `` i `` -th phase, is denoted as
38+ ``` math
39+ \begin{equation*}
40+ t^{(i)} \mapsto \boldsymbol y_j(t^{(i)}).
41+ \end{equation*}
42+ ```
43+ The first derivative of `` \boldsymbol y_j `` is denoted as `` \dot{\boldsymbol y}_j `` .
44+
45+ | Symbol | Description | Element Type |
46+ | :-:| :--| :--|
47+ | `` \boldsymbol y `` | Vector of dynamic variables | [ ` DynamicVariableIndex ` ] ( @ref ) |
48+ | `` \dot{\boldsymbol y} `` | Vector of derivatives of dynamic variables | [ ` Derivative ` ] ( @ref ) ` { ` [ ` DynamicVariableIndex ` ] ( @ref ) ` } ` |
49+
50+ ## Objective
1251
13- ## Problem Formulation
52+ The objective function is augmented to include a boundary term and an integrated dynamic term.
1453
15- MOI's [ Function-in-Set form problem] (@extref Standard-form-problem) is extended as follows.
16- Dynamic Optimization Problems deal with finding variables $x \in \mathbb R^{n_x}$, phase boundaries $t_0^{(i)} \in \mathbb R$, $t_f^{(i)} \in \mathbb R$, and dynamic variables $\boldsymbol y^{(i)} : [ t_0^{(i)}, t_f^{(i)}] \rightarrow \mathbb R^{n_y^{(i)}}$ that
54+ | Symbol | Description | Type |
55+ | :-:| :--| :--|
56+ | `` f_o `` | Finite-dimensional objective function | ` <: ` [ ` MOI.AbstractScalarFunction ` ] (@extref MathOptInterface.AbstractScalarFunction) |
57+ | `` b_o `` | Boundary objective function | ` <: ` [ ` AbstractBoundaryFunction ` ] ( @ref ) |
58+ | `` d_o^{(i)} `` | The `` i `` -th phase dynamic objective function | ` <: ` [ ` AbstractDynamicFunction ` ] ( @ref ) |
1759
60+ ## Constraints
61+
62+ The constraints are extended to include * boundary constraints* and * dynamic constraints* .
63+
64+ | Symbol | Description | Element Type |
65+ | :-:| :--| :--|
66+ | `` f_c `` | Finite-dimensional constraint functiosn | ` <: ` [ ` MOI.AbstractScalarFunction ` ] (@extref MathOptInterface.AbstractScalarFunction) |
67+ | `` \mathcal{S} `` | Finite-dimensional constraint sets | ` < ` [ ` MOI.AbstractScalarSet ` ] (@extref MathOptInterface.AbstractScalarSet) |
68+ | `` b_c `` | Boundary constraint functions | ` <: ` [ ` AbstractBoundaryFunction ` ] ( @ref ) |
69+ | `` \mathcal{B} `` | Boundary constraint sets| ` < ` [ ` MOI.AbstractScalarSet ` ] (@extref MathOptInterface.AbstractScalarSet) |
70+ | `` d_c^{(i)} `` | The `` i `` -th phase dynamic constraint functions | ` <: ` [ ` AbstractDynamicFunction ` ] ( @ref ) |
71+ | `` \mathcal{D}^{(i)} `` | The `` i `` -th phase dynamic constraint sets | ` < ` [ ` MOI.AbstractScalarSet ` ] (@extref MathOptInterface.AbstractScalarSet) |
72+
73+ ## DOP Formulation
74+
75+ The dynamic optimization problem is defined as finding the variables `` x `` , the phase boundaries `` t_0 `` , `` t_f `` , and the dynamic variables `` \boldsymbol y `` that
1876``` math
1977\begin{align*}
2078\begin{array}{rl}
2179 \text{minimize} \quad &
22- m \big( \boldsymbol y(t_0), \boldsymbol y(t_f), t_0, t_f, x \big) +
80+ f_o(x) + b_o \big( \boldsymbol y(t_0), \boldsymbol y(t_f), t_0, t_f, x \big) +
2381 \displaystyle{\sum_{i=1}^{n_p} \bigg[
24- \int_{t_0^{(i)}}^{t_f^{(i)}} \ell ^{(i)} \big( \boldsymbol y^{(i)}(t), t, x \big) \textrm{d}t \bigg],}\\
82+ \int_{t_0^{(i)}}^{t_f^{(i)}} d_o ^{(i)} \big( \boldsymbol y^{(i)}(t), t, x \big) \textrm{d}t \bigg],}\\
2583 %
2684 \text{subject to} \quad &
2785 \begin{aligned}
28- f(x) & \in \mathcal S,\\
29- %
30- d^{(i)}\big(\dot{\boldsymbol y}^{(i)}(t), \boldsymbol y^{(i)}(t), t, x) & \in \mathcal D^{(i)},
31- \quad \forall t \in [t_0^{(i)}, t_f^{(i)}],
32- \quad \forall i \in \{1, 2, ..., n_p\},\\
33- b(\boldsymbol y(t_0), \boldsymbol y(t_f), t_0, t_f, x) &\in \mathcal B,
86+ f_c(x) & \in \mathcal S,\\
87+ b_c(\boldsymbol y(t_0), \boldsymbol y(t_f), t_0, t_f, x) &\in \mathcal B,\\
88+ d^{(i)}\big(\dot{\boldsymbol y}^{(i)}(t^{(i)}), \boldsymbol y^{(i)}(t^{(i)}), t^{(i)}, x) & \in \mathcal D^{(i)},
89+ \quad \forall t^{(i)} \in [t_0^{(i)}, t_f^{(i)}], \quad \forall i \in \{1, 2, ..., n_p\}.
3490 \end{aligned}
3591\end{array}
3692\end{align*}
37- ```
38-
39- where:
40- * `` f `` are [ ` MOI.AbstractScalarFunction ` ] (@extref MathOptInterface.AbstractScalarFunction)s
41- * `` \ell `` and `` d `` are [ ` AbstractDynamicFunction ` ] ( @ref ) s
42- * `` m `` and `` b `` are [ ` AbstractBoundaryFunction ` ] ( @ref ) s
43-
44-
45- ## Dynamic Functions
46-
47- * [ ` PhaseIndex ` ] ( @ref )
48- * [ ` DynamicVariableIndex ` ] ( @ref )
49- * [ ` LinearDynamicFunction ` ] ( @ref )
50- * [ ` PureQuadraticDynamicFunction ` ] ( @ref )
51- * [ ` NonlinearDynamicFunction ` ] ( @ref )
52- * [ ` Derivative ` ] ( @ref )
53- * [ ` ExplicitDifferentialFunction ` ] ( @ref )
54-
55- ## Boundary Functions
56-
57- * [ ` Initial ` ] ( @ref )
58- * [ ` Final ` ] ( @ref )
59- * [ ` Linkage ` ] ( @ref )
60- * [ ` NonlinearBoundaryFunction ` ] ( @ref )
61- * [ ` Integral ` ] ( @ref )
62- * [ ` MultiPhaseIntegral ` ] ( @ref )
63- * [ ` Bolza ` ] ( @ref )
93+ ```
0 commit comments