Repository navigation
Conversation
`sigmay` and `sigmaz` are evaluated without the expressions `w`. If a noise formula referred to an expression, the generated code referred to an undeclared variable and did not compile. Fixes AMICI-dev#3377. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3379 +/- ##
==========================================
+ Coverage 79.54% 79.89% +0.34%
==========================================
Files 320 320
Lines 22466 22593 +127
Branches 1507 1516 +9
==========================================
+ Hits 17870 18050 +180
+ Misses 4588 4535 -53
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…ulas States in noise formulas are replaced by the matching observable. This failed if the observable formula refers to expressions, since they were not expanded before solving for the state. Fixes AMICI-dev#3384. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Noise formulas that depend on piecewise functions or splines, and state-dependent event noise formulas, are still not supported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 14, 2026
Member
Author
|
Superseded by #3388. |
FFroehlich
added a commit
that referenced
this pull request
Oct 15, 2026
sigmaz is evaluated without the event observables, so replacing states in event noise formulas by the event output generated uncompilable code. States are now only replaced in sigmay. State-dependent event noise formulas and event noise formulas that refer to the event observable itself are rejected at import (#3389, point 3). Adds `test_noise_formula_with_expression`, adapted from #3379, which checks sigmay, ssigmay and sigmaz for time-resolved and event noise formulas that refer to expressions (#3377), and `test_unsupported_sigmas_rejected` for the cases of #3389 (piecewise functions, splines, state- and event-observable-dependent event noise formulas). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fix the compilation of models with noise formulas that refer to model expressions (e.g., targets of assignment rules).
sigmayandsigmazare evaluated without the expressionsw, so the generated code referred to undeclared variables. The expressions are now substituted inDEModel._compute_equation(only for noise formulas that contain any), before the existing check for state-dependent noise formulas. That check replaces states by the matching observable; the expressions are now also substituted in the observable formula before solving for the state. Otherwise, expressions that depend on the states (e.g.,readout := Ain #3384) were rejected at import.Adds
test_noise_formula_with_expression, which checkssigmay,ssigmayandsigmazfor time-resolved and event noise formulas that refer to an expression, including a state-dependent one forsigmay. Onmain, the model does not compile.Still not supported: noise formulas that depend on piecewise functions or events (
sigmay/sigmazhave no Heaviside argument) or on splines, and state-dependent event noise formulas (also without expressions, e.g.,sigma="x * p", sincesigmazhas nozargument).ssigmazis not checked, since it is never filled inReturnData(#3380).Fixes #3377.
Fixes #3384.
🤖 Generated with Claude Code