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

Allow calculation of fluxes even when there are initial assignments #1132

Open
luciansmith opened this issue May 22, 2023 · 0 comments
Open

Comments

@luciansmith
Copy link

As discovered by @janisshin , roadrunner fails to calculate control coefficients in models with initial assignments:

import tellurium as te
import roadrunner
r = te.loada("""
   $Xo -> S1; k1*Xo - k2*S1
     S1 ->; k3*S1
     Xo = 5; k1 =0.45; k2 = 0.23; k3 = 0.6
     V1 = 2.3
     S1 = 5.6/V1
""")
r.steadyState()
print (r.getScaledFluxControlCoefficientMatrix())

yields:

RuntimeError: Could not set value for S1, as it is defined by an initial assignment rule and can not be set independently., at ?setValues@LLVMExecutableModel@rrllvm@@AEAAHP6A_NPEAULLVMModelData@2@HN@ZP812@EAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_K@Z2PEBHPEBN_N@Z

If I recall correctly, we're using the initial state of the model as a sort of 'scratch pad' to perform these calculations, but this doesn't work when there's an initial assignment rule. Need to either find a better scratch pad, or a way around the restriction.

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