-
Notifications
You must be signed in to change notification settings - Fork 567
Open
Labels
Description
Summary
When using the DAE simulator (e.g., CasADi), extract the adaptive time steps from cvodes or idas integrator.
Rationale
For stiff systems, it is increadibly helpful to get the adaptive timesteps. These timesteps can then be used to place collocation points.
Description
ChatGPT 5o suggested this is easy to do with CasADi 3.5 or later using the monitor option:
opts = {"t0": 0, "tf": 10, "monitor": ["t", "x"]}
F = ca.integrator("F", "idas", dae, opts)
res = F(x0=x0, z0=z0, p=p)
print(F.stats()["monitor"]["t"])
I have not tried this code sample yet, but I think it may just require a few modifications here:
Line 998 in 613f2ad
| F = casadi.integrator('F', integrator, dae, integrator_options) |
Additional information
@djlaky what do you think?
Reactions are currently unavailable