Events: merge new executions into the queue in time order (v0.9.6) - #11
Merged
Merged
Conversation
testEventTriggers sorted the newly triggered executions and appended them to eventExeList. executeEvents only looks at the front, so an event triggered with a short delay, due before one already waiting, was found overdue later and the run aborted with "missed Event". The legacy solver inserted each one at its sorted position; this merges them (stable, so equal times keep the legacy order). Found by VCell's SBML test-suite regression (10 delayed-event cases). tests/reference/cvode_delayed_events reproduces it: 0.9.5 aborts with 'missed Event early ... scheduled time = 0.5, current time = 1.1'; the reference is the legacy v0.0.44-dev4 output (early at 0.5, late at 1.1). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
VCell's SBML test-suite regression failed on 10 delayed-event models with vcell-ode 0.9.5:
SOLVER_ABORTED: missed Event 'event1' with trigger (__D_B_0 == 1), scheduled time = 0.52, current time = 1.70Cause
testEventTriggerssorted the newly triggered executions and appended them toeventExeList(splice(end, …)).executeEventsonly looks at the front of that list. An event triggered with a short delay, due before one already waiting, therefore sat behind it. When it finally reached the front it was overdue, and the run threw "missed Event".Fix
stable_sortthe new executions, thenmergethem into the list.Test
New
tests/reference/cvode_delayed_events, added to every reference loop (archives, image, SIF):latetriggers at t=0.1 with delay 1.0;earlytriggers at t=0.2 with delay 0.3.0.9.5 aborts:
missed Event 'early' … scheduled time = 0.5, current time = 1.1. The reference output is the legacy v0.0.44-dev4 binary's:earlyat 0.5,lateat 1.1.Version bumped to 0.9.6.
🤖 Generated with Claude Code