Standard stylistic note: functions should appear in code before they are called.
More fuzzy stylistic not: I want the run_on_config function in model_run to read like an algorithm description in a paper, so clear on what is happening and why, but not into the weeds about the details
I've refactored your incorporate_penalties to show you what I mean.
We don't have to accept this. I made it a seperate branch intentionally.
Not I haven't actually run this to see if I've broken anything
Main changes to model_run.py