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
Context
I have a model with many InitialAssignments, such as C12214= v1*0.001*dilution_factor where C12214 is a species and v1 and dilution_factor are variables. In some instances, I'd like to override the InitialAssignment and set the species concentration to a fixed value, say C12214= 1.0.
Issue
I'm looping through the variables and species initial concentrations that I want to override and calling r.setValue('init('+var+')', new_value). Everything works as expected when setting variables, but when setting species initial concentrations other variables in the model are changing as well. This happens regardless of which species I'm changing, and it always affects the same variables. The issue seems to be with r.removeInitialAssignment()
Workaround
Setting the concentration, r.setValue('['+var+']', new_value), as opposed to the initial concentration works as expected. In this case I don't need to change the initial concentration so this is okay.
The text was updated successfully, but these errors were encountered:
Context
I have a model with many InitialAssignments, such as
C12214= v1*0.001*dilution_factor
whereC12214
is a species andv1
anddilution_factor
are variables. In some instances, I'd like to override the InitialAssignment and set the species concentration to a fixed value, sayC12214= 1.0
.Issue
I'm looping through the variables and species initial concentrations that I want to override and calling
r.setValue('init('+var+')', new_value)
. Everything works as expected when setting variables, but when setting species initial concentrations other variables in the model are changing as well. This happens regardless of which species I'm changing, and it always affects the same variables. The issue seems to be withr.removeInitialAssignment()
Workaround
Setting the concentration,
r.setValue('['+var+']', new_value)
, as opposed to the initial concentration works as expected. In this case I don't need to change the initial concentration so this is okay.The text was updated successfully, but these errors were encountered: