stochastic dual dynamic programming - iit comillas dual... · mit, cambridge, ma, january 23-27,...

69
MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for a Low Carbon Economy Prof. Andres Ramos http://www.iit.upcomillas.es/aramos/ [email protected] [email protected]

Upload: others

Post on 01-Sep-2019

5 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

MIT, Cambridge, MA, January 23-27, 2012

Stochastic Dual Dynamic Programming

ESD.S30 Electric Power System Modeling for a Low Carbon Economy

Prof. Andres Ramos

http://www.iit.upcomillas.es/aramos/

[email protected]@mit.edu

Page 2: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

References

• Birge, J.R. and Louveaux, F. (1997) Introduction to Stochastic Programming. Springer-Verlag.

• Ermoliev, Y. and Wets, R.J-B. (eds.) Numerical Techniques for Stochastic Optimization. Springer-Verlag. Berlin, Germany. 1988.

• Kall, P. and Wallace, S.W. (1995) Stochastic Programming. John Wiley and Sons. (http://www.unizh.ch/ior/Pages/Deutsch/Mitglieder/Kall/bib/ka-wal-94.pdf)

• Infanger, G. Planning Under Uncertainty: Solving Large-Scale Stochastic Linear Programs

Boyd & Fraser. 1994.

• Mayer, J. (1998) Stochastic Linear Programming Algorithms. A Comparison Based on a

Model Management System. Gordon and Breach Science Publishers.

2Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Model Management System. Gordon and Breach Science Publishers.

• Prekopa, A. (1995) Stochastic Programming Kluwer Academic Publishers.

• Ruszczynski, A. and Shapiro, A. (eds.) (2003) Stochastic Programming Elsevier.

• Alonso-Ayuso, A., E. Cerdá, L. F. Escudero, R. Sala (eds.) (2004) Optimización bajo

incertidumbre Tirant lo Blanch. Valencia, España.

• Ramos, A., A. Alonso-Ayuso, G. Pérez (eds.) (2008) Optimización bajo Incertidumbre

Universidad Pontificia Comillas. Madrid, España

Page 3: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Other resources

• Stochastic Programming Community Home Page. Stochastic Programming Resources (www, papers, tutorials, lecture notes, books) (http://stoprog.org/)

• Stochastic Programming Bibliography (http://www.eco.rug.nl/mally/spbib.html)

• Books on Stochastic Programming (http://stoprog.org/index.html?booksSP.html)

• STOCHASTIC PROGRAMMING E-PRINT SERIES (http://www.speps.org/)

3Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Optimization Online. Stochastic Programming submissions (http://www.optimization-online.org/ARCHIVE_CAT/STOCH/index.html)

• Red Temática de Optimización bajo Incertidumbre (ReTOBI) (http://www.optimizacionbajoincertidumbre.org/)

• International Conference in Stochastic Programming

Page 4: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

2

1. General overview

2. Two-stage and multistage programming

3. Decomposition techniques

4. Benders' decomposition

5. Nested Benders' decomposition

6. Dantzig-Wolfe decomposition

7. Lagrangian relaxation

8. Scenario tree

9. Decomposition in two-stage and multistage stochastic

programming

10. Improvements in decomposition techniques

11. Simulation in stochastic optimization

Two-stage and multistage programming

11. Simulation in stochastic optimization

12. Stochastic dual dynamic programming

Page 5: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Two-stage (PL-2) and multistage (PL-P) linear programming

• Two-stage PL-2: decisions in two stages

• Multistage PL-P: decisions in multiple stages

• Stairway structure of the constraint matrix (block diagonal)

– Each stage in only related with the previous one

55Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

– Each stage in only related with the previous one

• Problems of each stage are similar (they have the same structure)

• The matrix structure can be detected by visual inspection

Page 6: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Two-stage linear programming PL-2

1A

B A

1 21 1 2 2,

1 1 1

min( )T T

x xc x c x

Ax b

+

=

56Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

1B

2A 1 1 1

1 1 2 2 2

1 2, 0

Bx Ax b

x x

+ =

Page 7: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Two-stage stochastic linear programming PLE-2

• O.F. minimizes first-stage costs and expected value of second-stage costs

1 21 1 2 2

,

1 1 1

1 1 2 2 2

1 2

min

, 0

T T

x xc x p c x

Ax b

B x A x b

x x

ω

ω ω ω

ω

ω ω ω ω

ω

∈Ω

+

=

+ =

58Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• If doesn’t depend on ω it is called fixed resource

• Structure of the constraint matrix

2Aω

1A 11B 1

2A 21B 2

2A 31B 3

2A

Page 8: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Deterministic equivalent problem

• State space is small

• Formulation of the deterministic equivalent problem

1 1 1 2 2 2 3 3 3

1 2 31 2 2 2

1 1 2 2 2 2 2 2, , ,

1 1 1

min T T T T

x x x xc x p c x p c x p c x

Ax b

ω ω ω

ω ω ω ω ω ω ω ω ω+ + +

=

59Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

1 1 1 1

2 2 2 2

3 3 3 3

1 2 3

1 1 2 2 2

1 1 2 2 2

1 1 2 2 2

1 2 2 2, , , , 0

B x A x b

B x A x b

B x A x b

x x x x

ω ω ω ω

ω ω ω ω

ω ω ω ω

ω ω ω

+ =

+ =

+ =

Page 9: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Multistage linear programming PL-P

1A

1B

2A

2B

3A

1

1 1

min

1, ,

0

p

PT

p px

p

p p pp p

c x

B x Ax b p P

x

=

− −+ = =

61Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

2 3

1PB−

PA 0

0

0

px

B

Page 10: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Medium term hydrothermal scheduling problem: constraint matrix

Intra-periodConstraints

Inter-periodConstraints

co

variables

1p p p p pR i P S R− + − − =

1 reservoir level

inflow

hydro output

reservoir spillage

p

p

p

p

R

i

P

S

62Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

onstraints

Page 11: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Medium term hydrothermal scheduling problem: constraint matrix

Period (month)

63Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Period (month)

Page 12: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Multistage stochastic linear programming PLE-P

• O. F. minimizes expected costs of all the stages

• Size grows exponentially with the number of scenarios

1

1

1

1 1

0

min

1, ,

0

0

p p p

pp

p p

p p p p p

p

PT

p p px

p

p p p p p

p

p c x

B x A x b p P

x

B

ω

ω ω ω

ω

ω ω ω ω ω

ω

ω

= ∈Ω

− − + = =

∑∑

64Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Size grows exponentially with the number of scenarios

• Probabilities are conditioned

• Constraint matrix

p

ppω

1A 11B 1

2A 21B 2

2A

12B 1

3A

22B 2

3A

32B 3

3A

42B 4

3A

Page 13: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

3

1. General overview

2. Two-stage and multistage programming

3. Decomposition techniques

4. Benders' decomposition

5. Nested Benders' decomposition

6. Dantzig-Wolfe decomposition

7. Lagrangian relaxation

8. Scenario tree

9. Decomposition in two-stage and multistage stochastic

programming

10. Improvements in decomposition techniques

11. Simulation in stochastic optimization

Decomposition techniques

11. Simulation in stochastic optimization

12. Stochastic dual dynamic programming

Page 14: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Decomposition techniques

• Divide and conquer strategy

– Time division by periods

– Spatial division by (thermal) units

– Division by scenarios

• Allow the solution of huge problems (not directly solvable) with a certain structure by solving iteratively small size problems

• Objective function and feasible region have to be convex whenever to obtain dual variables is needed

66Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

to obtain dual variables is needed

• Dantzig-Wolfe 1960, Benders 1962, Geoffrion 1972 (generalized Benders)

Page 15: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Decomposition techniques: classification

• According to the difficulties

– Variables (Benders)

– Constraints (Dantzig-Wolfe or lagrangian relaxation)

• According to the exchanged information between master and subproblem

67Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

master and subproblem

– Primal (Benders)

– Dual (Dantzig-Wolfe or lagrangian relaxation)

Page 16: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Coordinating mechanisms. Hydrothermal model

• Primal (quantities)

– Master assigns an amount of water to release in each period or the reservoir levels at the end of the period

– Each subproblem returns the marginal price (water value) associated to the use of the previous amount of water

• Dual (prices)

68Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Dual (prices)

– Master gives a value to the water

– Each subproblem returns the future cost function taking into account this value

Page 17: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Medium term hydrothermal scheduling problem

• Solvable by Bd, DW-LR or nested Benders’ decomposition

– Variables of hydro release complicate the solution ⇒Benders

– Constraints of hydro release complicate the solution ⇒Dantzig-Wolfe, lagrangian relaxation

• Criterion:

69Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Criterion:

– Engineering: context dependent

– Mathematical:

• What complicates? (foreseeable number of iterations)

• Respective size of master and subproblems

Page 18: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Algorithm: Benders

Master problem

• Master problem: inter-period constraints

• Subproblem: intra-period constraints

70Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Subproblem 1

Subproblem 2

Page 19: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Benders' decomposition

• Reservoir level or hydro release is a given for the subproblem

Master problem

Subproblem 1

Water valueReservoir level or

Hydro release

71Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Subproblem 1

Subproblem 2

Subproblem 3

Subproblem 4

Page 20: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Algorithm: Dantzig-Wolfe or lagrangianrelaxation

• Master problem: inter-period constraints

• Subproblem: intra-period constraints

Master problem

72Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Subproblem 1

Subproblem 2

Page 21: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

DW or LR decomposition

• Reservoir level is a variable for the subproblem

Master problem

Subproblem 1

Water value Hydro release

73Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Subproblem 1

Subproblem 2

Subproblem 3

Subproblem 4

Page 22: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Algorithm: nested Benders’ decomposition

Subproblem 3:

Subproblem 2

Subproblem 1

74Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Subproblem 3:

Subproblem for subproblem 2Master problem for subproblem 4

Subproblem 4

Page 23: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Nested Benders’ decomposition

Subproblem 1

Subproblem 2

Reservoir level or

Hydro releaseWater value

75Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Subproblem 3

Subproblem 4

Water value

Water value

Reservoir level or

Hydro release

Reservoir level or

Hydro release

Page 24: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

4

1. General overview

2. Two-stage and multistage programming

3. Decomposition techniques

4. Benders' decomposition

5. Nested Benders' decomposition

6. Dantzig-Wolfe decomposition

7. Lagrangian relaxation

8. Scenario tree

9. Decomposition in two-stage and multistage stochastic

programming

10. Improvements in decomposition techniques

11. Simulation in stochastic optimization

Benders' decomposition

11. Simulation in stochastic optimization

12. Stochastic dual dynamic programming

Page 25: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

When to use Benders’ decomposition?

• Variables x1 complicate the solution of the problem

• Implicitly n1 << n2

• Number of iterations related with n1

• Matrix structure induces separability of subproblems

• Master and subproblem have different nature

– Master in discrete variables (MIP)

79Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

– Master in discrete variables (MIP)

– Subproblem with nonlinear (convex) objective function (NLP)

• Benders’ decomposition needs convex o.f. and convex feasible region of the subproblem

Page 26: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Relaxed master problem and subproblem

• Master: first stage + cuts

1 21 1 2

,

1 1 1

2 1 1 2 2 2 1 1

1

min

1, ,

0

T

x

lT l lT l

c x

Ax b

B x f B x l j

x

θθ

π θ π

+

=

+ ≥ + =

84Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Subproblem: second stage with known decisions of the first stage

22 2 2

2 2 2 1 1 2

2

min

:

0

j T

x

j j

f c x

Ax b B x

x

π

=

= −

Page 27: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Benders’ master and subproblem

• Master

– One cut is added in each iteration

– Each cut defines a new feasible region

– Optimal solution of previous iteration becomes infeasible

– It is worthy to use dual simplex method

– Size1 1

( ) ( 1)m j n+ × +

90Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

– Size

– It can be nonconvex (MIP, NLP)

• Subproblem

– Each iteration modifies the RHS of the constraints

– It is worthy to use primal simplex method (if size is adequate)

– Size

– It must be convex (LP, NLP)

1 1( ) ( 1)m j n+ × +

2 2m n×

Page 28: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Benders’ algorithm (i)

• Upper bound of the optimal value of the o.f. of problem PL-2

• Lower bound of the problem, value obtained by the o.f.

PROBLEMA MAESTRO | ↑

propuesta 1jx precios sombra 2

jπ ↓ |

SUBPROBLEMA

1 1 2 2T j T jz c x c x= +

91Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Lower bound of the problem, value obtained by the o.f. of the relaxed master problem

• Convergence condition

or repetition of the last master proposal

1 1 2T j jz c x θ= +

2 2 2

1 1 2 2

T j j

T j T j

c xz z

z c x c x

θε

−−= ≤

+

Page 29: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Benders’ algorithm (ii)

• Successive approximation of the second-stage objective function by cuts.

• Benders’ cuts (cutting planes, support hyperplanes) are an outer linearization of the recourse function.

• Lower bound is monotonous increasing.

Upper bound is not necessarily monotonous decreasing.

92Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Upper bound is not necessarily monotonous decreasing.

– Upper bound is the minimum of previous upper bounds

• In the first iteration the value of can be fixed, if the problem nature is known, or by solving the master problem without cuts

• In each iteration we have a quasi-optimal feasible solution

01x

2 0θ =

Page 30: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Benders’ algorithm (iii)1. Initialization:

2. Solving the master problem

Determine the solution and the lower bound

If no optimality cuts

3. Solving the subproblem of sum of infeasibilities

z =∞z =−∞ 410ε −=0j =

1 21 1 2

,

1 1 1

2 1 1 1 2 2 2

1

min

1, ,

0

T

x

lT l lT

c x

Ax b

Bx b l j

x

θθ

π δ θ π

+

=

+ ≥ =

1 2( , )j jx θ

2 0θ =

1 21 1 2

,

1 1 1

2 1 1 1 2 2 2 1 1

1

min

1, ,

0

T

x

lT l l lT l

c x

Ax b

B x f B x l j

x

θθ

π δ θ π

+

=

+ ≥ + =

93Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

3. Solving the subproblem of sum of infeasibilities

If infeasibility cut

If go to step 4.

4. Solving the Benders’ subproblem

Obtain and update the upper bound.

3. If stopping rule is met

If not go to step 2.

22

, ,

2 2 2 1 1 2

2

min

:

, , 0

j T T

x v v

j j

f e v e v

Ax Iv Iv b B x

x v v

π

+ −

+ −

+ −

+ −

= +

+ − = −

2 0jf ≥

2 0jf =

22 2 2

2 2 2 1 1 2

2

min

:

0

j T

x

j j

f c x

Ax b B x

x

π

=

= −

2jx

2 2 2

1 1 2 2

T j j

T j T j

c xz z

z c x c x

θε

−−= ≤

+

Page 31: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Fixed cost transportation problem

• Complete problem

( ),

minij ij

ij ij ij ijx yij

ij i

c x f y

x a i

+

≤ ∀

Flows

Investment decisions

Capacity of each origin

110Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

0, 0,1

ij ij

ij ji

ij ij ij

ij ij

x a i

x b j

x M y ij

x y

≤ ∀

≥ ∀

≤ ∀

≥ ∈

each origin

Demand of each destination

Flow can pass only for installed

connections

Page 32: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Fixed cost transportation problem

• Master

min c x∑

,min

1, ,

0,1

ijij ijy

ij

l l l l l

ij ij ij ij ij ijij ij

ij

f y

M y f M y l k

y

θθ

δ θ π π

+

+ ≥ + =

∑ ∑ …

111Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Subproblemmin

:

0

ijij ij

xij

ij i

j

ij j

i

k k

ij ij ij ij

ij

c x

x a i

x b j

x M y ij

x

π

≤ ∀

≥ ∀

≤ ∀

Page 33: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Case study. Solution

• Possible arcs

112Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Solutions along decomposition

Page 34: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Case study. ConvergenceIteración Cota Inferior Cota Superior

1 a 6 −∞ ∞ 7 140 390

8 140 390

9 120 390

10 360 380

11 360 380

12 360 380

13 360 380

• Lower bound is not increasingly monotonous because there are infeasible iterations

113Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

13 360 380

14 360 380

15 380 380

0

50

100

150

200

250

300

350

400

450

7 8 9 10 11 12 13 14 15

Iteraciones

Cos

te to

tal

Cota Inferior Cota Superior

Page 35: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Convergence of hydrothermal scheduling model

16000

16500

17000

17500

18000

Fun

ción

obj

etiv

o

Cota Inferior

114Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

14000

14500

15000

15500

16000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Iteraciones

Fun

ción

obj

etiv

o

Cota Inferior

Cota Superior

Page 36: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Achtung! Achtung!

• Degeneration in LP problems

– In real cases it is frequent to find multiple optima (degeneration in dual problem) with the same or different basis. Given that decomposition techniques are based on dual variables you must be very careful in its computation

– For example, in hydrothermal scheduling model

115Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

– For example, in hydrothermal scheduling model formulated as LP it can exist spatial degeneration (system can produce with one plant or another) and temporal (system can produce now or in the future)

Page 37: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Primal degeneration

• Variable x6 is degenerated (basic variable with value 0)

2x

(0,6)(2,6)

1 4x =

22 12x =

4x1 2 8x x+ =

6x1 2

1 3

min 3 5

4

2 12

z x x

x x

x x

= − −+ =

+ =

116Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

1x

1 23 2 18x x+ =

(4,0)(0,0)

(4,3)

3x

5x2 4

1 2 5

1 2 6

1 2 3 4 5 6

2 12

3 2 18

8

, , , , , 0

x x

x x x

x x x

x x x x x x

+ =+ + =+ + =

Page 38: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

5

1. General overview

2. Two-stage and multistage programming

3. Decomposition techniques

4. Benders' decomposition

5. Nested Benders' decomposition

6. Dantzig-Wolfe decomposition

7. Lagrangian relaxation

8. Scenario tree

9. Decomposition in two-stage and multistage stochastic

programming

10. Improvements in decomposition techniques

11. Simulation in stochastic optimization

Nested Benders’ decomposition

11. Simulation in stochastic optimization

12. Stochastic dual dynamic programming

Page 39: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Nested Benders’ Decomposition (i)

• Recursive application of decomposition technique.

• Let us see the PL-P problem:

• We apply Benders’ decomposition:

Stage 1 master, stage 2 to P subproblem

1

1 1

0

min

1, ,

0

0

p

PT

p px

p

p p p p p

p

c x

B x A x b p P

x

B

=

− − + = =

121Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

– Stage 1 master, stage 2 to P subproblem

– We decompose the subproblem that begins in stage 2

• Stage 2 master, stage 3 to P subproblem

• We decompose the subproblem that begins in stage 3

– Stage 3 master, stage 4 to P subproblem

– We decompose the subproblem that begins in stage 4

Page 40: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Nested Benders’ Decomposition (ii)

• In stage p

– The problem of this stage is solved

– As a master it receives cuts from p+1 and passes the solution to p+1,

– As a subproblem it builds cuts from p-1 and receives the solution from p-1.

SUBPROBLEM 1

122Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

SUBPROBLEM 2

Water valueHydro output

SUBPROBLEM 3

SUBPROBLEM 4

Water valueHydro output

Water valueHydro output

Page 41: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Nested Benders’ Decomposition

• Generic problem to solve

11

,

1 1

1 1 1 1 1 1

1

0

min

:

: 1, ,

0

0

0

p p

T

p p px

l

p p p p p p

lT lT lT

p p p p p p p p p p

p

P

c x

A x b B x

B x q b q l j

x

B

θθ

π

π θ π η η

θ

++

− −

+ + + + + +

+

+

= −

+ ≥ = + =

11

,

1 1

1 1 1 1

1

0

min

:

: 1, ,

0

0

0

p p

T

p p px

l

p p p p p p

lT l lT l

p p p p p p p p p

p

P

c x

A x b B x

B x f B x l j

x

B

θθ

π

π θ π η

θ

++

− −

+ + + +

+

+

= −

+ ≥ + =

129Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Problem converges when first stage does

0

1

1

0

0

0

l

P

l

P

B

π

η

+

+

0

1

1

0

0

0

l

P

l

P

B

π

η

+

+

Page 42: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

9

1. General overview

2. Two-stage and multistage programming

3. Decomposition techniques

4. Benders' decomposition

5. Nested Benders' decomposition

6. Dantzig-Wolfe decomposition

7. Lagrangian relaxation

8. Scenario tree

9. Decomposition in two-stage and multistage stochastic

programming

10. Improvements in decomposition techniques

11. Simulation in stochastic optimization

Decomposition in two-stage and multistage stochastic

programming

11. Simulation in stochastic optimization

12. Stochastic dual dynamic programming

Page 43: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Two-stage stochastic linear programming PLE-2

• O.F. minimizes first-stage costs and expected value of second-stage costs

1 21 1 2 2

,

1 1 1

1 1 2 2 2

1 2

min

, 0

T T

x xc x p c x

Ax b

B x A x b

x x

ω

ω ω ω

ω

ω ω ω ω

ω

∈Ω

+

=

+ =

196Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• If doesn’t depend on ω it is called fixed resource

• Structure of the constraint matrix

2Aω

1A 11B 1

2A 21B 2

2A 31B 3

2A

Page 44: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Deterministic equivalent problem

• State space is small

• Formulation of the deterministic equivalent problem1 1 1 2 2 2 3 3 3

1 2 31 2 2 2

1 1 1 1

2 2 2 2

3 3 3 3

1 1 2 2 2 2 2 2, , ,

1 1 1

1 1 2 2 2

1 1 2 2 2

1 1 2 2 2

min T T T T

x x x xc x p c x p c x p c x

Ax b

B x A x b

B x A x b

B x A x b

ω ω ω

ω ω ω ω ω ω ω ω ω

ω ω ω ω

ω ω ω ω

ω ω ω ω

+ + +

=

+ =

+ =

+ =

197Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• In Benders’ decomposition subproblem results separable and has the same structure in the constraints

1 2 3

1 2 2 2, , , , 0x x x xω ω ω ≥

1 1

2 2

3 3

2

2 2

2

p c

c p c

p c

ω ω

ω ω

ω ω

=

1

2

3

1

1 1

1

B

B B

B

ω

ω

ω

=

1

2

3

2

2 2

2

A

A A

A

ω

ω

ω

=

1

2

3

2

2 2

2

b

b b

b

ω

ω

ω

=

1

2

3

2

2 2

2

x

x x

x

ω

ω

ω

=

Page 45: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Decomposition in PLE-2

• Master monocut and multicut

• Subproblem

1 21 1 2

,

1 1 1

2 1 1 2 2 2

1

min

1, ,

0

T

x

lT lT

c x

Ax b

p B x p b l j

x

θ

ω ω ω ω ω ω

ω ω

θ

π θ π∈Ω ∈Ω

+

=

+ ≥ =

∑ ∑ …

1 21 1 2

,

1 1 1

2 1 1 2 2 2

1

min

1, ,

0

T

x

lT lT

c x p

Ax b

B x b l j

x

ω

ω ω

θω

ω ω ω ω ω

θ

π θ π ω

∈Ω

+

=

+ ≥ ∈Ω =

198Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Subproblem

22 2

2 2 2 1 1 2

2

min

:

0

T

x

l

c x

A x b B x

x

ω

ω ω

ω ω ω ω ω

ω

π= −

Page 46: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Monocut vs. multicut

• Monocut (n1+1)x(m1+j).

Multicut (n1+Ω)x(m1+jΩ)

• Multicut convenient when m2 is large and Ω no much larger than n1. Requires less Benders iterations but more cumbersome

• Multicut approximates independently each scenario.

199Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Multicut approximates independently each scenario. Monocut approximates the weighted sum of scenarios

Monocut

Multicuts

Page 47: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Multistage stochastic linear programming PLE-P

• O.F. minimizes expected costs of all the stages

• Probabilities are conditional

1

1

1

1 1

0

min

1, ,

0

0

p p p

pp

p p

p p p p p

p

PT

p p px

p

p p p p p

p

p c x

B x A x b p P

x

B

ω

ω ω ω

ω

ω ω ω ω ω

ω

ω

= ∈Ω

− − + = =

∑∑

ppω

200Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• Probabilities are conditional

• Constraint matrix

p

ppω

1A 11B 1

2A 21B 2

2A

12B 1

3A

22B 2

3A

32B 3

3A

42B 4

3A

Page 48: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Multistage stochastic problem. Nested Benders’ decomposition

SUB1 P1

SUB1 P2 SUB2 P2

201Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

SUB1 P3 SUB2 P3 SUB3 P3 SUB4 P3

Page 49: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Stochastic multistage decompositionStep 0 Set 0t t

t tI Jξ ξ= = . Set 0t

t

ξθ ≡ at the initial iteration

Step 1 Forward pass: Repeat for 1,...,t T=

Repeat for each node tξ of stage t

Solve ( )ttRPξ

If feasible: obtain solution t

txξ

If 1t = obtain lower bound 1

1( )z v RPξ=

If infeasible: stop forward pass, set ´T t= and go to Step 4 Step 2 Upper bound computation: Evaluate objective function of the complete problem with the primal solutions so far obtained. ( )z v P=

203Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

solutions so far obtained. ( )z v P= Step 3 (stopping rule) If z z tol− < stop, t

txξ is optimal solution, else go to Step 4

Step 4 Backward pass Repeat for ,...,1t T=

Repeat for each node tξ of stage t

Solve ( )ttRPξ

If feasible: obtain objective , ( )t ti

t tv RPξ ξθ = and dual values ,t i

t

ξπ

Augment 1t t

t tI Iξ ξ= +

If infeasible: obtain sum of infeasibilities ,t jt

ξθɶ and dual values ,t jt

ξπɶ

Augment 1t t

t tJ Jξ ξ= +

Go to step 1

Page 50: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

10

1. General overview

2. Two-stage and multistage programming

3. Decomposition techniques

4. Benders' decomposition

5. Nested Benders' decomposition

6. Dantzig-Wolfe decomposition

7. Lagrangian relaxation

8. Scenario tree

9. Decomposition in two-stage and multistage stochastic

programming

10. Improvements in decomposition techniques

11. Simulation in stochastic optimization

Improvements in decomposition techniques

11. Simulation in stochastic optimization

12. Stochastic dual dynamic programming

Page 51: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Improvements in decomposition techniques (i)

• Optimization method used for the problems

Subproblems solved many times with modifications. In Benders’ decomposition the master adds constraints and the subproblem change the constraint RHS.

– Simplex dual method is the initial candidate. Try simplexmethod or interior point method.

– Warm start: Use of previous bases (option BRATIO in

206Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

– Warm start: Use of previous bases (option BRATIO in GAMS).

– Use of initial point taken from the deterministic equivalent problem for a scenario.

• Advanced start procedures generate preliminary cuts prior to initiating a formal Benders algorithm

Page 52: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Improvements in decomposition techniques (ii)

• Tree traversing strategies: Ways to traverse through the tree from the root to the leaves. The “best” tree traversing strategy will properly balance the quality of the cuts (and hence the lower bound) with the computational effort required to generate them

– Fast-pass: from 1 to P and from P-1 to 1

– Shuffle: solves the stage with largest error between lower

207Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

– Shuffle: solves the stage with largest error between lower and upper bounds. It is centered in final stages, never goes backward until the error of a stage is bounded (fast-

forward)

– Cautious: goes forward when the error in a stage is small enough. It is centered in initial stages, never goes forward until the error of a stage is bounded (fast-backward)

D.P. Morton An enhanced decomposition algorithm for multistage stochastic

hydroelectric scheduling Annals of Operations Research 1996 Vol. 64 p. 211 - 235

Page 53: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Improvements in decomposition techniques (iii)

• Formulation and cut aggregation

– Linear or nonlinear type (linearization around a point)

– Monocut or multicut

– More cuts ⇒ more information to the master ⇒ less iterations. On the other hand, more variables and more constraints in the master

208Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Page 54: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Improvements in decomposition techniques (iv)

• Tree partition or node aggregation (multicoordination)

– Advantage: reduction in decomposition algorithm iterations

– Disadvantage: potential increase in problem solution time (interior point method)

– Methods

• By nodes

• By scenarios

209Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

• By scenarios

• By subtrees

• By complete scenarios

• By graph partition

Page 55: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Node and scenario partition

Nodes Scenarios

210Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Page 56: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Subtree partition

• Ascendant node aggregation (from the leaves to the root) is the one with the best performance

211Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

S. Cerisola, A. Ramos Node Aggregation in Stochastic Nested Benders Decomposition Applied

to Hydrothermal Coordination 6th International Conference on Probabilistic Methods Applied

to Power Systems (PMAPS) RUM-102. Madeira, Portugal September 2000

Page 57: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Decomposition in grid computing

• Distributed computing

– J.M. Latorre Resolución distribuida de problemas de

Optimización estocástica. Aplicación al problema de

coordinación hidrotérmica Doctoral thesis. Universidad Pontificia Comillas. November 2007

– J.M. Latorre, S. Cerisola, A. Ramos, R. Palacios Analysis of

Stochastic Problem Decomposition Algorithms in

214Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Stochastic Problem Decomposition Algorithms in

Computational Grids Annals of Operations Research 166 (1): 355-373 Feb 2009

• GAMS grid

– Use of multiple cores of a computer

Page 58: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Multistage stochastic integer programming PLE-P

• Decomposition for multistage problems with integer variables in each stage

– S. Cerisola Benders' decomposition for mixed integer problems.

Application to a medium term hydrothermal coordination problem

Doctoral thesis. Universidad Pontificia Comillas. April 2004

– S. Cerisola, A. Baillo, J.M. Fernandez-Lopez, A. Ramos, R. GollmerStochastic Power Generation Unit Commitment in Electricity

Markets: A Novel Formulation and A Comparison of Solution

Methods Operations Research 57 (1): 32-46 Jan-Feb 2009

215Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Methods Operations Research 57 (1): 32-46 Jan-Feb 2009

– S. Cerisola, J.M. Latorre, A. Ramos Stochastic Dual Dynamic

Programming Applied to Nonconvex Hydrothermal Models

European Journal of Operational Research 218 (2012) 687–697 10.1016/j.ejor.2011.11.040

Page 59: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

11

1. General overview

2. Two-stage and multistage programming

3. Decomposition techniques

4. Benders' decomposition

5. Nested Benders' decomposition

6. Dantzig-Wolfe decomposition

7. Lagrangian relaxation

8. Scenario tree

9. Decomposition in two-stage and multistage stochastic

programming

10. Improvements in decomposition techniques

11. Simulation in stochastic optimization

Simulation in stochastic optimization

11. Simulation in stochastic optimization

12. Stochastic dual dynamic programming

Page 60: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Why do we need simulation?

• It is used when the number of states of random parameters too high

• Computation of expectation in the recourse function (multicut) or expectation in the cut terms (monocut)

• Equivalent to integrate or sample in the random parameter hyperspace with known probability density function. A sample is a combination of random

217Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

function. A sample is a combination of random parameter values

• Each sample is computationally cumbersome (solving an LP problem)

• Simulate is equivalent to integrate or sample in hyperspace of random parameters with a known probability density function

Page 61: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Types of sampling

• External sampling

– We take samples to reduce the problem size and then we solve the stochastic optimization problem

• In SDDP we take samples in the forward pass

• Internal sampling

218Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

– We take samples at the same time that we solve the stochastic optimization problem

• In a two-stage planning problem with the expected value for the second state substituted by the sample mean of the second stage

Page 62: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

12

1. General overview

2. Two-stage and multistage programming

3. Decomposition techniques

4. Benders' decomposition

5. Nested Benders' decomposition

6. Dantzig-Wolfe decomposition

7. Lagrangian relaxation

8. Scenario tree

9. Decomposition in two-stage and multistage stochastic

programming

10. Improvements in decomposition techniques

11. Simulation in stochastic optimization

Stochastic dual dynamic programming

11. Simulation in stochastic optimization

12. Stochastic dual dynamic programming

Page 63: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Stochastic Dual Dynamic Progamming SDDP

• Nested Benders’ decomposition with

– Forward pass: node sampling instead of solving all the nodes

– Backward pass: solution of all the nodes of the recombining tree. It approximates for each scenario the recourse function for the sampled values obtained in the forward iteration

• Therefore we have stochastic convergence

– Lower bound is deterministic while upper bound is stochastic

242Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

Lower bound is deterministic while upper bound is stochastic

– Stopping criterion: lower bound enters the confidence interval of the upper bound

– I.e., if the stopping criterion is 1% for a confidence level of 95%. The algorithm stops with we are sure with a 95% that the relative difference between upper and lower bounds is lower than 1%

Page 64: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Stochastic Dual Dynamic Progamming SDDPStep 0 Set 0t t

t tI Jξ ξ= = . Set 0t

t

ξθ ≡ at the initial iteration

Step 1 Simulate N scenarios ( )t nthξ , : 1,...,n N , 1,...,t T=

Forward pass: Repeat for : 1, ...,n N

Repeat for 1,...,t T=

Solve ( )ttRPξ with r. hand side value ( )t nth

ξ and obtain solution

( )tn

tx ξ

If 1t = obtain lower bound 1

1( )z v RPξ=

If infeasible: stop forward pass for simulation n Step 2 Upper bound computation: Evaluate objective function of the complete (deterministic) problem for each

of the primal solutions so far obtained. ( )1

t

Tn

t tz c xN

ξ= ∑

243Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

of the primal solutions so far obtained. ( )1

t t

t

z c xN =

= ∑

Step 3 (stopping rule) If z z tol− < stop, 1

1xξ is optimal solution, else go to Step 4

Step 4 Backward pass Repeat for , ...,1t T= Repeat for each node tξ of stage t Repeat for each proposal obtained in forward pass, modifying the right hand side value of subproblem ( )t

tRP ξ

Solve ( )ttRPξ

If feasible: obtain objective , ( )t ti

t tv RPξ ξθ = and dual values ,t i

t

ξπ

Augment 1t t

t tI Iξ ξ= +

If infeasible: obtain sum of infeasibilities ,t jtξθɶ and dual values ,t j

tξπɶ

Augment 1t t

t tJ Jξ ξ= +

Go to step 1

Page 65: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Stochastic convergence in SDDP (i)

15850

15900

15950

16000

Fun

ción

obj

etiv

o

Extremo Inferior

Extremo Superior

Cota Superior Media

Average upper bound of the last 100

iterations

244Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

15700

15750

15800

100

105

110

115

120

125

130

135

140

145

150

155

160

165

170

175

180

185

190

195

200

205

210

215

220

225

Iteraciones

Fun

ción

obj

etiv

o

Cota Inferior

Stop the algorithm if the lower bound enters

into the confidence interval of the upper

bound for a confidence level of 95 %

The first 100 iterations are ignored, needed to obtain a

small confidence interval

Page 66: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Stochastic convergence in SDDP (ii)

10000

12000

14000

16000

18000

Fun

ción

Obj

etiv

o

Cota Superior Media

Extremo Inferior

Extremo Superior

245Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

0

2000

4000

6000

8000

101

107

113

119

125

131

137

143

149

155

161

167

173

179

185

191

197

203

209

215

221

227

233

239

245

251

257

263

269

275

281

Iteraciones

Fun

ción

Obj

etiv

o

Extremo Superior

Cota Inferior

Page 67: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Stochastic convergence in SDDP (ii) (detail)

15800

15850

15900

15950

16000

Fun

ción

Obj

etiv

o

Cota Superior Media

Extremo Inferior

Extremo Superior

246Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

15600

15650

15700

15750

101

107

113

119

125

131

137

143

149

155

161

167

173

179

185

191

197

203

209

215

221

227

233

239

245

251

257

263

269

275

281

Iteraciones

Fun

ción

Obj

etiv

o

Extremo Superior

Cota Inferior

Page 68: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Comparison of decomposition methods

Benders SDDP

Suitable for stochastic problems with tree

structure

Suitable for stochastic problems where

stochasticity is introduced independently

by scenarios

Scenario tree with no fixed structure

(symmetrical or non symmetrical)

Recombining scenario tree (dependence of

one scenario with respect to other is

modeled by transition probabilities)

Solution of the deterministic equivalent

problem

Impossible to solve the deterministic

equivalent problem

247Escuela Técnica Superior de Ingeniería ICAI

Stochastic Dual Dynamic Programming - Andrés Ramos

2011-2012

problem equivalent problem

Multicut Multicut

Flexible node aggregation (tree partition) Rigid node aggregation (tree partition)

conditioned by the branching periods

In forward pass all the scenarios are solved In forward pass only one scenario is solved

Deterministic stopping criterion Stochastic stopping criterion

Exponential time increase with number of

scenarios

Linear time increase with number of

scenarios

Page 69: Stochastic Dual Dynamic Programming - IIT Comillas Dual... · MIT, Cambridge, MA, January 23-27, 2012 Stochastic Dual Dynamic Programming ESD.S30 Electric Power System Modeling for

Prof. Andres Ramos

www.upcomillas.es

www.upcomillas.es

Prof. Andres Ramos

http://www.iit.upcomillas.es/aramos/

[email protected]

[email protected]