Optimization
The Optimizer Oracle computes a reference optimal dispatch for a benchmark case, so agent actions can be scored against a known optimum rather than only against the unoptimised baseline. Every solve returns a full per-generator dispatch, the binding constraints at the optimum, and a structured single-action projection compatible with the rest of the evaluation pipeline.
Objectives
Pick the objective that matches what you want the agent to be judged on. Units and uncertainty semantics differ — this matters when you read the result bands (see Agreement bands below).
- min_violations — minimise total MW of constraint slack (branch overloads + generator-limit violations). Units: MW. The solver and resimulator measure the same quantity, so the uncertainty band on the objective is exact.
- min_generation_cost — minimise total $/h of generation cost using each generator's cost curve. The objective is monetary, but the solver↔resim disagreement is in MW, so the band shown on the chart is indicative, not a dollar uncertainty.
- min_load_shed — minimise MW of unserved load when the system is stressed. Units: MW; band is exact.
- min_redispatch_from_baseline — minimise the L1 norm of dispatch change Σ|Δpmw| from the baseline. MW-dimensioned but aggregates differently than Δ, so the band is indicative.
Engines
- DC-OPF (in-Worker) — linearised power flow with a B-θ formulation. Fast, always available, no external service. The default for most cases.
- AC-OPF — full nonlinear AC optimal power flow via the external simulation service (PyPSA / pandapower). Higher fidelity, requires the service to be reachable.
- SCOPF — security-constrained OPF: AC-OPF with N−1 contingency constraints. Most expensive; also via the external service.
- auto — try the preferred tier and fall back to DC-OPF if the external solver is unreachable.
Agreement bands
Every solve is independently re-simulated. The disagreement Δ = |solver_violations_mw − resim_violations_mw| measures how closely the solver's reported state matches an independent DC-flow check on the same dispatch.
Tolerance verdict
Δ is compared against a numerical-noise tolerance (LP solver precision + DC-flow rounding). The badge shows ✓ when Δ ≤ tolerance, ⚠ otherwise.
Objective chart band (±Δ)
±Δ on the Optimum bar. Exact for MW-unit objectives, indicative for monetary or aggregated objectives — see Objectives for the per-objective semantics.
Dispatch chart whiskers (±Δ / N)
±(Δ / N) upper-bound smear distributed across N generators. This is not a per-generator confidence interval: a single deterministic solve has no per-generator variance, so the whisker only bounds how much of the total disagreement could be attributed to any one generator. Disappears entirely when Δ = 0.
Click any band badge or chart info icon to open the Calculation details modal — it shows the exact Δ subtraction, the tolerance check, the whisker math, and objective-specific caveats.
How to read the charts
- Objective improvement — baseline vs optimum for the chosen objective. Lower is better for all current objectives.
- Optimal dispatch by generator — per-generator MW at the optimum, with the agreement whiskers described above.
- Stressed branches — branches whose loading binds at the optimum (overload slack > 0). A short list here means the case is tightly constrained and the agent has little slack.
- Summary comparison — objective value, total violations, and solve time across saved runs for the same case, so you can compare engines or objectives side-by-side.
Saving and reusing optima
Use Save run on the Optimizer page to persist a solve (case + objective + engine + full dispatch + metadata). Saved optima are user-scoped (RLS) and reappear in the runs list so you can validate agent actions against them later via Validate action.
Common pitfalls
- Infeasible — the case has no dispatch that meets all constraints with the available generation. Switch objective to
min_load_shedor relax the case. - External solver unreachable — AC-OPF / SCOPF require the simulation service. Use
autoor fall back todc_opf. - Large Δ with ⚠ — solver and resim disagree beyond tolerance. Usually means the solver returned a status other than
optimal(timeout, numerical issues). Re-solve, or switch engine.