-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.qmd
More file actions
298 lines (266 loc) · 12.3 KB
/
index.qmd
File metadata and controls
298 lines (266 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
---
title: "Reproducible Discrete-Event Simulation in Python and R"
subtitle: "Building transparent reliable simulation models within a reproducible analytical pipeline."
date: last-modified
language:
title-block-published: "Website last updated"
include-in-header:
- text: |
<style>
h1 {
text-align: center;
}
p.subtitle.lead {
text-align: center;
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
format:
html:
page-layout: full
---
<!-- Hide as no python-content or r-content blocks -->
<style>
#quarto-announcement {
display: none !important;
}
</style>
This open book is a self-paced training resource that teaches you how to design, implement, and share discrete-event simulation (DES) models in Python and R as part of a reproducible analytical pipeline. It combines a **step-by-step guide** with **complete example repositories** that you can adapt for your own projects.
The material is designed for analysts, researchers, and students in health and operations research who want to build transparent, trustworthy simulation models. To get the most from this resource, you should be comfortable with basic programming in either Python or R and have some familiarity with probability and basic statistics. **No prior DES experience is required**: short introductions to DES, reproducible analytical pipelines, and free and open source software are provided in the "Intros" section and linked below.
::: {.pale-blue}
"The DES RAP Book was a valuable resource in our transition to open-source DES modelling. It provided us with a step-by-step structure to follow and guidance on best practice for writing code, tests and documentation for our package. Our model is being using in the Midlands, and beyond, for understanding future demand and capacity within Kidney Replacement Therapy." - **Lucy Morgan, Analytics Manager at The Strategy Unit**.
:::
An engaged learner can complete the core step-by-step guide in around 10-15 hours, including time to run the code examples and attempt the exercises. You can work through the material in order as a structured course, or dip into specific sections (such as input modelling, verification and validation, or sharing and archiving) as needed.
After working through this resource, you will be able to:
* Set up **version control** and reproducible **environments** for your DES RAP project.
* Structure your work as a **package**, with clear, reusable code organisation.
* Manage **inputs** systematically, including data, parameters, and validation.
* Build a working **DES model** with entities, processes, randomness, and logging.
* Carry out **output analysis** and **experimentation**, including warm-up, replications, and scenario/sensitivity analysis.
* Apply **verification, validation, testing, and quality assurance** to increase trust in your model.
* Improve **style, documentation, and automation** with linting, docstrings, and GitHub Actions.
* **Collaborate and share** your work effectively, including code review, licensing, citation, changelogs, and archiving.
> If you use the DES RAP book in your teaching, research, or training, we'd love to hear about it. Please [get in touch](/pages/guide/further_info/feedback.qmd) to share how you've used the material, suggest improvements, or point us to example models or case studies that others might find helpful.
>
> Educators and trainers can adopt the book as a complete syllabus for a short course or reuse individual chapters as standalone teaching units (for example, sessions on RAP, testing, packaging, or sharing models), and should cite the resource when they do so in line with the provided citation below. The accompanying code is released under an MIT licence, and the text is available under a CC BY-SA 4.0 licence, allowing reuse and adaptation with appropriate attribution.
<br>
```{=html}
<div class="value-grid">
<a href="pages/guide/introduction.qmd" class="value-box">
<div class="icon"><i class="bi bi-journal-code"></i></div>
<div class="text">
<div class="title">Step-by-step guide</div>
<div class="value">Click to follow along with our guide to build your own reproducible DES model.</div>
</div>
</a>
<a href="pages/example_models/example_models.qmd" class="value-box">
<div class="icon"><i class="bi bi-folder2-open"></i></div>
<div class="text">
<div class="title">Examples</div>
<div class="value">The guide is accompanied by four complete example repositories - click to find out more!</div>
</div>
</a>
</div>
```
<br>
<div class="section-block">
#### Reproducibility frameworks
Our resources are designed to help you meet two important reproducibility standards. Learn more:
<a href="pages/frameworks/levels_of_rap.qmd" class="inline-btn">
<span class="inline-btn-icon"><i class="fa-solid fa-link"></i></span>
NHS Levels of RAP
</a>
<a href="pages/frameworks/stars_reproducibility.qmd" class="inline-btn">
<span class="inline-btn-icon"><i class="fa-solid fa-link"></i></span>
STARS reproducibility recommendations
</a>
#### New to these concepts?
We have dedicated pages explaining the foundations, helpful if you're new to any of these areas.
<a href="pages/intros/des.qmd" class="inline-btn">
<span class="inline-btn-icon"><i class="fa-solid fa-circle-info"></i></span>
Discrete-Event Simulation
</a>
<a href="pages/intros/rap.qmd" class="inline-btn">
<span class="inline-btn-icon"><i class="fa-solid fa-circle-info"></i></span>
Reproducible Analytical Pipelines
</a>
<a href="pages/intros/foss.qmd" class="inline-btn">
<span class="inline-btn-icon"><i class="fa-solid fa-circle-info"></i></span>
Free & Open Source Software
</a>
</div>
<br>
This resource is an output of **STARS**, a research project led by Associate Prof. **Tom Monks** [{fig-alt="ORCID logo"}](https://orcid.org/0000-0003-2631-4481).
The book is written by **Amy Heather** [{fig-alt="ORCID logo"}](https://orcid.org/0000-0002-6596-3479). It has been reviewed by:
* Prof. **Nav Mustafee** [{fig-alt="ORCID logo"}](https://orcid.org/0000-0002-2204-8924)
* Dr. **Alison Harper** [{fig-alt="ORCID logo"}](https://orcid.org/0000-0001-5274-5037)
* Associate Prof. **Tom Monks** [{fig-alt="ORCID logo"}](https://orcid.org/0000-0003-2631-4481)
* **Fatemeh Alidoost** [{fig-alt="ORCID logo"}](https://orcid.org/0009-0000-0252-560X)
* Dr. **Rob Challen** [{fig-alt="ORCID logo"}](https://orcid.org/0000-0002-5504-7768)
* **Tom Slater** [{fig-alt="ORCID logo"}](https://orcid.org/0009-0007-0838-7499)
The STARS project is supported by the Medical Research Council [grant number MR/Z503915/1] from 1st May 2024 to 31st October 2026. The listed researchers are associated with the **University of Exeter** Medical and Business Schools, and the **University of Bristol** School of Engineering, Mathematics and Technology.
You can find out more about our project on the [**STARS project website**](https://pythonhealthdatascience.github.io/stars/){target="_blank"}. If you use this resource, **please cite us:**
> Heather, A., Monks, T., Mustafee, N., Harper, A., Alidoost, F., Challen, R., & Slater, T. (2025). DES RAP Book: Reproducible Discrete-Event Simulation in Python and R. https://github.com/pythonhealthdatascience/des_rap_book. https://doi.org/10.5281/zenodo.17094155.
<br>
<i><b>Keywords:</b> discrete-event simulation; reproducible analytical pipelines; health services research; Python; R; simulation modelling; research software engineering; open-source tools; SimPy; simmer.</i>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "TrainingMaterial",
"@id": "https://doi.org/10.5281/zenodo.17094155",
"http://purl.org/dc/terms/conformsTo": {
"@type": "CreativeWork",
"@id": "https://bioschemas.org/profiles/TrainingMaterial/1.0-RELEASE"
},
"name": "DES RAP Book: Reproducible Discrete-Event Simulation in Python and R",
"description": "An open, self-paced training resource that teaches how to design, implement, and share discrete-event simulation (DES) models in Python and R as part of a reproducible analytical pipeline (RAP).",
"keywords": [
"discrete-event simulation",
"reproducible analytical pipelines",
"health services research",
"Python",
"R",
"simulation modelling",
"research software engineering",
"open-source tools",
"SimPy",
"simmer"
],
"url": "https://pythonhealthdatascience.github.io/des_rap_book/",
"identifier": [
{
"@type": "PropertyValue",
"propertyID": "DOI",
"value": "10.5281/zenodo.17094155"
}
],
"abstract": "This practical guide shows you how to build reproducible discrete-event simulation models (DES) that fit into a reproducible analytical pipeline (RAP), with tips that benefit all types of models and analysis. The resource combines a step-by-step guide with complete example repositories in Python and R.",
"about": [
{
"@type": "DefinedTerm",
"name": "Discrete-event simulation"
},
{
"@type": "DefinedTerm",
"name": "Reproducible analytical pipelines"
},
{
"@type": "DefinedTerm",
"name": "Health services research"
},
{
"@type": "DefinedTerm",
"name": "Research software engineering"
}
],
"audience": [
{
"@type": "Audience",
"audienceType": "researchers"
},
{
"@type": "Audience",
"audienceType": "research software engineers"
},
{
"@type": "Audience",
"audienceType": "analysts"
},
{
"@type": "Audience",
"audienceType": "postgraduate students in health and operations research"
}
],
"author": [
{
"@type": "Person",
"name": "Amy Heather",
"@id": "https://orcid.org/0000-0002-6596-3479"
}
],
"contributor": [
{
"@type": "Person",
"name": "Tom Monks",
"@id": "https://orcid.org/0000-0003-2631-4481"
},
{
"@type": "Person",
"name": "Nav Mustafee",
"@id": "https://orcid.org/0000-0002-2204-8924"
},
{
"@type": "Person",
"name": "Alison Harper",
"@id": "https://orcid.org/0000-0001-5274-5037"
},
{
"@type": "Person",
"name": "Fatemeh Alidoost",
"@id": "https://orcid.org/0009-0000-0252-560X"
},
{
"@type": "Person",
"name": "Rob Challen",
"@id": "https://orcid.org/0000-0002-5504-7768"
},
{
"@type": "Person",
"name": "Tom Slater",
"@id": "https://orcid.org/0009-0007-0838-7499"
}
],
"competencyRequired": [
"Basic programming in Python or R (functions, packages, simple scripts)",
"Familiarity with probability and basic statistics"
],
"educationalLevel": "intermediate",
"inLanguage": "en",
"learningResourceType": [
"online book",
"step-by-step guide",
"worked examples"
],
"license": [
"https://opensource.org/license/mit",
"https://creativecommons.org/licenses/by-sa/4.0/"
],
"mentions": [
{
"@type": "SoftwareApplication",
"name": "SimPy"
},
{
"@type": "SoftwareApplication",
"name": "simmer"
},
{
"@type": "SoftwareApplication",
"name": "Git"
},
{
"@type": "SoftwareApplication",
"name": "GitHub"
}
],
"teaches": [
"Setting up version control and reproducible environments for DES RAP projects",
"Structuring simulation projects as reusable packages",
"Managing inputs, parameters, and experiments in a reproducible way",
"Building DES models with entities, processes, randomness, and logging",
"Performing output analysis, warm-up, replications, and scenario/sensitivity analysis",
"Applying verification, validation, testing, and quality assurance to simulation models",
"Automating checks with linters and continuous integration",
"Documenting, licensing, citing, and archiving DES models for reuse"
],
"timeRequired": "PT10H",
"provider": {
"@type": "Organization",
"name": "STARS project, University of Exeter and University of Bristol"
},
"datePublished": "2025-09-10",
"creativeWorkStatus": "Active",
"version": "1.0"
}
</script>
<!-- datePublished is set to date of first release -->