42
Applications of Stochastic Applications of Stochastic Programming in the Energy Programming in the Energy Industry Industry Chonawee Supatgiat Research Group Enron Corp. INFORMS Houston Chapter Meeting August 2, 2001

Applications of Stochastic Programming in the Energy Industry

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: Applications of Stochastic Programming in the Energy Industry

Applications of Stochastic Applications of Stochastic Programming in the Energy IndustryProgramming in the Energy Industry

Chonawee SupatgiatResearch Group

Enron Corp.

INFORMS Houston Chapter Meeting

August 2, 2001

Page 2: Applications of Stochastic Programming in the Energy Industry

OutlineOutline

• 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

Page 3: Applications of Stochastic Programming in the Energy Industry

Stochastic ProgramStochastic 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

Page 4: Applications of Stochastic Programming in the Energy Industry

Two-Stage Stochastic Linear ProgramTwo-Stage Stochastic Linear Program

0

..

min

11

1

x

hxWts

xQxc

,Q xprobxQ

0

..

min,Q

22

2

y

xThyWts

ycx

Stage 1 Stage 2

x y

Page 5: Applications of Stochastic Programming in the Energy Industry

Extensive FormExtensive Form

,...,1

,...,1

0

,0

,

..

min

22

11

21

x

y

hyWxT

hxWts

ycprobxc

x y(

y(

y(

Page 6: Applications of Stochastic Programming in the Energy Industry

Multi-Stage Stochastic Linear ProgramMulti-Stage Stochastic Linear Program

0

..

min

1

111

1211

x

hxWts

xQxc

tkt

ktkatktktkatt xprobxQ,

,,1,,,1 ,Q

0

..

min,Q

,

,1,1,,

,1,,,,1,

kt

katkttkttktt

kttktkttktkatkt

x

xThxWts

xQxcx

Stage 1 Stage 2 Stage 3

x1 x32 3x2

• QN+1(xN) = 0, for all xN

Page 7: Applications of Stochastic Programming in the Energy Industry

Application 1Application 1

Colombia Long-Term Power Colombia Long-Term Power PlanningPlanning

(joint work with John Birge, Northwestern University)(joint work with John Birge, Northwestern University)

Page 8: Applications of Stochastic Programming in the Energy Industry

Power SystemPower System

Area 3

Area 1 Area 2

Colombia System:• 8 areas• 47 hydro units• 70 thermal units• 28 fuel types• hydro generation ~50%

Page 9: Applications of Stochastic Programming in the Energy Industry

Historic Inflows in some locations (m3/s)

0

500

1000

1500

2000

2500

1-19

90

4-19

90

7-19

90

10-1

990

1-19

91

4-19

91

7-19

91

10-1

991

1-19

92

4-19

92

7-19

92

10-1

992

1-19

93

4-19

93

7-19

93

10-1

993

1-19

94

4-19

94

7-19

94

10-1

994

1-19

95

4-19

95

7-19

95

10-1

995

1-19

96

4-19

96

7-19

96

10-1

996

1-19

97

4-19

97

7-19

97

10-1

997

month

Page 10: Applications of Stochastic Programming in the Energy Industry

Historic inflows in one location

0

200

400

600

800

1000

1200

1 2 3 4 5 6 7 8 9 10 11 12month

m3/

s19751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997

Page 11: Applications of Stochastic Programming in the Energy Industry

ProblemProblem

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

Page 12: Applications of Stochastic Programming in the Energy Industry

Model for Colombia PowerModel 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

Page 13: Applications of Stochastic Programming in the Energy Industry

Inflow Scenario Tree: Serial CorrelationInflow Scenario Tree: Serial Correlation

Stage 1 Stage 2 Stage 3

Page 14: Applications of Stochastic Programming in the Energy Industry

Multi-Stage Stochastic Linear ProgramMulti-Stage Stochastic Linear Program

0

..

min

1

111

1211

x

hxWts

xQxc

tkt

ktkatktktkatt xprobxQ,

,,1,,,1 ,Q

0

..

min,Q

,

,1,1,,

,1,,,,1,

kt

katkttkttktt

kttktkttktkatkt

x

xThxWts

xQxcx

Stage 1 Stage 2 Stage 3

x1 x32 3x2

• QN+1(xN) = 0, for all xN

Page 15: Applications of Stochastic Programming in the Energy Industry

Solution Technique: Nested DecompositionSolution Technique: Nested Decomposition

Basic Idea• Solve each subproblem separately

• xt is passed forward to the Stage t+1 subproblem• Function Qt is passed backward to Stage t-1 subproblem• Updating x and functions Q until converge

0

..

min,Q

,

,1,1,,

,1,,,,1,

kt

katkttkttktt

kttktkttktkatkt

x

xThxWts

xQxcx

Q3(x2,)

Q3(x2,)Q2 (x2,)

x1

x2

Page 16: Applications of Stochastic Programming in the Energy Industry

Feasibility when Passing ForwardFeasibility when Passing Forward

• If xt* from Stage t subproblem makes a subproblem at Stage t+1 infeasible

• Stage t+1 subproblem sends a message to Stage t that this xt* is a bad solution

xt

Page 17: Applications of Stochastic Programming in the Energy Industry

Nested DecompositionNested 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

Qt(xt-1)

Page 18: Applications of Stochastic Programming in the Energy Industry

Nested Decomposition (ND) v.s. Nested Decomposition (ND) v.s. Dynamic Programming (DP)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

Qt(xt-1)

Q

Page 19: Applications of Stochastic Programming in the Energy Industry

Abridged Nested DecompositionAbridged 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

Page 20: Applications of Stochastic Programming in the Energy Industry

Abridged Nested DecompositionAbridged 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

1

2

3

4

5

Stage 1 Stage 2 Stage 3 Stage 4 Stage 5

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)

Page 21: Applications of Stochastic Programming in the Energy Industry

Abridged Nested DecompositionAbridged Nested Decomposition

1

2

3

4

5

Stage 1 Stage 2 Stage 3 Stage 4 Stage 5

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

Page 22: Applications of Stochastic Programming in the Energy Industry

NDUM and CPLEX v. No. of ScenariosNDUM and CPLEX v. No. of Scenarios25598533

1279370000

0

10000

20000

30000

40000

50000

60000

70000

80000

0 10 20 30 40 50 60

# scenarios

Ru

n t

ime

(se

con

ds)

NDUM

CPLEX

#stagesscenarios/

stage #variables #constraints

6 1 88,197 67,162 6 2 174,952 133,222 6 5 435,217 331,402 6 10 868,992 661,702 6 20 1,736,542 1,322,302 6 23 1,996,807 1,520,482 6 50 4,339,192 3,304,102

2.8 hrs

19.4 hrs

Page 23: Applications of Stochastic Programming in the Energy Industry

Example Results (selected plants)Example Results (selected plants)

12

34

56

78

910

1112

13

Chivor

Guavio

Tebsa21

Tebsa22Tebsa24

TebsaB1Flores1

Flores2Flores3Proele1Proele2

0

100000

200000

300000

400000

500000

600000

700000

period

Interest plants

Chivor

Guavio

Tebsa21

Tebsa22

Tebsa24

TebsaB1

Flores1

Flores2

Flores3

Proele1

Proele2

MWh

Page 24: Applications of Stochastic Programming in the Energy Industry

hydro generation (MWh)

0

500000

1000000

1500000

2000000

2500000

3000000

1 2 3 4 5 6 7 8 9 10 11 12 13

period

Urra1TunjitaTronerasTencheSanfranciscoSanCarlosSalvajinaSalto2Salto1RiomayoRiogrande1QuebradonaPrado4PradoPorce2PlayasParaisoPajaritoNiquiaNechiMunaMirafloresLatasajeraLagunetaLaguacaJaguasInsulaGuavioGuatapeGuadalupe4Guadalupe3Florida2EstrellaEsmeraldaDoloresDesanfranColegioChivorChinchinaCanoasCampoalegreCalima1CalderasbOMB_MUBetaniaBajoanchicayaAltoanchicaya

Example: Hydro Generation

Page 25: Applications of Stochastic Programming in the Energy Industry

Example: Thermal GenerationExample: Thermal GenerationThermal generation (MWh)

0

500000

1000000

1500000

2000000

2500000

1 2 3 4 5 6 7 8 9 10 11 12 13

period

Ballena1 Ballena2Barranca1 Barranca2Barranca3 Barranca4Barranca5 Barranqui1Barranqui3 Barranqui4Cadafe Cartagena1Cartagena2 Cartagena3Cospique1 Cospique2Cospique3 Cospique4Cospique5 Chinu4Chinu5 Chinu6Chinu7 Chinu8Dorada Flores1Flores2 Flores3Guajira1 GualandayLaunion1 Launion2Launion3 Launion4Menced MencvcMenchb MenchecMenepm MennorMenth MerrilOcoa OxyPaipa1 Paipa2Paipa3 Paipa4Palenque3 Proele1Proele2 SantanderSierra1 Sierra2Tasajero TCentro1TCentro2 TCentro3Tebsa21 Tebsa22Tebsa24 TebsaB1Termoemcali TermovalleTv1 Tv2Zipaemg2 Zipaemg3Zipaemg4 Zipaemg5

Page 26: Applications of Stochastic Programming in the Energy Industry

Example: Dual PricesExample: Dual PricesMeet load dual area 1 ($/MWh)

0

2

4

6

8

10

12

14

16

18

20

1 2 3 4 5 6 7 8 9 10 11 12 13

period

mode1mode2mode3mode4mode5

Page 27: Applications of Stochastic Programming in the Energy Industry

Example: Max MW (selected Example: Max MW (selected plants)plants)

Max MW in Month

0

500

1000

0 5 10 15

Month

MW

TebsaB1Calima1GuavioSanCarlosMerrilTermoemcali

Page 28: Applications of Stochastic Programming in the Energy Industry

Application 2Application 2

Energy Marketer with Gas Storage Energy Marketer with Gas Storage and Generatorsand Generators

(joint work with Samer Takriti and Lilian Wu, IBM Research)(joint work with Samer Takriti and Lilian Wu, IBM Research)

Page 29: Applications of Stochastic Programming in the Energy Industry

Coordinating Fuel Inventory with Electricity Coordinating Fuel Inventory with Electricity GenerationGeneration

Gas storage

Gas-Turbinegeneration plants

Power market

Natural gas market

Gas customers

buy

sell

gas demand

fuel

sell power

Energy marketer

Page 30: Applications of Stochastic Programming in the Energy Industry

Properties of Gas Turbine GeneratorsProperties of Gas Turbine Generators

• Minimum up time

• Minimum down time

• Start up cost

• Quadratic gas consumptiongas consumption = a + b (generation) + c (generation)2

• Operating level

• Sell power at market (bid) price

Page 31: Applications of Stochastic Programming in the Energy Industry

Gas StorageGas 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

Page 32: Applications of Stochastic Programming in the Energy Industry

Randomness and DecisionsRandomness 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

Page 33: Applications of Stochastic Programming in the Energy Industry

Scenario TreeScenario Tree

p, g, d

p, g, d

p, g, d

p, g, d

p, g, d

p, g, d

p, g, d

p, g, d

p, g, d

p, g, d

p, g, d

p, g, d

p, g, d

Page 34: Applications of Stochastic Programming in the Energy Industry

Full ModelFull 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 constraintsGas storage capacityGas injection/withdraw capacity

Page 35: Applications of Stochastic Programming in the Energy Industry

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 DecompositionBender DecompositionMax 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.

Page 36: Applications of Stochastic Programming in the Energy Industry

Bender DecompositionBender Decomposition• First Stage: Unit commitment problem: stochastic integer

program

• Second Stage: Inventory problem: stochastic linear program

bBy

yzug

UZz

Uuts

czE

0),(

)(

..

][min

0

:..

][min)(

x

BybAxts

xfEy

Bender cuts

To be solved by simple LP

integerconditional

Integer & non-linear

Page 37: Applications of Stochastic Programming in the Energy Industry

• Lagrangian Relaxation of the Bender cuts

Max L(),

Unit Commitment ProblemUnit Commitment Problem

0),(

)(

..

)]([][min)(

yzug

UZz

Uuts

BybczEL

Gen 1

Gen 2

Gen 3

Gen 1

Gen 2

Gen 3

bBy

yzug

UZz

Uuts

czE

0),(

)(

..

][min

Page 38: Applications of Stochastic Programming in the Energy Industry

• Max i Li()+b

• where

Lagrangian Relaxation of Lagrangian Relaxation of Unit Commitment ProblemUnit Commitment Problem

)(

..

),(][min)(

iii

ii

iiiiii

UZz

Uuts

zugBzcEL

to be solved by stochastic DP

Individual generator problem

Vector of avg. gas price of generator i in each node

Page 39: Applications of Stochastic Programming in the Energy Industry

Solution Technique SummarySolution 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

Page 40: Applications of Stochastic Programming in the Energy Industry

CPU time comparison

1 1 7 3

286 283

228

296

930

233

268

405

4,973 16,303 29,383

0

50

100

150

200

250

300

350

400

450

500

1x10

0

1x30

5x30

2x30

1x10

00

10x3

0

20x3

0

5x10

0

problem size

seco

nd

s

pure B&B

Bender + B&B

Numbers of Bender’s cuts needed are between 7-38

Page 41: Applications of Stochastic Programming in the Energy Industry

CPU Time (seconds)duality Gap Error B&B

Bender+ Lagrangian

1x30 15.37% 0.09% 1 22x30 3.09% 0.33% 3 55x30 2.15% 0.19% 7 210x30 4.61% 2.42% 283 720x30 3.13% 2.81% 228 121x100 0.16% 0.16% 1 25x100 4.05% 3.80% 296 1310x100 8.94% - > 28,800 2820x100 6.75% - > 28,800 2750x100 4.40% - > 28,800 621x1000 0.15% 0.02% 286 602x1000 1.80% - > 28,800 14310x1000 3.89% - > 28,800 32650x1000 1.03% - > 28,800 755

Bender+ Lagrangian

Problem

Page 42: Applications of Stochastic Programming in the Energy Industry

CPU time comparison

1 3 7

283

228

1

296 286

2 5 2 7 12 2 13 28 2762 60

143

326

755

0

100

200

300

400

500

600

700

8001x

30

2x30

5x30

10x3

0

20x3

0

1x10

0

5x10

0

10x1

00

20x1

00

50x1

00

1x10

00

2x10

00

10x1

000

50x1

000

problem

seco

nd

s

B&B CPU time

Bender+ Lagrangian

> 8hr> 8hr

> 8hr > 8hr> 8hr

> 8hr