You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The basic problem is that internally, the list of initial values for a species (both floating and boundary) behave slightly differently from the lists of initial values for a compartment or parameter. The species list seems to use initial values for other species and not current values, even when the initial values are not being reset. In contrast, the compartment/parameters lists seem to use current values appropriately.
This can be seen in the ResetManyCompartments and ResetManyParameters tests vs. the ResetManyFloatingSpecies and ResetManyBoundarySpecies tests (found in test/model_analysis/model_analysis.cpp)
This is a pretty obscure case, but I figured I should go ahead and file it.
The following python script illustrates the problem:
import tellurium as te
import roadrunner
r = te.loada("""
species C1, C5;
// Rate Rules:
C5' = 1.5;
// Events:
E0: at time > 1: C1 = 10;
// Species initializations:
C1 = 1;
C5 = 4 + C1;
""")
r.simulate()
r.reset(roadrunner.SelectionRecord.RATE)
print("Reset C5 when it's a species:", r.getValue("C5"))
r = te.loada("""
var C1, C5;
// Rate Rules:
C5' = 1.5;
// Events:
E0: at time > 1: C1 = 10;
// Species initializations:
C1 = 1;
C5 = 4 + C1;
""")
r.simulate()
r.reset(roadrunner.SelectionRecord.RATE)
print("Reset C5 when it's a parameter:", r.getValue("C5"))
This outputs:
Reset C5 when it's a species: 5.0
Reset C5 when it's a parameter: 14.0
The correct value is 14: C5 should be 4+C1, and C1 is still 10, since it wasn't reset.
The text was updated successfully, but these errors were encountered:
The basic problem is that internally, the list of initial values for a species (both floating and boundary) behave slightly differently from the lists of initial values for a compartment or parameter. The species list seems to use initial values for other species and not current values, even when the initial values are not being reset. In contrast, the compartment/parameters lists seem to use current values appropriately.
This can be seen in the ResetManyCompartments and ResetManyParameters tests vs. the ResetManyFloatingSpecies and ResetManyBoundarySpecies tests (found in test/model_analysis/model_analysis.cpp)
This is a pretty obscure case, but I figured I should go ahead and file it.
The following python script illustrates the problem:
This outputs:
The correct value is 14: C5 should be 4+C1, and C1 is still 10, since it wasn't reset.
The text was updated successfully, but these errors were encountered: