Skip to content

Possible solution to repeated callbacks at dt=0 #1150

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

Closed
wants to merge 1 commit into from

Conversation

ChrisRackauckas
Copy link
Member

Possible solution to SciML/ModelingToolkit.jl#3327 . I don't like this solution though because the way it works is that it allows it to catch a dt=0 case by eliminating the bottom_t from matching t, and then checking if the nonlinear solver did not converge, and then setting error_occured on that. I think it's possible to construct a bug where in the interval (t0,t1) you have an event t2 and an "event" found at t0, this will search for the first event so it will narrow the intervals to t3 < t2 and then do the search on (t0,t3), then fail, and so it would say there is no event.

Possible solution to SciML/ModelingToolkit.jl#3327 . I don't like this solution though because the way it works is that it allows it to catch a dt=0 case by eliminating the bottom_t from matching t, and then checking if the nonlinear solver did not converge, and then setting error_occured on that. I think it's possible to construct a bug where in the interval (t0,t1) you have an event `t2` and an "event" found at t0, this will search for the first event so it will narrow the intervals to `t3 < t2` and then do the search on (t0,t3), then fail, and so it would say there is no event.
@oscardssmith
Copy link
Member

pinging @BenChung since I know he's thought a lot about this.

@ChrisRackauckas
Copy link
Member Author

It ended up even weirder than I thought. It was SciML/OrdinaryDiffEq.jl#2695 😅

@ChrisRackauckas ChrisRackauckas deleted the repeatedcallback branch May 8, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants