Simple integrator: constraint minimisation mixed constraint
The constraint-min simple integrator problem consists in minimising
\[ -\int_{0}^{1} u(t) \, \mathrm{d}t\]
subject to the constraints
\[ \dot x(t) = u(t), u(t) \in [0,\infty], \\ x(t) + u(t) \in [-\infty,0]\]
and the limit conditions
\[ x(0) = -1, \quad x(1) = xf.\]
You can access the problem in the CTProblems package:
using CTProblems
prob = Problem(:integrator, :x_dim_1, :u_dim_1, :lagrange, :mixed_constraint)
title = simple integrator - mixed constraint
model (Type) = OptimalControlModel{Autonomous, Fixed}
solution (Type) = OptimalControlSolution
Then, the model is given by
prob.model
The (autonomous) optimal control problem is given by:
t ∈ [t0, tf], time
x ∈ R, state
u ∈ R, control
x(t0) == x0, initial_con
0 ≤ u(t) ≤ +Inf, u_con
-Inf ≤ x(t) + u(t) ≤ 0, mixed_con
ẋ(t) == u(t)
∫(-(u(t))) → min
The (autonomous) optimal control problem is of the form:
minimize J(x, u) = ∫ f⁰(x(t), u(t)) dt, over [0, 1]
subject to
ẋ(t) = f(x(t), u(t)), t in [0, 1] a.e.,
ηl ≤ η(x(t)) ≤ ηu,
ψl ≤ ψ(x(t), u(t)) ≤ ψu,
ϕl ≤ ϕ(x(0), x(1)) ≤ ϕu,
where x(t) ∈ R and u(t) ∈ R.
Declarations (* required):
╭────────┬────────┬──────────┬──────────┬───────────┬────────────┬─────────────╮
│ times* │ state* │ control* │ variable │ dynamics* │ objective* │ constraints │
├────────┼────────┼──────────┼──────────┼───────────┼────────────┼─────────────┤
│ V │ V │ V │ X │ V │ V │ V │
╰────────┴────────┴──────────┴──────────┴───────────┴────────────┴─────────────╯
You can plot the solution.
using Plots
plot(prob.solution)