hgrecco / numbakit-ode

Leveraging numba to speed up ODE integration
Other
68 stars 3 forks source link

Passing multiple arguments as params #32

Open Rasaff57 opened 5 hours ago

Rasaff57 commented 5 hours ago

I have previously used scipy's solve_ivp, which lets me pass multiple arguments like this.

x = solve_ivp(Model, t_span, y0s, args=( ATP_demand, VO2max, vlamax, Ks1, Ks2, Ks3, Kelox, KpyrO2, T, VolRel_m, VolRel_b, Sc, Sa, M3, ATP_Ruhe, Vrel), method="RK45", dense_output=True, vectorized=True)

I have tried switching to the faster numba implementation but it keeps throwing the error that required arguments are missing. This is what i have:

params = [ATP_demand, VO2max, vlamax, Ks1, Ks2, Ks3, Kelox, KpyrO2, T, VolRel_m, VolRel_b, Sc, Sa, M3, ATP_Ruhe, Vrel] x = nbkode.RungeKutta45(Model, 0, y0s, params)

Any help is appreciated :)

maurosilber commented 4 hours ago

What is the signature of Model?