Repository navigation
Step event diagnostics - #427
Merged
Merged
Conversation
efredriksson-modelon
force-pushed
the
dev-ef-step-event-diagnostics
branch
from
November 18, 2026 16:56
8859777 to
b6f6a3b
Compare
efredriksson-modelon
marked this pull request as ready for review
November 18, 2026 16:57
PeterMeisrimelModelon
left a comment
Collaborator
There was a problem hiding this comment.
Looks great overall, a few mixed comments.
Collaborator
Author
|
@PeterMeisrimelModelon Thanks for the review! I have added new commits for the changes. The history will need to be consolidated once Assimulo is in and changes are OK. |
PeterMeisrimelModelon
approved these changes
Nov 19, 2026
The values of @Diagnostics.event_data.event_info.event_type (-1, 0, 1) were literals spread over the FMI2/FMI3 problem classes, the calculated diagnostics and the tests. EventType in pyfmi.common.diagnostics is now the one definition, and the variable's description is built from it.
step_events ran an event iteration for a step event and then returned 1. Assimulo turns that return into an event and runs another, so each step event got two. step_events now only returns 1. The test checks every solver. Assimulo 3.5.0 through 3.8.0 share this flow.
Assimulo 3.9 passes step event info to handle_event, which the step event diagnostics depend on. The Dockerfile builds the 3.9.0 tag.
Assimulo reports a step event as a state event, and Radau5ODE crashed on it with `logging = True`. Assimulo 3.9 passes the step event in event_info[2]. A step event now gets event type STEP_EVENT (2) and is counted in the new @Diagnostics.nbr_step_events. A state or time event in the same solver step keeps its own type.
Without dynamic diagnostics, a step event was logged like a state event that no indicator triggered. Each event now gets a "Step event info" line in the debug file and a step_event_info boolean in the XML log. Existing lines are unchanged.
efredriksson-modelon
force-pushed
the
dev-ef-step-event-diagnostics
branch
from
November 20, 2026 14:45
d67fb11 to
5196fb6
Compare
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.
Review commit by commit, but note the final commit first which collapses fixes as I decided to fix things in Assimulo instead. See modelon-community/Assimulo#142.
I will amend the history if we are happy with this solution.