Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event triggers before the mentioned condition #44

Open
hemilpanchiwala opened this issue Jun 14, 2020 · 4 comments
Open

Event triggers before the mentioned condition #44

hemilpanchiwala opened this issue Jun 14, 2020 · 4 comments
Assignees

Comments

@hemilpanchiwala
Copy link
Member

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 time t = 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)

Screenshot from 2020-06-14 23-52-26

Note: Left one is the predefined result from the SBML Test Suite while the right one is the SBSCL simulator's result.

@hemilpanchiwala hemilpanchiwala self-assigned this Jun 14, 2020
@hemilpanchiwala hemilpanchiwala changed the title Event triggered before the mentioned condition Event triggers before the mentioned condition Jun 14, 2020
@matthiaskoenig
Copy link
Collaborator

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.

@hemilpanchiwala
Copy link
Member Author

@shalinshah1993
Copy link
Collaborator

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?

@hemilpanchiwala
Copy link
Member Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants