-
Notifications
You must be signed in to change notification settings - Fork 31
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
Events with trigger that has an initial value of False are not supported #1760
Comments
Here some context form the SBML specification. As mentioned above the initalValue flag just allows to handle events at t=0.
|
Was not implemented primarily because nobody wanted to use it so far. I can definitely see the utility. I wasn't aware of the initial value field, but it sounds like it shouldn't be too difficult to implement support (but we generally allow t0≠0 in amici, but that hopefully doesn't matter). |
Yes, the t0≠0 should not matter. You already have support for events, so this is just a corner case to handle which I would need for most of my applications. In this context the support for the t=0 events with the initialValue field would be important. E.g. to set in multiple dosing experiments the t=0 dose correctly. |
The quick workaround would be to directly encode events at t==t0 in the condition table. I looked at the code and I should be doable to also implement native support. Looks like the sbml testsuite also has a couple of testcases that cover initial assignments for events. Will try to get this in over the weekend. |
@FFroehlich Thanks. |
Hi all, any update on this issue? |
sorry, this fell off my radar. should hopefully be able to fix this on develop this week. |
Events with initialValues are now supported on the |
Thanks so much. This is helping me a lot. Sorry for the slow response. I am in the process of evaluating simulation results between roadrunner/COPASI/AMICI for the events models and have to check identity of results. Models are now loading and can be simulated in AMICI. |
What did you expect to happen?
AMICI should support events which trigger at time 0. Often one wants to change values at time zero via events, for instance to set dosing protocols.
To Reproduce
Example attached.
icg_body_flat_v2.zip
results in
How to fix
Read out the
initialValue
flag of the event which sets the initialValue to eitherfalse
ortrue
. Evaluate the event trigger at time zero and if it is true fire the event. This is just an event at time 0 which used the initialValue to decide about the transition. AMICI already supports events, this is just the special case of events at time 0 (which is a very typical scenario).Best Matthias
The text was updated successfully, but these errors were encountered: