Summary
The Optimization test group fails on clean ModelingToolkit master d7f3ad523c00b4150281f259d1e97618fba79982 in the Expression-valued initial trajectories testset. A directly constructed MTKParameters omits the generated parameter var"v#0"(t) created by mtkcompile.
This is not caused by the ModelingToolkitBase version bump in #4920. The same failure was already present in the Julia 1 job for the feature PR that introduced the test: #4839 and https://github.com/SciML/ModelingToolkit.jl/actions/runs/31177291039/job/92863220273.
Clean reproduction
From an unmodified checkout at d7f3ad523c00b4150281f259d1e97618fba79982, on Julia 1.12.6:
$ GROUP=Optimization julialauncher +1.12 --project -e 'using Pkg; Pkg.test()'
Expression-valued initial trajectories: Error During Test at .../dynamic_optimization.jl:858
Got exception outside of a @test
Some parameters are missing from the variable map.
Please provide a value or default for the following variables:
var"v#0"(t)
Test Summary: | Pass Error Broken Total Time
Optimization | 184 1 1 186 23m36.4s
ERROR: Some tests did not pass: 184 passed, 0 failed, 1 errored, 1 broken.
The current downstream jobs fail identically:
Diagnosis
The test compiles systems in which structural processing introduces a generated parameter for the constant/input-like v(t). It then bypasses the same problem-processing path that successfully compiled and evaluated the initial trajectories:
p_test = MTKParameters(block, parammap)
Changing only that line to p_test = iprob.p is necessary but insufficient. A full local rerun still produced 184 passed, 1 errored, 1 broken after 25m18.3s. That replacement advances through the two fx assertions, two constant-expression assertions, and callable-rejection assertion, but the later independent system repeats the same pattern:
MTKParameters(psys, [a => 4.0])
After the first replacement, the testset again reports exactly 9 passes before the error, locating the remaining failure before the subsequent fp assertion. process_DynamicOptProblem already obtains a complete parameter object through process_SciMLProblem, and the initial-trajectory path successfully calls build_trajectory_function(..., p) with it.
The focused fix should use processed public problem parameters for both checks, for example iprob.p for the first system and the p field of an ODEProblem constructed with x(t), v(t), and a values for psys. This second adjustment has not yet completed full Optimization and QA validation, so no fix branch was pushed.
Expected behavior
The expression-valued trajectory tests should exercise build_trajectory_function with parameter objects produced by the public problem-construction paths, including all generated parameters, and the full Optimization group should pass on Julia 1 and pre-release Julia.
Summary
The
Optimizationtest group fails on clean ModelingToolkit masterd7f3ad523c00b4150281f259d1e97618fba79982in theExpression-valued initial trajectoriestestset. A directly constructedMTKParametersomits the generated parametervar"v#0"(t)created bymtkcompile.This is not caused by the ModelingToolkitBase version bump in #4920. The same failure was already present in the Julia 1 job for the feature PR that introduced the test: #4839 and https://github.com/SciML/ModelingToolkit.jl/actions/runs/31177291039/job/92863220273.
Clean reproduction
From an unmodified checkout at
d7f3ad523c00b4150281f259d1e97618fba79982, on Julia 1.12.6:The current downstream jobs fail identically:
Diagnosis
The test compiles systems in which structural processing introduces a generated parameter for the constant/input-like
v(t). It then bypasses the same problem-processing path that successfully compiled and evaluated the initial trajectories:Changing only that line to
p_test = iprob.pis necessary but insufficient. A full local rerun still produced184 passed, 1 errored, 1 brokenafter 25m18.3s. That replacement advances through the twofxassertions, two constant-expression assertions, and callable-rejection assertion, but the later independent system repeats the same pattern:After the first replacement, the testset again reports exactly 9 passes before the error, locating the remaining failure before the subsequent
fpassertion.process_DynamicOptProblemalready obtains a complete parameter object throughprocess_SciMLProblem, and the initial-trajectory path successfully callsbuild_trajectory_function(..., p)with it.The focused fix should use processed public problem parameters for both checks, for example
iprob.pfor the first system and thepfield of anODEProblemconstructed withx(t),v(t), andavalues forpsys. This second adjustment has not yet completed full Optimization and QA validation, so no fix branch was pushed.Expected behavior
The expression-valued trajectory tests should exercise
build_trajectory_functionwith parameter objects produced by the public problem-construction paths, including all generated parameters, and the fullOptimizationgroup should pass on Julia 1 and pre-release Julia.