Skip to content

detect if user specifies parameters in Simulation constructor and do not override if so #37

Description

@dave-doty

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions