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

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

Open
dave-doty opened this issue Dec 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dave-doty
Copy link
Member

dave-doty commented 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 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.

@dave-doty dave-doty added the enhancement New feature or request label Dec 10, 2021
@dave-doty 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant