Learn simulation methods
The techniques the models share: generating random numbers you can reproduce, judging how accurate a Monte Carlo estimate is, stepping differential equations forward in time, and writing discrete-event models with SimPy.
- Euler vs Runge–Kutta: Time Stepping in SimulationsWhy a spring simulated with Euler’s method gains energy, and what RK4 buys for four evaluations a step.
- How Accurate Is a Monte Carlo Estimate?Standard errors, confidence intervals, the 1/√n rule, and what changes when samples are correlated.
- Pseudo-Random Numbers and Seeds in SimulationWhere simulation randomness comes from, why seeds matter, and one generator in two languages.
- SimPy Examples: Queues in PythonDiscrete-event simulation with Python’s SimPy: four short programs, checked against queueing theory.
How these notes relate to the models
Each simulation page explains its own model. These notes cover what many models share, so the explanations are not repeated forty times. Every stochastic model uses the generator described in pseudo-random numbers and seeds; every estimate with an error bar follows how accurate a Monte Carlo estimate is; every differential-equation model is stepped with the method compared in Euler vs Runge–Kutta; and the queueing models are rewritten with a standard library in SimPy examples.
The code in these notes is tested the same way as the models: the numbers quoted in the text are the output of running it.