Reduce the year to a grid
A rate can only see the month and the hour, so two hours in the same cell will always be charged the same price. The optimizer never needs the individual hours again. It adds them up once into 288 cells, keeping just enough totals in each to score any grouping of cells instantly.
The tail is what makes the problem interesting: hours () cost more than $500/MWh, and the worst reached , nearly all of it capacity cost. The top 1% of hours hold of the squared gap between cost and a flat price, and they’re scattered too widely for any fixed schedule to isolate.