Welcome to our step-by-step guide to DES RAP

Page last modified

December 11, 2025

How to use this guide

Work through each page in order. Follow along with the code examples as you go. You’ll gradually build up a working model and your skills as you progress.

Each section builds on the previous one. You can:

  • Follow the explanations and instructions
  • Copy and run the provided code
  • Complete exercises at the end to test your understanding

Language selection

Use the toggle above to switch between Python and R examples throughout.

You have selected: Python

You have selected: R

What you’ll need

  • Your chosen programming language installed (Python or R).
  • A code editor or IDE (e.g., VSCode, RStudio, PyCharm, Positron).

Example models

Four complete example repositories show fully-implemented DES models. At the end of relevant pages, you’ll see an “Explore the example models” callout pointing you to sections you can reference.

Work through the guide first to understand the fundamentals, then refer to the examples to see how concepts work in practice and adapt them for your own models.


Example 1: M/M/s model

Example 1: M/M/s model

Example 2: Stroke model

Example 2: Stroke model



Ready? Let’s get started. → Next: Version control