0

Economic Dispatch

Fresh

Single-turn power-systems economic dispatch RL environment for verifiers / Prime Intellect Environments Hub. Closed-form merit-order ground truth, ...

Type
RL Env
Publisher
Jwilksbooth
Runtime
single-turn
License
mit
Size
v0.1.3
Published
Jul 2026

Cite

Notes

Only stored in your browser.

economic-dispatch

Single-turn power-systems economic dispatch RL environment for the verifiers library / Prime Intellect Environments Hub. Faithful rebuild of the June 2026 design; the control rung of a three-environment vertical.

Task

Given online generators — each with a linear cost ($/MWh) and operating range [Pmin, Pmax] — and a system load (MW), output the least-cost dispatch as JSON: {"G1": 12.3, "G2": 80.0, ...} such that total generation equals load and every unit respects its range.

Ground truth

For linear costs with box constraints and one balance equality, the optimum is the closed-form merit-order fill (commit every Pmin, then buy cheapest headroom first). Cross-checked against scipy.optimize.linprog (HiGHS): 200/200 instances, 0 mismatches.

Rewards

FunctionMeasuresWeight
reward_formatParseable JSON naming exactly the right units0.10
reward_power_balancesum(MW) matches load; linear falloff0.30
reward_limitsFraction of units within [Pmin, Pmax]0.20
reward_costoptimal/actual cost ratio, hard-gated on feasibility0.40

The feasibility gate on reward_cost is the anti-reward-hacking mechanism: dumping all load on the cheapest unit scores 0 on cost regardless of how cheap it looks. Verified in tests/test_validation.py (6 attack-gate tests, all passing — including NaN/Infinity JSON literals and tolerance-rent under-generation, which is settled at a 2× imbalance penalty price).

Baseline results

50 instances, 1 rollout each, July 2026:

Modeltotalformatbalancelimitscost
claude-haiku-4-50.8611.0001.0000.9040.700
claude-opus-4-81.0001.0001.0001.0001.000

Read this honestly: frontier models saturate this task — pure merit-order dispatch is solved reasoning. This environment is the baseline rung of the vertical: useful for small-model training/eval and as the control condition proving what its successor breaks. The same claude-opus-4-8 that scores a perfect 1.000 here drops to 0.901 — and claude-haiku-4-5 to 0.520 — on dcopf-grid-verifiers, which adds transmission-network physics so that merit-order reasoning is provably infeasible on 46% of instances. The delta between the two environments isolates exactly one skill: congestion-aware dispatch.

Usage

from economic_dispatch import load_environment
env = load_environment(num_examples=300)
N_INSTANCES=200 python tests/test_validation.py
vf-eval economic-dispatch -m <model> -n 50

The vertical

This is the control rung. Two successors defeat exactly the merit-order reasoning it rewards:

  • dcopf-grid-verifiers — DC optimal power flow with line limits; 46% of instances make the network-unconstrained merit-order dispatch infeasible (congestion / space).
  • multiperiod-dispatch — ramp-limited multi-period dispatch; 74% defeat per-period merit order (ramp coupling / time).

Next: N-1 contingency-secure dispatch; LMP/nodal pricing verified against LP duals.