Catch time overflow during steady-state simulation#3077
Merged
dweindl merged 1 commit intoAMICI-dev:mainfrom Nov 25, 2025
Merged
Catch time overflow during steady-state simulation#3077dweindl merged 1 commit intoAMICI-dev:mainfrom
dweindl merged 1 commit intoAMICI-dev:mainfrom
Conversation
* Remove the old and faulty check for finiteness of `x` in `Model::fxdot`. Closes AMICI-dev#3076. * The root cause of those NaNs in `x` was not CVODES. The problem is uncaught integer overflow during steady-state simulations. Catch that. * Add a dedicated error code * Add debug-level expectations to all integration functions of `Solver`
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3077 +/- ##
==========================================
- Coverage 77.73% 77.09% -0.65%
==========================================
Files 313 313
Lines 20668 20670 +2
Branches 1499 1500 +1
==========================================
- Hits 16067 15935 -132
- Misses 4592 4726 +134
Partials 9 9
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
FFroehlich
reviewed
Nov 25, 2025
| return AMICI_MAX_TIME_EXCEEDED; | ||
| } | ||
|
|
||
| if (t > 1e200 |
Member
There was a problem hiding this comment.
Ah, it would actually be nice to stop simulation early (which the code so far did not achieve) and rather than simulating nonsense until maxsteps is reached.
Member
Author
There was a problem hiding this comment.
This isn't an issue anymore. Previously, model state became infinite only when asking CVODES to integrate until t=inf. This is now prevented at a higher level (EventHandlingSimulator::run_steady_state).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xinModel::fxdot. Closes Incorrect check for finiteness of x in fxdot #3076.xwas not CVODES. The problem is uncaught integer overflow during steady-state simulations and asking CVODES to integrate untilt=inf. Catch that.Solver