Every building in the grid has a floor area, an age-dependent energy-use intensity (EUI), and a retrofit cost proportional to its size. Each simulated year the model spends the annual budget greedily on the highest-priority unretrofitted buildings until the money runs out — the classic marginal-abatement-cost-curve heuristic used in real municipal retrofit programs:
annual CO2(building) = floorArea × EUI × gridEmissionFactor
score(ROI mode) = (CO2 avoided per year) / (retrofit cost)
pick buildings by score, descending, until budget exhausted
Retrofit cost itself falls as more buildings get done — bulk procurement and contractor learning follow Wright's law, the same power-law learning curve used for solar panels and EV batteries:
cost(n) = cost(1) × n^(log2(1 − LR))
n = number of retrofits completed so far
LR = learning rate — cost drop per doubling of volume
A retrofitted building keeps saving energy (and emissions) every subsequent year, so the cumulative CO2-avoided readout is the running sum of all retrofitted buildings' annual savings accrued since their retrofit year — exactly how a city's measurement-and-verification (MRV) system would track program impact over time.
- Cost-effectiveness first retrofits the buildings with the best CO2-per-dollar first, which is provably optimal for a fixed annual budget (a continuous-knapsack greedy solution).
- Oldest first and Random order are common real-world alternatives — political or logistical constraints often override pure cost-effectiveness — and both reach 100% coverage slower per ton of CO2 avoided.