Least-cost power dispatch, within the physics
An electric grid must meet demand every moment at least cost, without pushing any line, voltage, or generator past its limit — a capacitated optimization problem with the same shape as the routing, scheduling, and dispatch problems BIS models for clients. Here it is built end to end in AMPL on the public IEEE test systems. BIS has no power-systems client, and that is the point: what follows is the method, not a résumé, and every number is reproducible from the linked repository.
A dispatch problem, in a client’s terms
Optimal power flow decides how much real and reactive power each generator produces, and the voltage it holds, to serve demand at least cost while respecting every thermal, voltage, and angle limit. Strip the domain away and it is the decision BIS builds engines for every day: allocate scarce capacity across a network, cheaply, without breaking a constraint. On a 40,000-location routing engine that discipline cut the fleet by 20%; here it produces the cheapest safe dispatch. The modeling is the same craft.
Two models, one honest relationship — written in AMPL
The fast model, DC‑OPF, assumes flat voltages and no reactive power; it is convex and clears in milliseconds. The true model, AC‑OPF, keeps the full physics — reactive power, voltages, losses, transformer taps, and apparent-power limits at both ends of every line. It is nonconvex, so a solver reporting “optimal” has found a local optimum — which is why BIS also computes a convex lower bound to certify how close that is. AMPL keeps the model readable and the data separate, so a customer’s own team can read every line and change a limit without touching the engine.
minimize cost:
sum {k in GEN} (c2[k]*p[k]^2 + c1[k]*p[k] + c0[k]);
subject to balance {i in BUS}: # power in = power out
sum {k in GEN_AT[i]} p[k] - Pd[i] - Gs[i]
= sum {l in BR_FROM[i]} f[l] - sum {l in BR_TO[i]} f[l];
subject to flow_max {l in BRANCH}: f[l] <= rate_a[l]; # thermal limit
subject to angle_diff {l in BRANCH}:
angmin[l] <= theta[f_bus[l]] - theta[t_bus[l]] <= angmax[l];Reproduces the published answer, then survives the real physics
Trust starts with reproducing a known result. On all four IEEE systems the AC objective matches the published PGLib‑OPF baseline to a relative error of 1×10⁻⁵ or better, and the convex bound reproduces the published optimality gap to the decimal.
| Case | Buses | AC objective ($/h) | Published | rel. err | SOC gap |
|---|---|---|---|---|---|
| IEEE 14 | 14 | 2,178.08 | 2,178.1 | 9.2e-6 | 0.11% |
| IEEE 30 | 30 | 8,208.52 | 8,208.5 | 2.4e-6 | 18.84% |
| IEEE 57 | 57 | 37,589.34 | 37,589.0 | 9.0e-6 | 0.16% |
| IEEE 118 | 118 | 97,213.61 | 97,214.0 | 4.0e-6 | 0.9% |
An independent power-flow check — written in NumPy, not AMPL — confirms every reported solution satisfies Kirchhoff’s laws to 2.8e⁻⁶ p.u. Then the judgment call: take the fast DC dispatch, hand it to the true AC physics, and see what the linear model could not.
Derate the busiest IEEE 14 line by 10% and re-solve: cost rises 2178 → 2859 $/h and the nodal price splits across the now-binding line — 7.9 vs 44.9 $/MWh. Prices diverging across a constraint is exactly what an operator expects; seeing it is the explainability check.
Built to run in your stack, and to be handed over
- 01
Frame
Name the real decision and what “feasible” must mean to the operator — before a line of model is written.
- 02
Model
Write it in AMPL with data separate from model and check statements guarding the inputs, so the customer’s team can read and change it.
- 03
Prove
Reproduce a known answer, then confirm the solution survives the true physics and bound its optimality.
- 04
Ship
Run it in your stack as a service with solve budgets and a status your systems can act on — not a notebook.
- 05
Own it
Hand over the repo, the tests, and a runbook. Your team runs and maintains it without us.
The patterns behind a 5‑day‑to‑5‑minute model deployment at an insurer, and an in-house distance service that cut roughly $60K/month, apply directly: a containerized amplpy service, solve budgets, a solver status your systems can act on, and results versioned with the input snapshot.
BIS builds the models AMPL license customers need — a formulation reviewed against the literature, made reproducible, and handed to the customer’s team to own. If a customer needs model development, this is what they get. Referrals welcome.
Have a decision worth modeling?
We start with a conversation, prove the value on a focused proof-of-concept with your real data, then ship it — measurable ROI, not a model demo.
