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
First, allow CRNs to be simulated in discrete time. The Simulation constructor forces continuous time to be used if the transition rules are specified by a list of CRN reactions, ignoring the value of the parameter continuous_time.
Instead, we should check whether the user specified continuous time explicitly, and if so, then use the value they gave, independently of whether CRN reactions or another method is used to specify transitions. One way is to declare its type is Optional[bool] with default value None. That way if it is a Boolean value then the user specified it. If it is None we can convert it to False after recording that it was the default value.
A similar issue appears with the steps_per_time_unit, which is automatically configured in some cases, but should not be automatically configured if the user specified a value, so it should be made type Optional[float] with default value None.
I'm not sure if this applies to any other parameters.
The text was updated successfully, but these errors were encountered:
dave-doty
changed the title
allow CRNs to be simulated in discrete time
detect if user specifies parameters in Simulation constructor and do not override if so
Dec 10, 2021
First, allow CRNs to be simulated in discrete time. The
Simulation
constructor forces continuous time to be used if the transition rules are specified by a list of CRN reactions, ignoring the value of the parametercontinuous_time
.Instead, we should check whether the user specified continuous time explicitly, and if so, then use the value they gave, independently of whether CRN reactions or another method is used to specify transitions. One way is to declare its type is
Optional[bool]
with default valueNone
. That way if it is a Boolean value then the user specified it. If it isNone
we can convert it toFalse
after recording that it was the default value.A similar issue appears with the
steps_per_time_unit
, which is automatically configured in some cases, but should not be automatically configured if the user specified a value, so it should be made typeOptional[float]
with default valueNone
.I'm not sure if this applies to any other parameters.
The text was updated successfully, but these errors were encountered: