Skip to main content

Energy Systems

Generation · Grid · Storage · Trading

Every grid operator solves unit commitment daily to decide which generators to start and stop, then runs economic dispatch in real time to balance load at minimum cost. As renewable penetration grows, battery storage scheduling under price uncertainty becomes a third critical optimisation layer — three tightly coupled problems that keep the lights on worldwide.

Engineering Context

Unit commitment (UC) determines which generating units to turn on or off over a planning horizon — typically 24 hours in hourly intervals. Starting a thermal generator incurs a start-up cost and requires minimum up/down time constraints. The binary on/off decisions make UC a mixed-integer program (MIP). Modern ISOs solve UC instances with thousands of generators and transmission constraints; here we demonstrate a compact 4–8 unit formulation that captures the essential combinatorial structure.

Problem type: Mixed-integer programming (MIP). Decide binary on/off status and continuous power output for each generator in each hour to meet demand at minimum total cost (fuel + start-up), subject to minimum up/down times, ramp rates, and spinning reserve.

Mathematical Formulation min Σt Σi [c_i(p_it) · u_it + SC_i · v_it]
s.t. Σi p_it = D_t   ∀ t // demand balance
     P_imin · u_itp_itP_imax · u_it // capacity bounds
     v_itu_it - u_i,t-1 // start-up indicator
     u_it ∈ {0,1}, p_it ≥ 0

UC Solver

6
Priority List
Lagrangian Relaxation
Adjust parameters and click Solve.
Evidence Base
  • Garver, L.L. (1962). Power generation scheduling by integer programming — development of theory. IEEE Transactions on Power Apparatus and Systems, 81(3), 730–735. Published
  • Sheble, G.B. & Fahd, G.N. (1994). Unit commitment literature synopsis. IEEE Transactions on Power Systems, 9(1), 128–135. Published
Engineering Context

Once unit commitment fixes which generators are online, economic dispatch (ED) allocates load among committed units every 5–15 minutes. Each generator has a quadratic cost curve c(p) = a + bp + cp². The equal incremental cost principle — setting marginal cost λ equal across all units — yields the global optimum for this convex QP. Steinberg & Smith formalised this in 1943; it remains the backbone of real-time grid operation worldwide.

Problem type: Convex quadratic programming (QP). Minimise total generation cost by allocating demand across committed generators, subject to capacity limits and a power balance constraint. Three scenarios with 4, 5, and 6 units demonstrate scaling.

Mathematical Formulation min Σi (a_i + b_i p_i + c_i p_i²)
s.t. Σi p_i = D // demand balance
     P_iminp_iP_imax   ∀ i // capacity
// KKT: b_i + 2c_i p_i = λ (equal incremental cost)

Dispatch Solver

5
500
Lambda Iteration
Gradient Descent
Adjust parameters and click Solve.
Evidence Base
  • Steinberg, M.J. & Smith, T.H. (1943). Economy loading of power plants and electric systems. John Wiley & Sons. Published
  • Wood, A.J. & Wollenberg, B.F. (1996). Power Generation, Operation, and Control, 2nd ed. Wiley-Interscience. Published
Engineering Context

Battery energy storage systems (BESS) earn revenue through price arbitrage: charge when electricity is cheap, discharge when it is expensive. Given a 24-hour price forecast, the operator solves a linear program to maximise profit subject to energy capacity, power rating, and round-trip efficiency. Sioshansi et al. (2009) showed that even with imperfect forecasts, LP-based scheduling captures 85–95% of the theoretical arbitrage value for grid-scale lithium-ion and flow batteries.

Problem type: Linear programming (LP). Decide hourly charge/discharge power for a battery over 24 hours to maximise arbitrage profit, subject to state-of-charge limits, power rating, and round-trip efficiency.

Mathematical Formulation max Σt π_t · (d_t - c_t)
s.t. E_{t+1} = E_t + η c_t - d_t // energy balance
     0 ≤ E_tEmax // SoC limits
     0 ≤ c_tPmax,   0 ≤ d_tPmax // power rating
// π_t = electricity price at hour t

Storage Solver

100
90%
LP Optimal
Greedy Threshold
Adjust parameters and click Solve.
Evidence Base
  • Sioshansi, R., Denholm, P., Jenkin, T. & Weiss, J. (2009). Estimating the value of electricity storage in PJM: Arbitrage and some welfare effects. Energy Economics, 31(2), 269–277. Published

Explore More Applications

See how the same mathematical families — integer programming, convex optimisation, linear programming — apply across climate science, healthcare, logistics, and agriculture.

Portfolio
ESC