Python
R
Service Planning
Identifying Bottlenecks
RAP

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


Summary

DES RAP Book is an open resource and website for building discrete-event simulation (DES) models within a reproducible analytical pipeline (RAP), supporting the healthcare simulation community. The resource demonstrates practical, code-based workflows and tools to help researchers and practitioners develop, validate, and share DES models in Python (SimPy) and R (simmer), ensuring models are reproducible.

Authors
Affiliations

Amy Heather

University of Exeter Medical School

Tom Monks

University of Exeter Medical School

Nav Mustafee

University of Exeter Business School

Alison Harper

University of Exeter Business School

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.

Key features include:


DES RAP Book homepage


Book contents

Section Pages
Introduction Discrete-event simulation (DES)
Reproducibility and RAPs
Guidelines
Open-source languages
Example conceptual models
Setup Version control
Environments
Structuring as a package
Code organisation
Model inputs Input modelling
Input data management
Parameters from script
Parameters from file
Parameter validation
Model building Randomness
Entity generation
Entity processing
Logging
Output analysis Initialisation bias
Performance measures
Replications
Length of warm-up
Number of replications
Parallel processing
Experimentation Scenario and sensitivity analysis
Tables and figures
Full run
Style and documentation Linting
Docstrings
GitHub actions
Documentation
Collaboration & sharing Code review
Licensing
Citation
Changelog
Sharing and archiving


View the book

To view the book, click on the image below or go to https://pythonhealthdatascience.github.io/des_rap_book/.


Project status

Status: Gold

Rationale: This resource guides users in building “Gold” standard models - well-documented, tested, and structured as packages - with four complete examples illustrating these best practices.