SciCompMod / memilio

Modular spatio-temporal models for epidemic and pandemic simulations
https://scicompmod.github.io/memilio/
Apache License 2.0
52 stars 15 forks source link

OdeIntegrator can run indefinitely #1038

Closed reneSchm closed 1 week ago

reneSchm commented 1 month ago

Bug description

After fixing a previous issue, where the IntegratorCore made steps smaller than dt_min, the OdeIntegrator can now no longer converge in certain situations, i.e. if t + dt_min > t_max without reaching t_max within tolerances, then dt will be set to a negative value by the OdeIntegrator and reset to dt_min by the Core, indefinitely.

The problem lies in the requirement that the Core may not make steps smaller than dt_min. This needs to be changed or circumvented.

Version

Any

To reproduce

Set e.g. dt=dt_min=0.7, t_0=0, t_max=1 for any integration/simulation and run it.

Relevant log output

No response

Add any relevant information, e.g. used compiler, screenshots.

No response

Checklist