Repository navigation
Report step events in event_info for solvers - #142
Merged
efredriksson-modelon merged 7 commits intoNov 20, 2026
Merged
efredriksson-modelon merged 7 commits into
efredriksson-modelon merged 7 commits into
Conversation
handle_event now receives [state_event_info, time_event, step_event]. A step event replaces the solver's ID_COMPLETE with ID_EVENT, so a step event at a time event reported time_event=False and skipped ntimeevents. The driver now records step events and checks the time event against tevent. Radau5ODE no longer sets _event_info to None.
Applies the explicit driver's change to the implicit driver, so IDA and Radau5DAE report step events. Radau5DAE no longer sets _event_info to None. Not covered: ODASSL raises on any step event (it has no state_event_info), and GLIMDA ignores step events.
A step event makes the driver ask the solver for state event info even when the problem defines no state events. CVode and IDA then gave an empty list and the other solvers an empty array. handle_event now receives an empty list from every solver; other cases are unchanged. The handle_event docstrings now say how to read the state event list: by its non-zero entries.
efredriksson-modelon
marked this pull request as ready for review
November 18, 2026 16:57
Collaborator
Author
|
@PeterMeisrimelModelon I don't have permissions for this repo, can you add yourself as reviewer and assign me for now until I get permissions? |
PeterMeisrimelModelon
self-requested a review
November 19, 2026 12:28
Collaborator
Cannot assign you, because you don't have permissions |
PeterMeisrimelModelon
requested changes
Nov 19, 2026
PeterMeisrimelModelon
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me! I think the tests could be improved a bit to increase readability/clarity.
Collaborator
Author
|
@PeterMeisrimelModelon Thanks for the review! Please have a look at the 2 new commits. |
efredriksson-modelon
force-pushed
the
dev-ef-step-events
branch
from
November 19, 2026 16:13
75f6ac8 to
92409ca
Compare
PeterMeisrimelModelon
approved these changes
Nov 19, 2026
efredriksson-modelon
merged commit Nov 20, 2026
d3bee4a
into
modelon-community:master
5 of 6 checks passed
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.
Report step events in event_info for solvers.
handle_event now receives [state_event_info, time_event, step_event].
A step event replaces the solver's ID_COMPLETE with ID_EVENT, so a step
event at a time event reported time_event=False and skipped
ntimeevents. The driver now records step events and checks the time
event against tevent.