-
-
Notifications
You must be signed in to change notification settings - Fork 233
Closed
Labels
Description
The following (minimized) example from https://help.juliahub.com/juliasimcontrol/dev/robust_control/ has been broken on some recent release of MTK, the error is
ERROR: Initialization expression sys₊k is currently not supported. If its a higher order derivative expression, then only the dummy derivative expressions are supported.
using ModelingToolkit, MonteCarloMeasurements, OrdinaryDiffEq
T = typeof(1 ± 1)
@parameters t k::T d
@variables x(t)::T v(t)::T
D = Differential(t)
eqs = [D(x) ~ v, D(v) ~ -k*x - d*v - 9.82]
@named sys = ODESystem(eqs, t)
prob = ODEProblem(complete(sys), [x => 0.0 ± 0.1, v => 0.0, k => 10 ± 1, d => 1], (0.0, 10.0))
sol = solve(prob, Tsit5())
T = typeof(-1..1)
@parameters Δ::T=(-1..1) # The uncertain element is between -1 and 1
@variables y(t)=0
connections = [
y ~ sys.x + Δ
]
@named uncertain_sys = ODESystem(connections, t, systems=[sys])
initial_condition = [sys.x => zero(T), sys.v => 0.0, sys.k => 10, sys.d => 1]
prob = ODEProblem(structural_simplify(uncertain_sys, split=false), initial_condition, (0.0, 10.0)) # This line errors
sol = solve(prob, Tsit5())
here's a failing build log
https://github.com/JuliaComputing/JuliaSimControl.jl/actions/runs/11119591661/job/30899449776#step:6:442