Skip to content
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

Don't eliminate parameters that are initial assignment targets (pt2) #2305

Merged
merged 5 commits into from
Feb 27, 2024

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Feb 22, 2024

Currently, parameters that are targets of initial assignments don't show up as parameters or expressions in the amici model. This is rather not what most users would expect.

Therefore, treat all SBML parameters that are initial assignment targets and whose initial assignment does not evaluate to a number (for those that do, see #2304) as amici expressions. Those static expressions will be handled more efficiently after #2303.

Related to #2150.

@dweindl dweindl self-assigned this Feb 22, 2024
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.71%. Comparing base (e679e51) to head (504d447).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2305      +/-   ##
===========================================
- Coverage    77.79%   77.71%   -0.08%     
===========================================
  Files          321      321              
  Lines        20538    20538              
  Branches      1436     1436              
===========================================
- Hits         15978    15962      -16     
- Misses        4557     4573      +16     
  Partials         3        3              
Flag Coverage Δ
cpp 73.50% <100.00%> (-0.08%) ⬇️
cpp_python 34.02% <100.00%> (ø)
petab 36.41% <100.00%> (ø)
python 72.28% <100.00%> (-0.08%) ⬇️
sbmlsuite ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
python/sdist/amici/sbml_import.py 78.48% <100.00%> (-0.73%) ⬇️

... and 1 file with indirect coverage changes

Currently, parameters that are targets of initial assignments don't show up as parameters or expressions in the amici model. This is rather not what most users would expect.

Therefore, treat all SBML parameters that are initial assignment targets and whose initial assignment does not evaluate to a number (for those that do, see AMICI-dev#2304) as amici expressions.
Those static expressions will be handled more efficiently after AMICI-dev#2303.

Related to AMICI-dev#2150.
@dweindl dweindl marked this pull request as ready for review February 23, 2024 07:11
@dweindl dweindl requested a review from a team as a code owner February 23, 2024 07:11
@dweindl dweindl marked this pull request as draft February 23, 2024 08:29
@dweindl dweindl marked this pull request as ready for review February 24, 2024 17:46
@dweindl dweindl merged commit 5e386ee into AMICI-dev:develop Feb 27, 2024
23 of 26 checks passed
@dweindl dweindl deleted the fix_2150_ia_params_exprs branch February 27, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SBML import: Undeclared identifier error when using parameters with initial assignments in observables
2 participants