Closed TorkelE closed 2 months ago
Simple example:
using ModelingToolkit, OrdinaryDiffEq using ModelingToolkit: t_nounits as t, D_nounits as D @parameters kp kd k1 k2 @variables X(t) Y(t) eqs = [ D(X) ~ kp - kd*X - k1*X + k2 * Y, D(Y) ~ k1*X - k2 * Y ] @mtkbuild model = ODESystem(eqs, t) u0_vals = [X => 4, Y => 5] tspan = (0.0, 10.0) p_vals = [kp => 1.0, kd => 0.1, k1 => 0.25, k2 => 0.5] prob = ODEProblem(model, u0_vals, tspan, p_vals) prob.ps[k2] prob2 = remake(prob; p = [k2 => 15.0]) prob2.ps[k2] # ERROR: MethodError: no method matching parameter_values(::Nothing)
This was caught by some Catalyst tests that worked quite recently, so I think this is probably something that was recently introduced.
That's an odd and unexpected bug... should take high priority since that's a regression.
Fixed in https://github.com/SciML/ModelingToolkit.jl/pull/2630 and released in MTKv9.11
Simple example:
This was caught by some Catalyst tests that worked quite recently, so I think this is probably something that was recently introduced.