mismatch: 0 MW
Bar height = plant output Pi
Blue plane = demand target
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.
This simulation shows how a real optimization algorithm — Lagrangian dual ascent — decides how much power each generator on an electrical grid should produce so that total fuel cost is minimized while exactly meeting demand. Every generator has its own quadratic cost curve; the algorithm iteratively adjusts a single shared "price" signal λ until the sum of each plant's price-optimal output matches the required demand, which is exactly the equal-marginal-cost rule real grid operators use for economic dispatch. Change demand, change the step size, randomize the plants' cost curves, and watch the 3D bars converge to the cost-minimizing split live.