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

r.getCurrentSBML() should set all values to current values, including those with initial assignments. #1138

Closed
luciansmith opened this issue Jul 20, 2023 · 0 comments

Comments

@luciansmith
Copy link

The function 'getCurrentSBML()' exports the current state of the model as if it were the 'initial' state of the model in an exported SBML file. (The same is true of 'getCurrentAntimony()') However, anything with an initial assignment escapes that clause, and you just get the initial assignment, not the current value. So:

import tellurium as te

r = te.loada("""
    S1->; k1*S1
    S1=3
    k1=S1/3
""")

r.S1 = 5
r.k1 = 0.3
print(r.getCurrentAntimony())

includes:

S1 = 5;
k1 = S1/3;

This is arguably a bug, though it's possible that someone is relying on the behavior somehow. @matthiaskoenig : would you agree this needs to be changed?

luciansmith added a commit that referenced this issue Jul 21, 2023
This turned out to be super simple:  just delete the initial assignments from the initially-generated SBML.  All the values are set afterwards, an
adelhpour pushed a commit that referenced this issue Nov 7, 2023
This turned out to be super simple:  just delete the initial assignments from the initially-generated SBML.  All the values are set afterwards, an
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

No branches or pull requests

1 participant