Skip to main content

Code notes

The Mesa simulation is intentionally small enough to read in one sitting.

Determinism

WorkforceModel creates independent seeded random streams for initialization, awareness, enrollment, completion, and matching. This means a parameter comparison can be reproduced exactly, and a downstream setting cannot perturb an upstream random sequence.

baseline = WorkforceModel(WorkforceConfig(seed=42))
expanded = WorkforceModel(WorkforceConfig(seed=42, training_seats=60))

Only the changed parameter differs between those runs.

Extending the model

Add new resident state to the Resident agent, initialize it in WorkforceModel, then make its effect explicit in one submodel. For example, transportation access could reduce enrollment or job matching without changing awareness.

Keep three rules:

  1. document every new behavior in the ODD protocol;
  2. preserve seeded randomness;
  3. add a metric that makes the behavior observable.