From 002ff890216fddc4ee7b00fd81f692c8c60eb205 Mon Sep 17 00:00:00 2001 From: Olivier Cots Date: Mon, 9 Nov 2026 21:54:15 +0100 Subject: [PATCH 01/12] feat(models): implement ModelingToolkit trajectory extraction (#439) Add dynamic_trajectory and trajectory functions in SolveModelingToolkit to reconstruct state and control trajectories from Corleone solutions for the documentation results pipeline (#314). Add unit tests in test_methods.jl. --- test/common/solve_modelingtoolkit.jl | 102 +++++++++++++++++++++ test/suite/ModelingToolkit/Project.toml | 1 + test/suite/ModelingToolkit/test_methods.jl | 23 +++++ 3 files changed, 126 insertions(+) diff --git a/test/common/solve_modelingtoolkit.jl b/test/common/solve_modelingtoolkit.jl index 57d3d9105..ffa5789ab 100644 --- a/test/common/solve_modelingtoolkit.jl +++ b/test/common/solve_modelingtoolkit.jl @@ -205,4 +205,106 @@ function outcome(res) ) end +""" +Reconstruct the `Corleone.Trajectory` from an optimization solution `res` and problem `pb`. +""" +function dynamic_trajectory( + res, + pb; + grid_size::Int=Main.TestConfigs.SMOKE_GRID, + shooting::Symbol=:single, +) + shooting === :single || throw(ArgumentError("unsupported shooting method $shooting")) + sys = OCP.model(pb) + iv = MTK.independent_variable(sys) + t0, tf = _extract_tspan(sys) + grid = range(t0, tf, length=grid_size) + + # Discretize path constraints over the grid + sys_disc = _discretize_path_constraints(sys, grid) + + # Controls and initial values + ctrl_syms = filter(MTK.isinput, MTK.unknowns(sys)) + inits = [u => 0.0 for u in ctrl_syms] + switches = [u => collect(grid[1:(end - 1)]) for u in ctrl_syms] + + opt_prob = Corleone.CorleoneDynamicOptProblem( + sys_disc, + inits, + switches...; + algorithm=Tsit5(), + tspan=(t0, tf), + ) + + _, reconstruct = Corleone.pack(Val(:ComponentArrays), opt_prob.ps) + current = reconstruct(res.u) + traj, _ = opt_prob.layer( + (opt_prob.layer.problem, opt_prob.evaluation_grid), current, opt_prob.st + ) + return traj +end + +""" +The trajectory of a solution `res` for the plots of the documentation (#314). +Matches the schema of `TestStatus.trajectory` with empty costates as Corleone is a +direct shooting solver without explicit costates. +""" +function trajectory( + res, + pb; + grid_size::Int=Main.TestConfigs.SMOKE_GRID, + shooting::Symbol=:single, +) + (hasproperty(res, :u) && !isnothing(res.u)) || return nothing + try + traj = dynamic_trajectory(res, pb; grid_size=grid_size, shooting=shooting) + sys = OCP.model(pb) + t = collect(traj.t) + n_points = length(t) + + # Points kept on the time grid: at most 501 points like TestStatus.TRAJECTORY_POINTS + max_points = 501 + keep = if n_points <= max_points + eachindex(t) + else + unique(round.(Int, range(1, n_points; length=max_points))) + end + t_sub = t[keep] + r(v) = round(Float64(v); sigdigits=6) + + xs = CTModels.Models.state_components(sys) + us = CTModels.Models.control_components(sys) + vs = CTModels.Models.variable_components(sys) + + state_dict = Dict{String,Vector{Float64}}() + for name in xs + sym = Symbol(name) + vals = traj[sym] + state_dict[name] = [r(vals[i]) for i in keep] + end + + control_dict = Dict{String,Vector{Float64}}() + for name in us + sym = Symbol(name) + vals = traj[sym] + # Control is piecewise-constant on intervals (length n_points - 1). + # Extend to n_points so it aligns with the time grid. + full_vals = [vals[min(i, length(vals))] for i in 1:n_points] + control_dict[name] = [r(full_vals[i]) for i in keep] + end + + return Dict{String,Any}( + "time" => r.(t_sub), + "state" => state_dict, + "control" => control_dict, + "costate" => Dict{String,Vector{Float64}}(), + "variable" => Float64[], + "names" => Dict("state" => xs, "control" => us, "variable" => vs), + ) + catch err + @warn "No trajectory for this ModelingToolkit solve" exception = err + return nothing + end +end + end # module SolveModelingToolkit diff --git a/test/suite/ModelingToolkit/Project.toml b/test/suite/ModelingToolkit/Project.toml index 0655f64e7..533b5ae58 100644 --- a/test/suite/ModelingToolkit/Project.toml +++ b/test/suite/ModelingToolkit/Project.toml @@ -6,6 +6,7 @@ Corleone = "2751e0db-33e9-4374-b36d-b7219e1e6b40" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" +OptimalControlProblems = "59046045-fb9c-4c23-964f-ff0a25704f96" Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba" OptimizationMOI = "fd9f6733-72f4-499f-8506-86b2bdd0dea1" OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" diff --git a/test/suite/ModelingToolkit/test_methods.jl b/test/suite/ModelingToolkit/test_methods.jl index bc8b784e5..695576567 100644 --- a/test/suite/ModelingToolkit/test_methods.jl +++ b/test/suite/ModelingToolkit/test_methods.jl @@ -59,6 +59,29 @@ function test_methods() Test.@test haskey(out, :converged) Test.@test haskey(out, :objective) Test.@test isfinite(out.objective) + + # 8. trajectory reconstruction + dyn_traj = Main.SolveModelingToolkit.dynamic_trajectory(res, pb; grid_size=10) + Test.@test dyn_traj isa Main.SolveModelingToolkit.Corleone.Trajectory + Test.@test length(dyn_traj.t) == 10 + + tr = Main.SolveModelingToolkit.trajectory(res, pb; grid_size=10) + Test.@test tr isa Dict{String,Any} + Test.@test haskey(tr, "time") + Test.@test haskey(tr, "state") + Test.@test haskey(tr, "control") + Test.@test haskey(tr, "costate") + Test.@test haskey(tr, "variable") + Test.@test haskey(tr, "names") + Test.@test length(tr["time"]) == 10 + Test.@test isempty(tr["costate"]) + Test.@test isempty(tr["variable"]) + Test.@test haskey(tr["state"], "x₁") + Test.@test haskey(tr["state"], "x₂") + Test.@test haskey(tr["control"], "u") + Test.@test length(tr["state"]["x₁"]) == 10 + Test.@test length(tr["state"]["x₂"]) == 10 + Test.@test length(tr["control"]["u"]) == 10 end end From 336e03b543ae5609c000016f6391966653663b3c Mon Sep 17 00:00:00 2001 From: Olivier Cots Date: Mon, 9 Nov 2026 21:54:46 +0100 Subject: [PATCH 02/12] ci(cron): add ModelingToolkit convergence cron and workflow schedule (#439) Add test/cron/ModelingToolkit/test_convergence.jl to record convergence and trajectories for ModelingToolkit problems against analytic and discretized references. Enable the Saturday cron schedule in CronModelingToolkit.yml and update cron report scope description. --- .github/workflows/CronModelingToolkit.yml | 12 ++- test/cron/ModelingToolkit/test_convergence.jl | 73 +++++++++++++++++++ tools/cron/report.py | 2 +- 3 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 test/cron/ModelingToolkit/test_convergence.jl diff --git a/.github/workflows/CronModelingToolkit.yml b/.github/workflows/CronModelingToolkit.yml index bcbcba711..a9287ab53 100644 --- a/.github/workflows/CronModelingToolkit.yml +++ b/.github/workflows/CronModelingToolkit.yml @@ -1,7 +1,15 @@ name: Cron ModelingToolkit on: + schedule: + - cron: "0 4 * * 6" workflow_dispatch: + inputs: + problems: + description: "Only these problems, comma-separated (e.g. beam): publishes their results, leaves the reports, the state and the issues" + required: false + default: '' + type: string permissions: contents: read @@ -16,6 +24,6 @@ jobs: uses: ./.github/workflows/cron-reusable.yml with: environment: ModelingToolkit - enabled: false - note: "`CronModelingToolkit.yml` · manual only until the scope exists" + problems: ${{ inputs.problems }} + note: "`CronModelingToolkit.yml` · weekly (Saturday 04:00 UTC) · Julia 1.13, Ubuntu, CPU" secrets: inherit diff --git a/test/cron/ModelingToolkit/test_convergence.jl b/test/cron/ModelingToolkit/test_convergence.jl new file mode 100644 index 000000000..475c5fa19 --- /dev/null +++ b/test/cron/ModelingToolkit/test_convergence.jl @@ -0,0 +1,73 @@ +isdefined(Main, :SolveModelingToolkit) || + include(joinpath(@__DIR__, "..", "..", "common", "solve_modelingtoolkit.jl")) + +module TestConvergenceModelingToolkit + +using Test: Test +using ModelingToolkit: ModelingToolkit as MTK +using OptimalControlProblems: OptimalControlProblems + +const VERBOSE = isdefined(Main, :TestOptions) ? Main.TestOptions.VERBOSE : true +const SHOWTIMING = isdefined(Main, :TestOptions) ? Main.TestOptions.SHOWTIMING : true + +function test_convergence() + S = Main.SolveModelingToolkit + backend = OptimalControlProblems.ModelingToolkitBackend() + Test.@testset "ModelingToolkit convergence report (default grid)" verbose = VERBOSE showtiming = + SHOWTIMING begin + for config in Main.TestConfigs.CONFIGS.ModelingToolkit + Test.@testset "$(Main.TestConfigs.label(config))" begin + test = "test_convergence $(Main.TestConfigs.label(config))" + Main.TestStatus.for_each_problem(test, backend) do problem + pb = getfield(OptimalControlProblems, problem)(backend) + N = OptimalControlProblems.grid_size_data(problem) + time = @elapsed sol = S.solve( + pb, config; grid_size=N, max_iter=Main.TestConfigs.MAX_ITER + ) + scheme = Symbol(:shooting_, get(config, :shooting, :single)) + stg = S.settings(config) + # convergence is reported, not tested (#360); an exception still fails + Main.TestStatus.result!( + test, + problem, + backend, + Main.TestConfigs.label(config); + modeler=stg.modeler, + solver=stg.solver, + options=stg.options, + grid_size=N, + scheme=scheme, + S.outcome(sol)..., + time=time, + trajectory=S.trajectory(sol, pb; grid_size=N), + ) + + # Log comparisons against analytic and trapezoidal reference objectives + analytic = OptimalControlProblems.analytic_reference(problem) + trapezoid = OptimalControlProblems.reference_objective( + problem; grid_size=N, scheme=:trapeze + ) + if !isnothing(analytic) + gap_analytic = + abs(sol.objective - analytic.objective) / abs(analytic.objective) + println( + " [$(problem)] gap to analytic objective ($(analytic.objective)): $(round(gap_analytic * 100; digits=4))%", + ) + end + if !isnothing(trapezoid) + gap_trap = abs(sol.objective - trapezoid) / abs(trapezoid) + println( + " [$(problem)] gap to OptimalControl trapezoid ($(trapezoid)): $(round(gap_trap * 100; digits=4))%", + ) + end + + Test.@test true + end + end + end + end +end + +end # module TestConvergenceModelingToolkit + +test_convergence() = TestConvergenceModelingToolkit.test_convergence() diff --git a/tools/cron/report.py b/tools/cron/report.py index c1ca0e996..b95abd15b 100644 --- a/tools/cron/report.py +++ b/tools/cron/report.py @@ -76,7 +76,7 @@ "ModelingToolkit": { "title": "ModelingToolkit — Nominal Convergence", "focus": "Symbolic modeling backend with ModelingToolkit.jl", - "cadence": "Manual dispatch (disabled until the environment exists)", + "cadence": "Weekly (Saturday 04:00 UTC) · Julia 1.13, Ubuntu (CPU)", }, } From 4dc89d2d2bd4b6a99ae6585926e8e6baf1d5f917 Mon Sep 17 00:00:00 2001 From: Olivier Cots Date: Mon, 9 Nov 2026 21:55:21 +0100 Subject: [PATCH 03/12] docs: add ModelingToolkit to documentation adapter and references (#439) Add ModelingToolkit to docs Project.toml, make.jl, api_reference.jl, and update the ModelingToolkit adapter in modelings.jl with Corleone direct shooting explanation and snippet. Fix Documenter cross-references to OptimalControlProblems.Problems.Problem. --- docs/Project.toml | 3 + docs/api_reference.jl | 1 + docs/make.jl | 4 + docs/modelings.jl | 23 +- docs/src/assets/Manifest.toml | 1177 ++++++++++++++++++++- docs/src/assets/Project.toml | 3 + docs/src/getting-started/first-problem.md | 2 +- docs/src/guide/get.md | 2 +- docs/src/migration.md | 2 +- 9 files changed, 1195 insertions(+), 22 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 6ed84e7f8..800d6d2e9 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -10,8 +10,10 @@ JuMP = "4076af6c-e467-56ae-b986-b466b2749572" LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589" MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6" Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" +ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71" OptimalControl = "5f98b655-cc9a-415a-b60e-744165666948" +OptimalControlProblems = "59046045-fb9c-4c23-964f-ff0a25704f96" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" @@ -30,6 +32,7 @@ JuMP = "1" LiveServer = "1" MadNLP = "0.10" Markdown = "1" +ModelingToolkit = "11" NLPModelsIpopt = "0.11" OptimalControl = "2.2" Plots = "1" diff --git a/docs/api_reference.jl b/docs/api_reference.jl index fa135e00e..32d42efee 100644 --- a/docs/api_reference.jl +++ b/docs/api_reference.jl @@ -58,6 +58,7 @@ function generate_api_reference(src_dir::String, ext_dir::String) ), ), (sym=:OptimalControlModels, files=ext("OptimalControlModels.jl")), + (sym=:ModelingToolkitModels, files=ext("ModelingToolkitModels.jl")), ] loaded_extensions = [ (cfg=cfg, mod=Base.get_extension(OptimalControlProblems, cfg.sym)) for diff --git a/docs/make.jl b/docs/make.jl index 0da100356..7dc1f620a 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -14,6 +14,7 @@ using CTBase # automatic API reference using OptimalControlProblems using OptimalControl # loads the OptimalControl extension using JuMP # loads the JuMP extension +using ModelingToolkit: ModelingToolkit # loads the ModelingToolkit extension using Plots # The extensions, by name, for the `@docs` blocks of the API Reference. @@ -21,6 +22,9 @@ const JuMPModels = Base.get_extension(OptimalControlProblems, :JuMPModels) const OptimalControlModels = Base.get_extension( OptimalControlProblems, :OptimalControlModels ) +const ModelingToolkitModels = Base.get_extension( + OptimalControlProblems, :ModelingToolkitModels +) # Plots are saved as SVG (SITE12): DocumenterVitepress prefers PNG when both are offered. Base.showable(::MIME"image/png", ::Plots.Plot) = false diff --git a/docs/modelings.jl b/docs/modelings.jl index 6eb1ac51e..a14ca9737 100644 --- a/docs/modelings.jl +++ b/docs/modelings.jl @@ -76,13 +76,30 @@ const ADAPTERS = Dict{Symbol,NamedTuple}( :ModelingToolkit => ( title="ModelingToolkit", summary="The continuous problem, written with ModelingToolkit.jl, solved with direct \ - shooting via Corleone.jl.", - packages=["ModelingToolkit", "Corleone", "Ipopt"], + shooting via Corleone.jl. With direct shooting in Corleone, the state path constraint is \ + enforced at the points of a constraint grid, and controls are piecewise constant on a \ + control grid.", + packages=["ModelingToolkit", "Corleone", "Optimization", "Ipopt"], snippet=(problem, grid_size) -> """ using ModelingToolkit, OptimalControlProblems + using Corleone, Ipopt, Optimization, OptimizationMOI, OrdinaryDiffEqTsit5 pb = $(problem)(ModelingToolkitBackend()) - sys = model(pb)""", + sys = model(pb) + + # Discretize path constraints on a constraint grid and setup direct shooting + grid = range(0.0, 1.0, length=$(grid_size)) + ctrl = filter(ModelingToolkit.isinput, ModelingToolkit.unknowns(sys)) + inits = [u => initial_guess(pb).control for u in ctrl] + switches = [u => collect(grid[1:(end - 1)]) for u in ctrl] + + opt_prob = CorleoneDynamicOptProblem( + sys, inits, switches...; + algorithm=Tsit5(), tspan=(0.0, 1.0), + ) + prob = OptimizationProblem(opt_prob, AutoForwardDiff()) + res = solve(prob, Ipopt.Optimizer()) + res.objective""", model_start=r"^\s*ModelingToolkit\.@named sys = ModelingToolkit\.System\(", checked_against=:OptimalControl, ), diff --git a/docs/src/assets/Manifest.toml b/docs/src/assets/Manifest.toml index 6a49bd7d3..606ebc2b3 100644 --- a/docs/src/assets/Manifest.toml +++ b/docs/src/assets/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.12.7" manifest_format = "2.0" -project_hash = "c9565a74a5921d788dccbbf8f436abaa8500d2f5" +project_hash = "3edf56e528cf1922efdf718854ae0881c21d78d4" [[deps.ADNLPModels]] deps = ["ADTypes", "DifferentiationInterface", "ForwardDiff", "LinearAlgebra", "NLPModels", "ReverseDiff", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings"] @@ -21,17 +21,13 @@ deps = ["PrecompileTools"] git-tree-sha1 = "629de23e1c16911b439dabd2303c08af9575b226" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" version = "1.24.0" +weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] [deps.ADTypes.extensions] ADTypesChainRulesCoreExt = "ChainRulesCore" ADTypesConstructionBaseExt = "ConstructionBase" ADTypesEnzymeCoreExt = "EnzymeCore" - [deps.ADTypes.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - [[deps.AMD]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] git-tree-sha1 = "344f3d221a6bee75925b5c97a30cfd870f12a138" @@ -49,11 +45,40 @@ git-tree-sha1 = "21a22cd1a6d45034933824665cfb874ec425a14b" uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.5+0" +[[deps.AbstractPlutoDingetjes]] +git-tree-sha1 = "e71ee7b4aa06b045259a7d6101e1cb45ad140bce" +uuid = "6e696c72-6542-2067-7265-42206c756150" +version = "1.4.1" + [[deps.AbstractTrees]] git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" version = "0.4.5" +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "8c0bc12397dabf5d2dfc4b5763ec463854cc44d3" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.46" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + [[deps.Adapt]] deps = ["LinearAlgebra"] git-tree-sha1 = "eec8a0ad4e4b673afba213931504c360fffb8f97" @@ -75,6 +100,61 @@ version = "1.1.3" uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.2" +[[deps.ArnoldiMethod]] +deps = ["LinearAlgebra", "Random", "StaticArrays"] +git-tree-sha1 = "d57bd3762d308bded22c3b82d033bff85f6195c6" +uuid = "ec485272-7323-5ecc-a04f-4719b315124d" +version = "0.4.0" + +[[deps.ArrayInterface]] +deps = ["Adapt", "LinearAlgebra"] +git-tree-sha1 = "1aec1ff0dcaa83a484e7f72097562fa3102c6722" +uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +version = "7.30.2" + + [deps.ArrayInterface.extensions] + ArrayInterfaceAMDGPUExt = "AMDGPU" + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceCUDSSExt = ["CUDSS", "CUDA"] + ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" + ArrayInterfaceChainRulesExt = "ChainRules" + ArrayInterfaceFillArraysExt = "FillArrays" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceGPUArraysCoreTrackerExt = ["GPUArraysCore", "Tracker"] + ArrayInterfaceMetalExt = "Metal" + ArrayInterfaceReverseDiffExt = "ReverseDiff" + ArrayInterfaceSparseArraysExt = "SparseArrays" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "8fde25d92e917350570f1203e47c933d16b77dce" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.16.0" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" version = "1.11.0" @@ -89,10 +169,67 @@ version = "1.7.0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" CUDACore = "bd0ed864-bdfe-4181-a5ed-ce625a5fdea2" +[[deps.BandedMatrices]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "PrecompileTools"] +git-tree-sha1 = "54e3d0ce61d4c4863911fe2823d18b27d8d32988" +uuid = "aae01518-5342-5314-be14-df237901396f" +version = "1.14.0" + + [deps.BandedMatrices.extensions] + BandedMatricesSparseArraysExt = "SparseArrays" + CliqueTreesExt = "CliqueTrees" + + [deps.BandedMatrices.weakdeps] + CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" version = "1.11.0" +[[deps.Bijections]] +git-tree-sha1 = "a2d308fcd4c2fb90e943cf9cd2fbfa9c32b69733" +uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" +version = "0.2.2" + +[[deps.BinaryHeaps]] +deps = ["PrecompileTools"] +git-tree-sha1 = "0adb6d8d0a4bae93a07d79c8d59eaf617f4c59da" +uuid = "b2a6c25c-c996-4615-94ab-6e519ffb8690" +version = "1.1.0" + +[[deps.BipartiteGraphs]] +deps = ["DataStructures", "DocStringExtensions", "Graphs", "PrecompileTools"] +git-tree-sha1 = "8fe09d06277d807ac5893f470a91f71cc832f913" +uuid = "caf10ac8-0290-4205-88aa-f15908547e8d" +version = "0.1.15" +weakdeps = ["SparseArrays"] + + [deps.BipartiteGraphs.extensions] + BipartiteGraphsSparseArraysExt = "SparseArrays" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "876d4c4b941cc8b079da79c88d9c2dee52b9dd13" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.10.3" +weakdeps = ["Adapt", "BandedMatrices"] + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + +[[deps.BracketingNonlinearSolve]] +deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLLogging"] +git-tree-sha1 = "b1b04c236ff7ed92e69d64b620448b3da00933d4" +uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" +version = "1.12.8" +weakdeps = ["ChainRulesCore", "ForwardDiff"] + + [deps.BracketingNonlinearSolve.extensions] + BracketingNonlinearSolveChainRulesCoreExt = ["ChainRulesCore", "ForwardDiff"] + BracketingNonlinearSolveForwardDiffExt = "ForwardDiff" + [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" @@ -292,6 +429,11 @@ git-tree-sha1 = "0737a3e59f9d94957f5b177fa2ca40901636b85b" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" version = "0.13.4" +[[deps.Combinatorics]] +git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.2" + [[deps.CommonSolve]] deps = ["PrecompileTools"] git-tree-sha1 = "6c389fa857f6ca5a95474b52a52023fd77f24cb7" @@ -304,6 +446,12 @@ git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.1" +[[deps.CommonWorldInvalidations]] +deps = ["PrecompileTools"] +git-tree-sha1 = "7c4ea0adfb7238bf4678aa36325863fab6163f6f" +uuid = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" +version = "1.2.2" + [[deps.Compat]] deps = ["TOML", "UUIDs"] git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad" @@ -319,6 +467,37 @@ deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" version = "1.3.1+2" +[[deps.CompositeTypes]] +git-tree-sha1 = "bce26c3dab336582805503bed209faab1c279768" +uuid = "b152e2b5-7a66-4b01-a709-34e65c35f657" +version = "0.1.4" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConcreteStructs]] +deps = ["PrecompileTools"] +git-tree-sha1 = "a72c3b5ce6d2a477f55b5c9b8756e91e695c67f6" +uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" +version = "0.2.8" + +[[deps.ConstructionBase]] +git-tree-sha1 = "b1bc10667320dd5367aff450a992c951ea38fbbc" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.6.1" +weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + [[deps.Contour]] git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" @@ -336,9 +515,9 @@ version = "1.16.0" [[deps.DataFrames]] deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] -git-tree-sha1 = "5fab31e2e01e70ad66e3e24c968c264d1cf166d6" +git-tree-sha1 = "fd798b61b03b15dda0715aac807885397e6ded88" uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "1.8.2" +version = "1.8.3" [[deps.DataStructures]] deps = ["OrderedCollections"] @@ -368,6 +547,61 @@ git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" version = "1.9.1" +[[deps.DiffEqBase]] +deps = ["ArrayInterface", "BracketingNonlinearSolve", "DocStringExtensions", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "RespecializeParams", "SciMLBase", "SciMLLogging", "SciMLOperators", "SciMLStructures", "Setfield", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "47230845a4944d292c07079838bdfee25bffebf8" +uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" +version = "7.21.6" + + [deps.DiffEqBase.extensions] + DiffEqBaseCUDAExt = "CUDA" + DiffEqBaseChainRulesCoreExt = "ChainRulesCore" + DiffEqBaseDynamicQuantitiesExt = "DynamicQuantities" + DiffEqBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] + DiffEqBaseFlexUnitsExt = "FlexUnits" + DiffEqBaseForwardDiffExt = ["ForwardDiff"] + DiffEqBaseGTPSAExt = "GTPSA" + DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" + DiffEqBaseMPIExt = "MPI" + DiffEqBaseMeasurementsExt = "Measurements" + DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseMooncakeExt = "Mooncake" + DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseSparseArraysExt = "SparseArrays" + DiffEqBaseTrackerExt = "Tracker" + DiffEqBaseUnitfulExt = "Unitful" + + [deps.DiffEqBase.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + FlexUnits = "76e01b6b-c995-4ce6-8559-91e72a3d4e95" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.DiffEqCallbacks]] +deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "LinearAlgebra", "Markdown", "PrecompileTools", "Random", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "dc3c0668779fd5783c075dab6ed53371eea12e8c" +uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" +version = "4.19.6" + + [deps.DiffEqCallbacks.extensions] + DiffEqCallbacksFunctorsExt = "Functors" + + [deps.DiffEqCallbacks.weakdeps] + Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196" + [[deps.DiffResults]] deps = ["StaticArraysCore"] git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" @@ -433,6 +667,11 @@ version = "0.7.22" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + [[deps.DocInventories]] deps = ["CodecZlib", "Downloads", "TOML"] git-tree-sha1 = "e97cfa8680a39396924dcdca4b7ff1014ed5c499" @@ -462,16 +701,48 @@ version = "0.3.9" [deps.DocumenterVitepress.weakdeps] DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" +[[deps.DomainSets]] +deps = ["CompositeTypes", "FunctionMaps", "IntervalSets", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "6ac879a64381881dc24f96a15e13e80204439906" +uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" +version = "0.8.3" + + [deps.DomainSets.extensions] + DomainSetsMakieExt = "Makie" + DomainSetsRandomExt = "Random" + DomainSetsRecipesBaseExt = "RecipesBase" + + [deps.DomainSets.weakdeps] + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" + [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.7.0" +[[deps.DynamicPolynomials]] +deps = ["LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Reexport", "StarAlgebras"] +git-tree-sha1 = "b95c4325301d86a6a1b59790b71f7269a8702dd5" +uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" +version = "0.6.8" + [[deps.EnumX]] git-tree-sha1 = "c49898e8438c828577f04b92fc9368c388ac783c" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.7" +[[deps.EnzymeCore]] +git-tree-sha1 = "d88c803e26799193db42e47f6e1e28eeb0322e4d" +uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" +version = "0.8.27" +weakdeps = ["Adapt", "ChainRulesCore"] + + [deps.EnzymeCore.extensions] + AdaptExt = "Adapt" + EnzymeCoreChainRulesCoreExt = "ChainRulesCore" + [[deps.EpollShim_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" @@ -514,6 +785,16 @@ git-tree-sha1 = "d2e49e7efd29719d6f28b891b0e0e159daa9d2b4" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" version = "0.1.11" +[[deps.ExpressionExplorer]] +git-tree-sha1 = "fdcc9d4a253e0041d37c95487f9ae027c3ec002d" +uuid = "21656369-7473-754a-2065-74616d696c43" +version = "1.1.6" + +[[deps.ExproniconLite]] +git-tree-sha1 = "250aa1562e840b38c72b44a9ebef0f39f6b6e950" +uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" +version = "0.10.16" + [[deps.FFMPEG]] deps = ["FFMPEG_jll"] git-tree-sha1 = "7bd13840b4148949e290748071bbe6826b3eabcd" @@ -526,11 +807,51 @@ git-tree-sha1 = "d9d3cd382f2c999f684e6bfa4039fcc16c153b6f" uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" version = "9.0.2+0" +[[deps.FastBroadcast]] +deps = ["ArrayInterface", "LinearAlgebra", "PrecompileTools"] +git-tree-sha1 = "093bf5e9ea63b36032240033ec2f149088fc0926" +uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" +version = "1.5.1" + + [deps.FastBroadcast.extensions] + FastBroadcastPolyesterExt = "Polyester" + FastBroadcastStaticExt = "Static" + FixedSizeArraysExt = "FixedSizeArrays" + + [deps.FastBroadcast.weakdeps] + FixedSizeArrays = "3821ddf9-e5b5-40d5-8e25-6813ab96b5e2" + Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" + Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" + [[deps.FastClosures]] git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" version = "0.3.2" +[[deps.FastPower]] +deps = ["PrecompileTools"] +git-tree-sha1 = "a6bcbd090fc6b6f022fc0ad96f77ba31b9577282" +uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b" +version = "1.5.1" + + [deps.FastPower.extensions] + FastPowerEnzymeExt = "Enzyme" + FastPowerForwardDiffExt = "ForwardDiff" + FastPowerMeasurementsExt = "Measurements" + FastPowerMonteCarloMeasurementsExt = "MonteCarloMeasurements" + FastPowerMooncakeExt = "Mooncake" + FastPowerReverseDiffExt = "ReverseDiff" + FastPowerTrackerExt = "Tracker" + + [deps.FastPower.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" version = "1.11.0" @@ -553,6 +874,38 @@ version = "1.18.2" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +[[deps.FindFirstFunctions]] +deps = ["PrecompileTools"] +git-tree-sha1 = "93eb9afa3a53b29d8a49714b83878225402b3281" +uuid = "64ca27bc-2ba2-4a57-88aa-44e436879224" +version = "3.4.1" + + [deps.FindFirstFunctions.extensions] + FindFirstFunctionsEnzymeCoreExt = "EnzymeCore" + FindFirstFunctionsMooncakeExt = "Mooncake" + + [deps.FindFirstFunctions.weakdeps] + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + +[[deps.FiniteDiff]] +deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] +git-tree-sha1 = "5031f23e040bf17082e5b52422d77b5e844eefb1" +uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" +version = "2.33.0" + + [deps.FiniteDiff.extensions] + FiniteDiffBandedMatricesExt = "BandedMatrices" + FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffSparseArraysExt = "SparseArrays" + FiniteDiffStaticArraysExt = "StaticArrays" + + [deps.FiniteDiff.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + [[deps.FixedPointNumbers]] deps = ["Random", "Statistics"] git-tree-sha1 = "59af96b98217c6ef4ae0dfe065ac7c20831d1a84" @@ -592,11 +945,32 @@ git-tree-sha1 = "e894be022a2eba58463939f1bf1f7f7006f27f52" uuid = "559328eb-81f9-559d-9380-de523a88c83c" version = "1.0.19+0" +[[deps.FunctionMaps]] +deps = ["CompositeTypes", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "31bd99a57edf98990d1c21486032963955450e8d" +uuid = "a85aefff-f8ca-4649-a888-c8e5398bc76c" +version = "0.1.2" + [[deps.FunctionWrappers]] git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" version = "1.1.3" +[[deps.FunctionWrappersWrappers]] +deps = ["FunctionWrappers", "PrecompileTools", "SciMLPublic"] +git-tree-sha1 = "2bcce3ad6f6977d617928d7707fdc86ac83cce03" +uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" +version = "1.13.0" + + [deps.FunctionWrappersWrappers.extensions] + FunctionWrappersWrappersEnzymeExt = ["Enzyme", "EnzymeCore"] + FunctionWrappersWrappersMooncakeExt = "Mooncake" + + [deps.FunctionWrappersWrappers.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" @@ -674,6 +1048,19 @@ git-tree-sha1 = "69ffb934a5c5b7e086a0b4fee3427db2556fba6e" uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" version = "1.3.16+0" +[[deps.Graphs]] +deps = ["ArnoldiMethod", "DataStructures", "Inflate", "LinearAlgebra", "Random", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "dbb2b976f605b220dfe139d6db9f3859680da09e" +uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" +version = "1.15.0" + + [deps.Graphs.extensions] + GraphsSharedArraysExt = "SharedArrays" + + [deps.Graphs.weakdeps] + Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" + SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + [[deps.HTTP]] deps = ["Base64", "CodecZlib", "Dates", "EnumX", "Logging", "PrecompileTools", "Random", "Reseau", "SHA", "TranscodingStreams", "URIs", "UUIDs", "Zlib_jll"] git-tree-sha1 = "70b131ae84fb6ff84d4e70ba1648fb5747e339a0" @@ -693,9 +1080,9 @@ version = "0.2.0" [[deps.Hwloc_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "XML2_jll", "Xorg_libpciaccess_jll"] -git-tree-sha1 = "8226014d201c6d689bf6034302637d2550155206" +git-tree-sha1 = "550c21420b96b46f2f0abe8fc4c9430cd55649e3" uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" -version = "2.15.0+1" +version = "2.15.0+3" [[deps.IOCapture]] deps = ["Logging", "Random"] @@ -703,24 +1090,75 @@ git-tree-sha1 = "0ee181ec08df7d7c911901ea38baf16f755114dc" uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" version = "1.0.0" +[[deps.ImplicitDiscreteSolve]] +deps = ["CommonSolve", "ConcreteStructs", "DiffEqBase", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "OrdinaryDiffEqCore", "Reexport", "SciMLBase", "SymbolicIndexingInterface"] +git-tree-sha1 = "a796d5bbd868177f97a840742e69061d89993a99" +uuid = "3263718b-31ed-49cf-8a0f-35a466e8af96" +version = "2.3.0" + +[[deps.Inflate]] +git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" +uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" +version = "0.1.5" + [[deps.InlineStrings]] -git-tree-sha1 = "06b65886c7577a3784d616e29f1302c2e36e389d" +git-tree-sha1 = "6e0a59a838f58259f49474e913e39c23e8ca1366" uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" -version = "1.4.6" +version = "2.0.1" [deps.InlineStrings.extensions] ArrowTypesExt = "ArrowTypes" ParsersExt = "Parsers" + SerializationExt = "Serialization" [deps.InlineStrings.weakdeps] ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" + Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "c72458f1962faeb003bf23cbdb75164fe6280906" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.4" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "ec1debd61c300961f98064cfb21287613ad7f303" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2025.2.0+0" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" version = "1.11.0" +[[deps.IntervalSets]] +git-tree-sha1 = "0db6aea5b64caa1c47e9fdd27394f0296f05e8bf" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.15" + + [deps.IntervalSets.extensions] + IntervalSetsMakieExt = "Makie" + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" + IntervalSetsStatisticsExt = "Statistics" + + [deps.IntervalSets.weakdeps] + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.InverseFunctions]] +git-tree-sha1 = "5cc6ad3e2bfc75a11eed92632ee341d37f4a4536" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.18" +weakdeps = ["Dates", "Test"] + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + [[deps.InvertedIndices]] git-tree-sha1 = "6da3c4316095de0f5ee2ebd875df8721e7e0bdbe" uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" @@ -778,6 +1216,12 @@ version = "1.13.4" ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +[[deps.Jieko]] +deps = ["ExproniconLite"] +git-tree-sha1 = "2f05ed29618da60c06a87e9c033982d4f71d0b6c" +uuid = "ae98c720-c025-4a4a-838c-29b094483192" +version = "0.2.1" + [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "e06b451acfb1c6fa5ea753b5042207226271f455" @@ -801,21 +1245,35 @@ deps = ["StyledStrings"] uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" version = "1.12.0" +[[deps.JumpProcesses]] +deps = ["ADTypes", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "PoissonRandom", "PrecompileTools", "Random", "RecursiveArrayTools", "SciMLBase", "SimpleNonlinearSolve", "StaticArrays", "SymbolicIndexingInterface"] +git-tree-sha1 = "8bab411bfa528f97ac0f8961288b37c567ed5e80" +uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" +version = "10.1.1" +weakdeps = ["Adapt", "ForwardDiff", "KernelAbstractions", "OrdinaryDiffEqCore"] + + [deps.JumpProcesses.extensions] + JumpProcessesForwardDiffExt = "ForwardDiff" + JumpProcessesKernelAbstractionsExt = ["Adapt", "KernelAbstractions"] + JumpProcessesOrdinaryDiffEqCoreExt = "OrdinaryDiffEqCore" + [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "MacroTools", "PrecompileTools", "Requires", "StaticArrays", "UUIDs"] git-tree-sha1 = "e51d16f9dcff134c4ecf79e7cfa764c59d2d648e" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" version = "0.9.45" +weakdeps = ["EnzymeCore", "LinearAlgebra", "SparseArrays"] [deps.KernelAbstractions.extensions] EnzymeExt = "EnzymeCore" LinearAlgebraExt = "LinearAlgebra" SparseArraysExt = "SparseArrays" - [deps.KernelAbstractions.weakdeps] - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +[[deps.Krylov]] +deps = ["LinearAlgebra", "Printf", "SparseArrays"] +git-tree-sha1 = "b13076e4fff6ea0d0a5ddd9b939a11ca2027755a" +uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" +version = "0.10.12" [[deps.LAME_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -835,6 +1293,21 @@ git-tree-sha1 = "6d7c65411dda4bfa0beb7490476122b4f805cf31" uuid = "88015f11-f218-50d7-93a8-a6af411a945d" version = "4.3.0+0" +[[deps.LHLFactorization]] +deps = ["LinearAlgebra", "PrecompileTools"] +git-tree-sha1 = "51d99d9892d0f95b4c9d4d7310785971f2d48298" +uuid = "2faa5264-e118-4071-8864-e10559f68c7c" +version = "2.2.2" + + [deps.LHLFactorization.extensions] + LHLFactorizationPolyesterExt = "Polyester" + LHLFactorizationSparseExt = ["PureKLU", "SparseArrays"] + + [deps.LHLFactorization.weakdeps] + Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" + PureKLU = "0c0d3e7f-3a8b-4f7e-b6f1-9a4d2e7c1f01" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + [[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "PrecompileTools", "Preferences", "Printf", "ScopedValues", "Unicode"] git-tree-sha1 = "41c2ce7ec5a14c89b93dc6a5853bf2a91d7a8583" @@ -887,6 +1360,11 @@ git-tree-sha1 = "0f2da712350b020bc3957f269c9caad516383ee0" uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" version = "1.3.0" +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +version = "1.11.0" + [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" @@ -952,6 +1430,18 @@ git-tree-sha1 = "9e887184f306b28dbfcff88cefbb0ec80f1aa9e0" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" version = "2.42.4+0" +[[deps.LineSearch]] +deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "PrecompileTools", "ReactantCore", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] +git-tree-sha1 = "53cf132c453dcfcf10f1cb9a701a07c99b7e842e" +uuid = "87fe0de2-c867-4266-b59a-2f0a94fc965b" +version = "0.1.20" + + [deps.LineSearch.extensions] + LineSearchLineSearchesExt = "LineSearches" + + [deps.LineSearch.weakdeps] + LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" + [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -983,6 +1473,107 @@ version = "2.14.3" Metal = "dde4c033-4e86-420c-a63e-0dd931031962" TSVD = "9449cd9e-2762-5aa3-a617-5413e99d722e" +[[deps.LinearSolve]] +deps = ["AMD", "ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LHLFactorization", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "PureKLU", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "SciMLStructures", "Setfield", "SparseArrays", "SparseColumnPivotedQR", "StaticArraysCore"] +git-tree-sha1 = "e3e84c5c330ea65568a85aef00031e2b870b0e99" +uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +version = "5.18.3" + + [deps.LinearSolve.extensions] + LinearSolveAMDGPUExt = "AMDGPU" + LinearSolveAMGXExt = ["AMGX", "CUDA"] + LinearSolveAlgebraicMultigridExt = "AlgebraicMultigrid" + LinearSolveArnoldiMethodExt = "ArnoldiMethod" + LinearSolveArpackExt = "Arpack" + LinearSolveBLISExt = ["blis_jll", "LAPACK_jll"] + LinearSolveBandedMatricesExt = "BandedMatrices" + LinearSolveBlockDiagonalsExt = "BlockDiagonals" + LinearSolveCKTSOExt = "CKTSO" + LinearSolveCUDAExt = ["cuSOLVER"] + LinearSolveCUDSSExt = "CUDSS" + LinearSolveCUSOLVERRFExt = "CUSOLVERRF" + LinearSolveChainRulesCoreExt = "ChainRulesCore" + LinearSolveCliqueTreesExt = "CliqueTrees" + LinearSolveConjugateGradientsExt = "ConjugateGradients" + LinearSolveElementalExt = "Elemental" + LinearSolveEnzymeExt = "EnzymeCore" + LinearSolveFastAlmostBandedMatricesExt = "FastAlmostBandedMatrices" + LinearSolveFastLapackInterfaceExt = "FastLapackInterface" + LinearSolveForwardDiffExt = "ForwardDiff" + LinearSolveGinkgoExt = "Ginkgo" + LinearSolveHSLExt = "HSL" + LinearSolveHYPREExt = "HYPRE" + LinearSolveIterativeSolversExt = "IterativeSolvers" + LinearSolveJacobiDavidsonExt = "JacobiDavidson" + LinearSolveKernelAbstractionsExt = "KernelAbstractions" + LinearSolveKrylovKitExt = "KrylovKit" + LinearSolveMUMPSExt = "MUMPS" + LinearSolveMetalExt = "Metal" + LinearSolveMooncakeExt = "Mooncake" + LinearSolvePETScExt = ["PETSc", "SparseMatricesCSR"] + LinearSolvePETScMPIExt = ["PETSc", "PartitionedArrays", "SparseMatricesCSR"] + LinearSolveParUExt = "ParU_jll" + LinearSolvePardisoExt = "Pardiso" + LinearSolvePartitionedSolversExt = ["PartitionedArrays", "PartitionedSolvers"] + LinearSolvePureUMFPACKExt = "PureUMFPACK" + LinearSolveReactantExt = "Reactant" + LinearSolveRecursiveFactorizationExt = ["RecursiveFactorization", "TriangularSolve"] + LinearSolveSLATEExt = "SLATE_jll" + LinearSolveSTRUMPACKExt = "STRUMPACK_jll" + LinearSolveSparspakExt = "Sparspak" + LinearSolveSpecializingFactorizationsExt = "SpecializingFactorizations" + LinearSolveSuperLUDISTExt = "SuperLUDIST" + + [deps.LinearSolve.weakdeps] + AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" + AMGX = "c963dde9-0319-47f5-bf0c-b07d3c80ffa6" + AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" + ArnoldiMethod = "ec485272-7323-5ecc-a04f-4719b315124d" + Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" + CKTSO = "8e543fc2-2ef1-4e2d-a99e-39beaa046845" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + CUSOLVERRF = "a8cc9031-bad2-4722-94f5-40deabb4245c" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" + ConjugateGradients = "f59de78d-195d-4e7b-a078-2e47da4c3ad6" + Elemental = "902c3f28-d1ec-5e7e-8399-a24c3845ee38" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + FastAlmostBandedMatrices = "9d29842c-ecb8-4973-b1e9-a27b1157504e" + FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + Ginkgo = "4c8bd3c9-ead9-4b5e-a625-08f1338ba0ec" + HSL = "34c5aeac-e683-54a6-a0e9-6e0fdc586c50" + HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" + IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" + JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" + JacobiDavidson = "11c68b98-9c9b-11e8-267b-bbb95576cead" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" + LAPACK_jll = "51474c39-65e3-53ba-86ba-03b1b862ec14" + MUMPS = "55d2b088-9f4e-11e9-26c0-150b02ea6a46" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + PETSc = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0" + ParU_jll = "9e0b026c-e8ce-559c-a2c4-6a3d5c955bc9" + Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" + PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" + PartitionedSolvers = "11b65f7f-80ac-401b-9ef2-3db765482d62" + PureUMFPACK = "b7e1f0a2-3c4d-4e5f-9a0b-1c2d3e4f5a6b" + Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" + RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" + SLATE_jll = "cb01ff19-587c-516c-bcf9-532d49da298d" + STRUMPACK_jll = "86fbd0b9-476f-557c-b766-62c724b42d8c" + SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" + Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" + SpecializingFactorizations = "fa08b7a1-13d3-4faf-875d-5cbc1520e3f3" + SuperLUDIST = "4cd002a6-0da4-410d-a012-232df062f478" + TriangularSolve = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" + blis_jll = "6136c539-28a5-5bf0-87cc-b183200dce32" + cuSOLVER = "887afef0-6a32-4de5-add4-7827692ba8fc" + [[deps.LiveServer]] deps = ["HTTP", "MIMEs", "Sockets", "Test"] git-tree-sha1 = "aeb86e2e29d4e340dc687f4b85a58fba89267def" @@ -1009,6 +1600,12 @@ version = "1.0.3" uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" version = "1.11.0" +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "f00544d95982ea270145636c181ceda21c4e2575" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.2.0" + [[deps.METIS_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "5ecd92439c60a50c49bd6e96192e9d486b24b050" @@ -1020,6 +1617,12 @@ git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" version = "1.1.0" +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] +git-tree-sha1 = "282cadc186e7b2ae0eeadbd7a4dffed4196ae2aa" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2025.2.0+0" + [[deps.MLStyle]] git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" uuid = "d8e11817-5142-5d16-987a-aa16d5891078" @@ -1071,6 +1674,16 @@ version = "1.54.0" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" +[[deps.MaybeInplace]] +deps = ["ArrayInterface", "LinearAlgebra", "MacroTools", "PrecompileTools"] +git-tree-sha1 = "f2cde0ae772162f20287b803e623966d0d94dea9" +uuid = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb" +version = "0.1.8" +weakdeps = ["SparseArrays"] + + [deps.MaybeInplace.extensions] + MaybeInplaceSparseArraysExt = "SparseArrays" + [[deps.Measures]] git-tree-sha1 = "b513cedd20d9c914783d8ad83d08120702bf2c77" uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" @@ -1086,10 +1699,96 @@ version = "1.2.1" uuid = "a63ad114-7e13-5084-954f-fe012c677804" version = "1.11.0" +[[deps.ModelingToolkit]] +deps = ["ADTypes", "BipartiteGraphs", "BlockArrays", "Combinatorics", "CommonSolve", "ConstructionBase", "DataStructures", "DiffEqBase", "DifferentiationInterface", "DocStringExtensions", "FillArrays", "ForwardDiff", "Graphs", "InteractiveUtils", "Libdl", "LinearAlgebra", "ModelingToolkitBase", "ModelingToolkitTearing", "Moshi", "OffsetArrays", "OrderedCollections", "PreallocationTools", "PrecompileTools", "REPL", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLPublic", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "StateSelection", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "TermInterface", "UnPack"] +git-tree-sha1 = "9c431cf99d31c3110515d6ed6d908f4e42442d9b" +uuid = "961ee093-0014-501f-94e3-6117800e7a78" +version = "11.46.1" + + [deps.ModelingToolkit.extensions] + MTKFMIExt = "FMIImport" + MTKOrdinaryDiffEqBDFExt = "OrdinaryDiffEqBDF" + MTKOrdinaryDiffEqDefaultExt = "OrdinaryDiffEqDefault" + MTKOrdinaryDiffEqRosenbrockExt = "OrdinaryDiffEqRosenbrock" + MTKOrdinaryDiffEqRosenbrockNonlinearSolveExt = ["OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqNonlinearSolve"] + MTKOrdinaryDiffEqTsit5Ext = "OrdinaryDiffEqTsit5" + + [deps.ModelingToolkit.weakdeps] + FMIImport = "9fcbc62e-52a0-44e9-a616-1359a0008194" + OrdinaryDiffEqBDF = "6ad6398a-0878-4a85-9266-38940aa047c8" + OrdinaryDiffEqDefault = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" + OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" + OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce" + OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" + +[[deps.ModelingToolkitBase]] +deps = ["ADTypes", "AbstractTrees", "ArrayInterface", "BandedMatrices", "BipartiteGraphs", "BlockArrays", "Combinatorics", "CommonSolve", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffRules", "DifferentiationInterface", "DocStringExtensions", "DomainSets", "EnumX", "EnzymeCore", "ExprTools", "FillArrays", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "Graphs", "ImplicitDiscreteSolve", "InteractiveUtils", "IntervalSets", "JumpProcesses", "Libdl", "LinearAlgebra", "Moshi", "NaNMath", "NonlinearSolveBase", "OffsetArrays", "OrderedCollections", "PreallocationTools", "PrecompileTools", "Printf", "REPL", "Random", "ReadOnlyArrays", "ReadOnlyDicts", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLLogging", "SciMLPublic", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "TermInterface", "UnPack"] +git-tree-sha1 = "216507a004dc0d597803b30ead7d5c396fdb643a" +uuid = "7771a370-6774-4173-bd38-47e70ca0b839" +version = "1.80.0" + + [deps.ModelingToolkitBase.extensions] + MTKBifurcationKitExt = "BifurcationKit" + MTKCasADiDynamicOptExt = "CasADi" + MTKChainRulesCoreExt = "ChainRulesCore" + MTKDiffEqNoiseProcessExt = "DiffEqNoiseProcess" + MTKDynamicQuantitiesExt = "DynamicQuantities" + MTKInfiniteOptExt = "InfiniteOpt" + MTKJuliaFormatterExt = "JuliaFormatter" + MTKLabelledArraysExt = "LabelledArrays" + MTKLatexifyExt = "Latexify" + MTKMooncakeExt = "Mooncake" + MTKPyomoDynamicOptExt = ["Pyomo", "PythonCall"] + MTKTrackerExt = "Tracker" + + [deps.ModelingToolkitBase.weakdeps] + BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665" + CasADi = "c49709b8-5c63-11e9-2fb2-69db5844192f" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503" + DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821" + InfiniteOpt = "20393b10-9daf-11e9-18c9-8db751c92c57" + JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" + LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" + Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + Pyomo = "0e8e1daf-01b5-4eba-a626-3897743a3816" + PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ModelingToolkitTearing]] +deps = ["BipartiteGraphs", "CommonSolve", "DocStringExtensions", "Graphs", "LinearAlgebra", "ModelingToolkitBase", "Moshi", "OffsetArrays", "OrderedCollections", "SciMLBase", "Setfield", "SparseArrays", "StateSelection", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "UUIDs"] +git-tree-sha1 = "ccf2c2242ba77c4d1eb26b4d6b74cd94720db775" +uuid = "6bb917b9-1269-42b9-9f7c-b0dca72083ab" +version = "1.20.9" + +[[deps.Moshi]] +deps = ["ExproniconLite", "Jieko"] +git-tree-sha1 = "3f234cf937eb1d58f613440ecb022da784ad34d4" +uuid = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d" +version = "0.3.13" + [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" version = "2025.11.4" +[[deps.MuladdMacro]] +deps = ["PrecompileTools"] +git-tree-sha1 = "283bf85d4a767481dd924dff0eee1735e95f449e" +uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" +version = "0.2.7" + +[[deps.MultivariatePolynomials]] +deps = ["DataStructures", "LinearAlgebra", "MutableArithmetics", "StarAlgebras"] +git-tree-sha1 = "65f1160de342181533efa7061f86539d420ab81d" +uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" +version = "0.5.20" +weakdeps = ["ChainRulesCore", "Latexify"] + + [deps.MultivariatePolynomials.extensions] + LatexifyExt = "Latexify" + MultivariatePolynomialsChainRulesCoreExt = "ChainRulesCore" + [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] git-tree-sha1 = "ffd1161361638e5f0bb796a095b0fdc230d6f019" @@ -1130,6 +1829,53 @@ git-tree-sha1 = "0b1b4a83773cfdefa5d9dc0322e4c0624ce88b5b" uuid = "c7aee132-11e1-519c-8219-0a43005e73c2" version = "20.12.2+0" +[[deps.NonlinearSolveBase]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnumX", "EnzymeCore", "FastClosures", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "LogExpFunctions", "Markdown", "MaybeInplace", "PreallocationTools", "PrecompileTools", "Preferences", "Printf", "RecursiveArrayTools", "RespecializeParams", "SciMLBase", "SciMLJacobianOperators", "SciMLLogging", "SciMLOperators", "SciMLStructures", "Setfield", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] +git-tree-sha1 = "f83b1fb97c02b99390346e13a71a027a59dc2459" +uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" +version = "2.55.1" + + [deps.NonlinearSolveBase.extensions] + NonlinearSolveBaseBandedMatricesExt = "BandedMatrices" + NonlinearSolveBaseChainRulesCoreExt = "ChainRulesCore" + NonlinearSolveBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] + NonlinearSolveBaseForwardDiffExt = "ForwardDiff" + NonlinearSolveBaseLineSearchExt = "LineSearch" + NonlinearSolveBaseLinearSolveExt = "LinearSolve" + NonlinearSolveBaseMooncakeExt = ["ChainRulesCore", "Mooncake"] + NonlinearSolveBaseReverseDiffExt = "ReverseDiff" + NonlinearSolveBaseSparseArraysExt = "SparseArrays" + NonlinearSolveBaseSparseMatrixColoringsExt = "SparseMatrixColorings" + NonlinearSolveBaseTrackerExt = "Tracker" + + [deps.NonlinearSolveBase.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + LineSearch = "87fe0de2-c867-4266-b59a-2f0a94fc965b" + LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.NonlinearSolveFirstOrder]] +deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConcreteStructs", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLJacobianOperators", "SciMLLogging", "SciMLOperators", "Setfield", "Sobol", "StaticArraysCore"] +git-tree-sha1 = "95a105b647b656dfbd7985ede8eb0eaf4b836505" +uuid = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d" +version = "2.10.0" + +[[deps.OffsetArrays]] +git-tree-sha1 = "750d0f2b5aac238d50dfee5f7a44fae3175a3305" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.18.0" +weakdeps = ["Adapt"] + + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" + [[deps.Ogg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" @@ -1175,6 +1921,18 @@ git-tree-sha1 = "07c2d96cde77525ad4c354547a34a068132f314d" uuid = "5f98b655-cc9a-415a-b60e-744165666948" version = "2.2.1-beta" +[[deps.OptimalControlProblems]] +deps = ["CTBase", "CTModels", "DocStringExtensions", "OrderedCollections", "SHA", "TOML"] +path = "/Users/ocots/Research/logiciels/dev/control-toolbox/OptimalControlProblems-439" +uuid = "59046045-fb9c-4c23-964f-ff0a25704f96" +version = "0.5.0" +weakdeps = ["JuMP", "ModelingToolkit", "OptimalControl"] + + [deps.OptimalControlProblems.extensions] + JuMPModels = "JuMP" + ModelingToolkitModels = "ModelingToolkit" + OptimalControlModels = "OptimalControl" + [[deps.Opus_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "e2bb57a313a74b8104064b7efd01406c0a50d2ff" @@ -1186,6 +1944,22 @@ git-tree-sha1 = "b079a6affebde167dad8ffe0d670b53917fbcb68" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" version = "2.0.3" +[[deps.OrdinaryDiffEqCore]] +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "BinaryHeaps", "CommonSolve", "ConstructionBase", "DiffEqBase", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FindFirstFunctions", "FunctionWrappers", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "PrecompileTools", "Preferences", "Printf", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "SciMLStructures", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "5765dd5605c88f1db2b3630df6f291751a96cd16" +uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" +version = "4.19.1" + + [deps.OrdinaryDiffEqCore.extensions] + OrdinaryDiffEqCoreMooncakeExt = "Mooncake" + OrdinaryDiffEqCorePolyesterExt = "Polyester" + OrdinaryDiffEqCoreSparseArraysExt = "SparseArrays" + + [deps.OrdinaryDiffEqCore.weakdeps] + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" @@ -1256,12 +2030,30 @@ version = "1.41.7" ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" +[[deps.PoissonRandom]] +deps = ["LogExpFunctions", "PrecompileTools", "Random"] +git-tree-sha1 = "7b7becc6ada13786479af8c5d08e7f7fe7d68301" +uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" +version = "0.4.14" + [[deps.PooledArrays]] deps = ["DataAPI", "Future"] git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3" uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" version = "1.4.3" +[[deps.PreallocationTools]] +deps = ["Adapt", "ArrayInterface", "PrecompileTools", "SciMLPublic"] +git-tree-sha1 = "cd00e28071a75c98664663f87c2ae447d25c0503" +uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" +version = "1.7.1" +weakdeps = ["EnzymeCore", "ForwardDiff", "ReverseDiff"] + + [deps.PreallocationTools.extensions] + PreallocationToolsEnzymeCoreExt = "EnzymeCore" + PreallocationToolsForwardDiffExt = "ForwardDiff" + PreallocationToolsReverseDiffExt = "ReverseDiff" + [[deps.PrecompileTools]] deps = ["Preferences"] git-tree-sha1 = "edbeefc7a4889f528644251bdb5fc9ab5348bc2c" @@ -1290,6 +2082,12 @@ version = "3.5.1" WriteDocx = "d049ceea-54ee-41d7-a26f-ba29db3b6599" XLSX = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0" +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" @@ -1300,6 +2098,16 @@ git-tree-sha1 = "4fbbafbc6251b883f4d2705356f3641f3652a7fe" uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" version = "1.4.0" +[[deps.PureKLU]] +deps = ["LinearAlgebra", "PrecompileTools", "SparseArrays"] +git-tree-sha1 = "ad0e84647fe7b3c2ae02aaeace1522139aaf6a27" +uuid = "0c0d3e7f-3a8b-4f7e-b6f1-9a4d2e7c1f01" +version = "1.6.0" +weakdeps = ["ForwardDiff"] + + [deps.PureKLU.extensions] + PureKLUForwardDiffExt = "ForwardDiff" + [[deps.Qt6Base_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] git-tree-sha1 = "144895f6166994730ee7ff8113b981fc360638f1" @@ -1340,6 +2148,23 @@ deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" version = "1.11.0" +[[deps.ReactantCore]] +deps = ["ExpressionExplorer", "MacroTools"] +git-tree-sha1 = "1fe4e616752a0c4818ae88a504fc59b0fb016659" +uuid = "a3311ec8-5e00-46d5-b541-4f83e724a433" +version = "0.1.26" + +[[deps.ReadOnlyArrays]] +git-tree-sha1 = "e6f7ddf48cf141cb312b078ca21cb2d29d0dc11d" +uuid = "988b38a3-91fc-5605-94a2-ee2116b3bd83" +version = "0.2.0" + +[[deps.ReadOnlyDicts]] +deps = ["DocStringExtensions"] +git-tree-sha1 = "711acef70140078d808be9cd33040f510af57f5e" +uuid = "795d4caa-f5a7-4580-b5d8-c01d53451803" +version = "1.0.1" + [[deps.RecipesBase]] deps = ["PrecompileTools"] git-tree-sha1 = "0c0dcffc464cda2ff33fc8ffc1dd1bdd53cd98be" @@ -1352,6 +2177,46 @@ git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" version = "0.6.12" +[[deps.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "LinearAlgebra", "PrecompileTools", "RecipesBase", "SciMLPublic", "SciMLStructures", "StaticArraysCore", "SymbolicIndexingInterface"] +git-tree-sha1 = "47fe0f2a25b5e98412c65227f8a649d26bb7f1b9" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "4.5.6" + + [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsCUDAExt = "CUDA" + RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" + RecursiveArrayToolsFastBroadcastPolyesterExt = ["FastBroadcast", "Polyester"] + RecursiveArrayToolsForwardDiffExt = "ForwardDiff" + RecursiveArrayToolsKernelAbstractionsExt = "KernelAbstractions" + RecursiveArrayToolsMeasurementsExt = "Measurements" + RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" + RecursiveArrayToolsMooncakeExt = "Mooncake" + RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"] + RecursiveArrayToolsSparseArraysExt = ["SparseArrays"] + RecursiveArrayToolsStatisticsExt = "Statistics" + RecursiveArrayToolsStructArraysExt = "StructArrays" + RecursiveArrayToolsTablesExt = ["Tables"] + RecursiveArrayToolsTrackerExt = "Tracker" + RecursiveArrayToolsZygoteExt = "Zygote" + + [deps.RecursiveArrayTools.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" @@ -1381,6 +2246,12 @@ git-tree-sha1 = "13d0465bbd89b45183c0363b635dc82d5843593f" uuid = "802f3686-a58f-41ce-bb0c-3c43c75bba36" version = "1.6.6" +[[deps.RespecializeParams]] +deps = ["FunctionWrappersWrappers", "PrecompileTools"] +git-tree-sha1 = "140c074bb63518a0e1ec2c8aba2a8a5719bcf21c" +uuid = "9fe22ead-9e00-4db2-8b46-706a60d40f5e" +version = "1.3.0" + [[deps.ReverseDiff]] deps = ["ChainRulesCore", "DiffResults", "DiffRules", "ForwardDiff", "FunctionWrappers", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"] git-tree-sha1 = "3a2e70fe87406e8cd495d9a1b6bea0a2fe926890" @@ -1391,6 +2262,22 @@ weakdeps = ["Statistics"] [deps.ReverseDiff.extensions] StatisticsExt = "Statistics" +[[deps.RuntimeGeneratedFunctions]] +deps = ["ExprTools", "PrecompileTools", "SHA", "Serialization"] +git-tree-sha1 = "9bb075002b40849582905394bb3031fb77aa102d" +uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" +version = "0.5.27" + +[[deps.SCCNonlinearSolve]] +deps = ["CommonSolve", "NonlinearSolveBase", "PrecompileTools", "SciMLBase", "SymbolicIndexingInterface"] +git-tree-sha1 = "86f55e5b92d056b9e039c1de808424d3c85957b3" +uuid = "9dfe8606-65a1-4bb3-9748-cb89d1561431" +version = "1.16.0" +weakdeps = ["ChainRulesCore"] + + [deps.SCCNonlinearSolve.extensions] + SCCNonlinearSolveChainRulesCoreExt = "ChainRulesCore" + [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" @@ -1401,6 +2288,104 @@ git-tree-sha1 = "b78d602475715c9c6ea21c9650fa5dba58e9945b" uuid = "319450e9-13b8-58e8-aa9f-8fd1420848ab" version = "2025.9.18+1" +[[deps.SciMLBase]] +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FindFirstFunctions", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "LoggingExtras", "Markdown", "PreallocationTools", "PrecompileTools", "Preferences", "Printf", "Random", "RecipesBase", "RecursiveArrayTools", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLPublic", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "85f85c3c5b949e7d691047e758e3fdb77c21310c" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "3.58.0" + + [deps.SciMLBase.extensions] + SciMLBaseChainRulesCoreExt = "ChainRulesCore" + SciMLBaseDifferentiationInterfaceExt = "DifferentiationInterface" + SciMLBaseDistributionsExt = "Distributions" + SciMLBaseEnzymeExt = "Enzyme" + SciMLBaseForwardDiffExt = "ForwardDiff" + SciMLBaseFunctionPropertiesExt = "FunctionProperties" + SciMLBaseMakieExt = ["Makie", "GeometryBasics"] + SciMLBaseMeasurementsExt = "Measurements" + SciMLBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + SciMLBaseMooncakeExt = "Mooncake" + SciMLBasePartialFunctionsExt = "PartialFunctions" + SciMLBasePyCallExt = "PyCall" + SciMLBasePythonCallExt = "PythonCall" + SciMLBaseRCallExt = "RCall" + SciMLBaseReactantCoreExt = "ReactantCore" + SciMLBaseReactantExt = "Reactant" + SciMLBaseReverseDiffExt = ["ReverseDiff", "ForwardDiff"] + SciMLBaseStaticArraysExt = "StaticArrays" + SciMLBaseTrackerExt = "Tracker" + SciMLBaseZygoteExt = ["Zygote", "ChainRulesCore", "ZygoteRules", "FillArrays"] + + [deps.SciMLBase.weakdeps] + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + FunctionProperties = "f62d2435-5019-4c03-9749-2d4c77af0cbc" + GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" + RCall = "6f49c342-dc21-5d91-9882-a32aef131414" + Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" + ReactantCore = "a3311ec8-5e00-46d5-b541-4f83e724a433" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" + +[[deps.SciMLJacobianOperators]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DifferentiationInterface", "FastClosures", "LinearAlgebra", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "781d5413c2991e581da86979b0d9f86f9a034a1c" +uuid = "19f34311-ddf3-4b8b-af20-060888a46c0e" +version = "0.1.20" + +[[deps.SciMLLogging]] +deps = ["Logging", "LoggingExtras", "PrecompileTools", "Preferences"] +git-tree-sha1 = "3aafee7edc2ec7e71f50dcc6816cb031fac390a0" +uuid = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" +version = "2.1.0" + + [deps.SciMLLogging.extensions] + SciMLLoggingTracyExt = "Tracy" + + [deps.SciMLLogging.weakdeps] + Tracy = "e689c965-62c8-4b79-b2c5-8359227902fd" + +[[deps.SciMLOperators]] +deps = ["Accessors", "Adapt", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "SciMLPublic"] +git-tree-sha1 = "3feb8a7bce88bb3ef051a4eda8106004ad040b6f" +uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" +version = "1.30.4" + + [deps.SciMLOperators.extensions] + SciMLOperatorsLoopVectorizationExt = "LoopVectorization" + SciMLOperatorsSparseArraysExt = "SparseArrays" + + [deps.SciMLOperators.weakdeps] + LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SciMLPublic]] +deps = ["PrecompileTools"] +git-tree-sha1 = "74685afb51732a464fbce79a72708f7c4203ceb7" +uuid = "431bcebd-1456-4ced-9d72-93c2757fff0b" +version = "1.3.0" + +[[deps.SciMLStructures]] +deps = ["ArrayInterface", "PrecompileTools"] +git-tree-sha1 = "4b8fc0ffe22b4ecba7a02f1fec0b3757db014d0c" +uuid = "53ae85a6-f571-4167-b2af-e1d143709226" +version = "1.10.6" + [[deps.ScopedValues]] deps = ["HashArrayMappedTries", "Logging"] git-tree-sha1 = "67a144433c4ce877ee6d1ada69a124d6b1ecf7be" @@ -1423,6 +2408,12 @@ version = "1.4.11" uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" version = "1.11.0" +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] +git-tree-sha1 = "89880a2cca5cabc68c9023f58e544beda1d2fc1f" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "1.2.0" + [[deps.Showoff]] deps = ["Dates"] git-tree-sha1 = "8238217340ad0aaabe11afe39c1098b5bc9f4c8e" @@ -1434,6 +2425,34 @@ git-tree-sha1 = "ec017517738d90aa43f682cbab22fe74cb156608" uuid = "67d14529-f57e-4d48-b504-d486213b7963" version = "0.1.0" +[[deps.SimpleNonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLLogging", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "8d9ec24ec7bd126abf97b44ba5bdd6d280572095" +uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" +version = "2.14.6" + + [deps.SimpleNonlinearSolve.extensions] + SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore" + SimpleNonlinearSolveReverseDiffExt = "ReverseDiff" + SimpleNonlinearSolveTrackerExt = "Tracker" + + [deps.SimpleNonlinearSolve.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.SimpleTraits]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "7ddb0b49c109481b046972c0e4ab02b2127d6a75" +uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" +version = "0.9.6" + +[[deps.Sobol]] +deps = ["DelimitedFiles", "Random"] +git-tree-sha1 = "5a74ac22a9daef23705f010f72c81d6925b19df8" +uuid = "ed01d8cd-4d21-5b2a-85b4-cc3bdc58bad4" +version = "1.5.0" + [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" version = "1.11.0" @@ -1459,6 +2478,16 @@ deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" version = "1.12.0" +[[deps.SparseColumnPivotedQR]] +deps = ["LinearAlgebra", "PrecompileTools", "SparseArrays"] +git-tree-sha1 = "8cf1a59c78dd6f900feb366e5a574f99ed278ef1" +uuid = "a57abbd0-fea5-4d57-96be-5e525945e8e4" +version = "2.1.8" +weakdeps = ["AMD"] + + [deps.SparseColumnPivotedQR.extensions] + SparseColumnPivotedQRAMDExt = "AMD" + [[deps.SparseConnectivityTracer]] deps = ["ADTypes", "DocStringExtensions", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"] git-tree-sha1 = "277d8929a56912e7342458d4db22ee45e4c0e75c" @@ -1513,6 +2542,29 @@ weakdeps = ["ChainRulesCore"] [deps.SpecialFunctions.extensions] SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" +[[deps.StarAlgebras]] +deps = ["LinearAlgebra", "MutableArithmetics", "SparseArrays"] +git-tree-sha1 = "95c5ea2eef117ba1310ee14aa1737d3ea2d262ae" +uuid = "0c0c59c1-dc5f-42e9-9a8b-b5dc384a6cd1" +version = "0.3.1" +weakdeps = ["JuMP", "MathOptInterface"] + + [deps.StarAlgebras.extensions] + StarAlgebrasJuMPExt = "JuMP" + StarAlgebrasMathOptInterfaceExt = "MathOptInterface" + +[[deps.StateSelection]] +deps = ["BipartiteGraphs", "DocStringExtensions", "FindFirstFunctions", "Graphs", "LinearAlgebra", "OrderedCollections", "Setfield", "SparseArrays"] +git-tree-sha1 = "10914498005246949b0474ad26a650570e08948b" +uuid = "64909d44-ed92-46a8-bbd9-f047dfbdc84b" +version = "1.11.1" + + [deps.StateSelection.extensions] + StateSelectionDeepDiffsExt = "DeepDiffs" + + [deps.StateSelection.weakdeps] + DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" + [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] git-tree-sha1 = "8a8a52f887f38d44014e24ee46b8a7311c625f6d" @@ -1592,6 +2644,71 @@ deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" version = "7.8.3+2" +[[deps.SymbolicIndexingInterface]] +deps = ["Accessors", "ArrayInterface", "PrecompileTools", "RuntimeGeneratedFunctions", "StaticArraysCore"] +git-tree-sha1 = "42dd4c193a1bacea5b6adf78b6224de907b06351" +uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" +version = "0.3.56" +weakdeps = ["PrettyTables"] + + [deps.SymbolicIndexingInterface.extensions] + SymbolicIndexingInterfacePrettyTablesExt = "PrettyTables" + +[[deps.SymbolicLimits]] +deps = ["PrecompileTools", "SymbolicUtils", "TermInterface"] +git-tree-sha1 = "cdf3f5760ff2ece5abe16f26a92a3f7da0eb8276" +uuid = "19f23fe9-fdab-4a78-91af-e7b7767979c3" +version = "1.2.2" + +[[deps.SymbolicUtils]] +deps = ["AbstractTrees", "ArrayInterface", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "EnumX", "ExproniconLite", "Graphs", "LinearAlgebra", "MacroTools", "Moshi", "MultivariatePolynomials", "MutableArithmetics", "NaNMath", "OrderedCollections", "PrecompileTools", "ReadOnlyArrays", "SciMLPublic", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "TaskLocalValues", "TermInterface", "WeakCacheSets"] +git-tree-sha1 = "61a82af727479af3d96988079fe3e05cdd57d695" +uuid = "d1185830-fcd6-423d-90d6-eec64667417b" +version = "4.55.0" + + [deps.SymbolicUtils.extensions] + SymbolicUtilsChainRulesCoreExt = "ChainRulesCore" + SymbolicUtilsDistributionsExt = "Distributions" + SymbolicUtilsLabelledArraysExt = "LabelledArrays" + SymbolicUtilsReverseDiffExt = "ReverseDiff" + + [deps.SymbolicUtils.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + +[[deps.Symbolics]] +deps = ["ADTypes", "AbstractPlutoDingetjes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "IntervalSets", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "Moshi", "MultivariatePolynomials", "MutableArithmetics", "NaNMath", "PrecompileTools", "Preferences", "Primes", "RecipesBase", "RuntimeGeneratedFunctions", "SciMLPublic", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] +git-tree-sha1 = "49a65a35d6fb99d152ad7266f8acd278da7e8d83" +uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" +version = "7.48.0" + + [deps.Symbolics.extensions] + SymbolicsD3TreesExt = "D3Trees" + SymbolicsDistributionsExt = "Distributions" + SymbolicsForwardDiffExt = "ForwardDiff" + SymbolicsGroebnerExt = "Groebner" + SymbolicsHypergeometricFunctionsExt = "HypergeometricFunctions" + SymbolicsLatexifyExt = ["Latexify", "LaTeXStrings"] + SymbolicsNemoExt = "Nemo" + SymbolicsStaticArraysExt = "StaticArrays" + SymbolicsSymPyExt = "SymPy" + SymbolicsSymPyPythonCallExt = "SymPyPythonCall" + + [deps.Symbolics.weakdeps] + D3Trees = "e3df1716-f71e-5df9-9e2d-98e193103c45" + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4" + HypergeometricFunctions = "34004b35-14d8-5ef3-9330-4cdb6864b03a" + LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" + Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" + Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" + SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" + [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" @@ -1614,12 +2731,23 @@ deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" +[[deps.TaskLocalValues]] +git-tree-sha1 = "67e469338d9ce74fc578f7db1736a74d93a49eb8" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.3" + [[deps.TensorCore]] deps = ["LinearAlgebra"] git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" version = "0.1.1" +[[deps.TermInterface]] +deps = ["PrecompileTools"] +git-tree-sha1 = "d6984451701c6462ce685d0e2d4f2c47cd966773" +uuid = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c" +version = "2.0.1" + [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -1642,6 +2770,12 @@ git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.11.3" +[[deps.TruncatedStacktraces]] +deps = ["InteractiveUtils", "MacroTools", "Preferences"] +git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" +uuid = "781d530d-4396-4725-bb49-402e4bee1e77" +version = "1.4.0" + [[deps.URIs]] deps = ["Serialization"] git-tree-sha1 = "eb3b85ca904a1d1647b15acc091b113b8874b648" @@ -1697,6 +2831,11 @@ git-tree-sha1 = "96478df35bbc2f3e1e791bc7a3d0eeee559e60e9" uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" version = "1.24.0+0" +[[deps.WeakCacheSets]] +git-tree-sha1 = "386050ae4353310d8ff9c228f83b1affca2f7f38" +uuid = "d30d5f5c-d141-4870-aa07-aabb0f5fe7d5" +version = "0.1.0" + [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] git-tree-sha1 = "b826aedca5fce2e3c91904e338c279e5c1a2da74" @@ -1952,6 +3091,12 @@ deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" version = "1.64.0+1" +[[deps.oneTBB_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "ed2d8d4ad96c03d3abe3382cdbbdea9489b63636" +uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" +version = "2023.1.0+0" + [[deps.p7zip_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/docs/src/assets/Project.toml b/docs/src/assets/Project.toml index 6ed84e7f8..800d6d2e9 100644 --- a/docs/src/assets/Project.toml +++ b/docs/src/assets/Project.toml @@ -10,8 +10,10 @@ JuMP = "4076af6c-e467-56ae-b986-b466b2749572" LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589" MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6" Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" +ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71" OptimalControl = "5f98b655-cc9a-415a-b60e-744165666948" +OptimalControlProblems = "59046045-fb9c-4c23-964f-ff0a25704f96" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" @@ -30,6 +32,7 @@ JuMP = "1" LiveServer = "1" MadNLP = "0.10" Markdown = "1" +ModelingToolkit = "11" NLPModelsIpopt = "0.11" OptimalControl = "2.2" Plots = "1" diff --git a/docs/src/getting-started/first-problem.md b/docs/src/getting-started/first-problem.md index b7a539b36..fda7f4575 100644 --- a/docs/src/getting-started/first-problem.md +++ b/docs/src/getting-started/first-problem.md @@ -12,7 +12,7 @@ using NLPModelsIpopt ## Get the problem A problem is a function, called with the modeling as argument. With OptimalControl it returns a -[`Problem`](@ref OptimalControlProblems.Problem): the continuous problem and its initial guess. +[`Problem`](@ref OptimalControlProblems.Problems.Problem): the continuous problem and its initial guess. ```@example first pb = beam(OptimalControlBackend()) diff --git a/docs/src/guide/get.md b/docs/src/guide/get.md index 842bb5a2e..cd623be76 100644 --- a/docs/src/guide/get.md +++ b/docs/src/guide/get.md @@ -22,7 +22,7 @@ it can represent, and takes at retrieval only what it needs to build it: | Modeling | Returns | Keywords | | :--- | :--- | :--- | -| OptimalControl, scalarized OptimalControl | a [`Problem`](@ref OptimalControlProblems.Problem): the continuous problem and its initial guess | `parameters`, `init` | +| OptimalControl, scalarized OptimalControl | a [`Problem`](@ref OptimalControlProblems.Problems.Problem): the continuous problem and its initial guess | `parameters`, `init` | | JuMP | a `JuMP.Model`, already discretized | `grid_size`, `scheme`, `ordering`, `parameters`, `init`, and the arguments of `JuMP.Model` | ```@example get diff --git a/docs/src/migration.md b/docs/src/migration.md index 447f11ba1..695c4382a 100644 --- a/docs/src/migration.md +++ b/docs/src/migration.md @@ -5,7 +5,7 @@ The breaking changes since 0.5, with how to update your code. The full list is i ## An OptimalControl problem is the continuous problem -A problem of the OptimalControl modelings returns a [`Problem`](@ref OptimalControlProblems.Problem): +A problem of the OptimalControl modelings returns a [`Problem`](@ref OptimalControlProblems.Problems.Problem): the continuous model and its initial guess. It no longer discretizes, and no longer takes a description or `grid_size`: the discretization, the modeler and the solver are chosen in `solve`. From cbb87b96e16d539de9cab1244aade934b9feed67 Mon Sep 17 00:00:00 2001 From: Olivier Cots Date: Mon, 9 Nov 2026 21:55:52 +0100 Subject: [PATCH 04/12] docs: update developer guides for ModelingToolkit models and tests (#439) Document ModelingToolkitModels extension in ext/README.md and the ModelingToolkit fast test suite and convergence cron in test/README.md. --- ext/README.md | 5 ++++- test/README.md | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ext/README.md b/ext/README.md index fbec53992..fcccf96d9 100644 --- a/ext/README.md +++ b/ext/README.md @@ -12,6 +12,7 @@ ext/ ├── Descriptions/.md # description of every problem: one file each ├── Models/.jl # the problem in a modeling, one directory per modeling ├── JuMPModels.jl # extension of the JuMP modeling +├── ModelingToolkitModels.jl # extension of the ModelingToolkit modeling └── OptimalControlModels.jl # extension of the OptimalControl modelings ``` @@ -46,7 +47,9 @@ ext/ - scalarized OptimalControl: the same model with scalar components only; - JuMP: a method that declares the problem as `ProblemData` (continuous functions, no discretization) and calls `build`; the schemes are written once, in - `JuMPModels/schemes/`. + `JuMPModels/schemes/`; + - ModelingToolkit: a method that writes the continuous model with ModelingToolkit.jl + (`@variables`, `Differential`, `Symbolics.Integral`, `System`) and returns `_problem(…)`. 4. **Test it**: `Pkg.test(; test_args=["problem="])` runs every test on this problem only (see `test/README.md`). The consistency tests check the files and the metadata; the smoke tests that it builds and runs; the equivalence tests that two modelings give the same diff --git a/test/README.md b/test/README.md index df8dcf148..30549ed02 100644 --- a/test/README.md +++ b/test/README.md @@ -214,6 +214,17 @@ asked to CUDA in a test file (`TST6`): without a functional device the solves ar as skipped (`Broken` in the summary); on a runner named `kkt` or `occidata`, a missing device fails `test_contract`. +## ModelingToolkit tests + +The environment `ModelingToolkit` (`test/suite/ModelingToolkit/`) solves problems written +with ModelingToolkit.jl and Corleone shooting (`CONFIGS.ModelingToolkit` in `common/configs.jl`). +It is opt-in due to its heavy dependencies. Run it with: + +```julia +Pkg.test(; test_args=["ModelingToolkit"]) # fast suite (test_problem, test_smoke, test_methods) +Pkg.test(; test_args=["ModelingToolkit", "cron"]) # weekly convergence cron +``` + ## Adding a test 1. Pick the group: `core` for what needs no extension, the modeling environment for one From 0c45752d2bd37d6f621f85061db39b2de21932e3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 13:39:25 +0000 Subject: [PATCH 05/12] docs: revert the local docs Manifest, a ModelingToolkit snippet that stops at the model (#439) The asset Manifest committed a local path and docs/Project.toml listed the package, which the docs load from LOAD_PATH (SITE18). The snippet solved with a hardcoded time span and without the discretization of the path constraints the tests use: it now stops at the model, and checked_against is nothing since no check runs on every pull request. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BSmPZipCYwgepwKpMP9sep --- docs/Project.toml | 1 - docs/modelings.jl | 33 +- docs/src/assets/Manifest.toml | 1177 +---------------- docs/src/assets/Project.toml | 3 - .../test_reference_solution.jl | 33 - 5 files changed, 27 insertions(+), 1220 deletions(-) delete mode 100644 test/suite/ModelingToolkit/test_reference_solution.jl diff --git a/docs/Project.toml b/docs/Project.toml index 800d6d2e9..9e33f93fe 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -13,7 +13,6 @@ Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71" OptimalControl = "5f98b655-cc9a-415a-b60e-744165666948" -OptimalControlProblems = "59046045-fb9c-4c23-964f-ff0a25704f96" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" diff --git a/docs/modelings.jl b/docs/modelings.jl index a14ca9737..1538c4fe9 100644 --- a/docs/modelings.jl +++ b/docs/modelings.jl @@ -75,33 +75,22 @@ const ADAPTERS = Dict{Symbol,NamedTuple}( ), :ModelingToolkit => ( title="ModelingToolkit", - summary="The continuous problem, written with ModelingToolkit.jl, solved with direct \ - shooting via Corleone.jl. With direct shooting in Corleone, the state path constraint is \ - enforced at the points of a constraint grid, and controls are piecewise constant on a \ - control grid.", - packages=["ModelingToolkit", "Corleone", "Optimization", "Ipopt"], + summary="The continuous problem, written as a ModelingToolkit.jl `System` with its \ + costs and constraints. The tests solve it by direct single shooting with Corleone.jl: \ + the controls are piecewise constant and the state path constraints are imposed at the \ + nodes of the grid; these choices are not part of the model, so the snippet stops at \ + the model.", + packages=["ModelingToolkit"], snippet=(problem, grid_size) -> """ using ModelingToolkit, OptimalControlProblems - using Corleone, Ipopt, Optimization, OptimizationMOI, OrdinaryDiffEqTsit5 pb = $(problem)(ModelingToolkitBackend()) - sys = model(pb) - - # Discretize path constraints on a constraint grid and setup direct shooting - grid = range(0.0, 1.0, length=$(grid_size)) - ctrl = filter(ModelingToolkit.isinput, ModelingToolkit.unknowns(sys)) - inits = [u => initial_guess(pb).control for u in ctrl] - switches = [u => collect(grid[1:(end - 1)]) for u in ctrl] - - opt_prob = CorleoneDynamicOptProblem( - sys, inits, switches...; - algorithm=Tsit5(), tspan=(0.0, 1.0), - ) - prob = OptimizationProblem(opt_prob, AutoForwardDiff()) - res = solve(prob, Ipopt.Optimizer()) - res.objective""", + sys = model(pb) # a ModelingToolkit.System + init = initial_guess(pb) # the initial guess of the problem""", model_start=r"^\s*ModelingToolkit\.@named sys = ModelingToolkit\.System\(", - checked_against=:OptimalControl, + # compared with OptimalControl at the continuous level, in the opt-in ModelingToolkit + # environment only (`suite/ModelingToolkit/test_modelings`): not on every pull request + checked_against=nothing, ), ) diff --git a/docs/src/assets/Manifest.toml b/docs/src/assets/Manifest.toml index 606ebc2b3..6a49bd7d3 100644 --- a/docs/src/assets/Manifest.toml +++ b/docs/src/assets/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.12.7" manifest_format = "2.0" -project_hash = "3edf56e528cf1922efdf718854ae0881c21d78d4" +project_hash = "c9565a74a5921d788dccbbf8f436abaa8500d2f5" [[deps.ADNLPModels]] deps = ["ADTypes", "DifferentiationInterface", "ForwardDiff", "LinearAlgebra", "NLPModels", "ReverseDiff", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings"] @@ -21,13 +21,17 @@ deps = ["PrecompileTools"] git-tree-sha1 = "629de23e1c16911b439dabd2303c08af9575b226" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" version = "1.24.0" -weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] [deps.ADTypes.extensions] ADTypesChainRulesCoreExt = "ChainRulesCore" ADTypesConstructionBaseExt = "ConstructionBase" ADTypesEnzymeCoreExt = "EnzymeCore" + [deps.ADTypes.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + [[deps.AMD]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] git-tree-sha1 = "344f3d221a6bee75925b5c97a30cfd870f12a138" @@ -45,40 +49,11 @@ git-tree-sha1 = "21a22cd1a6d45034933824665cfb874ec425a14b" uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" version = "0.1.5+0" -[[deps.AbstractPlutoDingetjes]] -git-tree-sha1 = "e71ee7b4aa06b045259a7d6101e1cb45ad140bce" -uuid = "6e696c72-6542-2067-7265-42206c756150" -version = "1.4.1" - [[deps.AbstractTrees]] git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" version = "0.4.5" -[[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] -git-tree-sha1 = "8c0bc12397dabf5d2dfc4b5763ec463854cc44d3" -uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.46" - - [deps.Accessors.extensions] - AxisKeysExt = "AxisKeys" - IntervalSetsExt = "IntervalSets" - LinearAlgebraExt = "LinearAlgebra" - StaticArraysExt = "StaticArrays" - StructArraysExt = "StructArrays" - TestExt = "Test" - UnitfulExt = "Unitful" - - [deps.Accessors.weakdeps] - AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - [[deps.Adapt]] deps = ["LinearAlgebra"] git-tree-sha1 = "eec8a0ad4e4b673afba213931504c360fffb8f97" @@ -100,61 +75,6 @@ version = "1.1.3" uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.2" -[[deps.ArnoldiMethod]] -deps = ["LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "d57bd3762d308bded22c3b82d033bff85f6195c6" -uuid = "ec485272-7323-5ecc-a04f-4719b315124d" -version = "0.4.0" - -[[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra"] -git-tree-sha1 = "1aec1ff0dcaa83a484e7f72097562fa3102c6722" -uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.30.2" - - [deps.ArrayInterface.extensions] - ArrayInterfaceAMDGPUExt = "AMDGPU" - ArrayInterfaceBandedMatricesExt = "BandedMatrices" - ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" - ArrayInterfaceCUDAExt = "CUDA" - ArrayInterfaceCUDSSExt = ["CUDSS", "CUDA"] - ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" - ArrayInterfaceChainRulesExt = "ChainRules" - ArrayInterfaceFillArraysExt = "FillArrays" - ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" - ArrayInterfaceGPUArraysCoreTrackerExt = ["GPUArraysCore", "Tracker"] - ArrayInterfaceMetalExt = "Metal" - ArrayInterfaceReverseDiffExt = "ReverseDiff" - ArrayInterfaceSparseArraysExt = "SparseArrays" - ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" - ArrayInterfaceTrackerExt = "Tracker" - - [deps.ArrayInterface.weakdeps] - AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" - ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - Metal = "dde4c033-4e86-420c-a63e-0dd931031962" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "8fde25d92e917350570f1203e47c933d16b77dce" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.16.0" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" version = "1.11.0" @@ -169,67 +89,10 @@ version = "1.7.0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" CUDACore = "bd0ed864-bdfe-4181-a5ed-ce625a5fdea2" -[[deps.BandedMatrices]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "PrecompileTools"] -git-tree-sha1 = "54e3d0ce61d4c4863911fe2823d18b27d8d32988" -uuid = "aae01518-5342-5314-be14-df237901396f" -version = "1.14.0" - - [deps.BandedMatrices.extensions] - BandedMatricesSparseArraysExt = "SparseArrays" - CliqueTreesExt = "CliqueTrees" - - [deps.BandedMatrices.weakdeps] - CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" version = "1.11.0" -[[deps.Bijections]] -git-tree-sha1 = "a2d308fcd4c2fb90e943cf9cd2fbfa9c32b69733" -uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" -version = "0.2.2" - -[[deps.BinaryHeaps]] -deps = ["PrecompileTools"] -git-tree-sha1 = "0adb6d8d0a4bae93a07d79c8d59eaf617f4c59da" -uuid = "b2a6c25c-c996-4615-94ab-6e519ffb8690" -version = "1.1.0" - -[[deps.BipartiteGraphs]] -deps = ["DataStructures", "DocStringExtensions", "Graphs", "PrecompileTools"] -git-tree-sha1 = "8fe09d06277d807ac5893f470a91f71cc832f913" -uuid = "caf10ac8-0290-4205-88aa-f15908547e8d" -version = "0.1.15" -weakdeps = ["SparseArrays"] - - [deps.BipartiteGraphs.extensions] - BipartiteGraphsSparseArraysExt = "SparseArrays" - -[[deps.BlockArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "876d4c4b941cc8b079da79c88d9c2dee52b9dd13" -uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.10.3" -weakdeps = ["Adapt", "BandedMatrices"] - - [deps.BlockArrays.extensions] - BlockArraysAdaptExt = "Adapt" - BlockArraysBandedMatricesExt = "BandedMatrices" - -[[deps.BracketingNonlinearSolve]] -deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLLogging"] -git-tree-sha1 = "b1b04c236ff7ed92e69d64b620448b3da00933d4" -uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" -version = "1.12.8" -weakdeps = ["ChainRulesCore", "ForwardDiff"] - - [deps.BracketingNonlinearSolve.extensions] - BracketingNonlinearSolveChainRulesCoreExt = ["ChainRulesCore", "ForwardDiff"] - BracketingNonlinearSolveForwardDiffExt = "ForwardDiff" - [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" @@ -429,11 +292,6 @@ git-tree-sha1 = "0737a3e59f9d94957f5b177fa2ca40901636b85b" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" version = "0.13.4" -[[deps.Combinatorics]] -git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" -uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.2" - [[deps.CommonSolve]] deps = ["PrecompileTools"] git-tree-sha1 = "6c389fa857f6ca5a95474b52a52023fd77f24cb7" @@ -446,12 +304,6 @@ git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.1" -[[deps.CommonWorldInvalidations]] -deps = ["PrecompileTools"] -git-tree-sha1 = "7c4ea0adfb7238bf4678aa36325863fab6163f6f" -uuid = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" -version = "1.2.2" - [[deps.Compat]] deps = ["TOML", "UUIDs"] git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad" @@ -467,37 +319,6 @@ deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" version = "1.3.1+2" -[[deps.CompositeTypes]] -git-tree-sha1 = "bce26c3dab336582805503bed209faab1c279768" -uuid = "b152e2b5-7a66-4b01-a709-34e65c35f657" -version = "0.1.4" - -[[deps.CompositionsBase]] -git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.2" -weakdeps = ["InverseFunctions"] - - [deps.CompositionsBase.extensions] - CompositionsBaseInverseFunctionsExt = "InverseFunctions" - -[[deps.ConcreteStructs]] -deps = ["PrecompileTools"] -git-tree-sha1 = "a72c3b5ce6d2a477f55b5c9b8756e91e695c67f6" -uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" -version = "0.2.8" - -[[deps.ConstructionBase]] -git-tree-sha1 = "b1bc10667320dd5367aff450a992c951ea38fbbc" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.6.1" -weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseLinearAlgebraExt = "LinearAlgebra" - ConstructionBaseStaticArraysExt = "StaticArrays" - [[deps.Contour]] git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" @@ -515,9 +336,9 @@ version = "1.16.0" [[deps.DataFrames]] deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] -git-tree-sha1 = "fd798b61b03b15dda0715aac807885397e6ded88" +git-tree-sha1 = "5fab31e2e01e70ad66e3e24c968c264d1cf166d6" uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "1.8.3" +version = "1.8.2" [[deps.DataStructures]] deps = ["OrderedCollections"] @@ -547,61 +368,6 @@ git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" version = "1.9.1" -[[deps.DiffEqBase]] -deps = ["ArrayInterface", "BracketingNonlinearSolve", "DocStringExtensions", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "RespecializeParams", "SciMLBase", "SciMLLogging", "SciMLOperators", "SciMLStructures", "Setfield", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] -git-tree-sha1 = "47230845a4944d292c07079838bdfee25bffebf8" -uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "7.21.6" - - [deps.DiffEqBase.extensions] - DiffEqBaseCUDAExt = "CUDA" - DiffEqBaseChainRulesCoreExt = "ChainRulesCore" - DiffEqBaseDynamicQuantitiesExt = "DynamicQuantities" - DiffEqBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] - DiffEqBaseFlexUnitsExt = "FlexUnits" - DiffEqBaseForwardDiffExt = ["ForwardDiff"] - DiffEqBaseGTPSAExt = "GTPSA" - DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" - DiffEqBaseMPIExt = "MPI" - DiffEqBaseMeasurementsExt = "Measurements" - DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" - DiffEqBaseMooncakeExt = "Mooncake" - DiffEqBaseReverseDiffExt = "ReverseDiff" - DiffEqBaseSparseArraysExt = "SparseArrays" - DiffEqBaseTrackerExt = "Tracker" - DiffEqBaseUnitfulExt = "Unitful" - - [deps.DiffEqBase.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" - DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - FlexUnits = "76e01b6b-c995-4ce6-8559-91e72a3d4e95" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" - GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" - MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" - Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" - MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - -[[deps.DiffEqCallbacks]] -deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "LinearAlgebra", "Markdown", "PrecompileTools", "Random", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "dc3c0668779fd5783c075dab6ed53371eea12e8c" -uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" -version = "4.19.6" - - [deps.DiffEqCallbacks.extensions] - DiffEqCallbacksFunctorsExt = "Functors" - - [deps.DiffEqCallbacks.weakdeps] - Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196" - [[deps.DiffResults]] deps = ["StaticArraysCore"] git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" @@ -667,11 +433,6 @@ version = "0.7.22" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" - [[deps.DocInventories]] deps = ["CodecZlib", "Downloads", "TOML"] git-tree-sha1 = "e97cfa8680a39396924dcdca4b7ff1014ed5c499" @@ -701,48 +462,16 @@ version = "0.3.9" [deps.DocumenterVitepress.weakdeps] DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" -[[deps.DomainSets]] -deps = ["CompositeTypes", "FunctionMaps", "IntervalSets", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "6ac879a64381881dc24f96a15e13e80204439906" -uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" -version = "0.8.3" - - [deps.DomainSets.extensions] - DomainSetsMakieExt = "Makie" - DomainSetsRandomExt = "Random" - DomainSetsRecipesBaseExt = "RecipesBase" - - [deps.DomainSets.weakdeps] - Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" - Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" - [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.7.0" -[[deps.DynamicPolynomials]] -deps = ["LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Reexport", "StarAlgebras"] -git-tree-sha1 = "b95c4325301d86a6a1b59790b71f7269a8702dd5" -uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" -version = "0.6.8" - [[deps.EnumX]] git-tree-sha1 = "c49898e8438c828577f04b92fc9368c388ac783c" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.7" -[[deps.EnzymeCore]] -git-tree-sha1 = "d88c803e26799193db42e47f6e1e28eeb0322e4d" -uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.8.27" -weakdeps = ["Adapt", "ChainRulesCore"] - - [deps.EnzymeCore.extensions] - AdaptExt = "Adapt" - EnzymeCoreChainRulesCoreExt = "ChainRulesCore" - [[deps.EpollShim_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" @@ -785,16 +514,6 @@ git-tree-sha1 = "d2e49e7efd29719d6f28b891b0e0e159daa9d2b4" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" version = "0.1.11" -[[deps.ExpressionExplorer]] -git-tree-sha1 = "fdcc9d4a253e0041d37c95487f9ae027c3ec002d" -uuid = "21656369-7473-754a-2065-74616d696c43" -version = "1.1.6" - -[[deps.ExproniconLite]] -git-tree-sha1 = "250aa1562e840b38c72b44a9ebef0f39f6b6e950" -uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" -version = "0.10.16" - [[deps.FFMPEG]] deps = ["FFMPEG_jll"] git-tree-sha1 = "7bd13840b4148949e290748071bbe6826b3eabcd" @@ -807,51 +526,11 @@ git-tree-sha1 = "d9d3cd382f2c999f684e6bfa4039fcc16c153b6f" uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" version = "9.0.2+0" -[[deps.FastBroadcast]] -deps = ["ArrayInterface", "LinearAlgebra", "PrecompileTools"] -git-tree-sha1 = "093bf5e9ea63b36032240033ec2f149088fc0926" -uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -version = "1.5.1" - - [deps.FastBroadcast.extensions] - FastBroadcastPolyesterExt = "Polyester" - FastBroadcastStaticExt = "Static" - FixedSizeArraysExt = "FixedSizeArrays" - - [deps.FastBroadcast.weakdeps] - FixedSizeArrays = "3821ddf9-e5b5-40d5-8e25-6813ab96b5e2" - Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" - Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" - [[deps.FastClosures]] git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" version = "0.3.2" -[[deps.FastPower]] -deps = ["PrecompileTools"] -git-tree-sha1 = "a6bcbd090fc6b6f022fc0ad96f77ba31b9577282" -uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b" -version = "1.5.1" - - [deps.FastPower.extensions] - FastPowerEnzymeExt = "Enzyme" - FastPowerForwardDiffExt = "ForwardDiff" - FastPowerMeasurementsExt = "Measurements" - FastPowerMonteCarloMeasurementsExt = "MonteCarloMeasurements" - FastPowerMooncakeExt = "Mooncake" - FastPowerReverseDiffExt = "ReverseDiff" - FastPowerTrackerExt = "Tracker" - - [deps.FastPower.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" - MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" version = "1.11.0" @@ -874,38 +553,6 @@ version = "1.18.2" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -[[deps.FindFirstFunctions]] -deps = ["PrecompileTools"] -git-tree-sha1 = "93eb9afa3a53b29d8a49714b83878225402b3281" -uuid = "64ca27bc-2ba2-4a57-88aa-44e436879224" -version = "3.4.1" - - [deps.FindFirstFunctions.extensions] - FindFirstFunctionsEnzymeCoreExt = "EnzymeCore" - FindFirstFunctionsMooncakeExt = "Mooncake" - - [deps.FindFirstFunctions.weakdeps] - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - -[[deps.FiniteDiff]] -deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] -git-tree-sha1 = "5031f23e040bf17082e5b52422d77b5e844eefb1" -uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.33.0" - - [deps.FiniteDiff.extensions] - FiniteDiffBandedMatricesExt = "BandedMatrices" - FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" - FiniteDiffSparseArraysExt = "SparseArrays" - FiniteDiffStaticArraysExt = "StaticArrays" - - [deps.FiniteDiff.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - [[deps.FixedPointNumbers]] deps = ["Random", "Statistics"] git-tree-sha1 = "59af96b98217c6ef4ae0dfe065ac7c20831d1a84" @@ -945,32 +592,11 @@ git-tree-sha1 = "e894be022a2eba58463939f1bf1f7f7006f27f52" uuid = "559328eb-81f9-559d-9380-de523a88c83c" version = "1.0.19+0" -[[deps.FunctionMaps]] -deps = ["CompositeTypes", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "31bd99a57edf98990d1c21486032963955450e8d" -uuid = "a85aefff-f8ca-4649-a888-c8e5398bc76c" -version = "0.1.2" - [[deps.FunctionWrappers]] git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" version = "1.1.3" -[[deps.FunctionWrappersWrappers]] -deps = ["FunctionWrappers", "PrecompileTools", "SciMLPublic"] -git-tree-sha1 = "2bcce3ad6f6977d617928d7707fdc86ac83cce03" -uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" -version = "1.13.0" - - [deps.FunctionWrappersWrappers.extensions] - FunctionWrappersWrappersEnzymeExt = ["Enzyme", "EnzymeCore"] - FunctionWrappersWrappersMooncakeExt = "Mooncake" - - [deps.FunctionWrappersWrappers.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" @@ -1048,19 +674,6 @@ git-tree-sha1 = "69ffb934a5c5b7e086a0b4fee3427db2556fba6e" uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" version = "1.3.16+0" -[[deps.Graphs]] -deps = ["ArnoldiMethod", "DataStructures", "Inflate", "LinearAlgebra", "Random", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "dbb2b976f605b220dfe139d6db9f3859680da09e" -uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.15.0" - - [deps.Graphs.extensions] - GraphsSharedArraysExt = "SharedArrays" - - [deps.Graphs.weakdeps] - Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" - SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383" - [[deps.HTTP]] deps = ["Base64", "CodecZlib", "Dates", "EnumX", "Logging", "PrecompileTools", "Random", "Reseau", "SHA", "TranscodingStreams", "URIs", "UUIDs", "Zlib_jll"] git-tree-sha1 = "70b131ae84fb6ff84d4e70ba1648fb5747e339a0" @@ -1080,9 +693,9 @@ version = "0.2.0" [[deps.Hwloc_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "XML2_jll", "Xorg_libpciaccess_jll"] -git-tree-sha1 = "550c21420b96b46f2f0abe8fc4c9430cd55649e3" +git-tree-sha1 = "8226014d201c6d689bf6034302637d2550155206" uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" -version = "2.15.0+3" +version = "2.15.0+1" [[deps.IOCapture]] deps = ["Logging", "Random"] @@ -1090,75 +703,24 @@ git-tree-sha1 = "0ee181ec08df7d7c911901ea38baf16f755114dc" uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" version = "1.0.0" -[[deps.ImplicitDiscreteSolve]] -deps = ["CommonSolve", "ConcreteStructs", "DiffEqBase", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "OrdinaryDiffEqCore", "Reexport", "SciMLBase", "SymbolicIndexingInterface"] -git-tree-sha1 = "a796d5bbd868177f97a840742e69061d89993a99" -uuid = "3263718b-31ed-49cf-8a0f-35a466e8af96" -version = "2.3.0" - -[[deps.Inflate]] -git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" -uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.5" - [[deps.InlineStrings]] -git-tree-sha1 = "6e0a59a838f58259f49474e913e39c23e8ca1366" +git-tree-sha1 = "06b65886c7577a3784d616e29f1302c2e36e389d" uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" -version = "2.0.1" +version = "1.4.6" [deps.InlineStrings.extensions] ArrowTypesExt = "ArrowTypes" ParsersExt = "Parsers" - SerializationExt = "Serialization" [deps.InlineStrings.weakdeps] ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" - Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "c72458f1962faeb003bf23cbdb75164fe6280906" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.4" - -[[deps.IntelOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "ec1debd61c300961f98064cfb21287613ad7f303" -uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2025.2.0+0" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" version = "1.11.0" -[[deps.IntervalSets]] -git-tree-sha1 = "0db6aea5b64caa1c47e9fdd27394f0296f05e8bf" -uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.15" - - [deps.IntervalSets.extensions] - IntervalSetsMakieExt = "Makie" - IntervalSetsRandomExt = "Random" - IntervalSetsRecipesBaseExt = "RecipesBase" - IntervalSetsStatisticsExt = "Statistics" - - [deps.IntervalSets.weakdeps] - Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" - Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.InverseFunctions]] -git-tree-sha1 = "5cc6ad3e2bfc75a11eed92632ee341d37f4a4536" -uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.18" -weakdeps = ["Dates", "Test"] - - [deps.InverseFunctions.extensions] - InverseFunctionsDatesExt = "Dates" - InverseFunctionsTestExt = "Test" - [[deps.InvertedIndices]] git-tree-sha1 = "6da3c4316095de0f5ee2ebd875df8721e7e0bdbe" uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" @@ -1216,12 +778,6 @@ version = "1.13.4" ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[deps.Jieko]] -deps = ["ExproniconLite"] -git-tree-sha1 = "2f05ed29618da60c06a87e9c033982d4f71d0b6c" -uuid = "ae98c720-c025-4a4a-838c-29b094483192" -version = "0.2.1" - [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "e06b451acfb1c6fa5ea753b5042207226271f455" @@ -1245,35 +801,21 @@ deps = ["StyledStrings"] uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" version = "1.12.0" -[[deps.JumpProcesses]] -deps = ["ADTypes", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "PoissonRandom", "PrecompileTools", "Random", "RecursiveArrayTools", "SciMLBase", "SimpleNonlinearSolve", "StaticArrays", "SymbolicIndexingInterface"] -git-tree-sha1 = "8bab411bfa528f97ac0f8961288b37c567ed5e80" -uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" -version = "10.1.1" -weakdeps = ["Adapt", "ForwardDiff", "KernelAbstractions", "OrdinaryDiffEqCore"] - - [deps.JumpProcesses.extensions] - JumpProcessesForwardDiffExt = "ForwardDiff" - JumpProcessesKernelAbstractionsExt = ["Adapt", "KernelAbstractions"] - JumpProcessesOrdinaryDiffEqCoreExt = "OrdinaryDiffEqCore" - [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "MacroTools", "PrecompileTools", "Requires", "StaticArrays", "UUIDs"] git-tree-sha1 = "e51d16f9dcff134c4ecf79e7cfa764c59d2d648e" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" version = "0.9.45" -weakdeps = ["EnzymeCore", "LinearAlgebra", "SparseArrays"] [deps.KernelAbstractions.extensions] EnzymeExt = "EnzymeCore" LinearAlgebraExt = "LinearAlgebra" SparseArraysExt = "SparseArrays" -[[deps.Krylov]] -deps = ["LinearAlgebra", "Printf", "SparseArrays"] -git-tree-sha1 = "b13076e4fff6ea0d0a5ddd9b939a11ca2027755a" -uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -version = "0.10.12" + [deps.KernelAbstractions.weakdeps] + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[deps.LAME_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1293,21 +835,6 @@ git-tree-sha1 = "6d7c65411dda4bfa0beb7490476122b4f805cf31" uuid = "88015f11-f218-50d7-93a8-a6af411a945d" version = "4.3.0+0" -[[deps.LHLFactorization]] -deps = ["LinearAlgebra", "PrecompileTools"] -git-tree-sha1 = "51d99d9892d0f95b4c9d4d7310785971f2d48298" -uuid = "2faa5264-e118-4071-8864-e10559f68c7c" -version = "2.2.2" - - [deps.LHLFactorization.extensions] - LHLFactorizationPolyesterExt = "Polyester" - LHLFactorizationSparseExt = ["PureKLU", "SparseArrays"] - - [deps.LHLFactorization.weakdeps] - Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" - PureKLU = "0c0d3e7f-3a8b-4f7e-b6f1-9a4d2e7c1f01" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - [[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "PrecompileTools", "Preferences", "Printf", "ScopedValues", "Unicode"] git-tree-sha1 = "41c2ce7ec5a14c89b93dc6a5853bf2a91d7a8583" @@ -1360,11 +887,6 @@ git-tree-sha1 = "0f2da712350b020bc3957f269c9caad516383ee0" uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" version = "1.3.0" -[[deps.LazyArtifacts]] -deps = ["Artifacts", "Pkg"] -uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" -version = "1.11.0" - [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" @@ -1430,18 +952,6 @@ git-tree-sha1 = "9e887184f306b28dbfcff88cefbb0ec80f1aa9e0" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" version = "2.42.4+0" -[[deps.LineSearch]] -deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "PrecompileTools", "ReactantCore", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] -git-tree-sha1 = "53cf132c453dcfcf10f1cb9a701a07c99b7e842e" -uuid = "87fe0de2-c867-4266-b59a-2f0a94fc965b" -version = "0.1.20" - - [deps.LineSearch.extensions] - LineSearchLineSearchesExt = "LineSearches" - - [deps.LineSearch.weakdeps] - LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" - [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -1473,107 +983,6 @@ version = "2.14.3" Metal = "dde4c033-4e86-420c-a63e-0dd931031962" TSVD = "9449cd9e-2762-5aa3-a617-5413e99d722e" -[[deps.LinearSolve]] -deps = ["AMD", "ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LHLFactorization", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "PureKLU", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "SciMLStructures", "Setfield", "SparseArrays", "SparseColumnPivotedQR", "StaticArraysCore"] -git-tree-sha1 = "e3e84c5c330ea65568a85aef00031e2b870b0e99" -uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "5.18.3" - - [deps.LinearSolve.extensions] - LinearSolveAMDGPUExt = "AMDGPU" - LinearSolveAMGXExt = ["AMGX", "CUDA"] - LinearSolveAlgebraicMultigridExt = "AlgebraicMultigrid" - LinearSolveArnoldiMethodExt = "ArnoldiMethod" - LinearSolveArpackExt = "Arpack" - LinearSolveBLISExt = ["blis_jll", "LAPACK_jll"] - LinearSolveBandedMatricesExt = "BandedMatrices" - LinearSolveBlockDiagonalsExt = "BlockDiagonals" - LinearSolveCKTSOExt = "CKTSO" - LinearSolveCUDAExt = ["cuSOLVER"] - LinearSolveCUDSSExt = "CUDSS" - LinearSolveCUSOLVERRFExt = "CUSOLVERRF" - LinearSolveChainRulesCoreExt = "ChainRulesCore" - LinearSolveCliqueTreesExt = "CliqueTrees" - LinearSolveConjugateGradientsExt = "ConjugateGradients" - LinearSolveElementalExt = "Elemental" - LinearSolveEnzymeExt = "EnzymeCore" - LinearSolveFastAlmostBandedMatricesExt = "FastAlmostBandedMatrices" - LinearSolveFastLapackInterfaceExt = "FastLapackInterface" - LinearSolveForwardDiffExt = "ForwardDiff" - LinearSolveGinkgoExt = "Ginkgo" - LinearSolveHSLExt = "HSL" - LinearSolveHYPREExt = "HYPRE" - LinearSolveIterativeSolversExt = "IterativeSolvers" - LinearSolveJacobiDavidsonExt = "JacobiDavidson" - LinearSolveKernelAbstractionsExt = "KernelAbstractions" - LinearSolveKrylovKitExt = "KrylovKit" - LinearSolveMUMPSExt = "MUMPS" - LinearSolveMetalExt = "Metal" - LinearSolveMooncakeExt = "Mooncake" - LinearSolvePETScExt = ["PETSc", "SparseMatricesCSR"] - LinearSolvePETScMPIExt = ["PETSc", "PartitionedArrays", "SparseMatricesCSR"] - LinearSolveParUExt = "ParU_jll" - LinearSolvePardisoExt = "Pardiso" - LinearSolvePartitionedSolversExt = ["PartitionedArrays", "PartitionedSolvers"] - LinearSolvePureUMFPACKExt = "PureUMFPACK" - LinearSolveReactantExt = "Reactant" - LinearSolveRecursiveFactorizationExt = ["RecursiveFactorization", "TriangularSolve"] - LinearSolveSLATEExt = "SLATE_jll" - LinearSolveSTRUMPACKExt = "STRUMPACK_jll" - LinearSolveSparspakExt = "Sparspak" - LinearSolveSpecializingFactorizationsExt = "SpecializingFactorizations" - LinearSolveSuperLUDISTExt = "SuperLUDIST" - - [deps.LinearSolve.weakdeps] - AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" - AMGX = "c963dde9-0319-47f5-bf0c-b07d3c80ffa6" - AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" - ArnoldiMethod = "ec485272-7323-5ecc-a04f-4719b315124d" - Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" - CKTSO = "8e543fc2-2ef1-4e2d-a99e-39beaa046845" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" - CUSOLVERRF = "a8cc9031-bad2-4722-94f5-40deabb4245c" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" - ConjugateGradients = "f59de78d-195d-4e7b-a078-2e47da4c3ad6" - Elemental = "902c3f28-d1ec-5e7e-8399-a24c3845ee38" - EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" - FastAlmostBandedMatrices = "9d29842c-ecb8-4973-b1e9-a27b1157504e" - FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - Ginkgo = "4c8bd3c9-ead9-4b5e-a625-08f1338ba0ec" - HSL = "34c5aeac-e683-54a6-a0e9-6e0fdc586c50" - HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" - IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" - JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" - JacobiDavidson = "11c68b98-9c9b-11e8-267b-bbb95576cead" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" - LAPACK_jll = "51474c39-65e3-53ba-86ba-03b1b862ec14" - MUMPS = "55d2b088-9f4e-11e9-26c0-150b02ea6a46" - Metal = "dde4c033-4e86-420c-a63e-0dd931031962" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - PETSc = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0" - ParU_jll = "9e0b026c-e8ce-559c-a2c4-6a3d5c955bc9" - Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" - PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" - PartitionedSolvers = "11b65f7f-80ac-401b-9ef2-3db765482d62" - PureUMFPACK = "b7e1f0a2-3c4d-4e5f-9a0b-1c2d3e4f5a6b" - Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" - RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" - SLATE_jll = "cb01ff19-587c-516c-bcf9-532d49da298d" - STRUMPACK_jll = "86fbd0b9-476f-557c-b766-62c724b42d8c" - SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" - Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" - SpecializingFactorizations = "fa08b7a1-13d3-4faf-875d-5cbc1520e3f3" - SuperLUDIST = "4cd002a6-0da4-410d-a012-232df062f478" - TriangularSolve = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" - blis_jll = "6136c539-28a5-5bf0-87cc-b183200dce32" - cuSOLVER = "887afef0-6a32-4de5-add4-7827692ba8fc" - [[deps.LiveServer]] deps = ["HTTP", "MIMEs", "Sockets", "Test"] git-tree-sha1 = "aeb86e2e29d4e340dc687f4b85a58fba89267def" @@ -1600,12 +1009,6 @@ version = "1.0.3" uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" version = "1.11.0" -[[deps.LoggingExtras]] -deps = ["Dates", "Logging"] -git-tree-sha1 = "f00544d95982ea270145636c181ceda21c4e2575" -uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.2.0" - [[deps.METIS_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "5ecd92439c60a50c49bd6e96192e9d486b24b050" @@ -1617,12 +1020,6 @@ git-tree-sha1 = "c64d943587f7187e751162b3b84445bbbd79f691" uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" version = "1.1.0" -[[deps.MKL_jll]] -deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] -git-tree-sha1 = "282cadc186e7b2ae0eeadbd7a4dffed4196ae2aa" -uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2025.2.0+0" - [[deps.MLStyle]] git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" uuid = "d8e11817-5142-5d16-987a-aa16d5891078" @@ -1674,16 +1071,6 @@ version = "1.54.0" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" -[[deps.MaybeInplace]] -deps = ["ArrayInterface", "LinearAlgebra", "MacroTools", "PrecompileTools"] -git-tree-sha1 = "f2cde0ae772162f20287b803e623966d0d94dea9" -uuid = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb" -version = "0.1.8" -weakdeps = ["SparseArrays"] - - [deps.MaybeInplace.extensions] - MaybeInplaceSparseArraysExt = "SparseArrays" - [[deps.Measures]] git-tree-sha1 = "b513cedd20d9c914783d8ad83d08120702bf2c77" uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" @@ -1699,96 +1086,10 @@ version = "1.2.1" uuid = "a63ad114-7e13-5084-954f-fe012c677804" version = "1.11.0" -[[deps.ModelingToolkit]] -deps = ["ADTypes", "BipartiteGraphs", "BlockArrays", "Combinatorics", "CommonSolve", "ConstructionBase", "DataStructures", "DiffEqBase", "DifferentiationInterface", "DocStringExtensions", "FillArrays", "ForwardDiff", "Graphs", "InteractiveUtils", "Libdl", "LinearAlgebra", "ModelingToolkitBase", "ModelingToolkitTearing", "Moshi", "OffsetArrays", "OrderedCollections", "PreallocationTools", "PrecompileTools", "REPL", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLPublic", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "StateSelection", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "TermInterface", "UnPack"] -git-tree-sha1 = "9c431cf99d31c3110515d6ed6d908f4e42442d9b" -uuid = "961ee093-0014-501f-94e3-6117800e7a78" -version = "11.46.1" - - [deps.ModelingToolkit.extensions] - MTKFMIExt = "FMIImport" - MTKOrdinaryDiffEqBDFExt = "OrdinaryDiffEqBDF" - MTKOrdinaryDiffEqDefaultExt = "OrdinaryDiffEqDefault" - MTKOrdinaryDiffEqRosenbrockExt = "OrdinaryDiffEqRosenbrock" - MTKOrdinaryDiffEqRosenbrockNonlinearSolveExt = ["OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqNonlinearSolve"] - MTKOrdinaryDiffEqTsit5Ext = "OrdinaryDiffEqTsit5" - - [deps.ModelingToolkit.weakdeps] - FMIImport = "9fcbc62e-52a0-44e9-a616-1359a0008194" - OrdinaryDiffEqBDF = "6ad6398a-0878-4a85-9266-38940aa047c8" - OrdinaryDiffEqDefault = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" - OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" - OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce" - OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" - -[[deps.ModelingToolkitBase]] -deps = ["ADTypes", "AbstractTrees", "ArrayInterface", "BandedMatrices", "BipartiteGraphs", "BlockArrays", "Combinatorics", "CommonSolve", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffRules", "DifferentiationInterface", "DocStringExtensions", "DomainSets", "EnumX", "EnzymeCore", "ExprTools", "FillArrays", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "Graphs", "ImplicitDiscreteSolve", "InteractiveUtils", "IntervalSets", "JumpProcesses", "Libdl", "LinearAlgebra", "Moshi", "NaNMath", "NonlinearSolveBase", "OffsetArrays", "OrderedCollections", "PreallocationTools", "PrecompileTools", "Printf", "REPL", "Random", "ReadOnlyArrays", "ReadOnlyDicts", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLLogging", "SciMLPublic", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "TermInterface", "UnPack"] -git-tree-sha1 = "216507a004dc0d597803b30ead7d5c396fdb643a" -uuid = "7771a370-6774-4173-bd38-47e70ca0b839" -version = "1.80.0" - - [deps.ModelingToolkitBase.extensions] - MTKBifurcationKitExt = "BifurcationKit" - MTKCasADiDynamicOptExt = "CasADi" - MTKChainRulesCoreExt = "ChainRulesCore" - MTKDiffEqNoiseProcessExt = "DiffEqNoiseProcess" - MTKDynamicQuantitiesExt = "DynamicQuantities" - MTKInfiniteOptExt = "InfiniteOpt" - MTKJuliaFormatterExt = "JuliaFormatter" - MTKLabelledArraysExt = "LabelledArrays" - MTKLatexifyExt = "Latexify" - MTKMooncakeExt = "Mooncake" - MTKPyomoDynamicOptExt = ["Pyomo", "PythonCall"] - MTKTrackerExt = "Tracker" - - [deps.ModelingToolkitBase.weakdeps] - BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665" - CasADi = "c49709b8-5c63-11e9-2fb2-69db5844192f" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503" - DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821" - InfiniteOpt = "20393b10-9daf-11e9-18c9-8db751c92c57" - JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" - LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" - Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - Pyomo = "0e8e1daf-01b5-4eba-a626-3897743a3816" - PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ModelingToolkitTearing]] -deps = ["BipartiteGraphs", "CommonSolve", "DocStringExtensions", "Graphs", "LinearAlgebra", "ModelingToolkitBase", "Moshi", "OffsetArrays", "OrderedCollections", "SciMLBase", "Setfield", "SparseArrays", "StateSelection", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "UUIDs"] -git-tree-sha1 = "ccf2c2242ba77c4d1eb26b4d6b74cd94720db775" -uuid = "6bb917b9-1269-42b9-9f7c-b0dca72083ab" -version = "1.20.9" - -[[deps.Moshi]] -deps = ["ExproniconLite", "Jieko"] -git-tree-sha1 = "3f234cf937eb1d58f613440ecb022da784ad34d4" -uuid = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d" -version = "0.3.13" - [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" version = "2025.11.4" -[[deps.MuladdMacro]] -deps = ["PrecompileTools"] -git-tree-sha1 = "283bf85d4a767481dd924dff0eee1735e95f449e" -uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" -version = "0.2.7" - -[[deps.MultivariatePolynomials]] -deps = ["DataStructures", "LinearAlgebra", "MutableArithmetics", "StarAlgebras"] -git-tree-sha1 = "65f1160de342181533efa7061f86539d420ab81d" -uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" -version = "0.5.20" -weakdeps = ["ChainRulesCore", "Latexify"] - - [deps.MultivariatePolynomials.extensions] - LatexifyExt = "Latexify" - MultivariatePolynomialsChainRulesCoreExt = "ChainRulesCore" - [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] git-tree-sha1 = "ffd1161361638e5f0bb796a095b0fdc230d6f019" @@ -1829,53 +1130,6 @@ git-tree-sha1 = "0b1b4a83773cfdefa5d9dc0322e4c0624ce88b5b" uuid = "c7aee132-11e1-519c-8219-0a43005e73c2" version = "20.12.2+0" -[[deps.NonlinearSolveBase]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnumX", "EnzymeCore", "FastClosures", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "LogExpFunctions", "Markdown", "MaybeInplace", "PreallocationTools", "PrecompileTools", "Preferences", "Printf", "RecursiveArrayTools", "RespecializeParams", "SciMLBase", "SciMLJacobianOperators", "SciMLLogging", "SciMLOperators", "SciMLStructures", "Setfield", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] -git-tree-sha1 = "f83b1fb97c02b99390346e13a71a027a59dc2459" -uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" -version = "2.55.1" - - [deps.NonlinearSolveBase.extensions] - NonlinearSolveBaseBandedMatricesExt = "BandedMatrices" - NonlinearSolveBaseChainRulesCoreExt = "ChainRulesCore" - NonlinearSolveBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] - NonlinearSolveBaseForwardDiffExt = "ForwardDiff" - NonlinearSolveBaseLineSearchExt = "LineSearch" - NonlinearSolveBaseLinearSolveExt = "LinearSolve" - NonlinearSolveBaseMooncakeExt = ["ChainRulesCore", "Mooncake"] - NonlinearSolveBaseReverseDiffExt = "ReverseDiff" - NonlinearSolveBaseSparseArraysExt = "SparseArrays" - NonlinearSolveBaseSparseMatrixColoringsExt = "SparseMatrixColorings" - NonlinearSolveBaseTrackerExt = "Tracker" - - [deps.NonlinearSolveBase.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - LineSearch = "87fe0de2-c867-4266-b59a-2f0a94fc965b" - LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.NonlinearSolveFirstOrder]] -deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConcreteStructs", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLJacobianOperators", "SciMLLogging", "SciMLOperators", "Setfield", "Sobol", "StaticArraysCore"] -git-tree-sha1 = "95a105b647b656dfbd7985ede8eb0eaf4b836505" -uuid = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d" -version = "2.10.0" - -[[deps.OffsetArrays]] -git-tree-sha1 = "750d0f2b5aac238d50dfee5f7a44fae3175a3305" -uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.18.0" -weakdeps = ["Adapt"] - - [deps.OffsetArrays.extensions] - OffsetArraysAdaptExt = "Adapt" - [[deps.Ogg_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" @@ -1921,18 +1175,6 @@ git-tree-sha1 = "07c2d96cde77525ad4c354547a34a068132f314d" uuid = "5f98b655-cc9a-415a-b60e-744165666948" version = "2.2.1-beta" -[[deps.OptimalControlProblems]] -deps = ["CTBase", "CTModels", "DocStringExtensions", "OrderedCollections", "SHA", "TOML"] -path = "/Users/ocots/Research/logiciels/dev/control-toolbox/OptimalControlProblems-439" -uuid = "59046045-fb9c-4c23-964f-ff0a25704f96" -version = "0.5.0" -weakdeps = ["JuMP", "ModelingToolkit", "OptimalControl"] - - [deps.OptimalControlProblems.extensions] - JuMPModels = "JuMP" - ModelingToolkitModels = "ModelingToolkit" - OptimalControlModels = "OptimalControl" - [[deps.Opus_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "e2bb57a313a74b8104064b7efd01406c0a50d2ff" @@ -1944,22 +1186,6 @@ git-tree-sha1 = "b079a6affebde167dad8ffe0d670b53917fbcb68" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" version = "2.0.3" -[[deps.OrdinaryDiffEqCore]] -deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "BinaryHeaps", "CommonSolve", "ConstructionBase", "DiffEqBase", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FindFirstFunctions", "FunctionWrappers", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "PrecompileTools", "Preferences", "Printf", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "SciMLStructures", "SymbolicIndexingInterface", "TruncatedStacktraces"] -git-tree-sha1 = "5765dd5605c88f1db2b3630df6f291751a96cd16" -uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" -version = "4.19.1" - - [deps.OrdinaryDiffEqCore.extensions] - OrdinaryDiffEqCoreMooncakeExt = "Mooncake" - OrdinaryDiffEqCorePolyesterExt = "Polyester" - OrdinaryDiffEqCoreSparseArraysExt = "SparseArrays" - - [deps.OrdinaryDiffEqCore.weakdeps] - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" @@ -2030,30 +1256,12 @@ version = "1.41.7" ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" -[[deps.PoissonRandom]] -deps = ["LogExpFunctions", "PrecompileTools", "Random"] -git-tree-sha1 = "7b7becc6ada13786479af8c5d08e7f7fe7d68301" -uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" -version = "0.4.14" - [[deps.PooledArrays]] deps = ["DataAPI", "Future"] git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3" uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" version = "1.4.3" -[[deps.PreallocationTools]] -deps = ["Adapt", "ArrayInterface", "PrecompileTools", "SciMLPublic"] -git-tree-sha1 = "cd00e28071a75c98664663f87c2ae447d25c0503" -uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "1.7.1" -weakdeps = ["EnzymeCore", "ForwardDiff", "ReverseDiff"] - - [deps.PreallocationTools.extensions] - PreallocationToolsEnzymeCoreExt = "EnzymeCore" - PreallocationToolsForwardDiffExt = "ForwardDiff" - PreallocationToolsReverseDiffExt = "ReverseDiff" - [[deps.PrecompileTools]] deps = ["Preferences"] git-tree-sha1 = "edbeefc7a4889f528644251bdb5fc9ab5348bc2c" @@ -2082,12 +1290,6 @@ version = "3.5.1" WriteDocx = "d049ceea-54ee-41d7-a26f-ba29db3b6599" XLSX = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0" -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.7" - [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" @@ -2098,16 +1300,6 @@ git-tree-sha1 = "4fbbafbc6251b883f4d2705356f3641f3652a7fe" uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" version = "1.4.0" -[[deps.PureKLU]] -deps = ["LinearAlgebra", "PrecompileTools", "SparseArrays"] -git-tree-sha1 = "ad0e84647fe7b3c2ae02aaeace1522139aaf6a27" -uuid = "0c0d3e7f-3a8b-4f7e-b6f1-9a4d2e7c1f01" -version = "1.6.0" -weakdeps = ["ForwardDiff"] - - [deps.PureKLU.extensions] - PureKLUForwardDiffExt = "ForwardDiff" - [[deps.Qt6Base_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] git-tree-sha1 = "144895f6166994730ee7ff8113b981fc360638f1" @@ -2148,23 +1340,6 @@ deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" version = "1.11.0" -[[deps.ReactantCore]] -deps = ["ExpressionExplorer", "MacroTools"] -git-tree-sha1 = "1fe4e616752a0c4818ae88a504fc59b0fb016659" -uuid = "a3311ec8-5e00-46d5-b541-4f83e724a433" -version = "0.1.26" - -[[deps.ReadOnlyArrays]] -git-tree-sha1 = "e6f7ddf48cf141cb312b078ca21cb2d29d0dc11d" -uuid = "988b38a3-91fc-5605-94a2-ee2116b3bd83" -version = "0.2.0" - -[[deps.ReadOnlyDicts]] -deps = ["DocStringExtensions"] -git-tree-sha1 = "711acef70140078d808be9cd33040f510af57f5e" -uuid = "795d4caa-f5a7-4580-b5d8-c01d53451803" -version = "1.0.1" - [[deps.RecipesBase]] deps = ["PrecompileTools"] git-tree-sha1 = "0c0dcffc464cda2ff33fc8ffc1dd1bdd53cd98be" @@ -2177,46 +1352,6 @@ git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" version = "0.6.12" -[[deps.RecursiveArrayTools]] -deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "LinearAlgebra", "PrecompileTools", "RecipesBase", "SciMLPublic", "SciMLStructures", "StaticArraysCore", "SymbolicIndexingInterface"] -git-tree-sha1 = "47fe0f2a25b5e98412c65227f8a649d26bb7f1b9" -uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "4.5.6" - - [deps.RecursiveArrayTools.extensions] - RecursiveArrayToolsCUDAExt = "CUDA" - RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" - RecursiveArrayToolsFastBroadcastPolyesterExt = ["FastBroadcast", "Polyester"] - RecursiveArrayToolsForwardDiffExt = "ForwardDiff" - RecursiveArrayToolsKernelAbstractionsExt = "KernelAbstractions" - RecursiveArrayToolsMeasurementsExt = "Measurements" - RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" - RecursiveArrayToolsMooncakeExt = "Mooncake" - RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"] - RecursiveArrayToolsSparseArraysExt = ["SparseArrays"] - RecursiveArrayToolsStatisticsExt = "Statistics" - RecursiveArrayToolsStructArraysExt = "StructArrays" - RecursiveArrayToolsTablesExt = ["Tables"] - RecursiveArrayToolsTrackerExt = "Tracker" - RecursiveArrayToolsZygoteExt = "Zygote" - - [deps.RecursiveArrayTools.weakdeps] - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" - MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" - Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" @@ -2246,12 +1381,6 @@ git-tree-sha1 = "13d0465bbd89b45183c0363b635dc82d5843593f" uuid = "802f3686-a58f-41ce-bb0c-3c43c75bba36" version = "1.6.6" -[[deps.RespecializeParams]] -deps = ["FunctionWrappersWrappers", "PrecompileTools"] -git-tree-sha1 = "140c074bb63518a0e1ec2c8aba2a8a5719bcf21c" -uuid = "9fe22ead-9e00-4db2-8b46-706a60d40f5e" -version = "1.3.0" - [[deps.ReverseDiff]] deps = ["ChainRulesCore", "DiffResults", "DiffRules", "ForwardDiff", "FunctionWrappers", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"] git-tree-sha1 = "3a2e70fe87406e8cd495d9a1b6bea0a2fe926890" @@ -2262,22 +1391,6 @@ weakdeps = ["Statistics"] [deps.ReverseDiff.extensions] StatisticsExt = "Statistics" -[[deps.RuntimeGeneratedFunctions]] -deps = ["ExprTools", "PrecompileTools", "SHA", "Serialization"] -git-tree-sha1 = "9bb075002b40849582905394bb3031fb77aa102d" -uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.27" - -[[deps.SCCNonlinearSolve]] -deps = ["CommonSolve", "NonlinearSolveBase", "PrecompileTools", "SciMLBase", "SymbolicIndexingInterface"] -git-tree-sha1 = "86f55e5b92d056b9e039c1de808424d3c85957b3" -uuid = "9dfe8606-65a1-4bb3-9748-cb89d1561431" -version = "1.16.0" -weakdeps = ["ChainRulesCore"] - - [deps.SCCNonlinearSolve.extensions] - SCCNonlinearSolveChainRulesCoreExt = "ChainRulesCore" - [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" @@ -2288,104 +1401,6 @@ git-tree-sha1 = "b78d602475715c9c6ea21c9650fa5dba58e9945b" uuid = "319450e9-13b8-58e8-aa9f-8fd1420848ab" version = "2025.9.18+1" -[[deps.SciMLBase]] -deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FindFirstFunctions", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "LoggingExtras", "Markdown", "PreallocationTools", "PrecompileTools", "Preferences", "Printf", "Random", "RecipesBase", "RecursiveArrayTools", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLPublic", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "85f85c3c5b949e7d691047e758e3fdb77c21310c" -uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "3.58.0" - - [deps.SciMLBase.extensions] - SciMLBaseChainRulesCoreExt = "ChainRulesCore" - SciMLBaseDifferentiationInterfaceExt = "DifferentiationInterface" - SciMLBaseDistributionsExt = "Distributions" - SciMLBaseEnzymeExt = "Enzyme" - SciMLBaseForwardDiffExt = "ForwardDiff" - SciMLBaseFunctionPropertiesExt = "FunctionProperties" - SciMLBaseMakieExt = ["Makie", "GeometryBasics"] - SciMLBaseMeasurementsExt = "Measurements" - SciMLBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" - SciMLBaseMooncakeExt = "Mooncake" - SciMLBasePartialFunctionsExt = "PartialFunctions" - SciMLBasePyCallExt = "PyCall" - SciMLBasePythonCallExt = "PythonCall" - SciMLBaseRCallExt = "RCall" - SciMLBaseReactantCoreExt = "ReactantCore" - SciMLBaseReactantExt = "Reactant" - SciMLBaseReverseDiffExt = ["ReverseDiff", "ForwardDiff"] - SciMLBaseStaticArraysExt = "StaticArrays" - SciMLBaseTrackerExt = "Tracker" - SciMLBaseZygoteExt = ["Zygote", "ChainRulesCore", "ZygoteRules", "FillArrays"] - - [deps.SciMLBase.weakdeps] - ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" - Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - FunctionProperties = "f62d2435-5019-4c03-9749-2d4c77af0cbc" - GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" - Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" - Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" - MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" - Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" - PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" - PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" - PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" - RCall = "6f49c342-dc21-5d91-9882-a32aef131414" - Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" - ReactantCore = "a3311ec8-5e00-46d5-b541-4f83e724a433" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" - -[[deps.SciMLJacobianOperators]] -deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DifferentiationInterface", "FastClosures", "LinearAlgebra", "SciMLBase", "SciMLOperators"] -git-tree-sha1 = "781d5413c2991e581da86979b0d9f86f9a034a1c" -uuid = "19f34311-ddf3-4b8b-af20-060888a46c0e" -version = "0.1.20" - -[[deps.SciMLLogging]] -deps = ["Logging", "LoggingExtras", "PrecompileTools", "Preferences"] -git-tree-sha1 = "3aafee7edc2ec7e71f50dcc6816cb031fac390a0" -uuid = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" -version = "2.1.0" - - [deps.SciMLLogging.extensions] - SciMLLoggingTracyExt = "Tracy" - - [deps.SciMLLogging.weakdeps] - Tracy = "e689c965-62c8-4b79-b2c5-8359227902fd" - -[[deps.SciMLOperators]] -deps = ["Accessors", "Adapt", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "SciMLPublic"] -git-tree-sha1 = "3feb8a7bce88bb3ef051a4eda8106004ad040b6f" -uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "1.30.4" - - [deps.SciMLOperators.extensions] - SciMLOperatorsLoopVectorizationExt = "LoopVectorization" - SciMLOperatorsSparseArraysExt = "SparseArrays" - - [deps.SciMLOperators.weakdeps] - LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890" - SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[deps.SciMLPublic]] -deps = ["PrecompileTools"] -git-tree-sha1 = "74685afb51732a464fbce79a72708f7c4203ceb7" -uuid = "431bcebd-1456-4ced-9d72-93c2757fff0b" -version = "1.3.0" - -[[deps.SciMLStructures]] -deps = ["ArrayInterface", "PrecompileTools"] -git-tree-sha1 = "4b8fc0ffe22b4ecba7a02f1fec0b3757db014d0c" -uuid = "53ae85a6-f571-4167-b2af-e1d143709226" -version = "1.10.6" - [[deps.ScopedValues]] deps = ["HashArrayMappedTries", "Logging"] git-tree-sha1 = "67a144433c4ce877ee6d1ada69a124d6b1ecf7be" @@ -2408,12 +1423,6 @@ version = "1.4.11" uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" version = "1.11.0" -[[deps.Setfield]] -deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "89880a2cca5cabc68c9023f58e544beda1d2fc1f" -uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.2.0" - [[deps.Showoff]] deps = ["Dates"] git-tree-sha1 = "8238217340ad0aaabe11afe39c1098b5bc9f4c8e" @@ -2425,34 +1434,6 @@ git-tree-sha1 = "ec017517738d90aa43f682cbab22fe74cb156608" uuid = "67d14529-f57e-4d48-b504-d486213b7963" version = "0.1.0" -[[deps.SimpleNonlinearSolve]] -deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLLogging", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "8d9ec24ec7bd126abf97b44ba5bdd6d280572095" -uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "2.14.6" - - [deps.SimpleNonlinearSolve.extensions] - SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore" - SimpleNonlinearSolveReverseDiffExt = "ReverseDiff" - SimpleNonlinearSolveTrackerExt = "Tracker" - - [deps.SimpleNonlinearSolve.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.SimpleTraits]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "7ddb0b49c109481b046972c0e4ab02b2127d6a75" -uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" -version = "0.9.6" - -[[deps.Sobol]] -deps = ["DelimitedFiles", "Random"] -git-tree-sha1 = "5a74ac22a9daef23705f010f72c81d6925b19df8" -uuid = "ed01d8cd-4d21-5b2a-85b4-cc3bdc58bad4" -version = "1.5.0" - [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" version = "1.11.0" @@ -2478,16 +1459,6 @@ deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" version = "1.12.0" -[[deps.SparseColumnPivotedQR]] -deps = ["LinearAlgebra", "PrecompileTools", "SparseArrays"] -git-tree-sha1 = "8cf1a59c78dd6f900feb366e5a574f99ed278ef1" -uuid = "a57abbd0-fea5-4d57-96be-5e525945e8e4" -version = "2.1.8" -weakdeps = ["AMD"] - - [deps.SparseColumnPivotedQR.extensions] - SparseColumnPivotedQRAMDExt = "AMD" - [[deps.SparseConnectivityTracer]] deps = ["ADTypes", "DocStringExtensions", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"] git-tree-sha1 = "277d8929a56912e7342458d4db22ee45e4c0e75c" @@ -2542,29 +1513,6 @@ weakdeps = ["ChainRulesCore"] [deps.SpecialFunctions.extensions] SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" -[[deps.StarAlgebras]] -deps = ["LinearAlgebra", "MutableArithmetics", "SparseArrays"] -git-tree-sha1 = "95c5ea2eef117ba1310ee14aa1737d3ea2d262ae" -uuid = "0c0c59c1-dc5f-42e9-9a8b-b5dc384a6cd1" -version = "0.3.1" -weakdeps = ["JuMP", "MathOptInterface"] - - [deps.StarAlgebras.extensions] - StarAlgebrasJuMPExt = "JuMP" - StarAlgebrasMathOptInterfaceExt = "MathOptInterface" - -[[deps.StateSelection]] -deps = ["BipartiteGraphs", "DocStringExtensions", "FindFirstFunctions", "Graphs", "LinearAlgebra", "OrderedCollections", "Setfield", "SparseArrays"] -git-tree-sha1 = "10914498005246949b0474ad26a650570e08948b" -uuid = "64909d44-ed92-46a8-bbd9-f047dfbdc84b" -version = "1.11.1" - - [deps.StateSelection.extensions] - StateSelectionDeepDiffsExt = "DeepDiffs" - - [deps.StateSelection.weakdeps] - DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" - [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] git-tree-sha1 = "8a8a52f887f38d44014e24ee46b8a7311c625f6d" @@ -2644,71 +1592,6 @@ deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" version = "7.8.3+2" -[[deps.SymbolicIndexingInterface]] -deps = ["Accessors", "ArrayInterface", "PrecompileTools", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "42dd4c193a1bacea5b6adf78b6224de907b06351" -uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.56" -weakdeps = ["PrettyTables"] - - [deps.SymbolicIndexingInterface.extensions] - SymbolicIndexingInterfacePrettyTablesExt = "PrettyTables" - -[[deps.SymbolicLimits]] -deps = ["PrecompileTools", "SymbolicUtils", "TermInterface"] -git-tree-sha1 = "cdf3f5760ff2ece5abe16f26a92a3f7da0eb8276" -uuid = "19f23fe9-fdab-4a78-91af-e7b7767979c3" -version = "1.2.2" - -[[deps.SymbolicUtils]] -deps = ["AbstractTrees", "ArrayInterface", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "EnumX", "ExproniconLite", "Graphs", "LinearAlgebra", "MacroTools", "Moshi", "MultivariatePolynomials", "MutableArithmetics", "NaNMath", "OrderedCollections", "PrecompileTools", "ReadOnlyArrays", "SciMLPublic", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "TaskLocalValues", "TermInterface", "WeakCacheSets"] -git-tree-sha1 = "61a82af727479af3d96988079fe3e05cdd57d695" -uuid = "d1185830-fcd6-423d-90d6-eec64667417b" -version = "4.55.0" - - [deps.SymbolicUtils.extensions] - SymbolicUtilsChainRulesCoreExt = "ChainRulesCore" - SymbolicUtilsDistributionsExt = "Distributions" - SymbolicUtilsLabelledArraysExt = "LabelledArrays" - SymbolicUtilsReverseDiffExt = "ReverseDiff" - - [deps.SymbolicUtils.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" - LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - -[[deps.Symbolics]] -deps = ["ADTypes", "AbstractPlutoDingetjes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "IntervalSets", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "Moshi", "MultivariatePolynomials", "MutableArithmetics", "NaNMath", "PrecompileTools", "Preferences", "Primes", "RecipesBase", "RuntimeGeneratedFunctions", "SciMLPublic", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] -git-tree-sha1 = "49a65a35d6fb99d152ad7266f8acd278da7e8d83" -uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "7.48.0" - - [deps.Symbolics.extensions] - SymbolicsD3TreesExt = "D3Trees" - SymbolicsDistributionsExt = "Distributions" - SymbolicsForwardDiffExt = "ForwardDiff" - SymbolicsGroebnerExt = "Groebner" - SymbolicsHypergeometricFunctionsExt = "HypergeometricFunctions" - SymbolicsLatexifyExt = ["Latexify", "LaTeXStrings"] - SymbolicsNemoExt = "Nemo" - SymbolicsStaticArraysExt = "StaticArrays" - SymbolicsSymPyExt = "SymPy" - SymbolicsSymPyPythonCallExt = "SymPyPythonCall" - - [deps.Symbolics.weakdeps] - D3Trees = "e3df1716-f71e-5df9-9e2d-98e193103c45" - Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4" - HypergeometricFunctions = "34004b35-14d8-5ef3-9330-4cdb6864b03a" - LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" - Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" - Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" - SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" - [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" @@ -2731,23 +1614,12 @@ deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" -[[deps.TaskLocalValues]] -git-tree-sha1 = "67e469338d9ce74fc578f7db1736a74d93a49eb8" -uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" -version = "0.1.3" - [[deps.TensorCore]] deps = ["LinearAlgebra"] git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" version = "0.1.1" -[[deps.TermInterface]] -deps = ["PrecompileTools"] -git-tree-sha1 = "d6984451701c6462ce685d0e2d4f2c47cd966773" -uuid = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c" -version = "2.0.1" - [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -2770,12 +1642,6 @@ git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" version = "0.11.3" -[[deps.TruncatedStacktraces]] -deps = ["InteractiveUtils", "MacroTools", "Preferences"] -git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" -uuid = "781d530d-4396-4725-bb49-402e4bee1e77" -version = "1.4.0" - [[deps.URIs]] deps = ["Serialization"] git-tree-sha1 = "eb3b85ca904a1d1647b15acc091b113b8874b648" @@ -2831,11 +1697,6 @@ git-tree-sha1 = "96478df35bbc2f3e1e791bc7a3d0eeee559e60e9" uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" version = "1.24.0+0" -[[deps.WeakCacheSets]] -git-tree-sha1 = "386050ae4353310d8ff9c228f83b1affca2f7f38" -uuid = "d30d5f5c-d141-4870-aa07-aabb0f5fe7d5" -version = "0.1.0" - [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] git-tree-sha1 = "b826aedca5fce2e3c91904e338c279e5c1a2da74" @@ -3091,12 +1952,6 @@ deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" version = "1.64.0+1" -[[deps.oneTBB_jll]] -deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "ed2d8d4ad96c03d3abe3382cdbbdea9489b63636" -uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" -version = "2023.1.0+0" - [[deps.p7zip_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/docs/src/assets/Project.toml b/docs/src/assets/Project.toml index 800d6d2e9..6ed84e7f8 100644 --- a/docs/src/assets/Project.toml +++ b/docs/src/assets/Project.toml @@ -10,10 +10,8 @@ JuMP = "4076af6c-e467-56ae-b986-b466b2749572" LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589" MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6" Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" -ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71" OptimalControl = "5f98b655-cc9a-415a-b60e-744165666948" -OptimalControlProblems = "59046045-fb9c-4c23-964f-ff0a25704f96" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" @@ -32,7 +30,6 @@ JuMP = "1" LiveServer = "1" MadNLP = "0.10" Markdown = "1" -ModelingToolkit = "11" NLPModelsIpopt = "0.11" OptimalControl = "2.2" Plots = "1" diff --git a/test/suite/ModelingToolkit/test_reference_solution.jl b/test/suite/ModelingToolkit/test_reference_solution.jl deleted file mode 100644 index 090c12911..000000000 --- a/test/suite/ModelingToolkit/test_reference_solution.jl +++ /dev/null @@ -1,33 +0,0 @@ -isdefined(Main, :SolveModelingToolkit) || - include(joinpath(@__DIR__, "..", "..", "common", "solve_modelingtoolkit.jl")) - -module TestReferenceSolutionModelingToolkit - -using Test: Test -using ModelingToolkit: ModelingToolkit as MTK -using OptimalControlProblems: OptimalControlProblems as OCP - -const VERBOSE = isdefined(Main, :TestOptions) ? Main.TestOptions.VERBOSE : true -const SHOWTIMING = isdefined(Main, :TestOptions) ? Main.TestOptions.SHOWTIMING : true - -function test_reference_solution() - backend = OCP.ModelingToolkitBackend() - Test.@testset "ModelingToolkit reference solution" verbose = VERBOSE showtiming = SHOWTIMING begin - Main.TestStatus.for_each_problem("reference_solution", backend) do problem - ref = OCP.reference_solution_data(problem) - isnothing(ref) && return nothing - pb = getfield(OCP, problem)(backend) - - # Solve with Corleone + Ipopt - res = Main.SolveModelingToolkit.solve(pb; grid_size=30, max_iter=100) - Test.@test Main.SolveModelingToolkit.succeeded(res) - # The numerical objective converges towards the reference objective (4.5 for bryson_denham) - rel_err = abs(res.objective - ref.objective) / abs(ref.objective) - Test.@test rel_err < 0.05 - end - end -end - -end # module TestReferenceSolutionModelingToolkit - -test_reference_solution() = TestReferenceSolutionModelingToolkit.test_reference_solution() From d13b11cf08be96b3e0e3c5e529eab470f2a16350 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 13:39:25 +0000 Subject: [PATCH 06/12] test: share the problem API, smoke and convergence tests between the modelings (#439) common/modeling_tests.jl holds the tests of common/optimalcontrol_tests.jl (#441), parameterized by the backend and an adapter, the solves of the modeling, so that ModelingToolkit uses them too. result! takes the reference of the gap, by default the reference objective of the discretization. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BSmPZipCYwgepwKpMP9sep --- test/common/modeling_tests.jl | 148 ++++++++++++++++++++++++++++ test/common/optimalcontrol_tests.jl | 129 ++++-------------------- test/common/status.jl | 11 ++- 3 files changed, 175 insertions(+), 113 deletions(-) create mode 100644 test/common/modeling_tests.jl diff --git a/test/common/modeling_tests.jl b/test/common/modeling_tests.jl new file mode 100644 index 000000000..c4fe5ad71 --- /dev/null +++ b/test/common/modeling_tests.jl @@ -0,0 +1,148 @@ +# The tests every modeling that returns a `Problem` shares (#441, #439): the API of a problem, +# the smoke solves, the convergence report. Written once and parameterized by the backend and +# by an adapter, a named tuple of what differs between the modelings: +# +# - `solve(pb, config; grid_size[, max_iter])`: a solution of `pb` with `config`; +# - `objective(sol)`: its objective; +# - `settings(config)`: `(modeler, solver, options)`, as `TestStatus.result!` records them; +# - `scheme(config)`: the discretization, for the report; +# - `outcome(sol)`: `(converged, reason, objective, iterations, violation)`; +# - `trajectory(sol, pb)`: the trajectory for the documentation, or `nothing`; +# - `reference(problem, grid_size, scheme)`: the objective the gap of the report is computed +# against; `nothing` for the reference objective of the problem for this discretization. +# +# The configurations come from `Main.TestConfigs.CONFIGS.`; the names of the test +# sets and of the lines of the report are those of the modeling. +module ModelingTests + +using Test: Test +using OptimalControlProblems: OptimalControlProblems + +const OCP = OptimalControlProblems +const VERBOSE = isdefined(Main, :TestOptions) ? Main.TestOptions.VERBOSE : true +const SHOWTIMING = isdefined(Main, :TestOptions) ? Main.TestOptions.SHOWTIMING : true + +"""Name of the modeling of `backend` (`:OptimalControl`, `:ModelingToolkit`, ...).""" +modeling(backend) = Main.TestStatus.modeling(backend) + +"""Configurations to solve with for `backend`, see `Main.TestConfigs.CONFIGS`.""" +configs(backend) = getfield(Main.TestConfigs.CONFIGS, modeling(backend)) + +""" +`params` with its last nonzero numerical value changed by a relative 1e-6, small enough to +keep every bound of the problem ordered; `nothing` if there is no such value. +""" +function changed(params::NamedTuple) + k = findlast(v -> v isa AbstractFloat || (v isa Integer && v != 0), values(params)) + isnothing(k) && return nothing + key = keys(params)[k] + return merge(params, NamedTuple{(key,)}((params[key] * (1 + 1e-6),))) +end + +""" +The API of a problem of the modeling of `backend`: the `Problem`, whose model is a +`model_type`, its metadata, its parameters, its initial guess, its display. `check(problem, pb)` +adds the checks of the modeling. +""" +function test_problem(backend; model_type::Type, check=(problem, pb) -> nothing) + name = modeling(backend) + Test.@testset "$name Problem API" verbose = VERBOSE showtiming = SHOWTIMING begin + Main.TestStatus.for_each_problem("problem", backend) do problem + pb = getfield(OCP, problem)(backend) + Test.@test pb isa OCP.Problem + Test.@test OCP.model(pb) isa model_type + Test.@test OCP.initial_guess(pb) isa NamedTuple + Test.@test issubset(keys(OCP.initial_guess(pb)), (:state, :control, :variable)) + data = OCP.metadata(pb) + Test.@test data[:parameters] == OCP.parameters_data(problem) + Test.@test data[:status] == OCP.status(problem) + Test.@test data[:grid_size] == OCP.grid_size_data(problem) + + # The parameters a problem is built with are recorded in its metadata, and the + # metadata of the collection are left untouched. + params = OCP.parameters_data(problem) + new = isnothing(params) ? nothing : changed(params) + if !isnothing(new) + Test.@test new != params + Test.@test OCP.metadata(getfield(OCP, problem)(backend; parameters=new))[:parameters] == + new + Test.@test OCP.parameters_data(problem) == params + end + + # The initial guess is the one of the metadata (#377), unless another one is given. + Test.@test OCP.initial_guess(pb) == OCP.initial_guess_data(problem) + other = (state=OCP.initial_guess_data(problem).state, control=0) + Test.@test OCP.initial_guess(getfield(OCP, problem)(backend; init=other)) === other + + # Shown with its name, modeling, status and dimensions. + shown = sprint(show, MIME("text/plain"), pb) + Test.@test occursin(string(problem), shown) + Test.@test occursin("$name modeling", shown) + Test.@test occursin(string(OCP.status(problem)[name]), shown) + Test.@test occursin( + "state dimension: $(OCP.state_dimension(OCP.model(pb)))", shown + ) + Test.@test sprint(show, pb) == "Problem(:$(problem))" + + check(problem, pb) + end + end +end + +""" +Every problem builds, evaluates and runs a few iterations in each configuration; the +convergence is reported by the convergence tests (`convergence` argument, cron), #360. +""" +function test_smoke(backend, adapter) + name = modeling(backend) + Test.@testset "$name smoke (small grid, few iterations)" verbose = VERBOSE showtiming = + SHOWTIMING begin + for config in configs(backend) + Test.@testset "$(Main.TestConfigs.label(config))" begin + test = "test_smoke $(Main.TestConfigs.label(config))" + Main.TestStatus.for_each_problem(test, backend) do problem + pb = getfield(OCP, problem)(backend) + o = Main.TestConfigs + sol = adapter.solve( + pb, config; grid_size=o.SMOKE_GRID, max_iter=o.SMOKE_MAX_ITER + ) + Test.@test isfinite(adapter.objective(sol)) + end + end + end + end +end + +""" +Every problem solved on its default grid in each configuration, and reported, not tested +(#360); an exception still fails. The second solve is timed, once compiled. +""" +function test_convergence(backend, adapter) + name = modeling(backend) + Test.@testset "$name convergence report (default grid)" verbose = VERBOSE showtiming = + SHOWTIMING begin + for config in configs(backend) + Test.@testset "$(Main.TestConfigs.label(config))" begin + test = "test_convergence $(Main.TestConfigs.label(config))" + Main.TestStatus.for_each_problem(test, backend) do problem + pb = getfield(OCP, problem)(backend) + N = OCP.grid_size_data(problem) + scheme = adapter.scheme(config) + sol = adapter.solve(pb, config; grid_size=N) + time = @elapsed sol = adapter.solve(pb, config; grid_size=N) # compiled + # convergence is reported, not tested (#360); an exception still fails + Main.TestStatus.result!( + test, problem, backend, Main.TestConfigs.label(config); + adapter.settings(config)..., + grid_size=N, scheme=scheme, adapter.outcome(sol)..., + time=time, trajectory=adapter.trajectory(sol, pb), + reference=adapter.reference(problem, N, scheme), + ) + Test.@test true # the problem was solved and reported: a line of the report + end + end + end + end +end + +end # module ModelingTests diff --git a/test/common/optimalcontrol_tests.jl b/test/common/optimalcontrol_tests.jl index 93b0e4d8b..c33a5168c 100644 --- a/test/common/optimalcontrol_tests.jl +++ b/test/common/optimalcontrol_tests.jl @@ -1,135 +1,44 @@ # The tests of the OptimalControl modelings (OptimalControl and OptimalControlScalarized), written # once and parameterized by the backend (#441): the API of a problem, the smoke solves, the # convergence report. A test file of a modeling is a wrapper that gives its backend (TST1). -# The configurations come from `Main.TestConfigs.CONFIGS.`, the solves from -# `Main.SolveOptimalControl`; the names of the test sets and of the lines of the report are -# those of the modeling, as before the tests were shared. +# The tests themselves are shared with every modeling that returns a `Problem` +# (`common/modeling_tests.jl`, #439); this module gives them the OptimalControl solves +# (`Main.SolveOptimalControl`). isdefined(Main, :SolveOptimalControl) || include(joinpath(@__DIR__, "solve_optimalcontrol.jl")) +isdefined(Main, :ModelingTests) || include(joinpath(@__DIR__, "modeling_tests.jl")) module OptimalControlTests -using Test: Test using OptimalControl: OptimalControl # loads the OptimalControlModels extension -using OptimalControlProblems: OptimalControlProblems -const OCP = OptimalControlProblems -const VERBOSE = isdefined(Main, :TestOptions) ? Main.TestOptions.VERBOSE : true -const SHOWTIMING = isdefined(Main, :TestOptions) ? Main.TestOptions.SHOWTIMING : true - -"""Name of the modeling of `backend` (`:OptimalControl`, `:OptimalControlScalarized`).""" -modeling(backend) = Main.TestStatus.modeling(backend) - -"""Configurations to solve with for `backend`, see `Main.TestConfigs.CONFIGS`.""" -configs(backend) = getfield(Main.TestConfigs.CONFIGS, modeling(backend)) - -""" -`params` with its last nonzero numerical value changed by a relative 1e-6, small enough to -keep every bound of the problem ordered; `nothing` if there is no such value. -""" -function changed(params::NamedTuple) - k = findlast(v -> v isa AbstractFloat || (v isa Integer && v != 0), values(params)) - isnothing(k) && return nothing - key = keys(params)[k] - return merge(params, NamedTuple{(key,)}((params[key] * (1 + 1e-6),))) +"""What the shared tests need of the OptimalControl solves (see `common/modeling_tests.jl`).""" +function adapter() + S = Main.SolveOptimalControl + return ( + solve=(pb, config; kwargs...) -> S.solve(pb, config; kwargs...), + objective=OptimalControl.objective, + settings=S.settings, + scheme=config -> Main.TestConfigs.SCHEME, + outcome=S.outcome, + trajectory=(sol, pb) -> Main.TestStatus.trajectory(sol), + reference=(problem, grid_size, scheme) -> nothing, + ) end """The API of a problem of the modeling of `backend`: the `Problem`, its metadata, its display.""" -function test_problem(backend) - name = modeling(backend) - Test.@testset "$name Problem API" verbose = VERBOSE showtiming = SHOWTIMING begin - Main.TestStatus.for_each_problem("problem", backend) do problem - pb = getfield(OCP, problem)(backend) - Test.@test pb isa OCP.Problem - Test.@test OCP.model(pb) isa OptimalControl.Model - Test.@test OCP.initial_guess(pb) isa NamedTuple - Test.@test issubset(keys(OCP.initial_guess(pb)), (:state, :control, :variable)) - data = OCP.metadata(pb) - Test.@test data[:parameters] == OCP.parameters_data(problem) - Test.@test data[:status] == OCP.status(problem) - Test.@test data[:grid_size] == OCP.grid_size_data(problem) - - # The parameters a problem is built with are recorded in its metadata, and the - # metadata of the collection are left untouched. - params = OCP.parameters_data(problem) - new = isnothing(params) ? nothing : changed(params) - if !isnothing(new) - Test.@test new != params - Test.@test OCP.metadata(getfield(OCP, problem)(backend; parameters=new))[:parameters] == - new - Test.@test OCP.parameters_data(problem) == params - end - - # The initial guess is the one of the metadata (#377), unless another one is given. - Test.@test OCP.initial_guess(pb) == OCP.initial_guess_data(problem) - other = (state=OCP.initial_guess_data(problem).state, control=0) - Test.@test OCP.initial_guess(getfield(OCP, problem)(backend; init=other)) === other - - # Shown with its name, modeling, status and dimensions. - shown = sprint(show, MIME("text/plain"), pb) - Test.@test occursin(string(problem), shown) - Test.@test occursin("$name modeling", shown) - Test.@test occursin(string(OCP.status(problem)[name]), shown) - Test.@test occursin( - "state dimension: $(OCP.state_dimension(OCP.model(pb)))", shown - ) - Test.@test sprint(show, pb) == "Problem(:$(problem))" - end - end -end +test_problem(backend) = Main.ModelingTests.test_problem(backend; model_type=OptimalControl.Model) """ Every problem builds, evaluates and runs a few iterations in each configuration; the convergence is reported by the convergence tests (`convergence` argument, cron), #360. """ -function test_smoke(backend) - S = Main.SolveOptimalControl - name = modeling(backend) - Test.@testset "$name smoke (small grid, few iterations)" verbose = VERBOSE showtiming = - SHOWTIMING begin - for config in configs(backend) - Test.@testset "$(Main.TestConfigs.label(config))" begin - test = "test_smoke $(Main.TestConfigs.label(config))" - Main.TestStatus.for_each_problem(test, backend) do problem - pb = getfield(OCP, problem)(backend) - o = Main.TestConfigs - sol = S.solve(pb, config; grid_size=o.SMOKE_GRID, max_iter=o.SMOKE_MAX_ITER) - Test.@test isfinite(OptimalControl.objective(sol)) - end - end - end - end -end +test_smoke(backend) = Main.ModelingTests.test_smoke(backend, adapter()) """ Every problem solved on its default grid in each configuration, and reported, not tested (#360); an exception still fails. """ -function test_convergence(backend) - S = Main.SolveOptimalControl - name = modeling(backend) - Test.@testset "$name convergence report (default grid)" verbose = VERBOSE showtiming = - SHOWTIMING begin - for config in configs(backend) - Test.@testset "$(Main.TestConfigs.label(config))" begin - test = "test_convergence $(Main.TestConfigs.label(config))" - Main.TestStatus.for_each_problem(test, backend) do problem - pb = getfield(OCP, problem)(backend) - N = OCP.grid_size_data(problem) - sol = S.solve(pb, config; grid_size=N) - time = @elapsed sol = S.solve(pb, config; grid_size=N) # second, compiled - # convergence is reported, not tested (#360); an exception still fails - Main.TestStatus.result!( - test, problem, backend, Main.TestConfigs.label(config); - S.settings(config)..., - grid_size=N, scheme=Main.TestConfigs.SCHEME, S.outcome(sol)..., - time=time, trajectory=Main.TestStatus.trajectory(sol), - ) - Test.@test true - end - end - end - end -end +test_convergence(backend) = Main.ModelingTests.test_convergence(backend, adapter()) end # module OptimalControlTests diff --git a/test/common/status.jl b/test/common/status.jl index 9be4f7581..e0265e3c9 100644 --- a/test/common/status.jl +++ b/test/common/status.jl @@ -139,12 +139,14 @@ gap(objective, reference) = """ result!(test, problem, backend, configuration; modeler, solver, options, grid_size, scheme, converged, reason, objective, iterations, violation, time, - trajectory=nothing) + trajectory=nothing, reference=nothing) Record the result of a solve of `problem` in the modeling of `backend`, discretized on `grid_size` steps with `scheme`. `modeler`, `solver` and `options` are the `settings` of the solve modules, the solver status the `outcome` of a solution, `trajectory` the -`trajectory` of the solution. +`trajectory` of the solution. The gap is to `reference`, by default the reference objective +of the problem for this discretization; a modeling without one (ModelingToolkit, solved by +shooting) gives the objective of the analytic solution, when there is one (#439). """ function result!( test, @@ -163,8 +165,11 @@ function result!( violation, time, trajectory=nothing, + reference=nothing, ) - reference = OptimalControlProblems.reference_objective(problem; grid_size, scheme) + if isnothing(reference) + reference = OptimalControlProblems.reference_objective(problem; grid_size, scheme) + end push!( RESULTS, Result( From afcdd5d1ae1bf36388ce61b0a959eb456a840701 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 13:39:25 +0000 Subject: [PATCH 07/12] test(mtk): build the Corleone problem once, from the initial guess, and measure the violation (#439) prepare returns the Optimization problem and the Corleone one; solve returns both with the result, and the trajectory is read from the problem solved instead of a copy of prepare. The controls start from the initial guess of the problem (#377), not 0. The violation is the largest violation of the constraints and bounds of the NLP, no longer 0. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BSmPZipCYwgepwKpMP9sep --- test/common/solve_modelingtoolkit.jl | 233 +++++++++++++++------------ 1 file changed, 128 insertions(+), 105 deletions(-) diff --git a/test/common/solve_modelingtoolkit.jl b/test/common/solve_modelingtoolkit.jl index ffa5789ab..d6e8c2b00 100644 --- a/test/common/solve_modelingtoolkit.jl +++ b/test/common/solve_modelingtoolkit.jl @@ -116,7 +116,25 @@ function solver_options( end """ -Prepare an `Optimization.OptimizationProblem` from a ModelingToolkit problem `pb` using Corleone. +The start value of each of the `m` controls, from the initial guess `init` of the problem +(#377): a number, a vector, or a function of the time taken at `t0`; `0.0` without a control +guess. Corleone starts every interval of a control from one value. +""" +function control_start(init, t0, m::Int) + g = haskey(init, :control) ? init.control : 0.0 + g isa Function && (g = g(t0)) + v = g isa Number ? fill(Float64(g), m) : Float64.(vec(collect(g))) + length(v) == m || + throw(DimensionMismatch("control guess of length $(length(v)), $m controls")) + return v +end + +""" +Prepare the solve of the ModelingToolkit problem `pb` with Corleone, built once: the path +constraints imposed at the `grid_size` nodes of the grid, the controls piecewise constant +between them and started from the initial guess of the problem. Returns the +`Optimization.OptimizationProblem` (`problem`) and the `Corleone.CorleoneDynamicOptProblem` +it was built from (`dynamic`), from which the trajectory of a solution is recovered. """ function prepare( pb; @@ -126,32 +144,32 @@ function prepare( ) shooting === :single || throw(ArgumentError("unsupported shooting method $shooting")) sys = OCP.model(pb) - iv = MTK.independent_variable(sys) t0, tf = _extract_tspan(sys) grid = range(t0, tf, length=grid_size) # Discretize path constraints over the grid sys_disc = _discretize_path_constraints(sys, grid) - # Controls and initial values + # Controls: started from the initial guess, switching at the nodes of the grid ctrl_syms = filter(MTK.isinput, MTK.unknowns(sys)) - inits = [u => 0.0 for u in ctrl_syms] - # Control switches: interior switches preceded by tspan[1] - switches = [u => collect(grid[1:end-1]) for u in ctrl_syms] + start = control_start(OCP.initial_guess(pb), t0, length(ctrl_syms)) + inits = [u => start[i] for (i, u) in enumerate(ctrl_syms)] + switches = [u => collect(grid[1:(end - 1)]) for u in ctrl_syms] - opt_prob = Corleone.CorleoneDynamicOptProblem( + dynamic = Corleone.CorleoneDynamicOptProblem( sys_disc, inits, switches...; algorithm=Tsit5(), tspan=(t0, tf), ) - - return Optimization.OptimizationProblem(opt_prob, Optimization.AutoForwardDiff()) + problem = Optimization.OptimizationProblem(dynamic, Optimization.AutoForwardDiff()) + return (; problem, dynamic) end """ -Solve the `Problem` `pb` with `config`. +Solve the `Problem` `pb` with `config`: a named tuple with the Optimization solution +(`result`) and the problems it solves (`problem`, `dynamic`, see `prepare`). """ function solve( pb, @@ -160,151 +178,156 @@ function solve( max_iter::Int=Main.TestConfigs.MAX_ITER, options::NamedTuple=(;), ) - prob = prepare( + prepared = prepare( pb; grid_size=grid_size, shooting=get(config, :shooting, :single), solver=get(config, :solver, :ipopt), ) opts = solver_options(get(config, :solver, :ipopt); max_iter=max_iter, options=options) - res = Optimization.solve(prob, Ipopt.Optimizer(); opts...) - return res + result = Optimization.solve(prepared.problem, Ipopt.Optimizer(); opts...) + return (; result, prepared...) end +"""The objective of a solution `sol` of `solve`.""" +objective(sol) = sol.result.objective + """ -How a solve with `config` and `options` was configured. +How a solve with `config` and `options` was configured, as `TestStatus.result!` records it. +The shooting is in the scheme, see `scheme`. """ function settings(config; max_iter::Int=Main.TestConfigs.MAX_ITER, options::NamedTuple=(;)) return ( modeler=:corleone, - shooting=get(config, :shooting, :single), solver=config.solver, options=solver_options(config.solver; max_iter=max_iter, options=options), ) end +"""The discretization of a solve with `config`, for the report: `:shooting_single`.""" +scheme(config) = Symbol(:shooting_, get(config, :shooting, :single)) + """ Whether the optimization succeeded. """ -function succeeded(res) +function succeeded(sol) + res = sol.result return Optimization.SciMLBase.successful_retcode(res) || res.retcode == Optimization.ReturnCode.Success end +""" +The largest violation of the constraints of the NLP solved (the path constraints at the nodes +of the grid, the boundary constraints) and of the bounds of its unknowns, at the solution. +""" +function violation(sol) + prob, u = sol.problem, sol.result.u + v = 0.0 + if !isnothing(prob.lb) + v = max(v, maximum(max.(prob.lb .- u, u .- prob.ub, 0.0); init=0.0)) + end + if !isnothing(prob.f.cons) && !isnothing(prob.lcons) + c = zeros(length(prob.lcons)) + prob.f.cons(c, u, prob.p) + v = max(v, maximum(max.(prob.lcons .- c, c .- prob.ucons, 0.0); init=0.0)) + end + return v +end + """ What `TestStatus.result!` records of a solution. """ -function outcome(res) - iters = hasproperty(res, :stats) && hasproperty(res.stats, :iterations) ? res.stats.iterations : 0 +function outcome(sol) + res = sol.result + iters = if hasproperty(res, :stats) && hasproperty(res.stats, :iterations) + res.stats.iterations + else + 0 + end return ( - converged=succeeded(res), + converged=succeeded(sol), reason=res.retcode, objective=res.objective, iterations=iters, - violation=0.0, + violation=violation(sol), ) end """ -Reconstruct the `Corleone.Trajectory` from an optimization solution `res` and problem `pb`. +The `Corleone.Trajectory` of a solution `sol` of `solve`, from the problem it solved: the +states at the nodes of the grid and the controls. """ -function dynamic_trajectory( - res, - pb; - grid_size::Int=Main.TestConfigs.SMOKE_GRID, - shooting::Symbol=:single, -) - shooting === :single || throw(ArgumentError("unsupported shooting method $shooting")) - sys = OCP.model(pb) - iv = MTK.independent_variable(sys) - t0, tf = _extract_tspan(sys) - grid = range(t0, tf, length=grid_size) - - # Discretize path constraints over the grid - sys_disc = _discretize_path_constraints(sys, grid) - - # Controls and initial values - ctrl_syms = filter(MTK.isinput, MTK.unknowns(sys)) - inits = [u => 0.0 for u in ctrl_syms] - switches = [u => collect(grid[1:(end - 1)]) for u in ctrl_syms] - - opt_prob = Corleone.CorleoneDynamicOptProblem( - sys_disc, - inits, - switches...; - algorithm=Tsit5(), - tspan=(t0, tf), - ) - - _, reconstruct = Corleone.pack(Val(:ComponentArrays), opt_prob.ps) - current = reconstruct(res.u) - traj, _ = opt_prob.layer( - (opt_prob.layer.problem, opt_prob.evaluation_grid), current, opt_prob.st +function dynamic_trajectory(sol) + dynamic = sol.dynamic + _, reconstruct = Corleone.pack(Val(:ComponentArrays), dynamic.ps) + current = reconstruct(sol.result.u) + traj, _ = dynamic.layer( + (dynamic.layer.problem, dynamic.evaluation_grid), current, dynamic.st ) return traj end """ -The trajectory of a solution `res` for the plots of the documentation (#314). -Matches the schema of `TestStatus.trajectory` with empty costates as Corleone is a -direct shooting solver without explicit costates. +The trajectory of a solution `sol` of `solve` for the plots of the documentation (#314), in +the schema of `TestStatus.trajectory`. The costates are empty: Corleone, a direct shooting +method, computes none. """ -function trajectory( - res, - pb; - grid_size::Int=Main.TestConfigs.SMOKE_GRID, - shooting::Symbol=:single, -) - (hasproperty(res, :u) && !isnothing(res.u)) || return nothing +function trajectory(sol, pb) + (hasproperty(sol.result, :u) && !isnothing(sol.result.u)) || return nothing try - traj = dynamic_trajectory(res, pb; grid_size=grid_size, shooting=shooting) - sys = OCP.model(pb) - t = collect(traj.t) - n_points = length(t) + return _trajectory(sol, pb) + catch err + @warn "No trajectory for this ModelingToolkit solve" exception = err + return nothing + end +end - # Points kept on the time grid: at most 501 points like TestStatus.TRAJECTORY_POINTS - max_points = 501 - keep = if n_points <= max_points - eachindex(t) - else - unique(round.(Int, range(1, n_points; length=max_points))) - end - t_sub = t[keep] - r(v) = round(Float64(v); sigdigits=6) +function _trajectory(sol, pb) + traj = dynamic_trajectory(sol) + sys = OCP.model(pb) + t = collect(traj.t) + n_points = length(t) - xs = CTModels.Models.state_components(sys) - us = CTModels.Models.control_components(sys) - vs = CTModels.Models.variable_components(sys) + # At most TestStatus.TRAJECTORY_POINTS points, as for the other modelings + max_points = Main.TestStatus.TRAJECTORY_POINTS + keep = if n_points <= max_points + eachindex(t) + else + unique(round.(Int, range(1, n_points; length=max_points))) + end + r(v) = round(Float64(v); sigdigits=6) - state_dict = Dict{String,Vector{Float64}}() - for name in xs - sym = Symbol(name) - vals = traj[sym] - state_dict[name] = [r(vals[i]) for i in keep] - end + xs = CTModels.Models.state_components(sys) + us = CTModels.Models.control_components(sys) + vs = CTModels.Models.variable_components(sys) - control_dict = Dict{String,Vector{Float64}}() - for name in us - sym = Symbol(name) - vals = traj[sym] - # Control is piecewise-constant on intervals (length n_points - 1). - # Extend to n_points so it aligns with the time grid. - full_vals = [vals[min(i, length(vals))] for i in 1:n_points] - control_dict[name] = [r(full_vals[i]) for i in keep] - end + state = Dict{String,Vector{Float64}}() + for name in xs + vals = traj[Symbol(name)] + length(vals) == n_points || + throw(DimensionMismatch("$(length(vals)) values of $name, $n_points times")) + state[name] = [r(vals[i]) for i in keep] + end - return Dict{String,Any}( - "time" => r.(t_sub), - "state" => state_dict, - "control" => control_dict, - "costate" => Dict{String,Vector{Float64}}(), - "variable" => Float64[], - "names" => Dict("state" => xs, "control" => us, "variable" => vs), - ) - catch err - @warn "No trajectory for this ModelingToolkit solve" exception = err - return nothing + # A control is constant on each interval: one value per interval (n_points - 1), the last + # one extended to the final time, or one value per time. + control = Dict{String,Vector{Float64}}() + for name in us + vals = traj[Symbol(name)] + length(vals) in (n_points - 1, n_points) || + throw(DimensionMismatch("$(length(vals)) values of $name, $n_points times")) + full = [vals[min(i, length(vals))] for i in 1:n_points] + control[name] = [r(full[i]) for i in keep] end + + return Dict{String,Any}( + "time" => r.(t[keep]), + "state" => state, + "control" => control, + "costate" => Dict{String,Vector{Float64}}(), + "variable" => Float64[], + "names" => Dict("state" => xs, "control" => us, "variable" => vs), + ) end end # module SolveModelingToolkit From 8f8a7c402f54dbc54751bd558c3d0b99512baeb9 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 13:39:25 +0000 Subject: [PATCH 08/12] test(mtk): compare with OptimalControl without discretizing, shared tests, thin cron (#439) test_modelings reads the System as the data of a JuMP problem and compares it with the OptimalControl model by Continuous.compare (#441). test_problem, test_smoke and the cron are wrappers of the shared tests; the cron times the compiled solve and records the gap to the analytic objective. test_reference_solution, which tested convergence on every run (#360), is removed. OptimalControl joins the ModelingToolkit environment for the comparison. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BSmPZipCYwgepwKpMP9sep --- test/common/continuous_modelingtoolkit.jl | 224 ++++++++++++++++++ test/common/modelingtoolkit_tests.jl | 59 +++++ test/cron/ModelingToolkit/test_convergence.jl | 71 +----- test/suite/ModelingToolkit/Project.toml | 2 + test/suite/ModelingToolkit/test_methods.jl | 80 ++++--- test/suite/ModelingToolkit/test_modelings.jl | 53 +++++ test/suite/ModelingToolkit/test_problem.jl | 94 +------- test/suite/ModelingToolkit/test_smoke.jl | 31 +-- 8 files changed, 399 insertions(+), 215 deletions(-) create mode 100644 test/common/continuous_modelingtoolkit.jl create mode 100644 test/common/modelingtoolkit_tests.jl create mode 100644 test/suite/ModelingToolkit/test_modelings.jl diff --git a/test/common/continuous_modelingtoolkit.jl b/test/common/continuous_modelingtoolkit.jl new file mode 100644 index 000000000..cc667bba7 --- /dev/null +++ b/test/common/continuous_modelingtoolkit.jl @@ -0,0 +1,224 @@ +# The ModelingToolkit model of a problem as the continuous data `Continuous.compare` reads +# (#439): the fields of the JuMP `ProblemData` (times, dynamics, Lagrange integrand, cost, path +# and boundary constraints, bounds), evaluated from the `System` at numerical points, without +# compiling it. Used by `suite/ModelingToolkit/test_modelings`, which compares the +# ModelingToolkit modeling of every problem with the OptimalControl one, as +# `suite/comparison/test_modelings` does for JuMP (#441). +# +# What a ModelingToolkit problem writes, and how it is read: +# - the dynamics `D(xᵢ(t)) ~ fᵢ`, one equation per state; +# - the costs (minimized, summed): integrals `Integral(t in (t0, tf))(ℓ)`, whose domain gives the +# times, and terms in the state at `t0` or `tf`; +# - the initial state, as the default value of a state that is not tunable; +# - the constraints `a ~ b`, `a ≲ b`, `a ≳ b`: a constraint in `t` is a path constraint, or a +# bound when it constrains one state or one control; one in the state at `t0` or `tf` is a +# boundary constraint; +# - the bounds of the metadata (`[bounds = (l, u)]`). +module ContinuousModelingToolkit + +using CTModels: CTModels +using ModelingToolkit: ModelingToolkit as MTK + +const SU = MTK.SymbolicUtils +const SYM = MTK.Symbolics + +unwrap(e) = SYM.unwrap(e) + +"""The value of `e` when it is a number, `nothing` otherwise.""" +function constant(e) + v = SU.unwrap_const(unwrap(e)) + return v isa Real ? Float64(v) : nothing +end + +"""Name of a state or a control, without its argument: `x₁` for `x₁(t)`.""" +name(s) = replace(string(s), r"\(.*\)$" => "") + +"""Whether `e` depends on the independent variable `iv`.""" +function depends_on_time(e, iv) + e = unwrap(e) + isequal(e, iv) && return true + SU.iscall(e) || return false + return any(a -> depends_on_time(a, iv), SU.arguments(e)) +end + +""" +The value of the expression `e` at the point `p`: `p.t`, `p.x`, `p.u` for a signal at the +time `t`, `p.x0`, `p.xf` for the state at `t0` or `tf`. `sig` holds the independent variable, +the states and the controls, and the times. +""" +function evaluate(e, sig, p) + e = unwrap(e) + isequal(e, sig.iv) && return p.t + if SU.iscall(e) + op, args = SU.operation(e), SU.arguments(e) + for (signals, now, at_t0, at_tf) in + ((sig.states, p.x, p.x0, p.xf), (sig.controls, p.u, nothing, nothing)) + i = findfirst(s -> isequal(op, SU.operation(s)), signals) + isnothing(i) && continue + arg = unwrap(only(args)) + isequal(arg, sig.iv) && return now[i] + τ = constant(arg) + !isnothing(at_t0) && τ == sig.t0 && return at_t0[i] + !isnothing(at_tf) && τ == sig.tf && return at_tf[i] + throw(ArgumentError("cannot evaluate $e: a signal at $τ, not at t0 or tf")) + end + return op(map(a -> evaluate(a, sig, p), args)...) + end + v = constant(e) + isnothing(v) && throw(ArgumentError("cannot evaluate $e")) + return v +end + +point(; t=nothing, x=nothing, u=nothing, x0=nothing, xf=nothing) = (; t, x, u, x0, xf) + +"""`h` as `(h′, c)` with `h = h′ + c` and `c` the constant term of a sum.""" +function split_constant(h) + h = unwrap(h) + (SU.iscall(h) && SU.operation(h) === (+)) || return h, 0.0 + args = SU.arguments(h) + values = map(constant, args) + rest = [a for (a, c) in zip(args, values) if isnothing(c)] + c = sum(c for c in values if !isnothing(c); init=0.0) + return (length(rest) == 1 ? only(rest) : +(rest...)), c +end + +""" +A constraint as `(lower, h, upper)`: `lower ≤ h ≤ upper`, the bounds being numbers. A +constraint between an expression and a number keeps the expression, as the other modelings +write it (`x(tf) == x_tf`). +""" +function bounded(c) + if c isa SYM.Equation + l, r = c.lhs, c.rhs + cr, cl = constant(r), constant(l) + !isnothing(cr) && return (cr, unwrap(l), cr) + !isnothing(cl) && return (cl, unwrap(r), cl) + h, k = split_constant(l - r) + return (-k, h, -k) + elseif c isa SYM.Inequality + # l ≤ r + l, r = c.relational_op === SYM.leq ? (c.lhs, c.rhs) : (c.rhs, c.lhs) + cr, cl = constant(r), constant(l) + !isnothing(cr) && return (-Inf, unwrap(l), cr) + !isnothing(cl) && return (cl, unwrap(r), Inf) + h, k = split_constant(l - r) + return (-Inf, h, -k) + end + throw(ArgumentError("unsupported constraint $c")) +end + +"""Initial value of the state `x` when it is fixed (not tunable), `nothing` otherwise.""" +function initial_value(sys, x) + MTK.istunable(x, false) && return nothing + v = nothing + if isdefined(MTK, :initial_conditions) + ics = MTK.initial_conditions(sys) + v = get(ics, unwrap(x), nothing) + end + isnothing(v) && (v = SYM.getdefaultval(x, nothing)) + return isnothing(v) ? nothing : constant(v) +end + +"""`syms` in the order of `names`; an error when a name is missing.""" +function ordered(syms, names) + return map(names) do n + i = findfirst(s -> name(s) == n, syms) + isnothing(i) && throw(ArgumentError("no component $n among $(name.(syms))")) + syms[i] + end +end + +""" +The data of the ModelingToolkit `System` `sys` in the fields of the JuMP `ProblemData`, read by +`Continuous.compare`; the states and the controls in the order of `state_names` and +`control_names` (those of the OptimalControl model). +""" +function problem_data(sys, state_names, control_names) + CTModels.Models.variable_dimension(sys) == 0 || + throw(ArgumentError("a problem with a variable is not supported yet")) + iv = unwrap(MTK.get_iv(sys)) + unknowns = MTK.unknowns(sys) + xs = ordered(filter(!MTK.isinput, unknowns), state_names) + us = ordered(filter(MTK.isinput, unknowns), control_names) + n, m = length(xs), length(us) + + # costs: integrals over (t0, tf) and terms in the state at t0 or tf + integrands, terms, times = Any[], Any[], nothing + for c in MTK.get_costs(sys) + c = unwrap(c) + if SU.iscall(c) && SU.operation(c) isa SYM.Integral + d = SU.operation(c).domain.domain + span = (constant(d.left), constant(d.right)) + isnothing(times) && (times = span) + span == times || throw(ArgumentError("integrals over different intervals")) + push!(integrands, only(SU.arguments(c))) + else + push!(terms, c) + end + end + isnothing(times) && throw(ArgumentError("no integral cost: the times are not known")) + t0, tf = times + sig = (; iv, states=unwrap.(xs), controls=unwrap.(us), t0, tf) + + # dynamics, in the order of the states + rhs = Vector{Any}(nothing, n) + for eq in MTK.equations(sys) + lhs = unwrap(eq.lhs) + (SU.iscall(lhs) && SU.operation(lhs) isa SYM.Differential) || + throw(ArgumentError("not a dynamics: $eq")) + i = findfirst(s -> isequal(s, unwrap(only(SU.arguments(lhs)))), sig.states) + isnothing(i) && throw(ArgumentError("not the derivative of a state: $eq")) + rhs[i] = eq.rhs + end + any(isnothing, rhs) && throw(ArgumentError("a state has no dynamics")) + + # bounds of the metadata, then the constraints + function metadata_bounds(s) + l, u = MTK.getbounds(s) + return something(constant(l), -Inf), something(constant(u), Inf) + end + lower_x, upper_x = first.(metadata_bounds.(xs)), last.(metadata_bounds.(xs)) + lower_u, upper_u = first.(metadata_bounds.(us)), last.(metadata_bounds.(us)) + path, boundary = Tuple{Any,Function,Any}[], Tuple{Any,Function,Any}[] + for c in MTK.get_constraints(sys) + lo, h, hi = bounded(c) + if depends_on_time(h, iv) + i = findfirst(s -> isequal(s, h), sig.states) + k = findfirst(s -> isequal(s, h), sig.controls) + if !isnothing(i) + lower_x[i], upper_x[i] = max(lower_x[i], lo), min(upper_x[i], hi) + elseif !isnothing(k) + lower_u[k], upper_u[k] = max(lower_u[k], lo), min(upper_u[k], hi) + else + f = (x, u, v, t) -> evaluate(h, sig, point(; t, x, u)) + push!(path, (lo, f, hi)) + end + else + push!(boundary, (lo, (x0, xf, v) -> evaluate(h, sig, point(; x0, xf)), hi)) + end + end + for (i, x) in enumerate(xs) + a = initial_value(sys, x) + isnothing(a) || push!(boundary, (a, (x0, xf, v) -> x0[i], a)) + end + + component(s, l, u) = (; name=name(s), lower=l, upper=u) + lagrange = if isempty(integrands) + nothing + else + (x, u, v, t) -> sum(evaluate(ℓ, sig, point(; t, x, u)) for ℓ in integrands) + end + return (; + state=[component(xs[i], lower_x[i], upper_x[i]) for i in 1:n], + control=[component(us[k], lower_u[k], upper_u[k]) for k in 1:m], + variable=NamedTuple[], + times=v -> (t0, tf), + dynamics=(x, u, v, t) -> [evaluate(f, sig, point(; t, x, u)) for f in rhs], + lagrange=lagrange, + cost=(I, x0, xf, v) -> I + sum(evaluate(g, sig, point(; x0, xf)) for g in terms; init=0.0), + path=path, + boundary=boundary, + ) +end + +end # module ContinuousModelingToolkit diff --git a/test/common/modelingtoolkit_tests.jl b/test/common/modelingtoolkit_tests.jl new file mode 100644 index 000000000..ee0710167 --- /dev/null +++ b/test/common/modelingtoolkit_tests.jl @@ -0,0 +1,59 @@ +# The tests of the ModelingToolkit modeling: the tests every modeling that returns a `Problem` +# shares (`common/modeling_tests.jl`, #441), given the ModelingToolkit solves +# (`Main.SolveModelingToolkit`, Corleone and Ipopt), and the checks of a `System` (#439). +isdefined(Main, :SolveModelingToolkit) || + include(joinpath(@__DIR__, "solve_modelingtoolkit.jl")) +isdefined(Main, :ModelingTests) || include(joinpath(@__DIR__, "modeling_tests.jl")) + +module ModelingToolkitTests + +using Test: Test +using ModelingToolkit: ModelingToolkit as MTK # loads the ModelingToolkitModels extension +using OptimalControlProblems: OptimalControlProblems + +const OCP = OptimalControlProblems + +""" +The objective of the analytic solution of `problem`, the reference of the gap in the report: +a shooting solve has no reference objective of its own discretization; `nothing` without one. +""" +function analytic_objective(problem, grid_size, scheme) + ref = OCP.analytic_reference(problem) + return isnothing(ref) ? nothing : ref.objective +end + +"""What the shared tests need of the ModelingToolkit solves (see `common/modeling_tests.jl`).""" +function adapter() + S = Main.SolveModelingToolkit + return ( + solve=(pb, config; kwargs...) -> S.solve(pb, config; kwargs...), + objective=S.objective, + settings=S.settings, + scheme=S.scheme, + outcome=S.outcome, + trajectory=S.trajectory, + reference=analytic_objective, + ) +end + +"""The checks of a `System`: its dimensions, one dynamics per state, a cost.""" +function check(problem, pb) + sys = OCP.model(pb) + Test.@test OCP.state_dimension(sys) == length(OCP.state_components(sys)) > 0 + Test.@test OCP.control_dimension(sys) == length(OCP.control_components(sys)) > 0 + Test.@test OCP.variable_dimension(sys) == length(OCP.variable_components(sys)) + Test.@test length(MTK.equations(sys)) == OCP.state_dimension(sys) + Test.@test !isempty(MTK.get_costs(sys)) +end + +"""The API of a problem of the modeling: the `Problem`, its metadata, its display.""" +test_problem(backend) = + Main.ModelingTests.test_problem(backend; model_type=MTK.AbstractSystem, check=check) + +"""Every problem builds and runs a few iterations; the convergence is in the cron (#360).""" +test_smoke(backend) = Main.ModelingTests.test_smoke(backend, adapter()) + +"""Every problem solved on its default grid, and reported, not tested (#360).""" +test_convergence(backend) = Main.ModelingTests.test_convergence(backend, adapter()) + +end # module ModelingToolkitTests diff --git a/test/cron/ModelingToolkit/test_convergence.jl b/test/cron/ModelingToolkit/test_convergence.jl index 475c5fa19..e7a1601f6 100644 --- a/test/cron/ModelingToolkit/test_convergence.jl +++ b/test/cron/ModelingToolkit/test_convergence.jl @@ -1,72 +1,15 @@ -isdefined(Main, :SolveModelingToolkit) || - include(joinpath(@__DIR__, "..", "..", "common", "solve_modelingtoolkit.jl")) +isdefined(Main, :ModelingToolkitTests) || + include(joinpath(@__DIR__, "..", "..", "common", "modelingtoolkit_tests.jl")) module TestConvergenceModelingToolkit -using Test: Test -using ModelingToolkit: ModelingToolkit as MTK using OptimalControlProblems: OptimalControlProblems -const VERBOSE = isdefined(Main, :TestOptions) ? Main.TestOptions.VERBOSE : true -const SHOWTIMING = isdefined(Main, :TestOptions) ? Main.TestOptions.SHOWTIMING : true - -function test_convergence() - S = Main.SolveModelingToolkit - backend = OptimalControlProblems.ModelingToolkitBackend() - Test.@testset "ModelingToolkit convergence report (default grid)" verbose = VERBOSE showtiming = - SHOWTIMING begin - for config in Main.TestConfigs.CONFIGS.ModelingToolkit - Test.@testset "$(Main.TestConfigs.label(config))" begin - test = "test_convergence $(Main.TestConfigs.label(config))" - Main.TestStatus.for_each_problem(test, backend) do problem - pb = getfield(OptimalControlProblems, problem)(backend) - N = OptimalControlProblems.grid_size_data(problem) - time = @elapsed sol = S.solve( - pb, config; grid_size=N, max_iter=Main.TestConfigs.MAX_ITER - ) - scheme = Symbol(:shooting_, get(config, :shooting, :single)) - stg = S.settings(config) - # convergence is reported, not tested (#360); an exception still fails - Main.TestStatus.result!( - test, - problem, - backend, - Main.TestConfigs.label(config); - modeler=stg.modeler, - solver=stg.solver, - options=stg.options, - grid_size=N, - scheme=scheme, - S.outcome(sol)..., - time=time, - trajectory=S.trajectory(sol, pb; grid_size=N), - ) - - # Log comparisons against analytic and trapezoidal reference objectives - analytic = OptimalControlProblems.analytic_reference(problem) - trapezoid = OptimalControlProblems.reference_objective( - problem; grid_size=N, scheme=:trapeze - ) - if !isnothing(analytic) - gap_analytic = - abs(sol.objective - analytic.objective) / abs(analytic.objective) - println( - " [$(problem)] gap to analytic objective ($(analytic.objective)): $(round(gap_analytic * 100; digits=4))%", - ) - end - if !isnothing(trapezoid) - gap_trap = abs(sol.objective - trapezoid) / abs(trapezoid) - println( - " [$(problem)] gap to OptimalControl trapezoid ($(trapezoid)): $(round(gap_trap * 100; digits=4))%", - ) - end - - Test.@test true - end - end - end - end -end +# The convergence report on the default grid; written once in `common/modeling_tests.jl` +# (#441, #439). The gap is to the objective of the analytic solution, when there is one. +test_convergence() = Main.ModelingToolkitTests.test_convergence( + OptimalControlProblems.ModelingToolkitBackend() +) end # module TestConvergenceModelingToolkit diff --git a/test/suite/ModelingToolkit/Project.toml b/test/suite/ModelingToolkit/Project.toml index 533b5ae58..3736ecf59 100644 --- a/test/suite/ModelingToolkit/Project.toml +++ b/test/suite/ModelingToolkit/Project.toml @@ -6,6 +6,7 @@ Corleone = "2751e0db-33e9-4374-b36d-b7219e1e6b40" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" +OptimalControl = "5f98b655-cc9a-415a-b60e-744165666948" OptimalControlProblems = "59046045-fb9c-4c23-964f-ff0a25704f96" Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba" OptimizationMOI = "fd9f6733-72f4-499f-8506-86b2bdd0dea1" @@ -20,6 +21,7 @@ Corleone = "2" ForwardDiff = "1" Ipopt = "1" ModelingToolkit = "11" +OptimalControl = "2.2" Optimization = "5" OptimizationMOI = "1" OrdinaryDiffEqTsit5 = "2" diff --git a/test/suite/ModelingToolkit/test_methods.jl b/test/suite/ModelingToolkit/test_methods.jl index 695576567..5529a7d17 100644 --- a/test/suite/ModelingToolkit/test_methods.jl +++ b/test/suite/ModelingToolkit/test_methods.jl @@ -40,48 +40,58 @@ function test_methods() Test.@test opts.tol == Main.TestConfigs.TOL Test.@test_throws ArgumentError Main.SolveModelingToolkit.solver_options(:madnlp) - # 5. settings + # 5. settings and scheme cfg = (shooting=:single, solver=:ipopt) stg = Main.SolveModelingToolkit.settings(cfg; max_iter=5) + Test.@test stg.modeler === :corleone Test.@test stg.solver === :ipopt - Test.@test stg.shooting === :single Test.@test stg.options.max_iter == 5 + Test.@test Main.SolveModelingToolkit.scheme(cfg) === :shooting_single - # 6. prepare - opt_prob = Main.SolveModelingToolkit.prepare(pb; grid_size=10) - Test.@test opt_prob isa Main.SolveModelingToolkit.Optimization.OptimizationProblem - - # 7. solve (smoke: 2 iterations) - res = Main.SolveModelingToolkit.solve(pb, cfg; grid_size=10, max_iter=2) - Test.@test isfinite(res.objective) - Test.@test hasproperty(res, :retcode) - out = Main.SolveModelingToolkit.outcome(res) - Test.@test haskey(out, :converged) - Test.@test haskey(out, :objective) - Test.@test isfinite(out.objective) - - # 8. trajectory reconstruction - dyn_traj = Main.SolveModelingToolkit.dynamic_trajectory(res, pb; grid_size=10) - Test.@test dyn_traj isa Main.SolveModelingToolkit.Corleone.Trajectory - Test.@test length(dyn_traj.t) == 10 - - tr = Main.SolveModelingToolkit.trajectory(res, pb; grid_size=10) + # 6. control_start: the initial guess of the problem (#377) + S = Main.SolveModelingToolkit + Test.@test S.control_start((control=0.5,), 0.0, 2) == [0.5, 0.5] + Test.@test S.control_start((control=[1, 2],), 0.0, 2) == [1.0, 2.0] + Test.@test S.control_start((control=t -> 3t,), 1.0, 1) == [3.0] + Test.@test S.control_start((state=[0.0, 0.0],), 0.0, 1) == [0.0] + Test.@test_throws DimensionMismatch S.control_start((control=[1, 2],), 0.0, 1) + + # 7. prepare: built once, the Optimization problem and the Corleone one + prepared = S.prepare(pb; grid_size=10) + Test.@test prepared.problem isa S.Optimization.OptimizationProblem + Test.@test prepared.dynamic isa S.Corleone.CorleoneDynamicOptProblem + + # 8. solve (smoke: 2 iterations) and outcome + sol = S.solve(pb, cfg; grid_size=10, max_iter=2) + Test.@test isfinite(S.objective(sol)) + out = S.outcome(sol) + Test.@test keys(out) == (:converged, :reason, :objective, :iterations, :violation) + Test.@test out.objective == S.objective(sol) + Test.@test isfinite(out.violation) && out.violation >= 0 + + # 9. trajectory, from the problem the solve built: the states start at their + # initial conditions whatever the iterate, and the controls are the solved ones + traj = S.dynamic_trajectory(sol) + Test.@test traj isa S.Corleone.Trajectory + Test.@test length(traj.t) == 10 + Test.@test first(traj.t) == tspan[1] && last(traj.t) == tspan[2] + + tr = S.trajectory(sol, pb) Test.@test tr isa Dict{String,Any} - Test.@test haskey(tr, "time") - Test.@test haskey(tr, "state") - Test.@test haskey(tr, "control") - Test.@test haskey(tr, "costate") - Test.@test haskey(tr, "variable") - Test.@test haskey(tr, "names") + Test.@test issetequal( + keys(tr), ("time", "state", "control", "costate", "variable", "names") + ) + xs = OCP.state_components(sys) + us = OCP.control_components(sys) + Test.@test tr["names"]["state"] == xs && tr["names"]["control"] == us Test.@test length(tr["time"]) == 10 - Test.@test isempty(tr["costate"]) - Test.@test isempty(tr["variable"]) - Test.@test haskey(tr["state"], "x₁") - Test.@test haskey(tr["state"], "x₂") - Test.@test haskey(tr["control"], "u") - Test.@test length(tr["state"]["x₁"]) == 10 - Test.@test length(tr["state"]["x₂"]) == 10 - Test.@test length(tr["control"]["u"]) == 10 + Test.@test isempty(tr["costate"]) && isempty(tr["variable"]) + Test.@test all(length(tr["state"][x]) == 10 for x in xs) + Test.@test all(length(tr["control"][u]) == 10 for u in us) + params = OCP.metadata(pb)[:parameters] + Test.@test tr["state"]["x₁"][1] ≈ params.x1_t0 + Test.@test tr["state"]["x₂"][1] ≈ params.x2_t0 + Test.@test all(isfinite, tr["control"]["u"]) end end diff --git a/test/suite/ModelingToolkit/test_modelings.jl b/test/suite/ModelingToolkit/test_modelings.jl new file mode 100644 index 000000000..dd90abcc5 --- /dev/null +++ b/test/suite/ModelingToolkit/test_modelings.jl @@ -0,0 +1,53 @@ +isdefined(Main, :Continuous) || + include(joinpath(@__DIR__, "..", "..", "common", "continuous.jl")) +isdefined(Main, :ContinuousModelingToolkit) || + include(joinpath(@__DIR__, "..", "..", "common", "continuous_modelingtoolkit.jl")) + +module TestModelingsModelingToolkit + +using Test: Test +using ModelingToolkit: ModelingToolkit # loads the ModelingToolkitModels extension +using OptimalControl: OptimalControl # loads the OptimalControlModels extension +using OptimalControlProblems: OptimalControlProblems + +const OCP = OptimalControlProblems +const VERBOSE = isdefined(Main, :TestOptions) ? Main.TestOptions.VERBOSE : true +const SHOWTIMING = isdefined(Main, :TestOptions) ? Main.TestOptions.SHOWTIMING : true + +# Do the ModelingToolkit and the OptimalControl modelings of a problem describe the same +# problem? As `suite/comparison/test_modelings` for JuMP (#441), at the continuous level and +# without a solve: the `System` is read as the data of a JuMP problem +# (`common/continuous_modelingtoolkit.jl`) and compared by `Continuous.compare` on the times, +# the dynamics, the objective, the path and boundary constraints and the bounds, at points +# taken on the initial guess. Here and not in `comparison`: ModelingToolkit is opt-in (#439). +function test_modelings() + mtk = OCP.ModelingToolkitBackend() + Test.@testset "modelings: the same continuous problem" verbose = VERBOSE showtiming = + SHOWTIMING begin + for other in (OCP.OptimalControlBackend(), OCP.OptimalControlScalarizedBackend()) + Test.@testset "ModelingToolkit vs $(Main.TestStatus.modeling(other))" begin + Main.TestStatus.for_each_problem("test_modelings", mtk, other) do problem + build = getfield(OCP, problem) + sys, pb = OCP.model(build(mtk)), build(other) + ocp = OCP.model(pb) + xs, us = OCP.state_components(ocp), OCP.control_components(ocp) + Test.@testset "components" begin + Test.@test sort(OCP.state_components(sys)) == sort(xs) + Test.@test sort(OCP.control_components(sys)) == sort(us) + end + data = Main.ContinuousModelingToolkit.problem_data(sys, xs, us) + checks = Main.Continuous.compare(data, ocp, OCP.initial_guess(pb)) + for (name, ok) in sort!(collect(checks); by=first) + Test.@testset "$name" begin + Test.@test ok + end + end + end + end + end + end +end + +end # module TestModelingsModelingToolkit + +test_modelings() = TestModelingsModelingToolkit.test_modelings() diff --git a/test/suite/ModelingToolkit/test_problem.jl b/test/suite/ModelingToolkit/test_problem.jl index 41377d1de..80cf12757 100644 --- a/test/suite/ModelingToolkit/test_problem.jl +++ b/test/suite/ModelingToolkit/test_problem.jl @@ -1,96 +1,12 @@ +isdefined(Main, :ModelingToolkitTests) || + include(joinpath(@__DIR__, "..", "..", "common", "modelingtoolkit_tests.jl")) + module TestProblemModelingToolkit -using Test: Test -using ModelingToolkit: ModelingToolkit as MTK using OptimalControlProblems: OptimalControlProblems -using CTModels: CTModels -using CTBase: CTBase - -const OCP = OptimalControlProblems -const VERBOSE = isdefined(Main, :TestOptions) ? Main.TestOptions.VERBOSE : true -const SHOWTIMING = isdefined(Main, :TestOptions) ? Main.TestOptions.SHOWTIMING : true - -""" -`params` with its last nonzero numerical value changed by a relative 1e-6, small enough to -keep every bound of the problem ordered; `nothing` if there is no such value. -""" -function changed(params::NamedTuple) - k = findlast(v -> v isa AbstractFloat || (v isa Integer && v != 0), values(params)) - isnothing(k) && return nothing - key = keys(params)[k] - return merge(params, NamedTuple{(key,)}((params[key] * (1 + 1e-6),))) -end - -function test_problem() - backend = OCP.ModelingToolkitBackend() - Test.@testset "ModelingToolkit Problem API" verbose = VERBOSE showtiming = SHOWTIMING begin - Main.TestStatus.for_each_problem("problem", backend) do problem - pb = getfield(OCP, problem)(backend) - Test.@test pb isa OCP.Problem - Test.@test OCP.model(pb) isa MTK.AbstractSystem - Test.@test OCP.initial_guess(pb) isa NamedTuple - Test.@test issubset(keys(OCP.initial_guess(pb)), (:state, :control, :variable)) - data = OCP.metadata(pb) - Test.@test data[:parameters] == OCP.parameters_data(problem) - Test.@test data[:status] == OCP.status(problem) - Test.@test data[:grid_size] == OCP.grid_size_data(problem) - - # Check CTModels dimension and component methods - sys = OCP.model(pb) - Test.@test CTModels.Models.state_dimension(sys) == length(CTModels.Models.state_components(sys)) - Test.@test CTModels.Models.control_dimension(sys) == length(CTModels.Models.control_components(sys)) - Test.@test CTModels.Models.variable_dimension(sys) == length(CTModels.Models.variable_components(sys)) - Test.@test CTModels.Models.state_dimension(sys) > 0 - Test.@test CTModels.Models.control_dimension(sys) > 0 - - # Verify MTK model equations and structure - eqs = MTK.equations(sys) - Test.@test length(eqs) == CTModels.Models.state_dimension(sys) - iv = MTK.independent_variable(sys) - Test.@test iv !== nothing - - # Verify costs - costs = MTK.get_costs(sys) - Test.@test !isempty(costs) - cost = costs[1] - op = MTK.SymbolicUtils.operation(cost) - Test.@test hasproperty(op, :domain) - d = op.domain.domain - params = OCP.parameters_data(problem) - Test.@test Float64(d.left) == Float64(params.t0) - Test.@test Float64(d.right) == Float64(params.tf) - - # Verify constraints - cons = MTK.get_constraints(sys) - Test.@test !isempty(cons) - - # The parameters a problem is built with are recorded in its metadata, and the - # metadata of the collection are left untouched. - new = isnothing(params) ? nothing : changed(params) - if !isnothing(new) - Test.@test new != params - Test.@test OCP.metadata(getfield(OCP, problem)(backend; parameters=new))[:parameters] == - new - Test.@test OCP.parameters_data(problem) == params - end - - # The initial guess is the one of the metadata (#377), unless another one is given. - Test.@test OCP.initial_guess(pb) == OCP.initial_guess_data(problem) - other = (state=OCP.initial_guess_data(problem).state, control=0) - Test.@test OCP.initial_guess(getfield(OCP, problem)(backend; init=other)) === other - # Shown with its name, modeling, status and dimensions. - shown = sprint(show, MIME("text/plain"), pb) - Test.@test occursin(string(problem), shown) - Test.@test occursin("ModelingToolkit modeling", shown) - Test.@test occursin(string(OCP.status(problem)[:ModelingToolkit]), shown) - Test.@test occursin( - "state dimension: $(CTModels.Models.state_dimension(sys))", shown - ) - Test.@test sprint(show, pb) == "Problem(:$(problem))" - end - end -end +# Written once in `common/modeling_tests.jl` (#441, #439). +test_problem() = Main.ModelingToolkitTests.test_problem(OptimalControlProblems.ModelingToolkitBackend()) end # module TestProblemModelingToolkit diff --git a/test/suite/ModelingToolkit/test_smoke.jl b/test/suite/ModelingToolkit/test_smoke.jl index d66dfd5d6..1205ffa55 100644 --- a/test/suite/ModelingToolkit/test_smoke.jl +++ b/test/suite/ModelingToolkit/test_smoke.jl @@ -1,35 +1,12 @@ -isdefined(Main, :SolveModelingToolkit) || - include(joinpath(@__DIR__, "..", "..", "common", "solve_modelingtoolkit.jl")) +isdefined(Main, :ModelingToolkitTests) || + include(joinpath(@__DIR__, "..", "..", "common", "modelingtoolkit_tests.jl")) module TestSmokeModelingToolkit -using Test: Test -using ModelingToolkit: ModelingToolkit as MTK using OptimalControlProblems: OptimalControlProblems -const VERBOSE = isdefined(Main, :TestOptions) ? Main.TestOptions.VERBOSE : true -const SHOWTIMING = isdefined(Main, :TestOptions) ? Main.TestOptions.SHOWTIMING : true - -# Every problem builds, evaluates and runs a few iterations in each configuration; the -# convergence is reported by the convergence tests. -function test_smoke() - S = Main.SolveModelingToolkit - backend = OptimalControlProblems.ModelingToolkitBackend() - Test.@testset "ModelingToolkit smoke (small grid, few iterations)" verbose = VERBOSE showtiming = - SHOWTIMING begin - for config in Main.TestConfigs.CONFIGS.ModelingToolkit - Test.@testset "$(Main.TestConfigs.label(config))" begin - test = "test_smoke $(Main.TestConfigs.label(config))" - Main.TestStatus.for_each_problem(test, backend) do problem - pb = getfield(OptimalControlProblems, problem)(backend) - o = Main.TestConfigs - sol = S.solve(pb, config; grid_size=o.SMOKE_GRID, max_iter=o.SMOKE_MAX_ITER) - Test.@test isfinite(sol.objective) - end - end - end - end -end +# Written once in `common/modeling_tests.jl` (#441, #439). +test_smoke() = Main.ModelingToolkitTests.test_smoke(OptimalControlProblems.ModelingToolkitBackend()) end # module TestSmokeModelingToolkit From 9834bf42ed7c6864ed1045094cdb61d3e580a97e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 13:39:25 +0000 Subject: [PATCH 09/12] ci(cron): ModelingToolkit scope in the reports, runners and docs of the tests (#439) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BSmPZipCYwgepwKpMP9sep --- .github/workflows/CronModelingToolkit.yml | 2 +- .github/workflows/README.md | 2 +- CHANGELOG.md | 4 +++ test/README.md | 34 +++++++++++++++-------- tools/cron/report.py | 13 +++++++-- 5 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CronModelingToolkit.yml b/.github/workflows/CronModelingToolkit.yml index 9090f0b73..37d930767 100644 --- a/.github/workflows/CronModelingToolkit.yml +++ b/.github/workflows/CronModelingToolkit.yml @@ -26,5 +26,5 @@ jobs: with: environment: ModelingToolkit problems: ${{ inputs.problems }} - note: "`CronModelingToolkit.yml` · weekly (Saturday 04:00 UTC) · Julia 1.13, Ubuntu, CPU" + note: "`CronModelingToolkit.yml` · weekly (Saturday 04:00 UTC) · Julia 1.13, Ubuntu + Windows, CPU" secrets: inherit diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 77a91c0b8..baf4ce864 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -9,7 +9,7 @@ scope labels. They are staggered at 04:00 UTC: | `CronOptimalControl.yml` | `OptimalControl` | Wednesday | Yes | | `CronOptimalControlScalarized.yml` | `OptimalControlScalarized` | Thursday | Yes | | `CronComparison.yml` | `comparison` | Friday | No | -| `CronModelingToolkit.yml` | `ModelingToolkit` | manual only until the scope exists | No | +| `CronModelingToolkit.yml` | `ModelingToolkit` | Saturday | No | | `CronRobustness.yml` | `JuMP-robustness`, `OptimalControl-robustness` | 1st of the month | No | Each thin workflow calls `cron-reusable.yml` (inputs `mode`: `cron`, or `robustness` for diff --git a/CHANGELOG.md b/CHANGELOG.md index 63c5ab495..6d7f4eb0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,10 @@ See [BREAKING.md](BREAKING.md). (tested once on fake problems, and on a few representative problems against CTDirect): see `test/README.md` (#441). A weekly cron, `comparison`, compares the NLP of every problem with CTDirect's. +- The ModelingToolkit modeling follows the same tests (#439): its model is compared with the + OptimalControl one without discretizing, it shares the API, smoke and convergence tests of + the other modelings, and a weekly cron reports its solves by direct shooting with Corleone, + started from the initial guess of the problem, with their trajectories for the documentation. ### 📦 Dependencies diff --git a/test/README.md b/test/README.md index 5c47baa77..317a0c46d 100644 --- a/test/README.md +++ b/test/README.md @@ -175,10 +175,12 @@ transcription; a failure in the cron is a difference between the JuMP NLP and CT `test_tableaux`, `test_equivalence`, `common/equivalence.jl`, `common/representative.jl` and the cron `comparison`. They test code that this package writes; their files say so. -The modelings of OptimalControl (`OptimalControl`, `OptimalControlScalarized`) share their -tests: `common/optimalcontrol_tests.jl` holds `test_problem`, `test_smoke` and -`test_convergence`, parameterized by the backend, and each test file is a wrapper that gives -its backend. +The modelings that return a `Problem` (`OptimalControl`, `OptimalControlScalarized`, +`ModelingToolkit`) share their tests: `common/modeling_tests.jl` holds `test_problem`, +`test_smoke` and `test_convergence`, parameterized by the backend and by an adapter, the +solves of the modeling (`common/optimalcontrol_tests.jl` for the two OptimalControl modelings, +`common/modelingtoolkit_tests.jl` for ModelingToolkit), and each test file is a wrapper that +gives its backend. ## Configurations @@ -261,14 +263,22 @@ device fails `test_contract`. ## ModelingToolkit tests -The environment `ModelingToolkit` (`test/suite/ModelingToolkit/`) solves problems written -with ModelingToolkit.jl and Corleone shooting (`CONFIGS.ModelingToolkit` in `common/configs.jl`). -It is opt-in due to its heavy dependencies. Run it with: - -```julia -Pkg.test(; test_args=["ModelingToolkit"]) # fast suite (test_problem, test_smoke, test_methods) -Pkg.test(; test_args=["ModelingToolkit", "cron"]) # weekly convergence cron -``` +The environment `ModelingToolkit` (`test/suite/ModelingToolkit/`) solves the problems written +with ModelingToolkit.jl by direct single shooting with Corleone.jl and Ipopt +(`CONFIGS.ModelingToolkit` in `common/configs.jl`, `common/solve_modelingtoolkit.jl`): the +controls are piecewise constant on the grid, started from the initial guess of the problem, +and the path constraints are imposed at its nodes. It is opt-in, for its heavy dependencies +(`Pkg.test(; test_args=["ModelingToolkit"])`, or the label `test ModelingToolkit backend`). + +It follows the three kinds of tests. Its model equivalence is `suite/ModelingToolkit/test_modelings`: +the `System` of every problem is read as the data of a JuMP problem +(`common/continuous_modelingtoolkit.jl`) and compared with the OptimalControl model by +`Continuous.compare`, as `suite/comparison/test_modelings` does for JuMP. It runs in this +environment, which therefore loads OptimalControl too, so that the `comparison` environment +stays free of ModelingToolkit. Its convergence report (`cron/ModelingToolkit`, weekly) has no +reference objective for a shooting discretization: the gap is to the objective of the analytic +solution, when the problem has one, and `violation` is the largest violation of the +constraints of the NLP solved. The costates are not computed by Corleone and are left empty. ## Adding a test diff --git a/tools/cron/report.py b/tools/cron/report.py index 94c142711..bb66a8e63 100644 --- a/tools/cron/report.py +++ b/tools/cron/report.py @@ -81,7 +81,7 @@ "ModelingToolkit": { "title": "ModelingToolkit — Nominal Convergence", "focus": "Symbolic modeling backend with ModelingToolkit.jl", - "cadence": "Weekly (Saturday 04:00 UTC) · Julia 1.13, Ubuntu (CPU)", + "cadence": "Weekly (Saturday 04:00 UTC) · Julia 1.13, Ubuntu + Windows (CPU)", }, } @@ -860,9 +860,16 @@ def labels(issue: dict) -> set[str]: "OptimalControl", "OptimalControl-robustness", "OptimalControlScalarized", + "ModelingToolkit", ], - "failure": ["JuMP", "OptimalControl", "OptimalControlScalarized", "comparison"], - "draft": ["JuMP", "OptimalControl", "OptimalControlScalarized"], + "failure": [ + "JuMP", + "OptimalControl", + "OptimalControlScalarized", + "comparison", + "ModelingToolkit", + ], + "draft": ["JuMP", "OptimalControl", "OptimalControlScalarized", "ModelingToolkit"], "capability": ["JuMP", "OptimalControl", "OptimalControlScalarized"], } From cc56b5ab2f8a4172d964588ce17fa5be20297fc0 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 13:53:46 +0000 Subject: [PATCH 10/12] ci(scope): keep an opt-in environment asked for by a label when everything runs When a shared file runs every environment, the test arguments were empty, which runs every environment except the opt-in ones: the label `test ModelingToolkit backend` was lost, and the ModelingToolkit environment never ran on this pull request. The environments are now named, with the opt-in ones of the labels. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BSmPZipCYwgepwKpMP9sep --- tools/ci/scope.py | 8 +++++++- tools/ci/test/test_scope.py | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/ci/scope.py b/tools/ci/scope.py index 3ca22ab48..9b333c2f7 100755 --- a/tools/ci/scope.py +++ b/tools/ci/scope.py @@ -217,7 +217,13 @@ def test_args(event, labels, rows, expected, repo): problems = ALL reason += "; every problem (label)" order = repo.environments + sorted(repo.opt_in) - if envs == ALL: + # ALL leaves out the opt-in environments: one asked for by a label is named, with every + # other environment, or the label would be lost when a shared file runs everything + opt_in = sorted(set(environments_of_labels(labels)) & repo.opt_in) + if envs == ALL and opt_in: + args = repo.environments + opt_in + reason += "; opt-in environments by label: " + ", ".join(opt_in) + elif envs == ALL: args = [] elif not envs: args = ["core"] diff --git a/tools/ci/test/test_scope.py b/tools/ci/test/test_scope.py index 930059c54..aaf6f9f8e 100644 --- a/tools/ci/test/test_scope.py +++ b/tools/ci/test/test_scope.py @@ -270,6 +270,14 @@ def test_opt_in_environment_by_label(self): out, _ = run_scope(changed(["docs/src/index.md"]), labels=["test ModelingToolkit backend"]) self.assertEqual("ModelingToolkit", out) + def test_opt_in_environment_by_label_with_everything(self): + # a shared file runs every environment: the opt-in one of the label is kept + out, err = run_scope(changed(["src/a.jl"]), labels=["test ModelingToolkit backend"]) + self.assertEqual("JuMP OptimalControl OptimalControlScalarized comparison ModelingToolkit", out) + self.assertIn("opt-in environments by label: ModelingToolkit", err) + out, _ = run_scope(changed(["docs/src/index.md"]), labels=["test everything", "test GPU backend"]) + self.assertEqual("JuMP OptimalControl OptimalControlScalarized comparison GPU", out) + def test_null_labels(self): out, _ = run_scope(changed(["ext/MetaData/beam.jl"]), labels=None) self.assertEqual("problem=beam", out) From 3e1c686e3fb417be306f8855e8cb43700baa259c Mon Sep 17 00:00:00 2001 From: Olivier Cots Date: Wed, 11 Nov 2026 16:48:29 +0100 Subject: [PATCH 11/12] test(mtk): the time span from the parameters, the control start checked (#439) A System does not say its time span when the cost has no integral (a Mayer cost): tspan reads it from the parameters of the problem, as the continuous comparison does. A test checks that the controls of the problem solved start from the initial guess of the problem (#377). Co-Authored-By: Claude Sonnet 5.5 --- test/common/continuous_modelingtoolkit.jl | 19 ++++++------- test/common/solve_modelingtoolkit.jl | 29 ++++++++++---------- test/suite/ModelingToolkit/test_methods.jl | 11 ++++++-- test/suite/ModelingToolkit/test_modelings.jl | 9 ++++-- 4 files changed, 39 insertions(+), 29 deletions(-) diff --git a/test/common/continuous_modelingtoolkit.jl b/test/common/continuous_modelingtoolkit.jl index cc667bba7..6b2216961 100644 --- a/test/common/continuous_modelingtoolkit.jl +++ b/test/common/continuous_modelingtoolkit.jl @@ -7,8 +7,8 @@ # # What a ModelingToolkit problem writes, and how it is read: # - the dynamics `D(xᵢ(t)) ~ fᵢ`, one equation per state; -# - the costs (minimized, summed): integrals `Integral(t in (t0, tf))(ℓ)`, whose domain gives the -# times, and terms in the state at `t0` or `tf`; +# - the costs (minimized, summed): integrals `Integral(t in (t0, tf))(ℓ)` and terms in the state at +# `t0` or `tf`; the times are those of the parameters of the problem; # - the initial state, as the default value of a state that is not tunable; # - the constraints `a ~ b`, `a ≲ b`, `a ≳ b`: a constraint in `t` is a path constraint, or a # bound when it constrains one state or one control; one in the state at `t0` or `tf` is a @@ -131,9 +131,10 @@ end """ The data of the ModelingToolkit `System` `sys` in the fields of the JuMP `ProblemData`, read by `Continuous.compare`; the states and the controls in the order of `state_names` and -`control_names` (those of the OptimalControl model). +`control_names` (those of the OptimalControl model), the times `(t0, tf)` being `tspan`: a +`System` does not say them when its cost has no integral. """ -function problem_data(sys, state_names, control_names) +function problem_data(sys, state_names, control_names, tspan) CTModels.Models.variable_dimension(sys) == 0 || throw(ArgumentError("a problem with a variable is not supported yet")) iv = unwrap(MTK.get_iv(sys)) @@ -141,23 +142,21 @@ function problem_data(sys, state_names, control_names) xs = ordered(filter(!MTK.isinput, unknowns), state_names) us = ordered(filter(MTK.isinput, unknowns), control_names) n, m = length(xs), length(us) + t0, tf = Float64.(tspan) # costs: integrals over (t0, tf) and terms in the state at t0 or tf - integrands, terms, times = Any[], Any[], nothing + integrands, terms = Any[], Any[] for c in MTK.get_costs(sys) c = unwrap(c) if SU.iscall(c) && SU.operation(c) isa SYM.Integral d = SU.operation(c).domain.domain - span = (constant(d.left), constant(d.right)) - isnothing(times) && (times = span) - span == times || throw(ArgumentError("integrals over different intervals")) + (constant(d.left), constant(d.right)) == (t0, tf) || + throw(ArgumentError("an integral over another interval than (t0, tf)")) push!(integrands, only(SU.arguments(c))) else push!(terms, c) end end - isnothing(times) && throw(ArgumentError("no integral cost: the times are not known")) - t0, tf = times sig = (; iv, states=unwrap.(xs), controls=unwrap.(us), t0, tf) # dynamics, in the order of the states diff --git a/test/common/solve_modelingtoolkit.jl b/test/common/solve_modelingtoolkit.jl index d6e8c2b00..04fb929e5 100644 --- a/test/common/solve_modelingtoolkit.jl +++ b/test/common/solve_modelingtoolkit.jl @@ -12,19 +12,12 @@ using OrdinaryDiffEqTsit5: Tsit5 using OptimalControlProblems: OptimalControlProblems as OCP """ -Extract the time horizon `(t0, tf)` from the integral cost domain in `sys`. -""" -function _extract_tspan(sys::MTK.AbstractSystem) - costs = MTK.get_costs(sys) - isempty(costs) && throw(ArgumentError("system has no cost terms")) - cost = costs[1] - op = MTK.SymbolicUtils.operation(cost) - if hasproperty(op, :domain) && hasproperty(op.domain, :domain) - d = op.domain.domain - return (Float64(d.left), Float64(d.right)) - else - throw(ArgumentError("cannot extract time horizon from cost $cost")) - end +The time horizon `(t0, tf)` of the problem `pb`, from its parameters: a `System` does not say +it when the cost has no integral (a Mayer cost). +""" +function tspan(pb) + params = OCP.metadata(pb)[:parameters] + return (Float64(params.t0), Float64(params.tf)) end """ @@ -144,7 +137,7 @@ function prepare( ) shooting === :single || throw(ArgumentError("unsupported shooting method $shooting")) sys = OCP.model(pb) - t0, tf = _extract_tspan(sys) + t0, tf = tspan(pb) grid = range(t0, tf, length=grid_size) # Discretize path constraints over the grid @@ -189,6 +182,14 @@ function solve( return (; result, prepared...) end +""" +The values of the control `name` (`"u"`) the problem `dynamic` of a `prepare` starts from: +one per interval. +""" +function control_values(dynamic, name) + return dynamic.ps.parameter.parameters[Symbol(name, "(t)")].parameter.ps +end + """The objective of a solution `sol` of `solve`.""" objective(sol) = sol.result.objective diff --git a/test/suite/ModelingToolkit/test_methods.jl b/test/suite/ModelingToolkit/test_methods.jl index 5529a7d17..1f9b04b61 100644 --- a/test/suite/ModelingToolkit/test_methods.jl +++ b/test/suite/ModelingToolkit/test_methods.jl @@ -16,9 +16,11 @@ function test_methods() pb = OCP.bryson_denham(backend) sys = OCP.model(pb) - # 1. _extract_tspan - tspan = Main.SolveModelingToolkit._extract_tspan(sys) + # 1. tspan: from the parameters of the problem, the same as the domain of the integral + tspan = Main.SolveModelingToolkit.tspan(pb) Test.@test tspan == (0.0, 1.0) + domain = MTK.SymbolicUtils.operation(MTK.get_costs(sys)[1]).domain.domain + Test.@test (Float64(domain.left), Float64(domain.right)) == tspan # 2. _is_path_constraint iv = MTK.independent_variable(sys) @@ -55,6 +57,11 @@ function test_methods() Test.@test S.control_start((control=t -> 3t,), 1.0, 1) == [3.0] Test.@test S.control_start((state=[0.0, 0.0],), 0.0, 1) == [0.0] Test.@test_throws DimensionMismatch S.control_start((control=[1, 2],), 0.0, 1) + # and it is the value the controls of the problem solved start from + other = OCP.bryson_denham(backend; init=(state=[0.0, 0.0], control=0.7)) + started = S.prepare(other; grid_size=6).dynamic + Test.@test S.control_values(started, "u") == fill(0.7, 5) + Test.@test S.control_values(S.prepare(pb; grid_size=6).dynamic, "u") == zeros(5) # 7. prepare: built once, the Optimization problem and the Corleone one prepared = S.prepare(pb; grid_size=10) diff --git a/test/suite/ModelingToolkit/test_modelings.jl b/test/suite/ModelingToolkit/test_modelings.jl index dd90abcc5..ef24832b2 100644 --- a/test/suite/ModelingToolkit/test_modelings.jl +++ b/test/suite/ModelingToolkit/test_modelings.jl @@ -1,5 +1,7 @@ isdefined(Main, :Continuous) || include(joinpath(@__DIR__, "..", "..", "common", "continuous.jl")) +isdefined(Main, :SolveModelingToolkit) || + include(joinpath(@__DIR__, "..", "..", "common", "solve_modelingtoolkit.jl")) isdefined(Main, :ContinuousModelingToolkit) || include(joinpath(@__DIR__, "..", "..", "common", "continuous_modelingtoolkit.jl")) @@ -28,14 +30,15 @@ function test_modelings() Test.@testset "ModelingToolkit vs $(Main.TestStatus.modeling(other))" begin Main.TestStatus.for_each_problem("test_modelings", mtk, other) do problem build = getfield(OCP, problem) - sys, pb = OCP.model(build(mtk)), build(other) - ocp = OCP.model(pb) + pb_mtk, pb = build(mtk), build(other) + sys, ocp = OCP.model(pb_mtk), OCP.model(pb) xs, us = OCP.state_components(ocp), OCP.control_components(ocp) Test.@testset "components" begin Test.@test sort(OCP.state_components(sys)) == sort(xs) Test.@test sort(OCP.control_components(sys)) == sort(us) end - data = Main.ContinuousModelingToolkit.problem_data(sys, xs, us) + tspan = Main.SolveModelingToolkit.tspan(pb_mtk) + data = Main.ContinuousModelingToolkit.problem_data(sys, xs, us, tspan) checks = Main.Continuous.compare(data, ocp, OCP.initial_guess(pb)) for (name, ok) in sort!(collect(checks); by=first) Test.@testset "$name" begin From 20cd5ce5c72d7c18fe200762ada00c8b291e5816 Mon Sep 17 00:00:00 2001 From: Olivier Cots Date: Wed, 11 Nov 2026 16:48:29 +0100 Subject: [PATCH 12/12] feat(models): vanderpol, robbins and jackson in the ModelingToolkit modeling (#439) A better sample than bryson_denham alone: a Lagrange cost, state bounds with boundary conditions, a Mayer cost with state and control bounds. They pass the continuous comparison with OptimalControl and the smoke solve; the comparison fails, on the right check, when a parameter of the ModelingToolkit model is changed. Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 2 + ext/MetaData/jackson.jl | 2 +- ext/MetaData/robbins.jl | 2 +- ext/MetaData/vanderpol.jl | 2 +- ext/ModelingToolkitModels/jackson.jl | 62 ++++++++++++++++++++++++++ ext/ModelingToolkitModels/robbins.jl | 57 +++++++++++++++++++++++ ext/ModelingToolkitModels/vanderpol.jl | 52 +++++++++++++++++++++ 7 files changed, 176 insertions(+), 3 deletions(-) create mode 100644 ext/ModelingToolkitModels/jackson.jl create mode 100644 ext/ModelingToolkitModels/robbins.jl create mode 100644 ext/ModelingToolkitModels/vanderpol.jl diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d7f4eb0b..8d6664fe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -91,6 +91,8 @@ See [BREAKING.md](BREAKING.md). OptimalControl one without discretizing, it shares the API, smoke and convergence tests of the other modelings, and a weekly cron reports its solves by direct shooting with Corleone, started from the initial guess of the problem, with their trajectories for the documentation. +- `vanderpol`, `robbins` and `jackson` are written in the ModelingToolkit modeling too, with a + Lagrange cost, a Mayer cost, state and control bounds (#439). ### 📦 Dependencies diff --git a/ext/MetaData/jackson.jl b/ext/MetaData/jackson.jl index aa16e1416..bd3f1e8bc 100644 --- a/ext/MetaData/jackson.jl +++ b/ext/MetaData/jackson.jl @@ -18,7 +18,7 @@ jackson_meta = OrderedDict( b_t0=0, x₃_t0=0, ), - :status => (OptimalControl=:valid, OptimalControlScalarized=:valid, JuMP=:valid), + :status => (OptimalControl=:valid, OptimalControlScalarized=:valid, JuMP=:valid, ModelingToolkit=:valid), # initial guess of every modeling (#377), from the parameters :init => p -> (state=[0.1, 0.1, 0.1], control=0.1), ) diff --git a/ext/MetaData/robbins.jl b/ext/MetaData/robbins.jl index f359658da..0524af68f 100644 --- a/ext/MetaData/robbins.jl +++ b/ext/MetaData/robbins.jl @@ -14,7 +14,7 @@ robbins_meta = OrderedDict( x₂_tf=0, x₃_tf=0, ), - :status => (OptimalControl=:valid, OptimalControlScalarized=:valid, JuMP=:valid), + :status => (OptimalControl=:valid, OptimalControlScalarized=:valid, JuMP=:valid, ModelingToolkit=:valid), # initial guess of every modeling (#377), from the parameters :init => p -> (state=[0.1, 0.1, 0.1], control=0.1), ) diff --git a/ext/MetaData/vanderpol.jl b/ext/MetaData/vanderpol.jl index 61d2b8df1..ca63f37b3 100644 --- a/ext/MetaData/vanderpol.jl +++ b/ext/MetaData/vanderpol.jl @@ -1,7 +1,7 @@ vanderpol_meta = OrderedDict( :grid_size => 500, :parameters => (t0=0, tf=2, ω=1, ε=1, x₁_t0=1, x₂_t0=0), - :status => (OptimalControl=:valid, OptimalControlScalarized=:valid, JuMP=:valid), + :status => (OptimalControl=:valid, OptimalControlScalarized=:valid, JuMP=:valid, ModelingToolkit=:valid), # initial guess of every modeling (#377), from the parameters :init => p -> (state=[0.1, 0.1], control=0.1), ) diff --git a/ext/ModelingToolkitModels/jackson.jl b/ext/ModelingToolkitModels/jackson.jl new file mode 100644 index 000000000..aeb6a5c78 --- /dev/null +++ b/ext/ModelingToolkitModels/jackson.jl @@ -0,0 +1,62 @@ +"""The **Jackson problem** is a classical benchmark in optimal control. + +Builds the `jackson` problem with the ModelingToolkit backend. + +```julia-repl +julia> using ModelingToolkit, OptimalControlProblems +julia> pb = jackson(ModelingToolkitBackend()) +``` + +Default parameters and the modeling status are available through +`problem_metadata(:jackson)` and `OptimalControlProblems.status(:jackson)`. +""" +function OptimalControlProblems.jackson( + ::ModelingToolkitBackend; + parameters::Union{Nothing,NamedTuple}=nothing, + init=nothing, +) + OptimalControlProblems.Catalogue._warn_if_draft(:jackson, :ModelingToolkit) + params = OptimalControlProblems.parameters_data(:jackson, parameters) + t0, tf = float(params[:t0]), float(params[:tf]) + k1, k2, k3 = params[:k1], params[:k2], params[:k3] + a_l, a_u = float(params[:a_l]), float(params[:a_u]) + b_l, b_u = float(params[:b_l]), float(params[:b_u]) + x₃_l, x₃_u = float(params[:x₃_l]), float(params[:x₃_u]) + u_l, u_u = float(params[:u_l]), float(params[:u_u]) + a_t0, b_t0, x₃_t0 = float(params[:a_t0]), float(params[:b_t0]), float(params[:x₃_t0]) + + t = ModelingToolkit.t_nounits + D = ModelingToolkit.Differential(t) + + ModelingToolkit.@variables a(..) = a_t0 [tunable = false] + ModelingToolkit.@variables b(..) = b_t0 [tunable = false] + ModelingToolkit.@variables x₃(..) = x₃_t0 [tunable = false] + ModelingToolkit.@variables u(..) [input = true, bounds = (u_l, u_u)] + + eqs = [ + D(a(t)) ~ -u(t) * (k1 * a(t) - k2 * b(t)), + D(b(t)) ~ u(t) * (k1 * a(t) - k2 * b(t)) - (1 - u(t)) * k3 * b(t), + D(x₃(t)) ~ (1 - u(t)) * k3 * b(t), + ] + # a Mayer cost: the final value of x₃ + costs = [-x₃(tf)] + constraints = [ + ModelingToolkit.Symbolics.:≳(a(t), a_l), + ModelingToolkit.Symbolics.:≲(a(t), a_u), + ModelingToolkit.Symbolics.:≳(b(t), b_l), + ModelingToolkit.Symbolics.:≲(b(t), b_u), + ModelingToolkit.Symbolics.:≳(x₃(t), x₃_l), + ModelingToolkit.Symbolics.:≲(x₃(t), x₃_u), + ] + + ModelingToolkit.@named sys = ModelingToolkit.System( + eqs, t; costs=costs, constraints=constraints + ) + + # initial guess: from the metadata (#377), unless given + init = OptimalControlProblems.Metadata._initial_guess(:jackson, params, init) + + return OptimalControlProblems.Problems._problem( + :jackson, :ModelingToolkit, sys, init, params + ) +end diff --git a/ext/ModelingToolkitModels/robbins.jl b/ext/ModelingToolkitModels/robbins.jl new file mode 100644 index 000000000..8c9c5ce0b --- /dev/null +++ b/ext/ModelingToolkitModels/robbins.jl @@ -0,0 +1,57 @@ +"""The **Robbins benchmark problem** is a classical optimal control problem introduced by Robbins (1980), involving a **third-order state constraint**. + +Builds the `robbins` problem with the ModelingToolkit backend. + +```julia-repl +julia> using ModelingToolkit, OptimalControlProblems +julia> pb = robbins(ModelingToolkitBackend()) +``` + +Default parameters and the modeling status are available through +`problem_metadata(:robbins)` and `OptimalControlProblems.status(:robbins)`. +""" +function OptimalControlProblems.robbins( + ::ModelingToolkitBackend; + parameters::Union{Nothing,NamedTuple}=nothing, + init=nothing, +) + OptimalControlProblems.Catalogue._warn_if_draft(:robbins, :ModelingToolkit) + params = OptimalControlProblems.parameters_data(:robbins, parameters) + t0, tf = float(params[:t0]), float(params[:tf]) + α, β, γ = params[:α], params[:β], params[:γ] + x₁_l = float(params[:x₁_l]) + x₁_t0, x₂_t0, x₃_t0 = float(params[:x₁_t0]), float(params[:x₂_t0]), float(params[:x₃_t0]) + x₁_tf, x₂_tf, x₃_tf = float(params[:x₁_tf]), float(params[:x₂_tf]), float(params[:x₃_tf]) + + t = ModelingToolkit.t_nounits + D = ModelingToolkit.Differential(t) + + ModelingToolkit.@variables x₁(..) = x₁_t0 [tunable = false] + ModelingToolkit.@variables x₂(..) = x₂_t0 [tunable = false] + ModelingToolkit.@variables x₃(..) = x₃_t0 [tunable = false] + ModelingToolkit.@variables u(..) [input = true] + + eqs = [D(x₁(t)) ~ x₂(t), D(x₂(t)) ~ x₃(t), D(x₃(t)) ~ u(t)] + costs = [ + ModelingToolkit.Symbolics.Integral(t in (t0, tf))( + α * x₁(t) + β * x₁(t)^2 + γ * u(t)^2 + ), + ] + constraints = [ + x₁(tf) ~ x₁_tf, + x₂(tf) ~ x₂_tf, + x₃(tf) ~ x₃_tf, + ModelingToolkit.Symbolics.:≳(x₁(t), x₁_l), + ] + + ModelingToolkit.@named sys = ModelingToolkit.System( + eqs, t; costs=costs, constraints=constraints + ) + + # initial guess: from the metadata (#377), unless given + init = OptimalControlProblems.Metadata._initial_guess(:robbins, params, init) + + return OptimalControlProblems.Problems._problem( + :robbins, :ModelingToolkit, sys, init, params + ) +end diff --git a/ext/ModelingToolkitModels/vanderpol.jl b/ext/ModelingToolkitModels/vanderpol.jl new file mode 100644 index 000000000..581125422 --- /dev/null +++ b/ext/ModelingToolkitModels/vanderpol.jl @@ -0,0 +1,52 @@ +"""The **Van der Pol oscillator control problem** is a benchmark in nonlinear optimal control. + +Builds the `vanderpol` problem with the ModelingToolkit backend. + +```julia-repl +julia> using ModelingToolkit, OptimalControlProblems +julia> pb = vanderpol(ModelingToolkitBackend()) +``` + +Default parameters and the modeling status are available through +`problem_metadata(:vanderpol)` and `OptimalControlProblems.status(:vanderpol)`. +""" +function OptimalControlProblems.vanderpol( + ::ModelingToolkitBackend; + parameters::Union{Nothing,NamedTuple}=nothing, + init=nothing, +) + OptimalControlProblems.Catalogue._warn_if_draft(:vanderpol, :ModelingToolkit) + params = OptimalControlProblems.parameters_data(:vanderpol, parameters) + t0, tf = float(params[:t0]), float(params[:tf]) + ω, ε = params[:ω], params[:ε] + x₁_t0, x₂_t0 = float(params[:x₁_t0]), float(params[:x₂_t0]) + + t = ModelingToolkit.t_nounits + D = ModelingToolkit.Differential(t) + + ModelingToolkit.@variables x₁(..) = x₁_t0 [tunable = false] + ModelingToolkit.@variables x₂(..) = x₂_t0 [tunable = false] + ModelingToolkit.@variables u(..) [input = true] + + eqs = [ + D(x₁(t)) ~ x₂(t), + D(x₂(t)) ~ ε * ω * (1 - x₁(t)^2) * x₂(t) - ω^2 * x₁(t) + u(t), + ] + costs = [ + ModelingToolkit.Symbolics.Integral(t in (t0, tf))( + 0.5 * (x₁(t)^2 + x₂(t)^2 + u(t)^2) + ), + ] + constraints = [] + + ModelingToolkit.@named sys = ModelingToolkit.System( + eqs, t; costs=costs, constraints=constraints + ) + + # initial guess: from the metadata (#377), unless given + init = OptimalControlProblems.Metadata._initial_guess(:vanderpol, params, init) + + return OptimalControlProblems.Problems._problem( + :vanderpol, :ModelingToolkit, sys, init, params + ) +end