Hi, I am trying to solve an ODEProblem for which I want to provide parameters in the form of a dictionary Dict{Symbol, Any}
. This used to work in the past but now I get the following error message:
ArgumentError: This problem does not support symbolic maps with 'remake', i.e. it does not have a symbolic origin. Please use 'remake' with the 'p' keyword argument as a vector of values, paying attention to parameter order.
Here’s a simple example which showcases what I would like to do and which results in the above error:
function lorenz!(du,u,p,t)
@unpack a, b, c = p
du[1] = a*(u[2]-u[1])
du[2] = u[1]*(b-u[3]) - u[2]
du[3] = u[1]*u[2] - c*u[3]
end
u0 = [1.0;0.0;0.0]
p = Dict{Symbol, Any}(
:a => 10.0,
:b => 28.0,
:c => 8/3,
)
tspan = (0.0,100.0)
prob = ODEProblem(lorenz!,u0,tspan,p)
sol = solve(prob,Tsit5())
Is there a way that allows me to continue using my dictionary and get this working? (I stumbled over ModelingToolkit.jl which might provide a solution but I couldn’t quite figure out what I need to do…)