CALCULUS FOR MODELLING 07
Compartment Models
A compartment model divides a system into states and represents movement between those states as mathematical flows.
The main idea
Each compartment has its own balance equation.
1. What is a compartment?
A compartment groups individuals or quantities that are treated as equivalent for the purpose of the model. Examples include susceptible people, infectious people, drug in blood, or material in a reservoir.
2. A two-compartment example
Suppose material moves from \(A\) to \(B\) at rate \(kA\):
\[A\xrightarrow{kA}B.\]Then
\[A'=-kA,\qquad B'=kA.\]3. Conservation
Adding the equations gives
\[(A+B)'=0,\]so total material is conserved.
4. Multiple flows
If a compartment receives several inflows and has several outflows, all contributions are added with the appropriate sign.
5. Flow diagrams
A useful workflow is to draw boxes for compartments and arrows for transitions before writing equations. Each arrow appears negatively in its source equation and positively in its destination equation.
6. Transition rate versus state
A flow can depend on one state, such as \(\gamma I\), or several states, such as \(\beta SI/N\). The functional form expresses the modelling assumption.
7. Closed and open systems
A closed model contains only internal transfers. An open model can include births, deaths, immigration, external inputs or other flows across the system boundary.
8. Why compartment models are useful
They make conservation, interactions and assumptions visible. They also naturally produce systems of differential equations.
9. Beyond epidemics
Compartment models appear in pharmacokinetics, ecology, chemical kinetics, radioactive decay, queueing systems and many other areas.
10. Deterministic and stochastic versions
The same compartment structure can support a deterministic flow model or a stochastic event model. What changes is how transitions are mathematically represented.