Sorry for the unclear message.
of course I know I can use a tuple (or dict) like para_tuple = (a = 1,b = 2) when defining an ODEProblem.
My question is, can I create a parameter tuple by an existing ODEProblem? I want to do this because the BifurcationKit.jl only accept parameters in tuples but I want to do the bifurcation analysis automatically after plotting the trajectory.
Until now that package can’t support the direct use of ODEProblem, so I want to ask about a possible transition between vector to tuple for parameters.
function f!(du,u,p,t)
k1, k2, k3 = p
x = u
du[1] = k1 * x+ k2 * x^2 +k3
end
u0 = [0.0]
tspan = (0.0,100.0)
para = [1.0, 2.0, 1.0] #parameters in vector form
prob = ODEProblem(f!,u0,tspan,para)
What I want then:
generate a tuple para_tuple from the prob which saves the keys as well as values of the parameter p :
para_tuple = (k1 = 1.0, k2 = 2.0, k3 = 1.0)
So that I can use it to define a BifurcationProblem (which requires the parameter tuple:
Yes, you are right. But I am thinking of building a general function or module that can create parameter tuples for different models. I think I would try DrWatson.jl to find the possibility.
Still thank you Chris, for your time and your extraordinary work!