DAE Examples and Last Point Strategy #48
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces two new examples for handling DAEs with state-dependent switches and implements a "Last Point Strategy" to optimize the integration process immediately preceding a switching point.
To demonstrate and test the handling of DAEs with switches, I have added:
daeExampleRHS.m,daeExample_main.m,daeExample_README.md)rlcRHS.m,rlc_main.m,rlcExample_README.md)extendODEuntilSwitch_t1_to_t2.mand Config)Once a switching point is detected (between t1 and t2), the strategy forces the integrator to reach the exact switching point using a single step. For compatible one-step solvers the function sets the
InitialStepto the remaining time-to-switch (delta_t) and relaxes the tolerances for this section. This ensures the solver hits the boundary efficiently without sub-stepping.ode23, ode45, ode78, ode89, ode113, ode23t, ode23tblast_point_strategyin Config file