Applications of Stochastic Programming in the Energy Industry Chonawee Supatgiat Research Group Enron Corp. INFORMS Houston Chapter Meeting August 2, 2001
Outline Stochastic Program Colombia Hydro-thermal System –Model –Solution techniques Nested Decomposition Abridged Nested Decomposition –Example result Fuel Inventory and Electric Generation –Model –Solution techniques Bender Decomposition Lagrangian Relaxation –Example result
Stochastic Program Mathematical program where some of the data incorporated into the objective or constraints is uncertain Recourse program: some decisions or recourse actions can be taken after uncertainty is disclosed x y
Two-Stage Stochastic Linear Program Stage 1 Stage 2 x y
Extensive Form x y( y( y(
Multi-Stage Stochastic Linear Program Q N+1 (x N ) = 0, for all x N
Application 1 Colombia Long-Term Power Planning (joint work with John Birge, Northwestern University)
Power System Area 3 Area 1 Area 2 Colombia System: 8 areas 47 hydro units 70 thermal units 28 fuel types hydro generation ~50%
Problem Central Dispatch Planning Problem –Colombia government need to determine capacity payment –Socially optimal dispatch planning of Colombia hydro-thermal generating units –Decision: in each period, water release (hydro) and generation (thermal), and export/import power flow between areas –Stochastic water inflow in each location
Model for Colombia Power Objective: –minimize total generation costs + outage penalty + alert water level penalty subject to the operating constraints: –meet load constraints –water balance constraints –thermal capacity constraints –hydro maximum/minimum flow constraints –export/import capacity constraints –minimum/maximum reservoir level
Inflow Scenario Tree: Serial Correlation Stage 1 Stage 2Stage 3
Multi-Stage Stochastic Linear Program Q N+1 (x N ) = 0, for all x N
Solution Technique: Nested Decomposition Basic Idea Solve each subproblem separately x t is passed forward to the Stage t+1 subproblem Function Q t is passed backward to Stage t-1 subproblem Updating x and functions Q until converge Q 3 (x 2, ) Q 2 (x 2, ) x1x1 x2x2
Feasibility when Passing Forward If x t * from Stage t subproblem makes a subproblem at Stage t+1 infeasible Stage t+1 subproblem sends a message to Stage t that this x t * is a bad solution xtxt
Nested Decomposition Forward Pass: –Starting at the root node and proceeding forward through the scenario tree, solve each node subproblem –Add feasibility cuts as infeasibilities arise Backward Pass –Starting in top node of Stage t = N-1, use optimal dual values in descendant Stage t+1 nodes to construct new optimality cut. Repeat for all nodes in Stage t, resolve all Stage t nodes, then t t-1. Repeat until converge x Q t (x t-1 )
Nested Decomposition (ND) v.s. Dynamic Programming (DP) DP: starting from the last nodes and evaluating Q for all possible values of x move backward when get complete information of Q ND: evaluating Q only for one value of x in each iteration move forward to generate new value of x x Q t (x t-1 ) Q
Abridged Nested Decomposition Incorporates sampling into the general framework of Nested Decomposition Assumes –relatively complete recourse: a feasible solution exists for every feasible solution in the previous stage –serial independence: the stochastic data in each stage is independent of the realized values in the previous stages Samples both the subproblems to solve and the solutions to continue from in the forward pass
Abridged Nested Decomposition 4.For each selected Stage t-1 subproblem solution, sample Stage t subproblems and solve selected subset 5.Sample Stage t subproblem solutions and branch in Stage t+1 only from selected subset Forward Pass 1.Solve root node subproblem 2.Sample Stage 2 subproblems and solve selected subset 3.Sample Stage 2 subproblem solutions and branch in Stage 3 only from selected subset (i.e., nodes 1 and 2)
Abridged Nested Decomposition Backward Pass Starting in first branching node of Stage t = N-1, solve all Stage t+1 descendant nodes and construct new optimality cut for all stage t subproblems. Repeat for all sampled nodes in Stage t, then repeat for t = t - 1
NDUM and CPLEX v. No. of Scenarios 2.8 hrs 19.4 hrs
Example Results (selected plants) MWh
Example: Hydro Generation
Example: Thermal Generation
Example: Dual Prices
Example: Max MW (selected plants)
Application 2 Energy Marketer with Gas Storage and Generators (joint work with Samer Takriti and Lilian Wu, IBM Research)
Coordinating Fuel Inventory with Electricity Generation Gas storage Gas-Turbine generation plants Power market Natural gas market Gas customers buy sell gas demand fuel sell power Energy marketer
Properties of Gas Turbine Generators Minimum up time Minimum down time Start up cost Quadratic gas consumption gas consumption = a + b (generation) + c (generation) 2 Operating level Sell power at market (bid) price
Gas Storage Buy gas at market ask price, sell gas at market bid price Storage holding cost Inject/withdraw fees Inject/withdraw limits Storage capacity Gas loss
Randomness and Decisions Have multiple forecasts for natural gas demand, natural gas prices, electricity prices Observe spot gas (bid/ask) prices, spot electricity (bid) price, and current gas demand State: current gas storage level, status of the electric generators Decide on the amount to buy/sell natural gas and the electricity generation
Scenario Tree p, g, d
Full Model Large stochastic mixed integer program Max total discounted expected future revenue from gas and power selling minus future operation costs from gas storage and generators and gas buying cost S.t. Minimum up/down time constraints (integer) Min/max power generation levels (conditional) Gas to power conversion equation (integer & possibly non-linear) Gas inventory balance constraints Gas storage capacity Gas injection/withdraw capacity
Minimum up/down time constraints (integer) Min/max power generation levels (conditional) Gas to power conversion equation (integer & non-linear) Gas inventory balance constraints Gas storage capacity Gas injection/withdraw capacity Bender Decomposition Max total discounted expected future revenue from gas and power selling minus future operation costs from gas storage and generators and gas buying cost S.t.
Bender Decomposition First Stage: Unit commitment problem: stochastic integer program Second Stage: Inventory problem: stochastic linear program Bender cuts To be solved by simple LP integer conditional Integer & non-linear
Lagrangian Relaxation of the Bender cuts Max L( ), Unit Commitment Problem Gen 1 Gen 2 Gen 3 Gen 1 Gen 2 Gen 3
Max i L i ( )+ b where Lagrangian Relaxation of Unit Commitment Problem to be solved by stochastic DP Individual generator problem Vector of avg. gas price of generator i in each node
Solution Technique Summary Pure B&B –Use OSL B&B to solve the full problem in one shot Bender + B&B –Decompose into two stages –Solve first stage by B&B and second stage by OSL LP Bender + Lagrangian –Decompose into two stages –Relax the Bender cuts and decompose the first stage. Solve its sub-problems by DP –Solve the second stage by OSL LP
Numbers of Bender’s cuts needed are between 7-38