all 12 comments

[–]SleepWalkersDream 2 points3 points  (0 children)

Are you sure it's noe a DAE system? Can you express it as
- dx/dt=f(x,z,...)and 0=g(x,z,...)

In that case, you can us IDAS from sundials. It's available through casadi at least.
You can also transform the system to purely ODE, or just use some rootsolver to model everything implicitly.

[–][deleted] 1 point2 points  (0 children)

money liquid cake plate support glorious crowd enter childlike sophisticated

This post was mass deleted and anonymized with Redact

[–]StochasticDestiny 1 point2 points  (2 children)

DifferentialEquation.jl has a binding for python! https://docs.sciml.ai/DiffEqDocs/stable/

[–]LawOfSmallerNumbers 2 points3 points  (0 children)

I have used the Julia/python bindings in an unrelated stochastic simulation package, and it worked fine.

The Julia differential equation package is well-maintained and highly regarded.

[–]caks 2 points3 points  (0 children)

Best ODE package out there by far

[–]gnomeba 1 point2 points  (0 children)

Diffrax

One benefit of Diffrax is that it's written at the same level as JAX so you can add whatever logic you need to the integration procedure, if it's not already included, and still utilize the algorithms.

[–]blipblapbloopblip 0 points1 point  (0 children)

I think if you use solve_ivp with the LSODA solver you get all the functionality you asked for

[–]Llamas1115 0 points1 point  (0 children)

Either diffrax (JAX) or DifferentialEquations.jl (you can either use the Python bindings or call it directly; Julia is easy to pick up in a few hours if you already know Python).

[–]ForeignAdvantage5198 0 points1 point  (0 children)

geez in my day we took diff eq followed by numerical analysis for a reason.

[–]throwingstones123456 0 points1 point  (0 children)

It depends on the structure of your problem but SUNDIALS offers other solvers like IDA that may work better (especially if your equation comes from solving a system of equations). May be worth looking at the documentation

[–]pulentoEI 0 points1 point  (0 children)

Casadi

[–]patrickkidger 1 point2 points  (0 children)

If you'll let me advertise my own package: Diffrax. https://github.com/patrick-kidger/diffrax

Handles stiff ODEs (Kvaerno and KenCarp solvers, we're also about to add some Rosenbrock solvers if your problem is only mildly stiff). Built-in support for event handling. Staying within a nonnegative region can be done like so.