Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3578 +/- ##
==========================================
+ Coverage 80.71% 80.72% +0.01%
==========================================
Files 331 331
Lines 23688 23701 +13
Branches 1674 1674
==========================================
+ Hits 19120 19133 +13
Misses 4562 4562
Partials 6 6
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
SymPy 1.15 solves `Min`/`Max` event triggers for `t` (raising `NotImplementedError` before), returning, e.g., `Piecewise((5, p < 1/2), (nan, True))` for `Max(t - 5, p - 1/2)`. Such events were treated as having explicit trigger times. With the JAX backend, the NaN ended up in the known discontinuity times, and time-triggered events of the model were missed. With the SUNDIALS backend, it caused spurious warnings about NaN trigger times. Discard solutions containing NaN and leave those triggers to root-finding. Update tests to accept the results of both SymPy<1.15 and SymPy>=1.15 (changed C++ code printing, `str()` of unevaluated division by zero no longer raising, additionally solvable triggers). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
SymPy 1.15 (currently 1.15.0rc2) solves some
Min/Maxevent triggers fortfor which it raisedNotImplementedErrorbefore. For triggers that AMICI'ssolve_minmax_trigger_for_tdoesn't handle, in particularOr-combinations with a time-independent condition, thesp.solvefallback now returns, e.g.,Piecewise((5, p < 1/2), (nan, True))forMax(t - 5, p - 1/2)((time > 5) || (p > 0.5)). Such events were treated as having explicit trigger times. Effects, checked with a test model with such triggers (gatedOr, decreasingOr,Andof gatedOrs, differentinitialValues, parameter-dependent trigger times):_known_discs), which are passed to diffrax asjump_ts. As a result, all events that should trigger aftert0were missed, including those of unrelated triggers liketime > tauin the same model, andjax.jacfwdfailed ("A linear solver received non-finite (NaN or inf) input").This change discards solutions containing NaN and leaves those triggers to root-finding, as with SymPy<1.15.
Tests now accept the results of both SymPy<1.15 and SymPy>=1.15:
-(1.0/10.0)*xinstead of-1.0/10.0*x; generally,b - ainstead of-a + b)str()of an unevaluated division by0.0no longer raisesZeroDivisionError, sotest_hill_function_dwdxnow checks the denominators directlyMin(t - 5, 10 - t)→{5, 10};Max(t - 5, Min(t - 10, p))→{5})CI was run with
sympy>=1.15.0rc2temporarily required (all checks passed, including the SBML test suite and the manually triggered workflows); that requirement has been reverted, so CI on the current head uses SymPy 1.14. Generated model code differs between the two SymPy versions only by term ordering / parentheses (checked for 134 SBML test suite models).🤖 Generated with Claude Code