-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Integrator provides erroneous results after an update of the integration problem via callbacks #1061
Comments
Does updating packages not make a difference? |
I just updated it but the issue is still present ! |
Because discrete callbacks resolve immediately after continuous callbacks, so the DiscreteCallback would be true on the same time as the ContinuousCallback affect!. Is that what you wanted or did you want it to take a step with the new dynamics first? Because if that's the case, then |
I first wrote this example while having a wrong understanding of the interpolar's capabilities. You already told me on Julia discourse that modifying the problem won't cause the interpolator to be updated during that integration step. That initial wrong understanding is the reason why the example is ill-conceived. |
This seems like a better fit for the integrator interface? |
That's a short sentence which feels like a question and an assertion at the same time xD... |
Quick question : is it possibile using the integrator interface to (i) reject a solution at timestep Plus, modifying the problem causes the solver to struggle with the discontinuity (even though the modification happened in a callback). |
Describe the bug 🐞
Simply put, I am trying to implement a saturation feature on ODEs' output by detecting a threshhold value via a continuous callback.
Then via a discrete callback I can check if yes or no I can deactivate the saturation. The problem is that once the continuous callback triggers and the problem is modified (i.e. activate the saturation by flipping a boolean state) two strange behaviours happen :
Expected behavior
affect
function of the continuous callback. However an error is thrown when the problem is modified.Minimal Reproducible Example 👇
Error & Stacktrace⚠️
Environment :
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
The text was updated successfully, but these errors were encountered: