forked from AndySomogyi/sbmlsolver
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Turning on and off conservedMoietyAnalysis doesn't reset total mass. #1146
Comments
Could you please try this one:
I am getting different results after setting 'ConservedMoietyAnalysis' to False using this way, but I am not sure if the new results are the ones you are after. |
Don’t compute the steady state values, that might not show up the bug.
|
I get the exact same results with both scripts. |
|
Note that the problem is that when you change S1, the sum of S1 and S2 is 40, so at steady state, they should total 40. But instead they revert back to total 15. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a short python program that illustrates the problem:
What's going on in the background is that conservedMoietyAnalysis starts off False by default, and is turned on when we run the model to steady state. We turn it back off explicitly, which lets us set init(S1) without changing S2. But then when we run to steady state again, the conserved moiety analysis turns on again in the background, and it uses the old total mass values ("_CSUM#', I think) instead of re-calculating them.
In addition, the values should be recalculated when setting the current values, too, not just the init:
The text was updated successfully, but these errors were encountered: