Sebastian Micluța-Câmpeanu — JuliaHub · University of Bucharest
Rajeev Voleti — JuliaHub
JuliaCon 2026 · Aug 12 · Alte Mensa, Atrium Maximum
Tκ(s) is an
interpolation object stored as a parametermtkcompile(sys; inputs, outputs) —
controls stay symbolic inputs, constrained quantities
stay addressable outputsAfter compilation
| states | 9 |
| control inputs (thrust, steering) | 2 |
| bounded outputs (tires ×4, power) | 5 |
| collocation nodes | 51 |
Costs and constraints are symbolic too:
costs = [-EvalAt(te)(…)], point constraints via
EvalAt, path bounds from variable metadata.
tf ⇒ normalize to τ ∈ [0, 1], dynamics become
∂U/∂τ = tf · f(U, V)tf multiplies every defect constraint, so one
free variable scales the whole NLPchange_independent_variable(sys, s),
the s-parametrization used in everything that followst(L)BVProblem uses MTK's
own codegen and hands the collocation to BoundaryValueDiffEq's MIRK/FIRK
solvers.| Transcription | Stack | Lap time | Iterations |
|---|---|---|---|
| Gauss–Lobatto (50, 3), L-BFGS | Dymos (Python) | 22.27 s | 79 |
| RK4 defects, analytic Hessian | JuMPDynamicOptProblem |
22.83 s | 39 |
| Orthogonal collocation (4) | InfiniteOptDynamicOptProblem |
22.00 s | 37 |
solve per backend — the transcription is a
keyword, not a rewrite.
mu_init = 1e-3, monotone barrier, MUMPS)Identical apexes (n saturating at ±4 m), braking points and speed envelope (39–80 m/s). The only divergence is on the straights, where lateral position is nearly cost-free.
Exact segment geometry · lateral offset n to scale (|n| ≤ 4 m) · draw-in paced by the optimal speed profile
scales — dynamics as scaled residuals
(x′ − f)/scale ~ 0, bounds on outputs lifted into
auxiliary variables with scaled equalities.mu_init = 1e-3
finds the racing line. Same problem, same start.
κ(s) is a DataInterpolations object
stored as a callable parameter — evaluated at a decision variableMethodError: *(::Symbolic, ::GeneralVariableRef)FunctionWrapperss inside κ(s) lowers onto the
backend's own time/arc variable| Formulation | Backend | Lap time | Iters | Ipopt wall | Verdict |
|---|---|---|---|---|---|
| time domain, free tf | JuMP RK4 | 22.41 s | 97 | — | converges, ill-conditioned |
| time domain, free tf | InfiniteOpt (FD / OC4) | — | — | — | fails, intrinsically |
| s-parametrization | JuMP RK4 | 22.83 s | 39 | 6.3 s | robust |
| s-parametrization | InfiniteOpt OC(4) | 22.00 s | 37 | 1.43 s | best honest lap, fastest solve |
| s-parametrization, lifted DAE-BVP | MIRK4 + Ipopt | 21.84 s | 119 | 302 s | leakage-flattered; honest 22.02 s |
| reference | Dymos GL(50,3) | 22.27 s | 79 | 242.6 s | brackets the same optimum |
merged ModelingToolkit.jl
inputs(sys) for optimal controlopen in review now
All split from the #4394 umbrella — reviewable pieces, each validated against this benchmark.
MIRK bounds live on mesh nodes — so at s ≈ 0 the lifted BVP fires thrust ≈ 40 (normal ±2), hits 115 m/s and swings power to −4000 kW.