Simulation builds a model of a system and runs it on a computer to see how it behaves, when experiments are too slow, costly or dangerous: traffic, epidemics, networks, circuits, climate. A model is a simplification on purpose. The craft lies in deciding what to leave out and in showing the result is believable.
Key concepts
- Model purpose: the question decides the detail; a model without a question grows without limit.
- Discrete-event simulation: a clock jumps from event to event, as arrivals and departures in a queue.
- Agent-based models: many simple individuals following local rules, from which global patterns emerge.
- Continuous models: differential equations stepped through time, with care for step size and stability.
- Monte Carlo methods: repeated random sampling to estimate quantities that are hard to compute directly.
Vocabulary
- Verification and validation: is the code doing what you meant, and is the model a fair picture of the real system.
- Random seed: the starting value that makes a random sequence reproducible.
- Warm-up: the initial period of a run, discarded because the system is not yet in a typical state.
- Replication: running the same model many times with different random streams to measure variability.
What to study, in order
- Estimate pi by Monte Carlo and watch the error shrink with the number of samples.
- Write a discrete-event simulation of a queue with an event list, and compare it with theory.
- Build a simple agent-based model, such as a spreading rumour, and vary its parameters.
- Step a differential equation, such as a pendulum, and test different step sizes.
- Calibrate against data, run replications with fixed seeds, and report intervals, not single runs.
Related tags
#probability #operations-research #numerical-analysis #physics-simulation #computational-science