This 2D companion renders the same budget-constrained greedy allocation as the 3D city twin, but as the chart real analysts actually use to plan retrofit programs: a marginal abatement cost curve (MACC). Every building becomes one bar — width along the x-axis is its annual CO2 avoided (tons/yr), height is its cost-effectiveness (dollars spent per ton/yr avoided). Sorting all bars from cheapest to most expensive and stacking them left-to-right produces the classic staircase: the curve's total width is the city's full abatement potential, and a vertical budget line marks how far this year's spending reaches into that curve.
annual CO2(building) = floorArea × EUI × gridEmissionFactor
height(building) = cost(n) / (CO2 avoided per year) [$ per t/yr — MACC bar height]
cost(n) = cost(1) × n^(log2(1 − LR)) [Wright's-law learning curve]
pick bars left-to-right (cheapest first) until budget exhausted
The bottom-left panel plots the Wright's-law learning curve directly: unit retrofit cost against cumulative retrofits completed, with a marker at every building actually retrofitted so far — bulk procurement drives real cost down along that curve exactly the same way it does for solar panels and EV batteries. The bottom-right strip chart tracks cumulative CO2 avoided against simulated year, the running MRV-style impact tally.
- Cost-effectiveness first sorts the MACC by height ascending every year — provably the optimal greedy solution for a fixed annual budget (continuous-knapsack), so the budget line always cuts the curve at its lowest possible total cost.
- Oldest first and Random order instead order the bars by age or by a fixed random draw, so the MACC's cheap-first staircase shape breaks apart — the budget line then skips over cheaper, more effective buildings while some 100+ dollar-per-ton bars get funded early. Watch how much of the curve stays unswept at a given year compared to cost-effectiveness mode.