Describe the bug π
The use of @constants in System under 10.2 throws mtkcompile error. Setting the same value as a parameter works as expected. @constants works fine under v9.80.5.
Minimal Reproducible Example π
@component function TestSys(;name, a=1.0)
pars = @parameters a=a # c=Ο # <--- setting c as param works as expected
vars = @variables x(t)
@constants c = Ο # having c as constant no longer works (did under 9v9.80.5 and below)
eqs = [D(x) ~ a*x + c] ]
return ODESystem(eqs,t,vars,pars; name)
end
@named sys0 = TestSys()
sys = mtkcompile(sys0)
(## edited to remove the unnecessary stack & environment details)