File S1. Source code for the manuscript
"Governance of Unsafe Behavior in Electric Power Maintenance: A Three-Population
Evolutionary Game with Endogenous Risk and a Conserved Quantity"

Contents
--------
matlab/fig_mdpi.m     MATLAB R2023b script that generates Figures 1-9 and the
                      console output used for the reported eigenvalues.
python/math_model.py  Reference implementation of the three-population replicator
                      system: payoff differences F_W, F_S, F_E, vertex eigenvalues,
                      closed-form thresholds, center coordinates and periods.
python/analysis.py    Latin hypercube sampling (N = 5000) and partial rank
                      correlation coefficients reported in Table 8 and Figure 9.
python/basins.py      Vectorized RK4 integration used for the basins of attraction
                      reported in Figure 5 (percentages quoted in Section 5.2).
python/basin_stats.py Basin statistics on a 17 x 17 grid at beta = 0.07, C = 8.0.
python/period_check.py Amplitude-period relation quoted in Section 4.3.
python/backlog.py     Logit-coordinate integration of the extended four-dimensional
                      system used in Section 6.

How to run
----------
MATLAB:  cd matlab; fig_mdpi        (requires MATLAB R2023b with the Statistics and
         Optimization toolboxes; set MATLAB_PREFDIR to a writable folder on Windows)
Python:  python 3.12 with numpy; run any script from the python/ folder, e.g.
         python math_model.py
         python analysis.py

The scripts are self-contained and reproduce every number quoted in the text,
tables and figures. The reference parameter set is defined in math_model.py
and in the defparams() function of fig_mdpi.m.
