Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion docs/problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,30 @@ end
# -----------------------------------
# Page
# -----------------------------------
# A description without a qualitative behaviour gets one that points to the figures of the
# modeling tabs (#449, T2): the outline of every page stays the same.
function with_behaviour(description::AbstractString)
occursin(r"^### Qualitative behaviour"m, description) && return description
placeholder = """
### Qualitative behaviour

Not described yet: the solution is plotted in the tab of each modeling, under *Solution*.

"""
return replace(
description,
"\n### Characteristics" => "\n" * placeholder * "### Characteristics";
count=1,
)
end

function problem_page(problem::Symbol)
mods = modelings(problem)
refs = references(problem)
statuses = OCP.status(problem)
description = read(joinpath(ROOT, "ext", "Descriptions", "$(problem).md"), String)
description = with_behaviour(
read(joinpath(ROOT, "ext", "Descriptions", "$(problem).md"), String)
)

views = Any[(id="problem", label="Problem", kind="problem")]
for (spec, adapter) in mods
Expand Down
11 changes: 4 additions & 7 deletions ext/Descriptions/balanced_field.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ The state vector is $x(t) = (r(t), v(t), h(t), \gamma(t))$ and the control is th
```math
\begin{aligned}
\min_{\alpha, t_f} \quad & r(t_f) \\
\text{s.t.} \quad & \dot{r}(t) = v(t) \cos \gamma(t), \\
\text{s.t.} \quad & \dot{r}(t) = v(t) \cos \gamma(t), \\
& \dot{v}(t) = \frac{T \cos \alpha(t) - D}{m} - g \sin \gamma(t), \\
& \dot{h}(t) = v(t) \sin \gamma(t), \\
& \dot{\gamma}(t) = \frac{T \sin \alpha(t) + L}{m v(t)} - \frac{g \cos \gamma(t)}{v(t)}, \\
& h(t_f) = 10.668 ext{ m (35 ft)}, \\
& h(t_f) = 10.668 \text{ m (35 ft)}, \\
& \gamma(t_f) = 5^\circ.
\end{aligned}
```
Expand All @@ -33,11 +33,8 @@ The parameters are based on a mid-size jet aircraft (nominal values from Dymos):

### Characteristics

- Multi-state nonlinear dynamics,
- Free final time $t_f$,
- Ground effect inclusion in the drag model ($K$ coefficient),
- Control bounds on the angle of attack $\alpha$,
- Boundary conditions representing $V_1$ conditions and final climb requirements.
- Nonlinear dynamics, with a ground effect in the drag model ($K$ coefficient).
- Boundary conditions representing the $V_1$ conditions and the final climb requirements.

### References

Expand Down
5 changes: 2 additions & 3 deletions ext/Descriptions/bioreactor.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ The positivity constraint on biomass $b(t)$ is usually active at the beginning o

### Characteristics

- Nonlinear coupled dynamics with periodic forcing,
- Control and state constraints ensuring feasibility,
- Bang–bang and singular arc structures in the optimal control,
- Nonlinear coupled dynamics with periodic forcing.
- Bang–bang and singular arc structures in the optimal control.
- Serves as a benchmark for optimal control methods with periodic and constrained systems.

### References
Expand Down
1 change: 0 additions & 1 deletion ext/Descriptions/brachistochrone.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ The control $u(t)$ is continuous and varies smoothly to trace the cycloidal arc.
### Characteristics

- **Nonlinear dynamics** involving trigonometric functions of the control.
- **Free final time** problem (time-optimal).
- Analytical solution is a **Cycloid**.
- Historically significant as the first problem solved using techniques that evolved into the Calculus of Variations.

Expand Down
3 changes: 1 addition & 2 deletions ext/Descriptions/cart_pendulum.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ Underactuation makes the problem challenging because the pendulum cannot be actu

### Characteristics

- Nonlinear, underactuated dynamics.
- Minimum-time objective with state and control constraints.
- Nonlinear, underactuated dynamics.
- Serves as a benchmark for trajectory optimisation and control of underactuated systems.

### References
Expand Down
4 changes: 2 additions & 2 deletions ext/Descriptions/chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ The control typically balances horizontal movement to minimise the vertical disp

### Characteristics

- Nonlinear dynamics with three states and one control.
- Minimum vertical displacement objective with boundary constraints.
- Nonlinear dynamics.
- Minimum vertical displacement objective.
- Serves as a benchmark for trajectory optimisation and direct transcription methods in nonlinear optimal control.

### References
Expand Down
5 changes: 2 additions & 3 deletions ext/Descriptions/dielectrophoretic_particle.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ where $x_0$ and $x_f$ are the initial and final particle positions, $\alpha$ is

### Characteristics

- Nonlinear dynamics with **bilinear and quadratic terms** in the control.
- **Time-optimal objective** with control bounds.
- Free end-time formulation.
- Nonlinear dynamics with **bilinear and quadratic terms** in the control.
- **Time-optimal objective**.
- Widely used as a benchmark in numerical optimal control for **microfluidic particle manipulation**.

### References
Expand Down
7 changes: 3 additions & 4 deletions ext/Descriptions/double_oscillator.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ where $F(t) = \sin\left(\frac{2 \pi}{T} t\right)$ is a prescribed periodic forci

### Characteristics

- Coupled linear–nonlinear dynamics with external periodic forcing.
- Control input enters through a damping term, introducing nonlinearity in the system response.
- Bounded control with symmetric limits.
- Widely used to benchmark numerical methods for constrained optimal control in mechanical systems.
- Coupled linear–nonlinear dynamics with external periodic forcing.
- Control input enters through a damping term, introducing nonlinearity in the system response.
- Widely used to benchmark numerical methods for constrained optimal control in mechanical systems.
- Serves as a testbed for averaging methods and bang–bang control design.

### References
Expand Down
4 changes: 1 addition & 3 deletions ext/Descriptions/ducted_fan.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ The weight $\mu > 0$ balances control effort and transition time.

### Characteristics

- Nonlinear six-dimensional dynamics.
- Free final time.
- Multiple input and state inequality constraints.
- Nonlinear dynamics.
- Benchmark for testing constrained nonlinear OCP solvers.

### References
Expand Down
16 changes: 3 additions & 13 deletions ext/Descriptions/electric_vehicle.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ The objective is to **minimise a combination of mechanical energy consumption an

Here, we denote the final time as $t_f$, with $t_f = 1$ s.

---

### Mathematical formulation

```math
Expand All @@ -27,8 +25,6 @@ r(x) = \alpha_0 + \alpha_1 x + \alpha_2 x^2 + \alpha_3 x^3,

and the parameters $h_0$, $h_1$, $h_2$, $b_1$, $b_2$, and $\alpha_i$ define vehicle dynamics, drag, and slope effects.

---

### System parameters

| Parameter | Symbol | Value | Description |
Expand All @@ -42,25 +38,19 @@ and the parameters $h_0$, $h_1$, $h_2$, $b_1$, $b_2$, and $\alpha_i$ define vehi
| Road profile | $\alpha_0,\dots,\alpha_3$ | 3, 0.4, -1, 0.1 | Cubic coefficients modelling road slope |
| Final time | $t_f$ | 1 s | Duration of the trajectory |

---

### Qualitative behaviour

- The optimal solution balances **traction and braking** to respect the velocity boundary conditions while minimising energy consumption.
- Road slope variations $r(x)$ introduce nonlinearities, strongly influencing the structure of the optimal control.
- For flat roads, the solution often exhibits a **bang–singular–bang profile**, while slopes lead to asymmetric trajectories.

---

### Characteristics

- Nonlinear second-order dynamics including drag, gravity, and slope effects.
- Mixed linear–quadratic cost reflecting energy and smoothness trade-offs.
- Fixed-time ($t_f = 1$ s), fixed-distance trip with zero final velocity.
- Nonlinear second-order dynamics including drag, gravity, and slope effects.
- Mixed linear–quadratic cost reflecting energy and smoothness trade-offs.
- Fixed-distance trip with zero final velocity.
- Benchmark for testing energy-optimal trajectory generation and direct transcription methods in electric vehicles.

---

### References

- **Petit, N., & Sciarretta, A. (2011).** *Optimal drive of electric vehicles using an inversion-based trajectory generation approach*. IFAC Proceedings Volumes, 44(1), 14519–14526.
Expand Down
12 changes: 1 addition & 11 deletions ext/Descriptions/glider.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ U_\text{updraft}(x) = u_c\, (1 - r) e^{-r}, \quad r = \left( \frac{x}{r_0} - 2.5

where $m, g, S, \rho, c_0, c_1, u_c, r_0$ are constants describing the glider and the thermal properties.

---

### System parameters

| Parameter | Symbol | Value | Description |
Expand All @@ -52,26 +50,18 @@ where $m, g, S, \rho, c_0, c_1, u_c, r_0$ are constants describing the glider an
| Lift coefficient bounds | $c_L$ | [0, 1.4] | Control input |
| Final time | $t_f$ | free | s |

---

### Qualitative behaviour

- The optimal trajectory exploits the thermal updraft to maximise horizontal distance.
- The lift coefficient $c_L$ balances altitude loss and horizontal progression.
- The dynamics are nonlinear due to the coupling of lift, drag, and relative velocity in the thermal.
- Horizontal velocity is maintained positive, and the trajectory respects the control and state constraints.

---

### Characteristics

- Nonlinear four-dimensional dynamics with one control input.
- Free final time.
- Mixed state and control constraints.
- Nonlinear dynamics.
- Widely used as a benchmark for trajectory optimisation and direct transcription methods in nonlinear optimal control.

---

### References

- **Dolan, E. D., & More, J. J. (2004).** *Benchmarking Optimization Software with COPS 3.0*. Argonne National Laboratory.
Expand Down
23 changes: 2 additions & 21 deletions ext/Descriptions/insurance.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ It consists of controlling insurance coverage, expenses, revenue, health, and ut
The system dynamics model the evolution of insurance participation, expenses, and auxiliary variables, while respecting bounds on all state and control variables.
The controls represent health investments, insurance revenue, health outcomes, and utility contributions.

---

### Mathematical formulation

The **objective** is to maximise expected utility:
Expand All @@ -16,8 +14,6 @@ The **objective** is to maximise expected utility:

where $f_x(t)$ is the probability density of illness events.

---

#### State, control, and auxiliary bounds

The variables are subject to:
Expand All @@ -30,17 +26,13 @@ The variables are subject to:
\end{aligned}
```

---

#### Initial and terminal conditions

```math
(I, m, x_3)|_{t=0} = (0, 0.001, 0), \quad
P - x_3(t_f) = 0
```

---

#### Dynamics

```math
Expand All @@ -64,8 +56,6 @@ v = \frac{m(t)^{\alpha/2}}{1 + m(t)^{\alpha/2}}, \quad
v' = \frac{\alpha}{2} \frac{m(t)^{\alpha/2 - 1}}{(1 + m(t)^{\alpha/2})^2}.
```

---

#### Algebraic / auxiliary constraints

```math
Expand All @@ -81,8 +71,6 @@ f_x(t) &= \lambda e^{-\lambda t} + \frac{e^{-\lambda t_f}}{t_f}, \\

These constraints encode **revenue balance**, **health evolution**, **utility computation**, and **auxiliary relationships**.

---

### System parameters

| Parameter | Symbol | Value | Description |
Expand All @@ -97,26 +85,19 @@ These constraints encode **revenue balance**, **health evolution**, **utility co
| Shock | $\sigma$ | 0 | Auxiliary multiplier |
| Final time | $t_f$ | 10 | s |

---

### Qualitative behaviour

- The optimal strategy balances **insurance coverage**, **health investment**, and **expenses** to maximise utility under constraints.
- Revenue and health constraints link controls and states nonlinearly.
- The dynamics incorporate moral hazard effects and diminishing returns on expenses.
- Auxiliary variables track utility and revenue derivatives, ensuring consistent constraints.

---

### Characteristics

- Nonlinear three-dimensional state dynamics with five control variables and one auxiliary.
- Fixed final time with state and control bounds.
- Models health insurance optimisation under ex post moral hazard and risk-sensitive utility.
- Nonlinear dynamics, with an auxiliary control.
- Models health insurance optimisation under ex post moral hazard and risk-sensitive utility.
- Serves as a benchmark for testing constrained nonlinear OCP solvers.

---

### References

- **Martinon, P., Picard, P., & Raj, A. (2018).** *On the design of optimal health insurance contracts under ex post moral hazard*.
Expand Down
15 changes: 2 additions & 13 deletions ext/Descriptions/jackson.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ It consists of controlling a three-dimensional system in which the first two sta
The objective is to **minimise the third state at the final time**, while satisfying bounds on states and control, as well as initial and terminal conditions.
The problem exhibits **singular arcs**, making it a useful benchmark for testing direct transcription and nonlinear programming methods.

---

### Mathematical formulation

The problem can be stated as
Expand All @@ -24,8 +22,6 @@ The problem can be stated as

where $x_1, x_2, x_3$ are the state variables, $u$ is the control input, and $k_1, k_2, k_3$ are system parameters.

---

### System parameters

| Parameter | Symbol | Value | Description |
Expand All @@ -37,26 +33,19 @@ where $x_1, x_2, x_3$ are the state variables, $u$ is the control input, and $k_
| Control bounds | $u$ | [0,1] | Single control input |
| State bounds | $x$ | $[0,1.1]^3$ | Box constraints for $x_1, x_2, x_3$ |

---

### Qualitative behaviour

- The first two states interact linearly under the effect of the control, while the third state accumulates according to $1-u(t)$.
- The problem exhibits **singular arcs**, where the optimal control is neither at its lower nor upper bound but satisfies Hamiltonian conditions.
- Optimal trajectories typically include **bang–bang segments** interleaved with singular arcs.
- State and control constraints are respected at all times, and the final cost depends only on $x_3(t_f)$.

---

### Characteristics

- Linear–nonlinear three-dimensional dynamics with **one control input**.
- State and control bounds.
- Terminal cost depends on a single state.
- Linear–nonlinear dynamics.
- Terminal cost depends on a single state.
- Serves as a benchmark for testing solvers handling singular arcs and constrained optimal control.

---

### References

- **Jackson, E. A. (1968).** *The existence of singular extremals*. Journal of Optimization Theory and Applications.
Expand Down
5 changes: 2 additions & 3 deletions ext/Descriptions/moonlander.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ Orientation dynamics $\theta(t)$ and $d\theta(t)$ play a critical role in direct

### Characteristics

- Nonlinear coupled dynamics with orientation-dependent thrust,
- Control constraints and bounded final time ensuring feasibility,
- Terminal position and velocity constraints for a soft landing,
- Nonlinear coupled dynamics with orientation-dependent thrust.
- Terminal position and velocity constraints for a soft landing.
- Benchmark problem for testing direct transcription and NLP solvers.

### References
Expand Down
8 changes: 2 additions & 6 deletions ext/Descriptions/mountain_car.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The problem can be stated as
```math
\begin{aligned}
\min_{x,v,u,t_f} \quad & J = t_f \\
\text{s.t.} \quad & \dot{x}(t) = v(t), \\
\text{s.t.} \quad & \dot{x}(t) = v(t), \\
& \dot{v}(t) = a \, u(t) - b \, \cos(c \, x(t)), \\
& x(0) = -0.5, \quad v(0) = 0.0, \\
& x(t_f) = 0.5, \quad v(t_f) \ge 0.0, \\
Expand Down Expand Up @@ -39,11 +39,7 @@ The problem can be stated as

### Characteristics

- Two-dimensional state space (position and velocity),
- Scalar control (effort/acceleration),
- **Free final time** with minimum time objective,
- State constraints (position and velocity bounds),
- Control constraints (bounds on acceleration).
- Serves as a benchmark for minimum-time problems whose solution first moves away from the goal.

### References

Expand Down
6 changes: 5 additions & 1 deletion ext/Descriptions/robbins.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
The **Robbins benchmark problem** is a classical optimal control problem introduced by Robbins (1980), involving a **third-order state constraint**:
The **Robbins benchmark problem** is a classical optimal control problem introduced by Robbins (1980), involving a **third-order state constraint**.

### Mathematical formulation

The state $x_1$ is driven through its third derivative and must stay nonnegative:

```math
x_1^{(3)}(t) = u(t), \qquad x_1(t) \ge 0,
Expand Down
Loading
Loading