The repositories accompany the DES RAP Book - an open educational resource on reproducible discrete-event simulation (DES) in Python and R. The book demonstrates best practices for building, validating, and sharing DES models within a reproducible analytical pipeline (RAP).
The pydesrap_mms and rdesrap_mms models illustrate how these principles can be applied to a simple M/M/s queueing model. The implement it in Python (using SimPy) and R (using simmer). The model simulates patients arriving, waiting to see a nurse, being served, and leaving. All code is structured as a local Python package.

An M/M/s queueing model is a classic mathematical model for systems where:
- Arrivals happen at random, following a Poisson process - and the time between arrivals follows an exponential distribution (the first “M”, which stands for “Markovian” as it is memoryless - arrivals are independent).
- Service times are exponential (second “M”).
- There are s parallel servers (e.g. nurses) sharing a single queue.
This type of model is widely used for studying waiting lines in healthcare, call centers, and other service systems. It helps answer questions like: How long will people wait? How many servers are needed to keep waits short? The only required inputs are the average arrival rate, average service time, and the number of servers.