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

Release 0.1.12 #182

Merged
merged 4 commits into from
Feb 2, 2024
Merged

Release 0.1.12 #182

merged 4 commits into from
Feb 2, 2024

Conversation

plietar
Copy link
Member

@plietar plietar commented Feb 1, 2024

No description provided.

This allows a user to run a simulation for a number of time steps and
save the state of the simulation. The state can then be restored to
continue the simulation.

This is,for example, useful to compare the impact of an intervention
based on different parameters. The simulation can be run up to the point
of an intervention, when the parameters' value don't matter. The
simulation can then be resumed multiple times but with different
intervention parameters each time.

For now, only variables are supported. Events will be added next.
It can have suprising side effects by resetting the user global RNG
state to a fixed value, and also get in the way of doing stochastic
simulations where we actually want to sample many different futures from
a given start point.

The only time where a user actually wants to restore the random number
generator state is probably when writing tests that compare a continuous
run against a resumed one. They can opt-in to that behaviour with a new
argument to `simulation_loop` called `restore_random_state`.
@plietar plietar requested a review from giovannic February 1, 2024 14:28
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (3800945) 96.28% compared to head (67a2019) 96.25%.
Report is 1 commits behind head on master.

Files Patch % Lines
src/event.cpp 92.50% 3 Missing ⚠️
R/simulation.R 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #182      +/-   ##
==========================================
- Coverage   96.28%   96.25%   -0.03%     
==========================================
  Files          36       36              
  Lines        1722     1817      +95     
==========================================
+ Hits         1658     1749      +91     
- Misses         64       68       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@plietar plietar merged commit fa5d1cf into master Feb 2, 2024
7 checks passed
@plietar plietar deleted the release-0.1.12 branch February 2, 2024 11:55
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.

2 participants