The JuDO ecosystem consists of two main packages arranged in a layered architecture.
JuDO has a layered architecture:
The user-facing modelling layer.
JuDO.jl extends JuMP with features for dynamic optimization. Problems are formulated in a solver-agnostic syntax and translated automatically into the DynOptInterface (DOI) standard representation.
Key modelling features:
| Macro / Function | Purpose |
|---|---|
DynModel(optimizer) | Create a dynamic optimization model |
@phase(model, t) | Declare the independent variable (time) |
@variable(model, bounds, DefinedOn(t)) | Declare a trajectory variable |
initial(x), final(x) | Access trajectory endpoints in constraints |
derivative(x) | Declare the time derivative |
@objective(model, sense, integral(expr)) | Lagrange (running) objective |
@objective(model, sense, final(expr)) | Mayer (terminal) objective |
JuDO.warmstart!(model, interpolant, x) | Provide an initial guess trajectory |
JuDO.optimize!(model) | Solve the problem |
dyn_value(model, x) | Extract solution as a callable t -> value |
The mathematical abstraction layer (DOI).
DynOptInterface.jl (DOI) is to dynamic optimization what MathOptInterface (MOI) is to static mathematical programming. It defines a standard intermediate representation for Dynamic optimization Problems (DOPs) that solvers can attach to.
The general problem form DOI represents:
subject to finite-dimensional constraints , boundary constraints , and dynamic/path constraints on each phase .
Key abstractions:
| Type | Purpose |
|---|---|
Phase | A time interval with variable boundaries |
DynamicVariable | An optimizable trajectory |
Derivative | Time derivative |
Initial, Final | Boundary-value operators |
Integral, MultiPhaseIntegral | Lagrange cost terms |
Bolza | Combined Mayer + Lagrange objective |
Current version: v0.3.0
The dynamic optimization solver.
Interesso.jl is a solver we develop that could attach to the DynOptInterface. It transcribes continuous-time DOPs into large-scale Nonlinear Programs (NLPs) using an Integrated Residuals Method (IRM) and dispatches them to Ipopt.
Apart from Interesso, we have also interfaced CTDirect.jl in OptimalControl toolbox under DOI, which demonstrates the capability of attaching existing solvers under DOI.
Features:
Multi-phase dynamic optimization
Explicit and implicit ODE dynamics
Free final time
NLP warm-starting via JuDO.warmstart!
Post-solve trajectory interpolants (callable solution functions)
Plots.jl extension for solution visualisation
Example problems included:
| Example | Description |
|---|---|
| Cart-pole swing-up | Classic pendulum-on-cart control |
| Space shuttle reentry | 6-state aerospace trajectory (benchmark: 34.14° crossrange) |
| Van der Pol oscillator | Nonlinear oscillator |
| Double integrator | LQR-type minimum-effort control |
| Bang-bang control | Switching control |
| Orbit raising | Orbital mechanics |
| Fuller's problem | Singular arc |
| Hyper-sensitive | Stiff boundary layer |
| Two-link robot arm | Robotics trajectory |
| Linear bicycle model | Vehicle dynamics |
Julia 1.12 or later is required.