Conclusion
Well done, you made it to the end! 😁
This book has shared with you the knowledge and tools to create simulation models in Python or R as part of a reproducible analytical pipeline - models that others can reproduce, trust, understand, and build upon.
What’s next?
Explore the example models
These example models demonstrate many of the practices covered in this book. They may seem daunting at first - there’s a lot going on - but having worked through the book, you’re in a good position to understand them.
Remember, these are examples, not prescriptions. They’re not perfect, and there’s no single “right way” to build reproducible models. They simply show one approach to implementing the principles you’ve learned.
Nurse visit simulation:
Click to visit pydesrap_mms repository
Click to visit rdesrap_mms repository
Stroke pathway simulation:
Make your own model
The best way to solidify what you’ve learned is to apply it. When planning you model, remember that a good simulation starts with conceptual modelling. As defined in Robinson (2007):
“The conceptual model is a non-software specific description of the simulation model that is to be developed, describing the objectives, inputs, outputs, content, assumptions and simplifications of the model.”
Some good resources on conceptual modelling include:
- Robinson, Stewart. 2007. “Chapter 5: Conceptual Modelling.” In Simulation: The Practice of Model Development and Use, 63–75. John Wiley & Sons.
- Robinson, Stewart. 2007. “Chapter 6: Developing the Conceptual Model.” In Simulation: The Practice of Model Development and Use, 77–93. John Wiley & Sons.
This book focused on building simple model structures to help you establish robust foundations and reproducible workflows. However, real-world simulation models often involve additional features and complexities, such as reneging, balking, priority classes, resource scheduling, branching, blocking, or more detailed patients pathways.
For inspiration on implementing a wider range of features, the HSMA “little book of DES” is an excellent resource. Its examples use Python, and the set up or structure may differ from those in this book, but the simulation principles apply whatever language you use. Focus on understanding the logic - how features are implemented and why - then adapt those ideas for the language, structure, or workflow that best fits your own model.
Review your existing models
Already have simulation models in development or completed? Now’s a great time to audit them against the practices you’ve learned.
Use the checklists linked below to identify what you’ve already achieved (woohoo!) and what’s missing. Then revisit relevant sections of the book to fill the gaps. Even small improvements - adding seeds, externalising parameters, or documenting dependencies - can significantly enhance your model’s reproducibility.
Checklists
Download checklists to audit existing models or guide development of existing models.
You can see examples of completed checklists in the nurse visit and stroke simulation example model repositories.
Also, don’t forget about the handy verification and validation checklist:
Acknowledgements
This book builds upon the generous work of many contributors to the open-source and simulation communities. We are particularly grateful for:
- The SimPy and simmer development teams for creating and maintaining excellent open-source DES libraries.
- The NHS RAP Community of Practice for their maturity framework.
- The HSMA Programme (Health Service Modelling Associates) for their little book of DES.
- All the researchers and practitioners who have openly shared their simulation models, enabling the research that informed this book.
- Contributors and reviewers who have provided feedback to improve this resource
Full references and citations appear throughout the book where specific resources are discussed.
Please cite this book
The code in this book is licensed under an MIT License, and the text is under CC-BY-SA, making it free to use, modify and share. However, we kindly ask/require that you cite or acknowledge this work when you use it.
Suggested citation:
Heather, A., Monks, T., Mustafee, N., & Harper, A. (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.
Find out more about STARS
This book is part of the STARS (Sharing Tools and Artefacts for Reusable and Reproducible Simulations) project, supported by the Medical Research Council [grant number MR/Z503915/1].
STARS tackles the challenges of sharing, reusing, and reproducing discrete event simulation (DES) models in healthcare. Our goal is to create open resources using the two most popular open-source languages for DES: Python and R. As part of this project, you’ll find tutorials, code examples, and tools to help researchers and practitioners develop, validate, and share DES models more effectively.
Learn more:
- GitHub organisation: https://github.com/pythonhealthdatascience
Well done! It’s a journey, not a race
Whether you’re new to reproducible simulation or deepening your existing practice, you’ve taken important steps toward building more trustworthy, transparent models.
Implementing these practices requires time and iteration. Perfection is not required immediately - or ever. Many of us are crunched for time, juggling multiple projects and deadlines. Finding space to improve workflows can feel impossible.
When time is limited, focus on what matters most for your specific project. Go through the checklists or flip back through the book to identify key steps that would make the biggest difference. Every small change moves your work forward.
Don’t be afraid to share your model, even if it doesn’t have all the bells and whistles. You benefit from others’ shared work; others benefit from yours. Shared models spark conversations, enable collaboration, and push the field forward. Each model shared raises the bar for transparency and makes it easier for the next person to do the same.
See the next page for details on giving feedback and contributing to this resource.

