Use correct time in event triggers and re-enable SBML time-based event tests - #104
Use correct time in event triggers and re-enable SBML time-based event tests#104dyrpsf wants to merge 1 commit into
Conversation
baranwalayush
left a comment
There was a problem hiding this comment.
Hi @dyrpsf, thanks for the PR and for your interest in contributing to SBSCL!
I have the same comments as in #103. Please check that review.
I again ran a check on my end using the SBMLTestSuite Runner and none of the test case mentioned 01444-01448 passes, which means there is still something to be taken care of.
Let me know if you have any questions or need help with setting the SBMLTestSuite Runner.
|
Quick update on local verification for the time-based event tests:
With this setup, This suggests that the current event-trigger changes are consistent with SBML Test Suite If you’re using a different SBML Test Suite version with the external SBMLTestSuite Runner, |
Thanks for the approval and for the pointer to document this in the README. I’ve created an issue (#107 ) for a README update describing the SBML Test Suite setup and will be |
|
Added further comments in #103. Please check that review. |
Thanks again for the review and the pointers here and on PR #103. As mentioned there, I’ve verified the fixes with |
This PR fixes the handling of SBML events whose triggers depend on
csymbol timeand addresses #44.
Problem
In
SBMLinterpreter.getNextEventAssignments(...), the time used to evaluate eventtriggers, priorities, delays, and assignment rules is the field
astNodeTime.Previously, at each call this was advanced by a fixed epsilon:
The AST for triggers (including those using
csymbol time) was always evaluatedat this artificial
astNodeTime, which did not match the actual simulation time.This led to incorrect firing times for events whose triggers depend on time,
e.g. in SBML Test Suite cases 01444–01448, where events should fire at
time >= 5but effectively appeared to fire earlier.
Changes
In
SBMLinterpreter.getNextEventAssignments(...):All subsequent evaluations of triggers, priorities, delays, and assignment rules
now see the correct
timevalue whencsymbol timeis used in the math.Re-enable the affected SBML Test Suite cases
In
SBMLTestSuiteTest, the following SBML Test Suite semantic test cases, whichwere previously skipped with the comment "failing due to event triggers before
mentioned condition (see issue #44)", have been removed from the
failedTestslist:These tests are now executed again (assuming the external SBML Test Suite
resources are available).
Tests
mvn -DskipTests compile– successmvn test– successMaintainers who have the SBML Test Suite installed should now be able to run
cases 01444–01448 and see that events which depend on
csymbol timefire at thecorrect times.