fix: accept solver stop times already reached - #344
Closed
Siel wants to merge 1 commit into
Closed
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #344 +/- ##
==========================================
+ Coverage 83.82% 83.89% +0.07%
==========================================
Files 82 82
Lines 33983 33958 -25
==========================================
+ Hits 28486 28489 +3
+ Misses 5497 5469 -28
🚀 New features to boost your workflow:
|
Contributor
|
| Project | pharmsol |
| Branch | fix/accept-current-stop-time |
| Testbed | mhovd-pgx |
🐰 View full continuous benchmarking report in Bencher
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
StopTimeAtCurrentTimeresult as authoritative in both closure and DSL/JIT ODE event loopsscript8.RfailureRoot cause
After bolus reinitialization, TSIT45 can land a few ULPs short of the requested event time. Diffsol applies its solver-specific tolerance and reports the stop as reached. The outer pharmsol event loop then requested the same stop again, received
StopTimeAtCurrentTime, and rejected it with a narrower local 64-ULP check.Diffsol already distinguishes a genuinely earlier invalid stop with
StopTimeBeforeCurrentTime, so pharmsol should not second-guessStopTimeAtCurrentTimewith a different tolerance.Validation
cargo test— passcargo test --features dsl-jit— passcargo test --all-features— passdebug/pharmsol_repropharmsol-level examples pass:*_diffsolcontrols continue to reproduce their expected raw Newton failures