- generation of kind k (solar, wind, gas CC, gas CT); solar and wind include curtailed output [MW]
- battery discharge [MW]
- battery charge [MW]
- grid imports, at most the import limit [MW]
- grid exports, at most the export limit, only when the price is ≥ 0 [MW]
- unmet (unserved) demand [MW]
- curtailed solar and wind (made, then thrown away) [MW]
- CAISO 2024 day-ahead hourly price at your utility's load point (PG&E, SCE or SDG&E DLAP); sites outside SCE and SDG&E territory, municipal utilities included, use the PG&E price [$/MWh]
- import delivery adder (transmission access + delivery), default 20 [$/MWh]
- gas heat rate at full load (ATB 2025): CC 6.087, CT 9.717 [MMBtu/MWh]
Dispatch order. A surplus hour charges the battery, then exports (if the price is not negative), then curtails. A deficit hour discharges the battery, then runs firm supply in merit order of this hour's cost: gas combined cycle always before the gas peaker, and imports jump ahead of a gas tier only when strictly cheaper. Whatever is still missing is unmet. At the default $3.65/MMBtu gas price, CC costs ≈ $24.3/MWh and CT ≈ $44.2/MWh to run.
Grid charging (on by default when grid-connected). In a “cheap” hour, where per MWh is below the value of stored energy over the next 24 h, the battery may also charge from spare import capacity. That uses perfect day-ahead foresight (an upper bound), and the year is kept only if it costs no more than the same year without grid charging, with unserved energy valued at $1,000/MWh. The year is cyclic: a first pass from 50% charge finds the Dec 31 state of charge, and the real pass starts from it.
Carbon is not priced on imports because CAISO prices already include California cap-and-trade costs. Results are rounded to 0.001 MW, so the balance holds to within a few kW.
Used in: Simulate tab (dispatch chart and totals); checked for every hour of every preset by backend/tests/test_contract.py.
Code: backend/app/simulate/dispatch.py, backend/app/simulate/engine.py