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.getScaledFluxControlCoefficientMatrix() if there are events #293

Open
hsauro opened this issue Feb 15, 2016 · 2 comments
Open

r.getScaledFluxControlCoefficientMatrix() if there are events #293

hsauro opened this issue Feb 15, 2016 · 2 comments

Comments

@hsauro
Copy link

hsauro commented Feb 15, 2016

Calling

r.getScaledFluxControlCoefficientMatrix() or getScaledConcentrationControlCoefficientMatrix()

give the error message:

Metabolic control analysis only valid for primitive reaction kinetics models. This model has events

However at steady state the events are not active so if should be possible to compute the matrix of control coefficients. In fact getCC does allow the control coefficients to be computed.

r = te.loada("""
J1: $A -> B; k1_A;
J2: B -> $C; k2_B;

at time > 4: k1 = k1*8

A = 10; B = 0; C = 0;
k1 = 0.1; k2 = 0.14;
""")

m = r.simulate(0, 25, 100)
r.plot()

print "Closeness to steady state: ", r.steadyState()

print r.getFullStoichiometryMatrix()
print r.getConservationMatrix();
print r.getReducedJacobian()

print r.getCC ("J1", "k1")
print r.getCC ("J1", "k2")

r.getScaledFluxControlCoefficientMatrix() # <-- Doesn't work

@0u812
Copy link
Member

0u812 commented Feb 18, 2016

I think I know why this is failing. NLEQ often has difficulty finding the steady state from initial conditions so roadrunner simulates the system before handing it off to NLEQ. This increases the chances of finding a steady state. If you have events then they may be triggered by the simulate call.

@0u812 0u812 added enhancement and removed bug labels Feb 18, 2016
@0u812
Copy link
Member

0u812 commented Feb 18, 2016

I can either provide a flag to disable the pre-simulate or I can temporarily disable events. I would prefer the former because the model is stateful.

@hsauro hsauro added this to the December 20, 2017 milestone Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants