Topic 10 · Modelling & Simulation (HL Option)
Computer Science · Cheatsheet

Topic 10 · Modelling & Simulation (HL Option)

Chapter 1 · Why and how to simulate

📋 Reference · always available
Why simulate
Reality too DANGEROUS · EXPENSIVE · SLOW · IMPOSSIBLE. Often multiple reasons combined.
Box's Law
All models are wrong; some are useful. The question is 'useful for THIS decision?'
Variables
What CHANGES over time. Position, velocity, infected count. The state of the system.
Parameters
FIXED values you choose. Gravity g, bounce coef e, infection rate β. Tune the dynamics.
Rules
Equations or logic relating state at t to t+Δt. v_new = v + g·dt. The dynamics.
Assumptions
Simplifications you've MADE. Air drag = 0. Uniform population mixing. ALWAYS list them.
Verification
'Built it RIGHT?' — code matches spec. Tools: unit tests, code review.
Validation
'Built the RIGHT thing?' — model matches reality. Tools: hindcasting, held-out data, expert review.
Sanity check
Run model on a KNOWN case first (e.g. analytic answer). If it fails, don't trust complex predictions.
Minimum detail rule
Use the SMALLEST model that answers your question. More parameters = more uncertainty + bugs + slowness.