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

Resettable State #196

Open
mmcleod89 opened this issue Jul 31, 2024 · 3 comments
Open

Resettable State #196

mmcleod89 opened this issue Jul 31, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@mmcleod89
Copy link
Collaborator

We need to be able to reset the state to the year of intervention. Saving the dataframe should be easy enough, but we need to make sure that nothing in the modules is going to cause a problem e.g. variables that change over time.

@mmcleod89 mmcleod89 added the enhancement New feature or request label Jul 31, 2024
@mmcleod89 mmcleod89 added this to HIVpy Jul 31, 2024
@github-project-automation github-project-automation bot moved this to To do in HIVpy Jul 31, 2024
@mmcleod89
Copy link
Collaborator Author

How easy is it to serialise custom classes in Python?

@mmcleod89
Copy link
Collaborator Author

We need to be able to retain the state at the time of intervention and then continue with either option 0 (continuation of whatever the status quo is) or option X (some choice of intervention)

@mmcleod89
Copy link
Collaborator Author

In simulation.py

  • run simulation to year of intervention instead of end
  • make population deep copy and test that these are fully independent i.e. no references, changes in one (either to people or module variables) does not affect the other
  • write a simple intervention function and call this from inside run once the copy has been made (and test!)
  • run each simulation to stop date and capture output from both

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
Status: To do
Development

No branches or pull requests

2 participants