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

Handle events with time-based triggers without rootfinding? #2185

Open
dweindl opened this issue Oct 30, 2023 · 1 comment
Open

Handle events with time-based triggers without rootfinding? #2185

dweindl opened this issue Oct 30, 2023 · 1 comment
Labels
c++ enhancement events related to handing discrete events python

Comments

@dweindl
Copy link
Member

dweindl commented Oct 30, 2023

We wouldn't really need any of sundials' rootfinding for handling events with time-based triggers.

Handling those events without rootfinding should be more efficient and solve some of those issues:

Cvode routine CVode returned a root after reinitialization. The initial step-size after the event or heaviside function is too small. To fix this, increase absolute and relative tolerances! failed with error code 2

Not yet sure how much effort it would be.

dweindl added a commit to dweindl/AMICI that referenced this issue Dec 4, 2023
A first attempt towards AMICI-dev#2185

For events that occur at known timepoints, we don't need sundials'
root-finding. We can just stop the solver at the respective timepoints
and handle the events.

To be extended to parameterized but state-independent trigger functions.
dweindl added a commit that referenced this issue Dec 11, 2023
A first attempt towards #2185

For events that occur at known timepoints, we don't need sundials' root-finding. We can just stop the solver at the respective timepoints and handle the events.

Here, events are sorted such that the `ne_solver` events  that require root-finding by the solver come first and the other `ne - ne_solver` events come after that. The solver only tracks  `ne_solver` roots. 

To be extended to parameterized but state-independent trigger functions at some point.
@dweindl
Copy link
Member Author

dweindl commented Dec 12, 2023

@dweindl dweindl added the events related to handing discrete events label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ enhancement events related to handing discrete events python
Projects
None yet
Development

No branches or pull requests

1 participant