Lotka–Volterra Fishing Problem

This example is based on the Lotka-Volterra fishing problem.

Setup

Use Corleone to define the shooting layers and optimization models.

using Corleone

The other packages provide:

  • Layer initialization: LuxCore and Random
  • ODE integration: OrdinaryDiffEqTsit5
  • Optimization: Optimization, OptimizationMOI, Ipopt, and ComponentArrays
  • Objective and constraint gradients: ForwardDiff
  • Plotting: CairoMakie
using LuxCore
using Random
using OrdinaryDiffEqTsit5
using SymbolicIndexingInterface
using Optimization
using OptimizationMOI
using Ipopt
using ComponentArrays
using ForwardDiff
using CairoMakie
Makie.inline!()
Makie.Automatic()

Lotka–Volterra Dynamics

The first two states are prey and predator populations. The third accumulates their squared deviations from one. The second parameter is fishing intensity; the first and third are fixed interaction rates.

\[\begin{aligned} \dot{x} &= x-xy-0.4vx, & x(0)&=0.5, \\ \dot{y} &= -y+xy-0.2vy, & y(0)&=0.7, \\ J &= \int_0^{12}\bigl((x-1)^2+(y-1)^2\bigr)\,dt, & 0&\le v\le1. \end{aligned}\]

Here v is the fishing control, stored as p[2] in the numerical model.

function lotka_dynamics(du, u, p, t)
    du[1] = u[1] - p[1] * prod(u[1:2]) - 0.4 * p[2] * u[1]
    du[2] = -u[2] + p[3] * prod(u[1:2]) - 0.2 * p[2] * u[2]
    return du[3] = (u[1] - 1.0)^2 + (u[2] - 1.0)^2
end
tspan = (0.0, 12.0)
u0 = [0.5, 0.7, 0.0]
p0 = [1.0, 0.0, 1.0]
prob = ODEProblem(lotka_dynamics, u0, tspan, p0; abstol = 1.0e-9, reltol = 1.0e-9)
ODEProblem with uType Vector{Float64} and tType Float64. In-place: true
Non-trivial mass matrix: false
timespan: (0.0, 12.0)
u0: 3-element Vector{Float64}:
 0.5
 0.7
 0.0

Single Shooting Approach

Make fishing intensity tunable between zero and one, and keep the two interaction rates fixed. The 119 switching times define 120 control intervals. The initial state is taken from the ODE problem.

cgrid = collect(0.1:0.1:11.9)
control = Tunable(
    2; kind = Val(:parameter), default = 1.0,
    lowerbound = 0.0, upperbound = 1.0
) => cgrid
physical_parameters = (
    Constant([3, 1]; kind = Val(:parameter)) => nothing,
)
layer = ShootingLayer(
    prob, Tsit5(), control, physical_parameters...;
    controls = [2], quadratures = [3]
)
ShootingLayer{}(nothing, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, typeof(Main.var"##336".lotka_dynamics), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, Base.Pairs{Symbol, Float64, Nothing, @NamedTuple{abstol::Float64, reltol::Float64}}, SciMLBase.StandardODEProblem}(SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, typeof(Main.var"##336".lotka_dynamics), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}(Main.var"##336".lotka_dynamics, LinearAlgebra.UniformScaling{Bool}(true), nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, SciMLBase.DEFAULT_OBSERVED, nothing, nothing, nothing, nothing), [0.5, 0.7, 0.0], (0.0, 12.0), [1.0, 0.0, 1.0], Base.Pairs(:abstol => 1.0e-9, :reltol => 1.0e-9), SciMLBase.StandardODEProblem()), OrdinaryDiffEqTsit5.Tsit5{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), FastBroadcast.Serial}(OrdinaryDiffEqCore.trivial_limiter!, OrdinaryDiffEqCore.trivial_limiter!, FastBroadcast.Serial()), SciMLBase.EnsembleSerial(), InitialConditions{}(nothing, SciMLStructures.ArrayRepack{Vector{Float64}}([0.5, 0.7, 0.0]), (u₁ = PassThrough{}(:u₁), u₂ = PassThrough{}(:u₂), u₃ = PassThrough{}(:u₃)), ([1], [2], [3])), Parameter{}(nothing, SciMLStructures.ArrayRepack{Vector{Float64}}([1.0, 0.0, 1.0]), (p₁ = PiecewiseConstant{}(:p₁, LookUp{}(nothing, nothing), (p₁ = FixedLayer{}(ParameterCollection{}(Corleone.var"#173#174"{Vector{Float64}}([0.0], Core.Box((-Inf, Inf)), Core.Box(1.0)), 1)), p₃ = FixedLayer{}(ParameterCollection{}(Corleone.var"#173#174"{Vector{Float64}}([0.0], Core.Box((-Inf, Inf)), Core.Box(1.0)), 1)))), p₂ = PiecewiseConstant{}(:p₂, LookUp{}([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 6.9, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 9.9, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9], nothing), ParameterCollection{}(Corleone.var"#173#174"{Vector{Float64}}([0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 6.9, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 9.9, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9], Core.Box((0.0, 1.0)), Core.Box(1.0)), 120))), ([1, 3], [2])), ControlSymbolCache{}(SymbolicIndexingInterface.SymbolCache{Dict{Symbol, Int64}, Dict{Symbol, Int64}, Nothing, Symbol, Dict{Symbol, Float64}}(Dict(:u₃ => 3, :u₁ => 1, :u₂ => 2), Dict(:p₃ => 3, :p₂ => 2, :p₁ => 1), nothing, :t, Dict(:p₂ => 0.0, :u₃ => 0.0, :p₃ => 1.0, :u₁ => 0.5, :u₂ => 0.7, :p₁ => 1.0)), [:p₂], [:u₃], Dict{Any, Any}(:p₂ => (0.0, 1.0))))

Minimize the terminal accumulated cost. The model initializes parameters and state, then prepares the objective. OptimizationProblem applies the control bounds from the annotation and uses ForwardDiff for gradients.

dynprob = CorleoneDynamicOptProblem(
    layer, :(u₃(12.0))
)
opt = OptimizationProblem(dynprob, AutoForwardDiff(); function_kwargs = (;))
uopt = solve(
    opt,
    Ipopt.Optimizer(),
    tol = 1.0e-6,
    hessian_approximation = "limited-memory",
    max_iter = 300,
    print_level = 3
);
@assert successful_retcode(uopt)

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit https://github.com/coin-or/Ipopt
******************************************************************************

Total number of variables............................:      120
                     variables with only lower bounds:        0
                variables with lower and upper bounds:      120
                     variables with only upper bounds:        0
Total number of equality constraints.................:        0
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0


Number of Iterations....: 135

                                   (scaled)                 (unscaled)
Objective...............:   1.3443410156615019e+00    1.3443410156615019e+00
Dual infeasibility......:   9.3110901751459884e-07    9.3110901751459884e-07
Constraint violation....:   0.0000000000000000e+00    0.0000000000000000e+00
Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00
Complementarity.........:   1.0397554573784411e-07    1.0397554573784411e-07
Overall NLP error.......:   9.3110901751459884e-07    9.3110901751459884e-07


Number of objective function evaluations             = 677
Number of objective gradient evaluations             = 136
Number of equality constraint evaluations            = 0
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 32.260

EXIT: Optimal Solution Found.

Reconstruct the optimized parameters and plot the trajectory.

_, reconstruct = pack(default_vectorizer(), dynprob.ps)
optimized_parameters = reconstruct(uopt.u)
optsol, _ = layer(nothing, optimized_parameters, opt.p)
trajectoryplot(optsol)

Trajectory plot for The Lotka Volterra Fishing Problem

Multiple Shooting

Lift all three states at interior shooting points. Matching constraints enforce continuity, including the accumulated cost, so its final value covers the whole time horizon. Full-state resets allow independent blocks with EnsembleThreads(). Start Julia with --threads=4 to use four threads.

Start with control intervals of length 0.25. The shooting points at 3.4 and 6.1 lie inside intervals; 9.75 already coincides with a control switch.

shooting_points = [3.4, 6.1, 9.75]
initial_conditions = (
    Tunable(i; kind = Val(:variable), lowerbound = 0.0, upperbound = 2.0) => shooting_points for i in 1:3
)
mslayer = ShootingLayer(
    prob, Tsit5(), first(control) => collect(0.25:0.25:11.75), physical_parameters...,
    initial_conditions...; ensemblealg = EnsembleThreads(),
    controls = [2], quadratures = [3]
)
ShootingLayer{}(nothing, SciMLBase.ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, Vector{Float64}, SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, typeof(Main.var"##336".lotka_dynamics), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, Base.Pairs{Symbol, Float64, Nothing, @NamedTuple{abstol::Float64, reltol::Float64}}, SciMLBase.StandardODEProblem}(SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, typeof(Main.var"##336".lotka_dynamics), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}(Main.var"##336".lotka_dynamics, LinearAlgebra.UniformScaling{Bool}(true), nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, SciMLBase.DEFAULT_OBSERVED, nothing, nothing, nothing, nothing), [0.5, 0.7, 0.0], (0.0, 12.0), [1.0, 0.0, 1.0], Base.Pairs(:abstol => 1.0e-9, :reltol => 1.0e-9), SciMLBase.StandardODEProblem()), OrdinaryDiffEqTsit5.Tsit5{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), FastBroadcast.Serial}(OrdinaryDiffEqCore.trivial_limiter!, OrdinaryDiffEqCore.trivial_limiter!, FastBroadcast.Serial()), SciMLBase.EnsembleThreads(), InitialConditions{}(nothing, SciMLStructures.ArrayRepack{Vector{Float64}}([0.5, 0.7, 0.0]), (u₁ = InitialCondition{}(:u₁, LookUp{}(Dict(6.1 => 2, 9.75 => 3, 3.4 => 1), nothing), (u₁ = ParameterCollection{}(Corleone.var"#118#119"{Tuple{Float64, Float64}, Float64}((0.0, 2.0), 0.5, Core.Box([3.4, 6.1, 9.75])), 3), u₂ = ParameterCollection{}(Corleone.var"#118#119"{Tuple{Float64, Float64}, Float64}((0.0, 2.0), 0.7, Core.Box([3.4, 6.1, 9.75])), 3), u₃ = ParameterCollection{}(Corleone.var"#118#119"{Tuple{Float64, Float64}, Float64}((0.0, 2.0), 0.0, Core.Box([3.4, 6.1, 9.75])), 3))),), ([1, 2, 3],)), Parameter{}(nothing, SciMLStructures.ArrayRepack{Vector{Float64}}([1.0, 0.0, 1.0]), (p₁ = PiecewiseConstant{}(:p₁, LookUp{}(nothing, nothing), (p₁ = FixedLayer{}(ParameterCollection{}(Corleone.var"#173#174"{Vector{Float64}}([0.0], Core.Box((-Inf, Inf)), Core.Box(1.0)), 1)), p₃ = FixedLayer{}(ParameterCollection{}(Corleone.var"#173#174"{Vector{Float64}}([0.0], Core.Box((-Inf, Inf)), Core.Box(1.0)), 1)))), p₂ = PiecewiseConstant{}(:p₂, LookUp{}([0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0, 5.25, 5.5, 5.75, 6.0, 6.25, 6.5, 6.75, 7.0, 7.25, 7.5, 7.75, 8.0, 8.25, 8.5, 8.75, 9.0, 9.25, 9.5, 9.75, 10.0, 10.25, 10.5, 10.75, 11.0, 11.25, 11.5, 11.75], nothing), ParameterCollection{}(Corleone.var"#173#174"{Vector{Float64}}([0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0, 5.25, 5.5, 5.75, 6.0, 6.25, 6.5, 6.75, 7.0, 7.25, 7.5, 7.75, 8.0, 8.25, 8.5, 8.75, 9.0, 9.25, 9.5, 9.75, 10.0, 10.25, 10.5, 10.75, 11.0, 11.25, 11.5, 11.75], Core.Box((0.0, 1.0)), Core.Box(1.0)), 48))), ([1, 3], [2])), ControlSymbolCache{}(SymbolicIndexingInterface.SymbolCache{Dict{Symbol, Int64}, Dict{Symbol, Int64}, Nothing, Symbol, Dict{Symbol, Float64}}(Dict(:u₃ => 3, :u₁ => 1, :u₂ => 2), Dict(:p₃ => 3, :p₂ => 2, :p₁ => 1), nothing, :t, Dict(:p₂ => 0.0, :u₃ => 0.0, :p₃ => 1.0, :u₁ => 0.5, :u₂ => 0.7, :p₁ => 1.0)), [:p₂], [:u₃], Dict{Any, Any}(:u₃ => (0.0, 2.0), :u₁ => (0.0, 2.0), :p₂ => (0.0, 1.0), :u₂ => (0.0, 2.0))))

Initialize controls to one and lifted states to the corresponding ODE initial values.

msps, msst = LuxCore.setup(MersenneTwister(42), mslayer)
((initialcondition = (initialconditions = (u₁ = (lookup = NamedTuple(), parameter = (u₁ = (ps = [0.5, 0.5, 0.5],), u₂ = (ps = [0.7, 0.7, 0.7],), u₃ = (ps = [0.0, 0.0, 0.0],))),),), parameter = (parameters = (p₁ = (lookup = NamedTuple(), parameter = (p₁ = NamedTuple(), p₃ = NamedTuple())), p₂ = (lookup = NamedTuple(), parameter = (ps = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],))),)), (initialcondition = (initialconditions = (u₁ = (lookup = (collection = Dict(6.1 => 2, 9.75 => 3, 3.4 => 1), inserted = Int64[], cache = nothing), parameter = (u₁ = NamedTuple(), u₂ = NamedTuple(), u₃ = NamedTuple()), active = false),), active = Bool[0, 0, 0], permutation = [1, 2, 3]), parameter = (parameters = (p₁ = (lookup = (collection = nothing, inserted = Int64[], cache = nothing), parameter = (p₁ = (states = NamedTuple(), parameters = (ps = [1.0],)), p₃ = (states = NamedTuple(), parameters = (ps = [1.0],)))), p₂ = (lookup = (collection = [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0, 5.25, 5.5, 5.75, 6.0, 6.25, 6.5, 6.75, 7.0, 7.25, 7.5, 7.75, 8.0, 8.25, 8.5, 8.75, 9.0, 9.25, 9.5, 9.75, 10.0, 10.25, 10.5, 10.75, 11.0, 11.25, 11.5, 11.75], inserted = Int64[], cache = nothing), parameter = NamedTuple())), permutation = [1, 3, 2]), timestops = [0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.4, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0, 5.25, 5.5, 5.75, 6.0, 6.1, 6.25, 6.5, 6.75, 7.0, 7.25, 7.5, 7.75, 8.0, 8.25, 8.5, 8.75, 9.0, 9.25, 9.5, 9.75, 10.0, 10.25, 10.5, 10.75, 11.0, 11.25, 11.5, 11.75, 12.0]))

Split the control intervals at 3.4 and 6.1, duplicating their current values.

msps, msst = add_parameter_segments!(mslayer, msps, msst)
((initialcondition = (initialconditions = (u₁ = (lookup = NamedTuple(), parameter = (u₁ = (ps = [0.5, 0.5, 0.5],), u₂ = (ps = [0.7, 0.7, 0.7],), u₃ = (ps = [0.0, 0.0, 0.0],))),),), parameter = (parameters = (p₁ = (lookup = NamedTuple(), parameter = (p₁ = NamedTuple(), p₃ = NamedTuple())), p₂ = (lookup = NamedTuple(), parameter = (ps = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],))),)), (initialcondition = (initialconditions = (u₁ = (lookup = (collection = Dict(6.1 => 2, 9.75 => 3, 3.4 => 1), inserted = Int64[], cache = nothing), parameter = (u₁ = NamedTuple(), u₂ = NamedTuple(), u₃ = NamedTuple()), active = false),), active = Bool[0, 0, 0], permutation = [1, 2, 3]), parameter = (parameters = (p₁ = (lookup = (collection = nothing, inserted = Int64[], cache = nothing), parameter = (p₁ = (states = NamedTuple(), parameters = (ps = [1.0],)), p₃ = (states = NamedTuple(), parameters = (ps = [1.0],)))), p₂ = (lookup = (collection = [0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.4, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0, 5.25, 5.5, 5.75, 6.0, 6.1, 6.25, 6.5, 6.75, 7.0, 7.25, 7.5, 7.75, 8.0, 8.25, 8.5, 8.75, 9.0, 9.25, 9.5, 9.75, 10.0, 10.25, 10.5, 10.75, 11.0, 11.25, 11.5, 11.75], inserted = [15, 27], cache = nothing), parameter = NamedTuple())), permutation = [1, 3, 2]), timestops = [0.0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.4, 3.5, 3.75, 4.0, 4.25, 4.5, 4.75, 5.0, 5.25, 5.5, 5.75, 6.0, 6.1, 6.25, 6.5, 6.75, 7.0, 7.25, 7.5, 7.75, 8.0, 8.25, 8.5, 8.75, 9.0, 9.25, 9.5, 9.75, 10.0, 10.25, 10.5, 10.75, 11.0, 11.25, 11.5, 11.75, 12.0]))

Plot the initial segments and their reset jumps.

mssol, _ = mslayer(nothing, msps, msst);
trajectoryplot(mssol, show_legend = true, whiskerwidth = 10)

Trajectory plot for The Lotka Volterra Fishing Problem

Reuse the expanded parameters and state. State continuity and matching control values at inserted switches are included as equality constraints.

ms_dynprob = CorleoneDynamicOptProblem(
    mslayer, :(u₃(12.0)), ps = msps, st = msst
)

ms_opt = OptimizationProblem(ms_dynprob, AutoForwardDiff(); function_kwargs = (;))
ms_uopt = solve(
    ms_opt,
    Ipopt.Optimizer(),
    tol = 1.0e-6,
    hessian_approximation = "limited-memory",
    max_iter = 1000,
    print_level = 5
);
@assert successful_retcode(ms_uopt)
This is Ipopt version 3.14.19, running with linear solver MUMPS 5.9.0.

Number of nonzeros in equality constraint Jacobian...:      649
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:       59
                     variables with only lower bounds:        0
                variables with lower and upper bounds:       59
                     variables with only upper bounds:        0
Total number of equality constraints.................:       11
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  1.3440679e+00 2.41e+00 8.55e-01   0.0 0.00e+00    -  0.00e+00 0.00e+00   0
   1  1.2649431e+00 2.39e+00 1.23e+00  -6.2 2.96e+00    -  5.29e-03 8.43e-03h  1
   2  1.1384611e+00 2.36e+00 1.94e+01  -0.5 3.30e+00    -  1.50e-01 1.46e-02h  1
   3  9.8102407e-01 2.31e+00 5.55e+00  -6.3 3.31e+00    -  6.83e-03 1.95e-02h  1
   4  3.4883379e-01 2.32e+00 4.50e+01   0.4 3.49e+01    -  1.69e-02 2.66e-02f  1
   5  1.5180486e-01 2.27e+00 2.11e+02   0.9 2.50e+01    -  5.07e-01 3.05e-02f  1
   6  3.2296180e-01 2.23e+00 2.26e+03   1.9 6.24e+01    -  4.26e-01 1.30e-02f  1
   7  4.7494970e-01 2.15e+00 4.33e+04   2.6 1.54e+01    -  7.98e-01 3.53e-02h  1
   8  5.6293513e-01 1.99e+00 9.04e+04   2.8 2.65e+00    -  1.79e-01 8.35e-02h  1
   9  5.6125931e-01 1.97e+00 1.58e+06   2.8 4.67e+00    -  2.00e-01 1.15e-02h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  10  5.7183850e-01 1.95e+00 1.24e+08   2.8 2.75e+00    -  7.69e-01 1.04e-02h  1
  11  5.7280755e-01 1.95e+00 3.10e+10   2.8 3.06e+00    -  1.91e-01 7.58e-04h  1
  12  5.7285686e-01 1.95e+00 9.38e+14   2.8 3.77e+00    -  1.00e+00 3.29e-05h  1
  13  1.8950134e+00 2.38e+00 7.25e+14   2.8 2.13e+00    -  2.27e-01 7.06e-01h  1
  14  1.8950049e+00 2.38e+00 1.16e+15   2.8 4.95e+01    -  2.28e-07 5.93e-07f  1
  15  1.8949999e+00 2.38e+00 2.12e+15   2.8 5.96e+00    -  2.26e-09 8.10e-07f  1
  16  1.8252151e+00 2.35e+00 3.03e+15   2.8 1.18e+01    -  4.05e-07 1.38e-02f  1
  17  1.5097128e+00 2.19e+00 2.96e+15   2.8 1.18e+01    -  1.34e-02 6.99e-02h  1
  18  1.5073103e+00 2.19e+00 2.86e+15   1.3 1.18e+01    -  6.87e-02 7.02e-04h  1
  19r 1.5073103e+00 2.19e+00 9.90e+02   1.3 0.00e+00    -  0.00e+00 4.39e-07R  5
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  20r 1.2832252e+00 2.09e+00 7.97e+02   1.8 5.12e+00    -  2.87e-01 1.93e-01f  1
  21r 7.2258771e-01 1.27e+00 1.23e+03   2.3 1.97e+00    -  6.29e-01 4.80e-01f  1
  22  7.1323041e-01 9.98e-01 1.18e+08  -1.1 1.46e-01   9.3 8.77e-01 1.00e+00h  1
  23  6.9768835e-01 9.77e-01 1.17e+08   0.0 5.38e+00    -  8.86e-01 2.14e-02h  1
  24  6.9851690e-01 9.75e-01 1.19e+08   0.7 1.45e+00   8.9 1.00e+00 1.82e-03h  1
  25  6.9855829e-01 9.74e-01 1.19e+08   1.4 5.43e-01   8.4 1.00e+00 9.91e-04h  1
  26  1.2025350e+00 6.00e-01 1.25e+08   2.1 1.61e+00   7.9 1.00e+00 5.05e-01h  1
  27  1.2348279e+00 5.77e-01 1.20e+08   2.2 1.02e+00    -  1.00e+00 3.86e-02h  1
  28  1.9903417e+00 1.57e-01 3.78e+07   2.1 9.85e-01    -  1.00e+00 7.85e-01f  1
  29  2.0109549e+00 1.47e-01 3.57e+07   2.8 2.79e-01    -  4.87e-01 6.68e-02h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  30  1.9697460e+00 8.75e-02 2.15e+04   2.8 3.85e-01    -  9.91e-01 1.00e+00f  1
  31  1.9604427e+00 7.65e-03 3.38e+02   1.6 4.24e-02    -  9.97e-01 1.00e+00f  1
  32  1.9650570e+00 3.19e-05 7.26e+00  -0.3 4.39e-03    -  9.98e-01 1.00e+00f  1
  33  1.9604613e+00 2.88e-05 9.05e-01  -1.4 6.16e-03    -  9.87e-01 1.00e+00f  1
  34  1.8036500e+00 6.37e-03 3.62e-01  -1.5 1.29e-01    -  9.94e-01 1.00e+00f  1
  35  1.5843618e+00 1.84e-02 2.57e-01  -2.1 2.09e-01    -  9.94e-01 1.00e+00f  1
  36  1.4370748e+00 8.10e-03 1.57e-01  -2.4 1.54e-01    -  9.84e-01 1.00e+00h  1
  37  1.3672091e+00 1.15e-02 1.17e-01  -3.1 1.98e-01    -  1.00e+00 1.00e+00h  1
  38  1.3665943e+00 9.11e-04 1.24e-01  -3.1 1.22e-01    -  1.00e+00 9.67e-01h  1
  39  1.3526062e+00 1.65e-03 3.14e-02  -3.6 1.29e-01    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  40  1.3482754e+00 5.77e-04 2.96e-02  -4.1 1.52e-01    -  1.00e+00 7.58e-01h  1
  41  1.3450116e+00 1.67e-03 8.97e-02  -4.6 1.80e-01    -  9.99e-01 1.00e+00h  1
  42  1.3462543e+00 7.15e-04 3.04e-02  -4.2 1.31e-01    -  1.00e+00 1.00e+00h  1
  43  1.3484561e+00 1.20e-05 1.44e-01  -5.0 3.68e-02    -  1.00e+00 1.00e+00H  1
  44  1.3453252e+00 6.95e-04 2.90e-02  -5.5 2.88e-02    -  1.00e+00 7.86e-01h  1
  45  1.3458759e+00 6.38e-05 8.48e-03  -5.6 8.01e-03    -  1.00e+00 9.99e-01h  1
  46  1.3458847e+00 4.47e-06 6.41e-03  -6.3 8.72e-03    -  1.00e+00 1.00e+00h  1
  47  1.3458476e+00 1.41e-05 1.99e-02  -7.2 7.48e-02    -  1.00e+00 3.14e-01h  1
  48  1.3457672e+00 1.83e-05 9.69e-03  -5.9 4.35e-02    -  1.00e+00 4.87e-01h  1
  49  1.3457238e+00 1.90e-05 7.04e-03  -6.5 2.21e-02    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  50  1.3457234e+00 1.09e-05 1.40e-02  -6.2 3.23e-02    -  1.00e+00 1.00e+00h  1
  51  1.3457135e+00 2.52e-05 1.98e-02  -6.2 5.01e-02    -  1.00e+00 9.10e-01h  1
  52  1.3456795e+00 4.60e-05 1.62e-02  -5.9 3.00e-02    -  1.00e+00 6.80e-01h  1
  53  1.3455965e+00 6.98e-05 2.12e-02  -6.0 2.12e-02    -  1.00e+00 1.00e+00h  1
  54  1.3456745e+00 3.07e-05 5.99e-03  -5.4 2.02e-02    -  1.00e+00 7.15e-01h  1
  55  1.3456732e+00 1.77e-06 2.32e-03  -6.8 1.24e-02    -  1.00e+00 1.00e+00h  1
  56  1.3456570e+00 1.15e-05 9.74e-03  -7.4 1.01e-02    -  1.00e+00 6.53e-01h  1
  57  1.3456578e+00 5.89e-06 2.73e-03  -6.6 3.72e-03    -  1.00e+00 1.00e+00h  1
  58  1.3456565e+00 3.40e-07 5.15e-04  -7.8 6.87e-03    -  1.00e+00 1.00e+00h  1
  59  1.3456490e+00 1.13e-06 3.60e-03  -7.9 8.28e-02    -  1.00e+00 2.57e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  60  1.3456487e+00 1.69e-04 4.34e-02  -5.9 2.46e-01    -  1.00e+00 4.48e-01f  1
  61  1.3455006e+00 1.48e-04 1.15e-02  -6.0 8.46e-02    -  1.00e+00 1.00e+00h  1
  62  1.3460433e+00 1.54e-06 5.02e-02  -5.4 7.28e-02    -  1.00e+00 1.00e+00H  1
  63  1.3454413e+00 1.31e-04 6.32e-03  -5.5 2.87e-02    -  6.27e-01 1.00e+00h  1
  64  1.3456667e+00 2.17e-05 1.42e-02  -5.9 3.44e-02    -  1.00e+00 9.98e-01h  1
  65  1.3456349e+00 2.58e-05 5.25e-03  -6.0 2.68e-02    -  4.90e-01 1.00e+00h  1
  66  1.3457582e+00 1.97e-06 2.10e-02  -5.7 7.57e-02    -  1.00e+00 9.66e-01H  1
  67  1.3456035e+00 3.96e-05 2.65e-03  -5.8 6.48e-02    -  8.64e-01 1.00e+00h  1
  68  1.3456363e+00 8.27e-06 4.84e-03  -6.3 1.93e-02    -  1.00e+00 1.00e+00h  1
  69  1.3456279e+00 7.51e-06 5.31e-03  -6.7 5.41e-03    -  1.00e+00 9.95e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  70  1.3456383e+00 5.31e-06 4.77e-03  -6.4 3.88e-03    -  1.00e+00 1.00e+00h  1
  71  1.3456312e+00 2.41e-06 1.96e-03  -7.1 2.85e-03    -  1.00e+00 1.00e+00h  1
  72  1.3456337e+00 4.45e-07 1.20e-04  -7.3 2.25e-03    -  1.00e+00 9.90e-01h  1
  73  1.3456352e+00 3.29e-11 1.04e-03  -8.8 2.25e-03    -  1.00e+00 1.00e+00H  1
  74  1.3456326e+00 6.53e-07 5.59e-05  -8.0 9.06e-04    -  1.00e+00 1.00e+00h  1
  75  1.3456331e+00 3.41e-09 4.78e-05  -9.9 3.42e-04    -  1.00e+00 1.00e+00h  1
  76  1.3456328e+00 3.42e-08 6.75e-05 -10.4 5.61e-03    -  1.00e+00 4.63e-01h  1
  77  1.3456327e+00 3.89e-08 1.28e-04  -9.2 1.24e-02    -  1.00e+00 3.86e-02h  1
  78  1.3456323e+00 5.95e-07 2.09e-03  -8.4 5.71e-03    -  1.00e+00 7.55e-01h  1
  79  1.3456322e+00 3.31e-07 1.73e-04  -7.9 2.96e-03    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  80  1.3456324e+00 4.85e-07 1.90e-04  -7.6 1.79e-03    -  1.00e+00 1.00e+00h  1
  81  1.3456323e+00 9.27e-08 2.32e-04  -8.6 2.06e-03    -  1.00e+00 9.98e-01h  1
  82  1.3456322e+00 1.81e-06 3.97e-03  -7.7 3.50e-03    -  1.00e+00 1.00e+00h  1
  83  1.3456311e+00 1.16e-06 1.56e-04  -8.1 1.44e-03    -  7.64e-01 1.00e+00h  1
  84  1.3456321e+00 3.29e-09 2.46e-05  -8.8 3.65e-04    -  1.00e+00 1.00e+00h  1
  85  1.3456324e+00 1.27e-07 2.84e-04  -8.0 2.13e-03    -  1.00e+00 1.00e+00h  1
  86  1.3456341e+00 5.14e-10 1.02e-03  -8.1 1.06e-03    -  9.68e-01 1.00e+00H  1
  87  1.3456311e+00 8.34e-07 6.76e-04  -8.1 1.81e-03    -  1.00e+00 1.00e+00h  1
  88  1.3456321e+00 1.64e-08 4.02e-05  -8.1 9.20e-04    -  1.00e+00 1.00e+00h  1
  89  1.3456323e+00 1.63e-11 1.99e-04  -8.4 2.68e-03    -  1.00e+00 1.00e+00H  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
  90  1.3456329e+00 2.22e-15 5.80e-04  -8.4 2.18e-03    -  1.00e+00 1.00e+00H  1
  91  1.3456321e+00 1.40e-07 3.34e-04  -8.5 3.71e-03    -  8.66e-01 3.33e-01f  1
  92  1.3456317e+00 3.42e-07 1.12e-04  -8.5 1.14e-03    -  7.72e-01 9.64e-01f  1
  93  1.3456317e+00 1.89e-07 7.24e-05  -8.3 1.21e-03    -  1.00e+00 5.00e-01f  2
  94  1.3456384e+00 2.10e-09 2.05e-03  -7.3 2.83e-03    -  1.00e+00 1.00e+00H  1
  95  1.3456296e+00 2.73e-06 2.86e-04  -7.4 2.33e-03    -  1.00e+00 1.00e+00h  1
  96  1.3456318e+00 2.62e-08 6.69e-05  -8.6 4.39e-04    -  1.00e+00 1.00e+00h  1
  97  1.3456318e+00 1.51e-07 1.39e-04 -10.5 7.99e-04    -  1.00e+00 1.00e+00h  1
  98  1.3456317e+00 1.08e-07 2.53e-05  -9.0 8.94e-04    -  1.00e+00 1.00e+00h  1
  99  1.3456317e+00 1.81e-09 4.95e-05 -10.3 7.16e-04    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 100  1.3456317e+00 8.99e-09 6.84e-05 -10.0 8.12e-02    -  1.00e+00 1.51e-02h  1
 101  1.3456314e+00 3.41e-07 1.49e-04  -9.0 2.45e-02    -  1.00e+00 4.85e-01h  1
 102  1.3456371e+00 6.65e-06 6.49e-03  -7.0 3.32e-02    -  8.32e-01 2.58e-01f  1
 103  1.3456277e+00 5.42e-06 1.47e-03  -7.2 1.14e-02    -  1.00e+00 1.00e+00h  1
 104  1.3456360e+00 3.43e-06 2.75e-03  -6.3 1.23e-02    -  1.00e+00 5.86e-01h  1
 105  1.3456380e+00 4.58e-06 4.28e-03  -6.4 4.01e-03    -  1.00e+00 1.00e+00h  1
 106  1.3456375e+00 1.40e-06 1.06e-03  -6.4 7.80e-03    -  1.00e+00 1.00e+00h  1
 107  1.3456410e+00 1.48e-10 4.05e-04  -6.4 8.17e-03    -  1.00e+00 1.00e+00H  1
 108  1.3456476e+00 1.13e-12 7.71e-04  -6.4 3.78e-03    -  1.00e+00 1.00e+00H  1
 109  1.3456337e+00 2.87e-06 4.59e-04  -6.4 7.00e-03    -  1.00e+00 1.00e+00f  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 110  1.3456394e+00 1.49e-07 3.41e-04  -6.4 1.15e-03    -  1.00e+00 1.00e+00h  1
 111  1.3456394e+00 1.63e-07 2.16e-04  -6.4 1.05e-03    -  1.00e+00 1.00e+00h  1
 112  1.3456394e+00 1.28e-07 7.53e-05  -6.4 1.88e-03    -  1.00e+00 1.00e+00h  1
 113  1.3456394e+00 7.23e-08 1.14e-04  -6.4 1.10e-03    -  1.00e+00 1.00e+00h  1
 114  1.3456395e+00 2.43e-08 5.01e-05  -6.4 1.05e-03    -  1.00e+00 1.00e+00h  1
 115  1.3456409e+00 9.79e-11 6.43e-04  -6.4 1.62e-03    -  1.00e+00 1.00e+00H  1
 116  1.3456389e+00 3.80e-07 1.69e-05  -6.4 1.42e-03    -  1.00e+00 1.00e+00h  1
 117  1.3456395e+00 1.82e-10 1.33e-05  -6.4 3.40e-04    -  1.00e+00 1.00e+00h  1
 118  1.3456398e+00 2.74e-11 2.05e-04  -6.4 4.61e-03    -  1.00e+00 1.00e+00H  1
 119  1.3456397e+00 3.33e-15 2.12e-04  -6.4 7.05e-03    -  1.00e+00 1.00e+00H  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 120  1.3456397e+00 1.10e-11 1.70e-04  -6.4 1.99e-02    -  1.00e+00 1.95e-03h 10
 121  1.3456726e+00 1.33e-15 2.37e-03  -6.4 5.90e-02    -  1.00e+00 1.00e+00H  1
 122  1.3456275e+00 1.44e-05 4.05e-03  -6.4 3.37e-02    -  1.00e+00 1.00e+00f  1
 123  1.3456515e+00 7.86e-05 1.58e-02  -5.7 9.35e-02    -  1.00e+00 7.40e-01h  1
 124  1.3455411e+00 9.08e-05 1.22e-02  -5.8 4.95e-02    -  1.00e+00 1.00e+00h  1
 125  1.3456452e+00 2.03e-04 3.64e-02  -5.1 1.12e-01    -  1.00e+00 3.98e-01h  2
 126  1.3455475e+00 1.40e-04 9.16e-03  -5.2 3.00e-02    -  8.76e-01 1.00e+00h  1
 127  1.3457256e+00 1.08e-05 8.21e-03  -5.2 1.51e-02    -  1.00e+00 1.00e+00h  1
 128  1.3457456e+00 4.70e-06 3.24e-03  -5.2 1.58e-02    -  1.00e+00 1.00e+00h  1
 129  1.3457655e+00 5.04e-09 1.01e-03  -5.2 1.31e-02    -  1.00e+00 1.00e+00H  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 130  1.3457402e+00 6.65e-06 5.30e-03  -5.2 1.28e-02    -  1.00e+00 1.00e+00h  1
 131  1.3458002e+00 2.61e-11 2.26e-03  -5.2 2.13e-02    -  1.00e+00 1.00e+00H  1
 132  1.3457151e+00 2.29e-05 7.63e-04  -5.2 1.73e-02    -  1.00e+00 1.00e+00f  1
 133  1.3457513e+00 3.74e-07 4.60e-04  -5.2 1.46e-03    -  1.00e+00 1.00e+00h  1
 134  1.3457518e+00 2.11e-07 7.18e-05  -5.2 1.15e-03    -  1.00e+00 1.00e+00h  1
 135  1.3457518e+00 7.04e-08 1.14e-04  -5.2 1.06e-03    -  1.00e+00 1.00e+00h  1
 136  1.3457503e+00 9.90e-08 1.63e-04  -5.2 2.42e-03    -  1.00e+00 1.00e+00h  1
 137  1.3457509e+00 6.56e-07 1.87e-03  -5.2 1.09e-02    -  1.00e+00 1.00e+00h  1
 138  1.3457541e+00 3.85e-07 1.29e-04  -5.2 2.63e-03    -  1.00e+00 1.00e+00h  1
 139  1.3457497e+00 3.39e-07 1.22e-04  -5.2 1.81e-03    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 140  1.3457515e+00 2.21e-07 6.18e-05  -5.2 2.48e-03    -  1.00e+00 1.00e+00h  1
 141  1.3457527e+00 2.36e-07 3.16e-04  -5.2 1.24e-03    -  1.00e+00 1.00e+00h  1
 142  1.3457526e+00 2.19e-07 1.66e-04  -5.2 1.84e-03    -  1.00e+00 1.00e+00h  1
 143  1.3457491e+00 7.06e-07 1.86e-03  -5.2 2.06e-03    -  1.00e+00 1.00e+00h  1
 144  1.3457518e+00 5.62e-07 1.61e-04  -5.2 9.80e-04    -  1.00e+00 1.00e+00h  1
 145  1.3457522e+00 3.54e-07 1.66e-04  -5.2 1.24e-03    -  1.00e+00 5.00e-01h  2
 146  1.3457520e+00 1.66e-08 1.57e-05  -5.2 3.12e-04    -  1.00e+00 1.00e+00h  1
 147  1.3456452e+00 4.70e-06 4.78e-03  -7.0 7.90e-03    -  9.61e-01 1.00e+00h  1
 148  1.3456311e+00 3.94e-06 3.76e-03  -7.0 1.50e-02    -  1.00e+00 1.00e+00h  1
 149  1.3456301e+00 3.56e-06 5.13e-03  -7.0 1.19e-02    -  1.00e+00 1.60e-01h  2
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 150  1.3456327e+00 7.85e-07 1.76e-03  -7.0 2.49e-03    -  1.00e+00 1.00e+00h  1
 151  1.3456336e+00 1.04e-07 8.21e-05  -7.0 8.93e-04    -  1.00e+00 9.26e-01h  1
 152  1.3456336e+00 1.27e-06 3.28e-03  -7.0 3.11e-03    -  1.00e+00 1.00e+00f  1
 153  1.3456328e+00 8.89e-07 1.19e-03  -7.0 8.91e-04    -  1.00e+00 1.00e+00h  1
 154  1.3456336e+00 2.82e-08 6.42e-05  -7.0 4.29e-04    -  1.00e+00 1.00e+00h  1
 155  1.3456335e+00 3.61e-09 3.02e-05  -7.0 5.40e-04    -  1.00e+00 1.00e+00h  1
 156  1.3456332e+00 3.04e-08 1.09e-04  -7.0 2.98e-03    -  1.00e+00 1.00e+00h  1
 157  1.3456355e+00 1.17e-10 5.28e-04  -7.0 7.62e-03    -  1.00e+00 1.00e+00H  1
 158  1.3456309e+00 1.44e-06 1.64e-03  -7.0 4.30e-03    -  1.00e+00 1.00e+00h  1
 159  1.3456465e+00 6.88e-09 1.94e-03  -7.2 8.88e-03    -  1.00e+00 1.00e+00H  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 160  1.3456213e+00 6.97e-06 2.62e-04  -7.3 8.48e-03    -  1.00e+00 1.00e+00h  1
 161  1.3456315e+00 5.26e-08 2.22e-04  -8.5 1.66e-03    -  1.00e+00 1.00e+00h  1
 162  1.3456314e+00 1.98e-07 9.06e-05  -9.7 1.60e-03    -  1.00e+00 1.00e+00h  1
 163  1.3456314e+00 6.97e-08 3.72e-05  -8.5 1.18e-03    -  1.00e+00 1.00e+00h  1
 164  1.3456316e+00 2.42e-08 8.90e-05  -8.5 2.23e-03    -  1.00e+00 8.61e-01H  1
 165  1.3456314e+00 7.07e-08 5.50e-05  -9.5 6.38e-04    -  1.00e+00 1.00e+00h  1
 166  1.3456314e+00 1.40e-07 2.44e-04  -8.6 9.32e-04    -  1.00e+00 1.00e+00h  1
 167  1.3456313e+00 9.02e-08 5.44e-05  -8.7 5.93e-04    -  1.00e+00 1.00e+00h  1
 168  1.3456314e+00 3.18e-08 7.92e-05 -10.4 6.73e-04    -  1.00e+00 1.00e+00h  1
 169  1.3456314e+00 2.47e-08 5.93e-05 -11.0 2.57e-04    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 170  1.3456315e+00 2.89e-12 2.77e-04  -9.7 8.23e-04    -  1.00e+00 1.00e+00H  1
 171  1.3456313e+00 3.80e-08 7.24e-06 -11.0 6.85e-04    -  1.00e+00 1.00e+00h  1
 172  1.3456314e+00 5.51e-11 7.82e-06 -11.0 6.90e-05    -  1.00e+00 1.00e+00h  1
 173  1.3456314e+00 6.22e-10 1.10e-05 -11.0 3.27e-03    -  1.00e+00 6.96e-02h  1
 174  1.3456314e+00 2.07e-07 3.62e-04 -11.0 5.82e-03    -  1.00e+00 6.27e-01h  1
 175  1.3456310e+00 3.95e-07 2.69e-04 -11.0 1.24e-03    -  7.54e-01 1.00e+00h  1
 176  1.3456310e+00 3.87e-07 2.40e-04 -11.0 1.87e-03    -  3.94e-01 2.06e-02h  1
 177  1.3456309e+00 2.05e-06 2.64e-03 -10.8 4.11e-03    -  1.00e+00 1.00e+00h  1
 178  1.3456294e+00 1.63e-06 9.35e-04 -10.8 2.73e-03    -  5.04e-01 1.00e+00h  1
 179  1.3456336e+00 4.19e-10 7.27e-04  -9.4 5.79e-03    -  1.00e+00 1.00e+00H  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 180  1.3456294e+00 1.07e-06 2.72e-04  -9.5 3.34e-03    -  9.85e-01 1.00e+00h  1
 181  1.3456314e+00 1.70e-08 2.03e-05 -10.0 6.09e-04    -  1.00e+00 1.00e+00h  1
 182  1.3456314e+00 3.86e-13 9.96e-05  -9.2 1.45e-03    -  1.00e+00 1.00e+00H  1
 183  1.3456377e+00 4.81e-13 1.44e-03  -9.3 5.01e-03    -  4.09e-01 1.00e+00H  1
 184  1.3456265e+00 3.53e-06 1.61e-04  -9.3 5.74e-03    -  1.00e+00 1.00e+00f  1
 185  1.3456314e+00 6.70e-09 4.97e-05 -10.4 1.62e-04    -  1.00e+00 1.00e+00h  1
 186  1.3456314e+00 4.65e-09 2.81e-05 -11.0 2.55e-04    -  1.00e+00 1.00e+00h  1
 187  1.3456314e+00 1.60e-14 2.46e-05 -11.0 1.81e-04    -  1.00e+00 1.00e+00H  1
 188  1.3456313e+00 3.89e-09 8.43e-06 -11.0 3.69e-04    -  1.00e+00 1.00e+00h  1
 189  1.3456314e+00 3.88e-13 2.96e-05 -11.0 4.90e-04    -  1.00e+00 1.00e+00H  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 190  1.3456313e+00 6.68e-09 7.18e-06 -11.0 3.69e-04    -  1.00e+00 1.00e+00h  1
 191  1.3456314e+00 3.92e-09 4.98e-05 -11.0 1.55e-04    -  1.00e+00 1.00e+00h  1
 192  1.3456313e+00 2.79e-09 4.93e-06 -11.0 1.27e-04    -  1.00e+00 1.00e+00h  1
 193  1.3456314e+00 2.89e-11 3.07e-06 -11.0 6.65e-05    -  1.00e+00 1.00e+00h  1
 194  1.3456314e+00 3.85e-08 1.89e-04  -9.7 2.53e-02    -  1.00e+00 4.02e-02h  2
 195  1.3456314e+00 3.13e-08 8.15e-05  -9.9 2.35e-03    -  1.00e+00 4.34e-01h  1
 196  1.3456309e+00 1.15e-06 2.22e-03  -9.9 1.57e-03    -  3.34e-01 1.00e+00f  1
 197  1.3456304e+00 7.91e-07 8.53e-05 -10.3 1.41e-03    -  1.00e+00 1.00e+00h  1
 198  1.3456313e+00 9.79e-10 1.48e-05 -11.0 1.36e-04    -  1.00e+00 1.00e+00h  1
 199  1.3456313e+00 7.57e-10 9.47e-06 -10.2 6.91e-04    -  1.00e+00 3.99e-01h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 200  1.3456313e+00 1.33e-07 1.23e-04 -10.8 3.13e-03    -  1.00e+00 1.00e+00h  1
 201  1.3456311e+00 1.14e-07 5.23e-05  -8.8 2.99e-03    -  5.87e-01 1.00e+00h  1
 202  1.3456320e+00 7.51e-07 1.38e-03  -7.2 7.47e-02    -  1.00e+00 1.43e-01h  1
 203  1.3456309e+00 1.86e-06 2.64e-03  -7.3 9.53e-03    -  9.11e-01 1.00e+00h  1
 204  1.3456308e+00 2.93e-06 2.58e-03  -7.3 1.77e-02    -  4.19e-01 1.09e-01h  4
 205  1.3456307e+00 8.81e-07 6.01e-04  -7.3 7.74e-03    -  1.00e+00 1.00e+00h  1
 206  1.3456378e+00 1.45e-10 1.32e-03  -7.3 1.04e-02    -  1.00e+00 1.00e+00H  1
 207  1.3456313e+00 1.29e-06 1.41e-03  -7.3 7.75e-03    -  1.00e+00 1.00e+00h  1
 208  1.3456296e+00 2.13e-06 2.03e-03  -7.3 1.92e-02    -  7.85e-01 5.31e-01h  1
 209  1.3456304e+00 1.25e-06 1.75e-03  -7.3 7.97e-03    -  1.00e+00 5.00e-01f  2
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 210  1.3456271e+00 1.03e-05 8.58e-03  -7.3 1.73e-02    -  1.00e+00 9.58e-01h  1
 211  1.3456178e+00 2.44e-05 9.66e-03  -7.3 9.94e-03    -  6.77e-01 1.00e+00f  1
 212  1.3456469e+00 3.23e-05 1.63e-02  -6.2 1.56e-02    -  1.00e+00 9.85e-01h  1
 213  1.3455897e+00 4.49e-05 1.03e-02  -6.2 2.37e-02    -  8.53e-01 1.00e+00h  1
 214  1.3456430e+00 3.12e-05 1.90e-02  -6.2 1.51e-02    -  1.00e+00 9.74e-01h  1
 215  1.3456140e+00 2.08e-05 4.74e-03  -6.3 1.48e-02    -  3.60e-01 6.03e-01h  1
 216  1.3456147e+00 1.84e-05 3.69e-03  -6.9 7.67e-03    -  1.00e+00 1.25e-01f  4
 217  1.3456313e+00 1.68e-06 7.73e-04  -7.0 2.65e-03    -  1.00e+00 1.00e+00h  1
 218  1.3456331e+00 1.82e-08 5.86e-05  -7.1 3.63e-04    -  1.00e+00 1.00e+00h  1
 219  1.3456329e+00 8.61e-08 3.16e-04  -7.1 9.74e-04    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 220  1.3456328e+00 2.17e-07 2.53e-04  -7.1 9.48e-04    -  1.00e+00 1.00e+00h  1
 221  1.3456327e+00 1.09e-07 7.00e-05  -7.1 1.39e-03    -  1.00e+00 1.00e+00h  1
 222  1.3456328e+00 1.48e-08 1.83e-05  -7.1 4.30e-04    -  1.00e+00 1.00e+00h  1
 223  1.3456329e+00 2.61e-09 1.28e-05  -7.1 4.28e-04    -  1.00e+00 1.00e+00h  1
 224  1.3456329e+00 1.25e-08 7.90e-05  -7.1 1.01e-03    -  1.00e+00 1.00e+00h  1
 225  1.3456350e+00 3.47e-10 8.50e-04  -7.1 5.20e-03    -  1.00e+00 1.00e+00H  1
 226  1.3456315e+00 1.14e-06 8.80e-04  -7.1 3.78e-03    -  1.00e+00 1.00e+00h  1
 227  1.3456317e+00 1.22e-06 1.65e-03  -7.1 8.26e-03    -  1.00e+00 4.93e-01h  2
 228  1.3456327e+00 4.48e-07 1.79e-03  -7.1 5.05e-03    -  1.00e+00 1.00e+00h  1
 229  1.3456321e+00 6.01e-07 1.10e-03  -7.1 1.40e-02    -  1.00e+00 1.85e-01h  2
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 230  1.3456324e+00 2.39e-07 5.78e-05  -7.1 2.35e-03    -  1.00e+00 1.00e+00h  1
 231  1.3456329e+00 6.91e-08 1.60e-04  -7.1 5.10e-04    -  1.00e+00 1.00e+00h  1
 232  1.3456328e+00 7.51e-08 8.23e-05  -7.1 1.71e-03    -  1.00e+00 1.00e+00h  1
 233  1.3456351e+00 1.02e-10 7.73e-04  -7.1 4.30e-03    -  1.00e+00 1.00e+00H  1
 234  1.3456308e+00 2.07e-06 1.03e-03  -7.1 1.41e-03    -  1.00e+00 1.00e+00h  1
 235  1.3456327e+00 9.04e-08 2.05e-04  -7.1 1.45e-03    -  1.00e+00 1.00e+00h  1
 236  1.3456328e+00 3.20e-08 4.66e-05  -7.1 1.09e-03    -  1.00e+00 1.00e+00h  1
 237  1.3456329e+00 2.21e-12 7.33e-05  -7.1 5.18e-04    -  1.00e+00 1.00e+00H  1
 238  1.3456328e+00 3.31e-08 6.11e-05  -7.1 1.22e-03    -  1.00e+00 1.00e+00h  1
 239  1.3456328e+00 2.59e-08 5.80e-05  -7.1 3.95e-04    -  1.00e+00 5.00e-01h  2
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 240  1.3456328e+00 1.22e-08 2.39e-05  -7.1 8.11e-04    -  1.00e+00 1.00e+00h  1
 241  1.3456333e+00 6.22e-15 2.83e-04  -7.1 1.10e-03    -  1.00e+00 1.00e+00H  1
 242  1.3456325e+00 2.84e-07 2.77e-05  -7.1 1.21e-03    -  1.00e+00 1.00e+00f  1
 243  1.3456328e+00 5.22e-09 6.16e-05  -7.1 1.95e-04    -  1.00e+00 1.00e+00h  1
 244  1.3456328e+00 2.41e-09 2.48e-06  -7.1 1.48e-04    -  1.00e+00 1.00e+00h  1
 245  1.3456328e+00 1.01e-11 2.39e-06  -7.1 1.53e-05    -  1.00e+00 1.00e+00h  1
 246  1.3456329e+00 1.15e-13 8.84e-05  -7.1 8.66e-04    -  1.00e+00 1.00e+00H  1
 247  1.3456329e+00 1.33e-15 6.96e-05  -7.1 7.45e-04    -  1.00e+00 1.00e+00H  1
 248  1.3456327e+00 1.04e-07 6.95e-05  -7.1 1.83e-03    -  1.00e+00 1.00e+00f  1
 249  1.3456327e+00 7.58e-08 7.63e-05  -7.1 1.15e-03    -  1.00e+00 1.00e+00h  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 250  1.3456331e+00 6.66e-16 2.21e-04  -7.1 6.70e-04    -  1.00e+00 1.00e+00H  1
 251  1.3456329e+00 1.78e-15 1.69e-04  -7.1 5.62e-04    -  1.00e+00 1.00e+00F  1
 252  1.3456328e+00 2.97e-08 5.73e-05  -7.1 6.86e-04    -  1.00e+00 1.00e+00h  1
 253  1.3456328e+00 2.67e-09 2.65e-05  -7.1 5.33e-05    -  1.00e+00 1.00e+00h  1
 254  1.3456328e+00 6.69e-10 3.99e-06  -7.1 4.29e-05    -  1.00e+00 1.00e+00h  1
 255  1.3456328e+00 5.19e-11 1.69e-06  -7.1 1.17e-05    -  1.00e+00 1.00e+00h  1
 256  1.3456328e+00 7.80e-11 3.92e-06  -7.1 2.46e-05    -  1.00e+00 1.00e+00h  1
 257  1.3456328e+00 1.00e-10 3.40e-06  -7.1 6.55e-05    -  1.00e+00 1.00e+00h  1
 258  1.3456328e+00 2.10e-10 6.36e-06  -7.1 1.15e-04    -  1.00e+00 1.00e+00h  1
 259  1.3456328e+00 6.91e-14 4.64e-05  -7.1 3.88e-04    -  1.00e+00 1.00e+00H  1
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 260  1.3456328e+00 4.77e-09 9.32e-06  -7.1 2.80e-04    -  1.00e+00 1.00e+00h  1
 261  1.3456328e+00 1.11e-09 1.62e-05  -7.1 1.16e-04    -  1.00e+00 1.00e+00h  1
 262  1.3456329e+00 1.33e-15 7.27e-05  -7.1 4.27e-04    -  1.00e+00 1.00e+00H  1
 263  1.3456328e+00 9.59e-09 1.45e-06  -7.1 3.99e-04    -  1.00e+00 1.00e+00h  1
 264  1.3456328e+00 2.16e-11 2.10e-06  -7.1 1.51e-05    -  1.00e+00 1.00e+00h  1
 265  1.3456328e+00 2.89e-15 2.01e-05  -7.1 2.70e-04    -  1.00e+00 1.00e+00H  1
 266  1.3456328e+00 7.30e-10 1.44e-05  -7.1 2.48e-03    -  1.00e+00 2.50e-01h  3
 267  1.3456352e+00 1.11e-15 4.19e-04  -7.1 9.50e-03    -  1.00e+00 1.00e+00H  1
 268  1.3456329e+00 6.66e-16 1.13e-04  -7.1 8.57e-03    -  1.00e+00 1.00e+00F  1
 269  1.3456328e+00 3.97e-08 5.10e-05  -7.1 5.61e-02    -  6.53e-01 3.12e-02f  6
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 270  1.3456328e+00 2.69e-08 4.81e-05  -7.1 1.25e-03    -  1.00e+00 5.00e-01h  2
 271  1.3456329e+00 4.94e-12 1.15e-04  -7.1 1.03e-03    -  1.00e+00 1.00e+00H  1
 272  1.3456329e+00 1.77e-12 1.11e-04  -7.1 1.05e-03    -  1.00e+00 1.00e+00H  1
 273  1.3456369e+00 1.89e-14 7.74e-04  -7.1 2.99e-03    -  1.00e+00 1.00e+00H  1
 274  1.3456305e+00 1.57e-06 4.96e-05  -7.1 2.77e-03    -  1.00e+00 1.00e+00f  1
 275  1.3456328e+00 1.98e-10 4.69e-06  -7.1 8.23e-05    -  1.00e+00 1.00e+00h  1
 276  1.3456328e+00 3.80e-14 5.84e-05  -7.1 2.47e-04    -  1.00e+00 1.00e+00H  1
 277  1.3456328e+00 4.25e-09 2.86e-06  -7.1 2.42e-04    -  1.00e+00 1.00e+00h  1
 278  1.3456328e+00 2.27e-09 7.96e-06  -7.1 1.14e-04    -  1.00e+00 5.00e-01h  2
 279  1.3456328e+00 1.17e-09 1.49e-06  -7.1 5.27e-05    -  1.00e+00 5.00e-01h  2
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 280  1.3456328e+00 7.92e-10 1.17e-05  -7.1 1.78e-04    -  1.00e+00 1.00e+00h  1
 281  1.3456329e+00 4.44e-16 1.13e-04  -7.1 2.41e-04    -  1.00e+00 1.00e+00H  1
 282  1.3456328e+00 1.54e-08 1.71e-06  -7.1 3.63e-04    -  1.00e+00 1.00e+00h  1
 283  1.3456328e+00 7.91e-12 6.49e-07  -7.1 1.40e-05    -  1.00e+00 1.00e+00h  1

Number of Iterations....: 283

                                   (scaled)                 (unscaled)
Objective...............:   1.3456328267214988e+00    1.3456328267214988e+00
Dual infeasibility......:   6.4915668204113537e-07    6.4915668204113537e-07
Constraint violation....:   7.9141138087379659e-12    7.9141138087379659e-12
Variable bound violation:   0.0000000000000000e+00    0.0000000000000000e+00
Complementarity.........:   8.3249267374269510e-08    8.3249267374269510e-08
Overall NLP error.......:   6.4915668204113537e-07    6.4915668204113537e-07


Number of objective function evaluations             = 413
Number of objective gradient evaluations             = 283
Number of equality constraint evaluations            = 413
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 285
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 0
Total seconds in IPOPT                               = 48.718

EXIT: Optimal Solution Found.

Reconstruct the optimized parameters and plot the trajectory.

_, reconstruct_ms = pack(default_vectorizer(), ms_dynprob.ps)
optimized_parameters = reconstruct_ms(ms_uopt.u)
ms_optsol, _ = mslayer(nothing, optimized_parameters, ms_opt.p)
trajectoryplot(ms_optsol)

Trajectory plot for The Lotka Volterra Fishing Problem

Matching residuals measure feasibility of the lifted states and inserted control intervals. The single- and multiple-shooting problems use different control grids, and this multiple-shooting model also bounds its lifted states (including the quadrature) by two. Their objective values need not coincide.

maximum(abs, shooting_constraints(ms_optsol))
7.914113808737966e-12

Appendix

This example was built using these direct dependencies,
        using Pkg
        Pkg.status()
Status `~/work/Corleone.jl/Corleone.jl/docs/Project.toml`
  [13f3f980] CairoMakie v0.15.17
  [b0b7db55] ComponentArrays v0.15.50
  [2751e0db] Corleone v2.0.0 `~/work/Corleone.jl/Corleone.jl`
  [6590a4b1] CorleoneOED v2.0.0 `../lib/CorleoneOED`
  [e30172f5] Documenter v1.19.0
  [daee34ce] DocumenterCitations v1.5.0
  [f6369f11] ForwardDiff v1.4.6
  [b6b21f68] Ipopt v1.16.0
  [98b081ad] Literate v2.21.0
  [bb33d45b] LuxCore v1.5.4
  [961ee093] ModelingToolkit v11.46.1
  [d147904a] OptimalControlBenchmarks v0.1.0 `../lib/OptimalControlBenchmarks`
  [7f7a1694] Optimization v5.9.1
  [22f7324a] OptimizationLBFGSB v1.5.3
  [fd9f6733] OptimizationMOI v1.6.1
  [b1df2697] OrdinaryDiffEqTsit5 v2.1.5
  [2efcf032] SymbolicIndexingInterface v0.3.55
  [ddb6d928] YAML v0.4.17
  [2a0f44e3] Base64 v1.11.0
  [9a3f8284] Random v1.11.0
and using this machine and Julia version.
        using InteractiveUtils
        InteractiveUtils.versioninfo()
Julia Version 1.13.3
Commit 67ac47b9cd8 (2026-10-25 15:28 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × AMD EPYC 7763 64-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-20.1.8 (ORCJIT, znver3)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 4 virtual cores)
A more complete overview of all dependencies and their versions is also provided.
        using Pkg
        Pkg.status(; mode = PKGMODE_MANIFEST)
Status `~/work/Corleone.jl/Corleone.jl/docs/Manifest.toml`
  [47edcb42] ADTypes v1.24.0
  [14f7f29c] AMD v0.5.4
  [a4c015fc] ANSIColoredPrinters v0.0.1
  [621f4979] AbstractFFTs v1.5.0
  [6e696c72] AbstractPlutoDingetjes v1.4.1
  [1520ce14] AbstractTrees v0.4.5
  [7d9f7c33] Accessors v0.1.46
  [79e6a3ab] Adapt v4.7.4
  [4f381ef7] AdaptiveArrayPools v0.3.12
  [35492f91] AdaptivePredicates v1.2.0
  [66dad0bd] AliasTables v1.1.3
  [27a7e980] Animations v0.4.2
  [ec485272] ArnoldiMethod v0.4.0
  [4fba245c] ArrayInterface v7.30.2
  [4c555306] ArrayLayouts v1.16.0
  [67c07d97] Automa v1.2.0
  [13072b0f] AxisAlgorithms v1.1.0
  [39de3d68] AxisArrays v0.4.8
  [aae01518] BandedMatrices v1.14.0
  [198e06fe] BangBang v0.4.9
  [18cc8868] BaseDirs v1.4.0
  [2027ae74] BibInternal v0.4.0
  [13533e5b] BibParser v0.3.0
  [f1be7e48] Bibliography v0.4.0
  [e2ed5e7c] Bijections v0.2.2
  [b2a6c25c] BinaryHeaps v1.1.0
  [caf10ac8] BipartiteGraphs v0.1.15
  [8e7c35d0] BlockArrays v1.10.3
  [70df07ce] BracketingNonlinearSolve v1.12.8
⌅ [fa961155] CEnum v0.5.0
  [96374032] CRlibm v1.1.1
  [159f3aea] Cairo v1.1.1
  [13f3f980] CairoMakie v0.15.17
  [d360d2e6] ChainRulesCore v1.26.8
  [ae650224] ChunkSplitters v3.2.0
  [523fee87] CodecBzip2 v0.8.5
  [944b1d66] CodecZlib v0.7.9
  [6b39b394] CodecZstd v0.8.7
  [a2cac450] ColorBrewer v0.4.2
  [35d6a980] ColorSchemes v3.32.0
  [3da002f7] ColorTypes v0.12.5
  [c3611d14] ColorVectorSpace v0.11.2
  [5ae59095] Colors v0.13.4
⌅ [861a8166] Combinatorics v1.0.2
  [38540f10] CommonSolve v0.2.14
  [bbf7d656] CommonSubexpressions v0.3.1
  [f70d9fcc] CommonWorldInvalidations v1.2.2
  [34da2185] Compat v4.18.1
  [b0b7db55] ComponentArrays v0.15.50
  [b152e2b5] CompositeTypes v0.1.4
  [a33af91c] CompositionsBase v0.1.2
  [95dc2771] ComputePipeline v0.1.9
  [2569d6c7] ConcreteStructs v0.2.8
  [88cd18e8] ConsoleProgressMonitor v0.1.2
  [187b0558] ConstructionBase v1.6.0
  [d38c429a] Contour v0.6.3
  [b7a15901] CoreMath v0.1.0
  [2751e0db] Corleone v2.0.0 `~/work/Corleone.jl/Corleone.jl`
  [6590a4b1] CorleoneOED v2.0.0 `../lib/CorleoneOED`
  [a8cc5b0e] Crayons v4.2.0
  [9a962f9c] DataAPI v1.16.0
  [864edb3b] DataStructures v0.19.6
  [e2d170a0] DataValueInterfaces v1.0.0
  [927a84f5] DelaunayTriangulation v1.7.0
  [8bb1440f] DelimitedFiles v1.9.1
  [2b5f629d] DiffEqBase v7.21.5
  [459566f4] DiffEqCallbacks v4.19.5
  [163ba53b] DiffResults v1.1.0
  [b552c78f] DiffRules v1.16.0
  [a0c0ee7d] DifferentiationInterface v0.7.21
  [8d63f2c5] DispatchDoctor v0.4.29
  [31c24e10] Distributions v0.25.132
⌅ [ffbed154] DocStringExtensions v0.9.5
  [e30172f5] Documenter v1.19.0
  [daee34ce] DocumenterCitations v1.5.0
  [5b8099bc] DomainSets v0.8.3
⌅ [7c1d4256] DynamicPolynomials v0.6.8
  [4e289a0a] EnumX v1.0.7
  [f151be2c] EnzymeCore v0.8.26
  [429591f6] ExactPredicates v2.2.9
  [e2ba6199] ExprTools v0.1.11
  [55351af7] ExproniconLite v0.10.14
  [b86e33f2] FFTA v0.3.2
  [7034ab61] FastBroadcast v1.5.0
  [9aa1b823] FastClosures v0.3.2
  [9ea80cae] FastInterpolations v0.4.20
  [a4df4552] FastPower v1.5.1
  [5789e2e9] FileIO v1.20.0
  [8fc22ac5] FilePaths v0.9.0
  [48062228] FilePathsBase v0.9.24
  [1a297f60] FillArrays v1.18.2
  [64ca27bc] FindFirstFunctions v3.4.1
  [6a86dc24] FiniteDiff v2.33.0
⌅ [53c48c17] FixedPointNumbers v0.8.6
  [1fa38f19] Format v1.3.7
  [f6369f11] ForwardDiff v1.4.6
  [b38be410] FreeType v4.1.1
  [663a7486] FreeTypeAbstraction v0.10.8
  [a85aefff] FunctionMaps v0.1.2
  [069b7b12] FunctionWrappers v1.1.3
  [77dc65aa] FunctionWrappersWrappers v1.13.0
  [d9f16b24] Functors v0.5.4
  [46192b85] GPUArraysCore v0.2.2
  [a0844989] Gamma v1.2.0
  [5c1252a2] GeometryBasics v0.5.13
  [d7ba0133] Git v1.5.0
  [a2bd30eb] Graphics v1.1.3
  [86223c79] Graphs v1.15.0
  [3955a311] GridLayoutBase v0.11.3
  [076d061b] HashArrayMappedTries v0.2.0
  [5880b2e8] HelpPlots v1.1.0
  [34004b35] HypergeometricFunctions v0.3.31
  [b5f81e59] IOCapture v1.0.0
  [615f187c] IfElse v0.1.1
  [2803e5a7] ImageAxes v0.6.12
  [c817782e] ImageBase v0.1.7
  [a09fc81d] ImageCore v0.10.5
  [82e4d734] ImageIO v0.6.10
  [bc367c6b] ImageMetadata v0.9.10
  [3263718b] ImplicitDiscreteSolve v2.3.0
  [9b13fd28] IndirectArrays v1.0.0
  [d25df0c9] Inflate v0.1.5
  [22cec73e] InitialValues v0.3.1
  [18e54dd8] IntegerMathUtils v0.1.4
  [a98d9a8b] Interpolations v0.16.3
  [d1acc4aa] IntervalArithmetic v1.0.12
  [8197267c] IntervalSets v0.7.15
  [3587e190] InverseFunctions v0.1.18
  [b6b21f68] Ipopt v1.16.0
  [92d709cd] IrrationalConstants v0.2.7
  [f1662d9f] Isoband v0.1.1
  [c8e1da08] IterTools v1.11.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.8.0
  [682c06a0] JSON v1.13.4
  [7d188eb4] JSONSchema v1.6.0
  [ae98c720] Jieko v0.2.1
  [b835a17e] JpegTurbo v0.1.6
  [ccbc3e58] JumpProcesses v10.0.1
  [5ab0869b] KernelDensity v0.6.12
  [ba0b0d4f] Krylov v0.10.12
  [5be7bae1] LBFGSB v0.4.1
  [2faa5264] LHLFactorization v2.2.2
  [b964fa9f] LaTeXStrings v1.4.1
  [0e77f7df] LazilyInitializedFields v1.3.0
  [8cdb02fc] LazyModules v0.3.1
  [1d6d02ad] LeftChildRightSiblingTrees v0.3.0
  [87fe0de2] LineSearch v0.1.19
  [7ed4a6bd] LinearSolve v5.18.3
  [98b081ad] Literate v2.21.0
  [2ab3a3ac] LogExpFunctions v1.0.3
  [e6f89c97] LoggingExtras v1.2.0
  [bb33d45b] LuxCore v1.5.4
  [1914dd2f] MacroTools v0.5.16
  [ee78f7c6] Makie v0.24.17
  [dbb5928d] MappedArrays v0.4.3
  [d0879d2d] MarkdownAST v0.1.3
  [b8f27783] MathOptInterface v1.54.0
  [0a4f8689] MathTeXEngine v0.6.9
  [bb5d69b7] MaybeInplace v0.1.8
  [e1d29d7a] Missings v1.2.1
  [961ee093] ModelingToolkit v11.46.1
  [7771a370] ModelingToolkitBase v1.79.0
  [6bb917b9] ModelingToolkitTearing v1.20.7
  [e94cdb99] MosaicViews v0.3.4
  [2e0e35c7] Moshi v0.3.13
  [46d2c3a1] MuladdMacro v0.2.7
⌅ [102ac46a] MultivariatePolynomials v0.5.20
  [d8a4904e] MutableArithmetics v1.9.3
  [77ba4419] NaNMath v1.1.5
  [f09324ee] Netpbm v1.1.1
  [be0214bd] NonlinearSolveBase v2.55.1
  [5959db7a] NonlinearSolveFirstOrder v2.10.0
  [510215fc] Observables v0.5.5
  [6fe1bfb0] OffsetArrays v1.17.0
  [67456a42] OhMyThreads v0.8.9
  [52e1d378] OpenEXR v0.3.3
  [d147904a] OptimalControlBenchmarks v0.1.0 `../lib/OptimalControlBenchmarks`
  [7f7a1694] Optimization v5.9.1
  [bca83a33] OptimizationBase v5.10.0
  [22f7324a] OptimizationLBFGSB v1.5.3
  [fd9f6733] OptimizationMOI v1.6.1
  [bac558e1] OrderedCollections v2.0.3
  [bbf590c4] OrdinaryDiffEqCore v4.19.1
  [b1df2697] OrdinaryDiffEqTsit5 v2.1.5
  [90014a1f] PDMats v0.11.41
  [f57f5aa1] PNGFiles v0.4.5
  [19eb6ba3] Packing v0.5.1
  [5432bcbf] PaddedViews v0.5.12
  [69de0a69] Parsers v3.0.5
  [eebad327] PkgVersion v0.3.3
  [995b91a9] PlotUtils v1.5.1
  [e409e4f3] PoissonRandom v0.4.14
  [647866c9] PolygonOps v0.1.2
  [d236fae5] PreallocationTools v1.7.1
  [aea7be01] PrecompileTools v1.3.4
  [21216c6a] Preferences v1.6.1
  [08abe8d2] PrettyTables v3.5.0
  [27ebfcd6] Primes v0.5.7
  [33c8b6b6] ProgressLogging v0.1.6
  [92933f4c] ProgressMeter v1.13.0
  [43287f4e] PtrArrays v1.4.0
  [0c0d3e7f] PureKLU v1.6.0
  [4b34888f] QOI v1.0.2
  [1fd47b50] QuadGK v2.11.3
  [b3c3ace0] RangeArrays v0.3.2
  [c84ed2f1] Ratios v0.4.5
  [988b38a3] ReadOnlyArrays v0.2.0
  [795d4caa] ReadOnlyDicts v1.0.1
  [3cdcf5f2] RecipesBase v1.4.0
  [731186ca] RecursiveArrayTools v4.5.6
  [189a3867] Reexport v1.2.2
  [2792f1a3] RegistryInstances v0.1.0
  [05181044] RelocatableFolders v1.0.1
  [ae029012] Requires v1.3.1
  [9fe22ead] RespecializeParams v1.3.0
  [79098fc4] Rmath v0.9.0
  [f2b01f46] Roots v3.0.13
  [5eaf0fd0] RoundingEmulator v0.2.1
  [7e49a35a] RuntimeGeneratedFunctions v0.5.27
  [9dfe8606] SCCNonlinearSolve v1.16.0
  [fdea26ae] SIMD v3.8.1
  [0bca4576] SciMLBase v3.58.0
  [19f34311] SciMLJacobianOperators v0.1.20
  [a6db7da4] SciMLLogging v2.1.0
  [c0aeaf25] SciMLOperators v1.30.4
  [431bcebd] SciMLPublic v1.3.0
  [53ae85a6] SciMLStructures v1.10.6
  [7e506255] ScopedValues v1.6.2
  [6c6a2e73] Scratch v1.3.0
  [efcf1570] Setfield v1.2.0
  [65257c39] ShaderAbstractions v0.5.1
  [73760f76] SignedDistanceFields v0.4.1
  [727e6d20] SimpleNonlinearSolve v2.14.6
  [699a6c99] SimpleTraits v0.9.6
  [45858cf5] Sixel v0.1.6
  [ed01d8cd] Sobol v1.5.0
  [a2af1166] SortingAlgorithms v1.2.3
  [a57abbd0] SparseColumnPivotedQR v2.1.8
  [9f842d2f] SparseConnectivityTracer v1.2.4
  [0a514795] SparseMatrixColorings v0.4.29
  [276daf66] SpecialFunctions v2.9.1
  [91464d47] StableTasks v0.1.7
  [cae243ae] StackViews v0.1.2
⌅ [0c0c59c1] StarAlgebras v0.3.1
  [64909d44] StateSelection v1.11.1
  [aedffcd0] Static v1.4.6
  [0d7ed370] StaticArrayInterface v1.10.0
  [90137ffa] StaticArrays v1.9.24
  [1e83bf80] StaticArraysCore v1.4.4
  [10745b16] Statistics v1.11.5
  [82ae8749] StatsAPI v1.8.0
  [2913bbd2] StatsBase v0.34.13
  [4c63d2b9] StatsFuns v2.2.1
  [69024149] StringEncodings v0.3.7
  [892a3eda] StringManipulation v0.6.1
  [09ab397b] StructArrays v0.7.4
  [ec057cc2] StructUtils v2.12.0
  [2efcf032] SymbolicIndexingInterface v0.3.55
  [19f23fe9] SymbolicLimits v1.2.2
  [d1185830] SymbolicUtils v4.54.0
  [0c5d862f] Symbolics v7.48.0
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.14.0
  [ed4db957] TaskLocalValues v0.1.3
  [62fd8b95] TensorCore v0.1.1
  [8ea1fca8] TermInterface v2.0.1
  [5d786b92] TerminalLoggers v0.1.8
  [1c621080] TestItems v1.1.0
  [731e570b] TiffImages v0.11.9
  [a759f4b9] TimerOutputs v1.2.2
  [3bb67fe8] TranscodingStreams v0.11.3
  [981d1d27] TriplotBase v0.1.0
  [781d530d] TruncatedStacktraces v1.4.0
  [5c2747f8] URIs v1.7.3
  [3a884ed6] UnPack v1.0.2
  [1cfade01] UnicodeFun v0.4.1
  [1986cc42] Unitful v1.29.0
  [d30d5f5c] WeakCacheSets v0.1.0
  [e3aaa7dc] WebP v0.1.3
  [efce3f68] WoodburyMatrices v1.1.0
  [ddb6d928] YAML v0.4.17
  [ae81ac8f] ASL_jll v0.1.5+0
  [6e34b625] Bzip2_jll v1.0.9+0
  [4e9b3aee] CRlibm_jll v1.0.1+0
  [83423d85] Cairo_jll v1.18.8+1
  [a38c48d9] CoreMath_jll v0.1.0+0
⌅ [5ae413db] EarCut_jll v2.2.4+0
  [2e619515] Expat_jll v2.10.0+0
  [b22a6f82] FFMPEG_jll v9.0.2+0
  [a3f928ae] Fontconfig_jll v2.18.3+0
⌅ [d7e528f0] FreeType2_jll v2.14.3+1
  [559328eb] FriBidi_jll v1.0.19+0
⌅ [b0724c58] GettextRuntime_jll v0.22.4+0
  [59f7168a] Giflib_jll v6.1.3+0
  [020c3dae] Git_LFS_jll v3.8.1+0
  [f8c6e375] Git_jll v2.56.0+0
  [7746bdde] Glib_jll v2.90.1+0
  [3b182d85] Graphite2_jll v1.3.16+0
  [2e76f6c2] HarfBuzz_jll v100.15000.0+0
  [e33a78d0] Hwloc_jll v2.15.0+0
  [905a6f67] Imath_jll v3.2.2+0
  [1d5cc7b8] IntelOpenMP_jll v2025.2.0+0
⌅ [9cc047cb] Ipopt_jll v300.1400.1902+0
  [aacddb02] JpegTurbo_jll v3.2.1+0
  [c1c5ebd0] LAME_jll v3.100.3+0
  [88015f11] LERC_jll v4.3.0+0
  [1d63c593] LLVMOpenMP_jll v23.1.1+0
  [81d17ec3] L_BFGS_B_jll v3.0.1+0
⌅ [e9f186c6] Libffi_jll v3.4.7+0
  [7e76a0d4] Libglvnd_jll v1.7.1+1
  [94ce4f54] Libiconv_jll v1.18.0+0
  [4b2f31a3] Libmount_jll v2.42.4+0
  [89763e89] Libtiff_jll v4.7.3+0
  [38a345b3] Libuuid_jll v2.42.4+0
  [d00139f3] METIS_jll v5.1.4+0
  [856f044c] MKL_jll v2025.2.0+0
  [d7ed1dd3] MUMPS_seq_jll v500.900.100+0
  [e7412a2a] Ogg_jll v1.3.6+0
  [656ef2d0] OpenBLAS32_jll v0.3.34+1
  [6cdc7f73] OpenBLASConsistentFPCSR_jll v0.3.34+0
  [18a262bb] OpenEXR_jll v3.5.3+0
⌅ [95196869] OpenJPH_jll v0.32.0+0
  [9bd350c2] OpenSSH_jll v10.6.1+0
  [efe28fd5] OpenSpecFun_jll v0.5.6+0
  [91d4177d] Opus_jll v1.6.1+0
  [36c8627f] Pango_jll v1.58.2+0
  [30392449] Pixman_jll v0.46.4+0
  [f50d1b31] Rmath_jll v0.5.2+0
  [319450e9] SPRAL_jll v2025.9.18+1
  [02c8fc9c] XML2_jll v2.15.4+0
  [ffd25f8a] XZ_jll v5.8.4+0
  [4f6342f7] Xorg_libX11_jll v1.8.14+0
  [0c0b7dd1] Xorg_libXau_jll v1.0.13+0
  [a3789734] Xorg_libXdmcp_jll v1.1.6+0
  [1082639a] Xorg_libXext_jll v1.3.8+0
  [d091e8ba] Xorg_libXfixes_jll v6.0.2+0
  [ea2f1a96] Xorg_libXrender_jll v0.9.13+0
  [a65dc6b1] Xorg_libpciaccess_jll v0.19.0+0
  [c7cfdc94] Xorg_libxcb_jll v1.17.1+0
  [c5fb5394] Xorg_xtrans_jll v1.6.0+0
  [9a68df92] isoband_jll v0.2.3+0
  [a4ae2306] libaom_jll v3.15.3+0
  [0ac62f75] libass_jll v0.17.5+0
  [46979653] libdeflate_jll v1.26.0+1
  [8e53e030] libdrm_jll v2.4.134+0
⌅ [f638f0a6] libfdk_aac_jll v2.0.4+0
  [b53b4c65] libpng_jll v1.6.59+1
  [075b6546] libsixel_jll v1.80.702+0
  [9a156e7d] libva_jll v2.24.1+0
  [f27f6e37] libvorbis_jll v1.3.8+0
  [c5f90fcd] libwebp_jll v1.6.1+0
  [1317d2d5] oneTBB_jll v2023.1.0+0
⌅ [1270edf5] x264_jll v10164.0.1+0
⌅ [dfaa095f] x265_jll v4.1.0+0
  [0dad84c5] ArgTools v1.1.2
  [56f22d72] Artifacts v1.11.0
  [2a0f44e3] Base64 v1.11.0
  [8bf52ea8] CRC32c v1.11.0
  [ade2ca70] Dates v1.11.0
  [8ba89e20] Distributed v1.11.0
  [f43a241f] Downloads v1.7.0
  [7b1f6079] FileWatching v1.11.0
  [9fa8497b] Future v1.11.0
  [b77e0a4c] InteractiveUtils v1.11.0
  [ac6e5ff7] JuliaSyntaxHighlighting v1.12.0
  [4af54fe1] LazyArtifacts v1.11.0
  [b27032c2] LibCURL v1.0.0
  [76f85450] LibGit2 v1.11.0
  [8f399da3] Libdl v1.11.0
  [37e2e46d] LinearAlgebra v1.13.0
  [56ddb016] Logging v1.11.0
  [d6f4376e] Markdown v1.11.0
  [a63ad114] Mmap v1.11.0
  [ca575930] NetworkOptions v1.3.0
  [44cfe95a] Pkg v1.13.0
  [de0858da] Printf v1.11.0
  [3fa0cd96] REPL v1.11.0
  [9a3f8284] Random v1.11.0
  [ea8e919c] SHA v1.0.0
  [9e88b42a] Serialization v1.11.0
  [1a1011a3] SharedArrays v1.11.0
  [6462fe0b] Sockets v1.11.0
  [2f01184e] SparseArrays v1.13.0
  [f489334b] StyledStrings v1.11.0
  [4607b0f0] SuiteSparse
  [fa267f1f] TOML v1.0.3
  [a4e569a6] Tar v1.10.0
  [8dfed614] Test v1.11.0
  [cf7118a7] UUIDs v1.11.0
  [4ec0a83e] Unicode v1.11.0
  [e66e0078] CompilerSupportLibraries_jll v1.5.5+2
  [deac9b47] LibCURL_jll v8.22.0+0
  [e37daf67] LibGit2_jll v1.9.7+0
  [29816b5a] LibSSH2_jll v1.11.104+0
  [14a3606d] MozillaCACerts_jll v2026.10.20
  [4536629a] OpenBLAS_jll v0.3.30+0
  [05823500] OpenLibm_jll v0.8.7+0
  [458c3c95] OpenSSL_jll v3.5.8+0
  [efcefdf7] PCRE2_jll v10.47.0+0
  [bea87d4a] SuiteSparse_jll v7.10.1+0
  [83775a58] Zlib_jll v1.3.2+0
  [3161d3a3] Zstd_jll v1.5.7+1
  [8e850b90] libblastrampoline_jll v5.15.0+0
  [8e850ede] nghttp2_jll v1.70.0+0
  [3f19e933] p7zip_jll v17.8.3+0
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`

This page was generated using Literate.jl.