Skip to content

Commit 50d29ed

Browse files
authored
Merge pull request #125 from pythonhealthdatascience/dev
Dev
2 parents d5905aa + f23d7cb commit 50d29ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+817
-2481
lines changed

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,45 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Dates formatted as YYYY-MM-DD as per [ISO standard](https://www.iso.org/iso-8601-date-and-time-format.html).
77

8+
## v0.3.0 - 2025-11-06
9+
10+
This release adds new pages on the mathematical proof of correctness, discrete-event simulation, and conclusions/feedback, as well as template repositories for structuring work as a package. It fixes the calculation of R time-weighted measures, updates the Python approach to determining warm-up length, and extends all pages to cover all performance metrics. Numerous smaller improvements are also included.
11+
12+
### Added
13+
14+
* Template repositories for package structure.
15+
* Mathematical proof of correctness page.
16+
* Discrete-event simulation introductory page.
17+
* Conclusions page.
18+
* Feedback page.
19+
20+
### Fixed
21+
22+
* Add correction for R time-weighted measures so last interval is included in calculations.
23+
24+
### Changed
25+
26+
* Pages following *Performance Measures* now use **all** metrics (and not just two) for Python and R.
27+
* Changed Python approach for determining length of warm-up (previous approach unsuitable when using all metrics).
28+
* Added patient end-time logging to all simulation model pages.
29+
* Upgraded to `sim-tools` v1.0.0 (Python) and add `queueing` (R).
30+
31+
Also some minor improvements and refinements, including:
32+
33+
* Extra desk-check suggestions in `verification_validation.qmd`
34+
* Removed colour variable for R sensitivity plots.
35+
* Expanded and cross-linked stuff on guidelines in `sharing/archive.qmd` and `intro/guidelines.qmd`.
36+
* Small corrections in README, docstrings, linting.
37+
* Refactoring tests.
38+
* Clarifications on R data storage, seed sequences, correlated streams, and limitations of structuring research as a package.
39+
* Mentions of MRAN, P3M, commit pinning, `data-raw`, `pins` and `{targets}`.
40+
* Mentioned relevant verification/validation concepts in topic pages.
41+
* Added link to repository `renv.lock` on environment page.
42+
843
## v0.2.0 - 2025-10-14
944

45+
This release adds a large number of new pages. It also introduces pre-commits, contributor acknowledgements, a contributing guide, interface improvements, updated introduction boxes, and giscus comments.
46+
1047
### Added
1148

1249
* Logging page

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ keywords:
4141
- simmer
4242
- rap
4343
license: MIT
44-
version: '0.2.0'
45-
date-released: '2025-10-14'
44+
version: '0.3.0'
45+
date-released: '2025-11-06'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# DES RAP Book: Reproducible Discrete-Event Simulation in Python and R
44

5-
[![Python](https://img.shields.io/badge/-Python_3.9.22-a8902b?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/)
5+
[![Python 3.11](https://img.shields.io/badge/-Python_3.11-a8902b?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/)
66
![R 4.4.1](https://img.shields.io/badge/-R_4.4.1-276DC2?style=for-the-badge&logo=r&logoColor=white)
77
![Code licence](https://img.shields.io/badge/🛡️_Code_licence-MIT-8a00c2?style=for-the-badge&labelColor=gray)
88
![Text licence](https://img.shields.io/badge/🛡️_Text_licence-CC--BY--SA--4.0-b100cd?style=for-the-badge&labelColor=gray)

environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ dependencies:
2222
- jupytext==1.17.2
2323
- kaleido==1.1.0
2424
- lintquarto==0.5.0
25-
- sim-tools==0.10.0
25+
- sim-tools==1.0.0

pages/experiments/scenarios.qmd

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ In @Heather2025, six out of seven studies with scenarios lacked scenario code. T
106106
{{< include ../output_analysis/replications_resources/summary_stats.py >}}
107107
{{< include ../output_analysis/parallel_resources/runner.py >}}
108108
```
109-
= 18
109+
110110
```{r}
111111
#| echo: false
112112
#| file: ../output_analysis/replications_resources/create_params.R
@@ -119,7 +119,7 @@ In @Heather2025, six out of seven studies with scenarios lacked scenario code. T
119119

120120
```{r}
121121
#| echo: false
122-
#| file: ../output_analysis/replications_resources/metrics.R
122+
#| file: ../output_analysis/length_warmup_resources/metrics.R
123123
```
124124

125125
```{r}
@@ -367,7 +367,7 @@ HTML(to_html_datatable(scenario_results.head(200)))
367367

368368
:::
369369

370-
::: {.r-content}
370+
:::: {.r-content}
371371

372372
```{r}
373373
# Run scenarios
@@ -387,8 +387,22 @@ write.csv(scenario_results,
387387
kable(scenario_results) |> scroll_box(height = "400px")
388388
```
389389

390+
<br>
391+
392+
::: {.callout-note title="Selective re-running"}
393+
394+
For simulations with very long run times, you may wish to explore the [{targets}](https://books.ropensci.org/targets/) package.
395+
396+
With `{targets}`, you can set up your pipeline so that input changes (like updates to parameter files or scenario definitions) trigger the package to automatically re-run only the affected simulations and analyses, while all other results are reused from cache. This targeted re-running helps save computation time when there are many slow scenarios to run.
397+
398+
If you change the code inside your model function, `{targets}` will detect those updates and make sure all impacted analysis steps are re-run.
399+
400+
*Note: This package hasn't been personally tried in this project, so we can't vouch for whether it definitely works reliably with simmer simulation models - it's just a cool package we've heard about! For guides on using this, see the official [{targets} manual](https://books.ropensci.org/targets/)*.
401+
390402
:::
391403

404+
::::
405+
392406
## Sensitivity analysis
393407

394408
<div class="h3-tight"></div>
@@ -399,6 +413,8 @@ Scenario analysis focuses on a set of pre-defined situations which are plausible
399413

400414
Sensitivity analysis varies one parameter (or a small group of parameters) and assess the impact of small changes in that parameter on outcomes. The purpose is to understand **how uncertainty in the inputs affects the model**, and how **robust** the model is to variation in those inputs.
401415

416+
Sensitivity analysis is an important for model validation (and forms part of "[experimentation validation](../verification_validation/verification_validation.qmd#experimentation-validation)").
417+
402418
### Running sensitivity analyses
403419

404420
Sensitivity analyses should be run programmatically, just like scenario analyses, and the code should be shared for reproducibility.

0 commit comments

Comments
 (0)