Open hemilpanchiwala opened 4 years ago
You should figure out where the events are evaluated in the code. I.e. somewhere it is checked in every integration step if the trigger conditions are fullfilled. Could you post the information on where to find this code then I can have a look what could go wrong.
@matthiaskoenig, Are you talking about this method? Link: https://github.com/hemilpanchiwala/SBSCL/blob/testrunner/src/main/java/org/simulator/math/odes/AbstractDESSolver.java#L731
I think AbsrtactDESSolver
simply runs it. Where in the code does the test make a call to the solver? What params are passed? I'm guessing that the params
passed or the way it is called has something to do with it. It should be interesting to note that the test starts at t = 4
and not t = 0
. May be the parameter you passed need t+1
?
@shalinshah1993, this is the link where params are passed to the solver. But, instead, I think there can be a problem in giving time in AbstractDESSolver whenever processEvents is called. Link to the solver method in AbstractDESSolver: https://github.com/hemilpanchiwala/SBSCL/blob/ff1aa32336ca7352f9964fe5b340f0ec756058ac/src/main/java/org/simulator/math/odes/AbstractDESSolver.java#L903
The issue occurs when the
time
csymbol is used in the condition to trigger an event.While running the SBML L3V2 test case 1444 from the SBML Test Suite, I see that the event should trigger at the time
t >= 5
but in results, the event is triggered at the timet = 4
.A similar issue occurs for test cases 1445, 1446, 1447, and 1448.
Here is the screenshot of the result from the SBML Test Runner (for test case 1444) Whenever the slope of the plot changes, at that time the event is triggered. (As per the model, it should trigger at
t = 5
)Note: Left one is the predefined result from the SBML Test Suite while the right one is the SBSCL simulator's result.