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

Change 'states' --> 'initial_states' when initializing model #102

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

twallema
Copy link
Owner

@twallema twallema commented Oct 8, 2024

  • I have checked to ensure there aren't other open Pull Requests for the same update/change
  • I have updated the documentation accordingly.

Describe your fixes/additions/changes

The input argument of class JumpProcess and ODE named "states" has been renamed to "initial_states" because this is more descriptive.

So to initialise an SIR model use,

model = SIR(initial_states={'S': 1000, 'I': 1}, parameters={'beta': 0.35, 'gamma': 5})

Instead of,

model = SIR(states={'S': 1000, 'I': 1}, parameters={'beta': 0.35, 'gamma': 5})

One advantage is that previously, the "states" were renamed "initial_states" upon model initialization. So if you want to access the initial states of your model you'd have to model.initial_states but the input argument was named "states". The new implementation is more consistent.

@twallema twallema merged commit e3d32aa into master Oct 9, 2024
2 checks passed
@twallema twallema deleted the rename-states-initial-states branch October 9, 2024 01:21
@twallema twallema mentioned this pull request Oct 9, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant