implementation and electric sector applications jesus velásquez … · 2020. 6. 9. ·...

21
J. Velásquez-Bermúdez DecisionWare - Do Analytics, Colombia jesus.Velá[email protected] Chapter II-5 - GDDP/G-SDDP Implementation and Electric Sector Applications Jesus Velásquez-Bermúdez Abstract. This chapter is oriented to study the computational implementation of the Generalized Dual Dynamic Programming (GDDP) and Generalized Stochastic Dual Dynamic Programming (G-SDDP). Implementation focuses on dynamic, and/or stochastic models; the concepts presented are typical of the GDDP/G-SDDP. The implementation only presents considerations for sequential computing, but they are critical to the implementation of parallel GDDP/G-SDDP algorithms, which is presented in a later chapter. The described process has been implemented in OPTEX Expert Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002 (Velasquez 2002), it was not followed by the publication of the experimental results. This chapter includes several models with practical application in the electrical sector. The experiments show the speed-up of GDDP methodologies versus Nested Benders methodologies (NBD) and the robustness of GDDP/G-SDDP. As conclusion, the conceptual formulation of the GDDP problem enables development of efficient algorithms based on the partition and the decomposition of the original problem using Benders' Theory and the conceptualization of Dynamic Programming. The concept presented can be extended to other large-scale methodologies that may be used in dynamic stochastic models, such as Lagrangean Relaxation. INDEX 1. GDDP IMPLEMENTATION ......................................................................................................................................... 2 1.1. GENERAL CONSIDERATIONS ABOUT BENDERS CUTS ................................................................................................ 2 1.2. UNIFIED BENDERS CUTS ........................................................................................................................................... 3 1.2.1. THEORY .................................................................................................................................................................... 3 1.2.2. SPECIAL CASES ......................................................................................................................................................... 3 1.2.3. PARTIALLY UNIFIED BENDERS CUTS ........................................................................................................................ 4 1.3. SUB-PROBLEM SELECTION........................................................................................................................................ 4 1.4. ALGORITHMIC IMPROVEMENTS................................................................................................................................. 5 2. G-SDDP IMPLEMENTATION...................................................................................................................................... 6 2.1. ALGORITHMIC IMPROVEMENTS................................................................................................................................. 6 2.2. STOCHASTIC CONVERGENCE .................................................................................................................................... 7 3. ELECTRIC SECTOR GDDP/G-SDDP MODELING ............................................................................................. 8 3.1. ECONOMIC DISPATCH ............................................................................................................................................... 8 3.1.1. ALGEBRAIC FORMULATION ...................................................................................................................................... 9 3.1.1.1. LP-ED: LINEAR DISPATCH CONSTRAINTS..................................................................................................... 10 3.1.1.2. MIP-ED: MIXED LINEAR DISPATCH CONSTRAINTS ........................................................................................ 2 3.1.1.3. MINLP-ED: MIXED NON-LINEAR DISPATCH CONSTRAINTS ........................................................................ 17 3.2. ELECTRIC SECTOR STOCHASTIC SUPPLY CHAIN DESIGN .......................................................................................... 2 3.2.1. ALGEBRAIC FORMULATION ...................................................................................................................................... 3 3.2.2. RESULTS OF REALISTIC EXPERIMENTS...................................................................................................................... 2 3.3. CONCLUSIONS........................................................................................................................................................... 3 4. ACKNOWLEDGMENTS ............................................................................................................................................... 4

Upload: others

Post on 24-Jan-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

J. Velásquez-Bermúdez

DecisionWare - Do Analytics, Colombia jesus.Velá[email protected]

Chapter II-5 - GDDP/G-SDDP – Implementation and Electric Sector Applications

Jesus Velásquez-Bermúdez

Abstract.

This chapter is oriented to study the computational implementation of the Generalized Dual Dynamic Programming

(GDDP) and Generalized Stochastic Dual Dynamic Programming (G-SDDP). Implementation focuses on dynamic,

and/or stochastic models; the concepts presented are typical of the GDDP/G-SDDP. The implementation only presents

considerations for sequential computing, but they are critical to the implementation of parallel GDDP/G-SDDP

algorithms, which is presented in a later chapter. The described process has been implemented in OPTEX Expert

Optimization System (Velasquez 2018).

The first paper about GDDP/G-SDDP was published in 2002 (Velasquez 2002), it was not followed by the publication

of the experimental results. This chapter includes several models with practical application in the electrical sector. The

experiments show the speed-up of GDDP methodologies versus Nested Benders methodologies (NBD) and the

robustness of GDDP/G-SDDP.

As conclusion, the conceptual formulation of the GDDP problem enables development of efficient algorithms based on

the partition and the decomposition of the original problem using Benders' Theory and the conceptualization of Dynamic

Programming. The concept presented can be extended to other large-scale methodologies that may be used in dynamic

stochastic models, such as Lagrangean Relaxation.

INDEX

1. GDDP IMPLEMENTATION ......................................................................................................................................... 2 1.1. GENERAL CONSIDERATIONS ABOUT BENDERS CUTS ................................................................................................ 2 1.2. UNIFIED BENDERS CUTS ........................................................................................................................................... 3 1.2.1. THEORY .................................................................................................................................................................... 3 1.2.2. SPECIAL CASES ......................................................................................................................................................... 3 1.2.3. PARTIALLY UNIFIED BENDERS CUTS ........................................................................................................................ 4 1.3. SUB-PROBLEM SELECTION........................................................................................................................................ 4 1.4. ALGORITHMIC IMPROVEMENTS................................................................................................................................. 5 2. G-SDDP IMPLEMENTATION ...................................................................................................................................... 6

2.1. ALGORITHMIC IMPROVEMENTS................................................................................................................................. 6 2.2. STOCHASTIC CONVERGENCE .................................................................................................................................... 7 3. ELECTRIC SECTOR GDDP/G-SDDP MODELING ............................................................................................. 8

3.1. ECONOMIC DISPATCH ............................................................................................................................................... 8 3.1.1. ALGEBRAIC FORMULATION ...................................................................................................................................... 9 3.1.1.1. LP-ED: LINEAR DISPATCH CONSTRAINTS..................................................................................................... 10 3.1.1.2. MIP-ED: MIXED LINEAR DISPATCH CONSTRAINTS ........................................................................................ 2 3.1.1.3. MINLP-ED: MIXED NON-LINEAR DISPATCH CONSTRAINTS ........................................................................ 17 3.2. ELECTRIC SECTOR STOCHASTIC SUPPLY CHAIN DESIGN .......................................................................................... 2 3.2.1. ALGEBRAIC FORMULATION ...................................................................................................................................... 3 3.2.2. RESULTS OF REALISTIC EXPERIMENTS ...................................................................................................................... 2 3.3. CONCLUSIONS ........................................................................................................................................................... 3

4. ACKNOWLEDGMENTS ............................................................................................................................................... 4

Page 2: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-2

1. GDDP Implementation

This chapter is oriented to study the computational implementation of the Generalized Dual Dynamic Programming

(GDDP) and Generalized Stochastic Dual Dynamic Programming (G-SDDP). 1.1. General Considerations about Benders Cuts

Benders’s methodology provides an optimal solution of the integrated problem GDDP: solving iteratively the master

problem and the set of subproblems. For minimization, BT algorithm close the gap between dual lower bound (LB) and

the primal upper bound (UB) by improving the linear representation of each subproblem cost. The termination criteria

can be defined as the relative difference between the primal and dual bound is less than a tolerance GDDP

| UBk - LBk | / | UBk + | ≤ GDDP

(1)

where is an infinitesimal element. UBk is defined as the sum of the subproblems objective functions the this is:

UBk = t= dtTuk

t (2)

where ukt represents the optimal solution of control variables in the iteration k. The lower bound LBk is defined as the

summa of the estimate cost for each subproblem:

LBk = t= kt(xt-1,xt) (3)

where kt(xt-1,xt) represents the optimal estimate of the subproblem cost in the iteration k.

Three alternatives for implementation of the GDDP methodology can be considered:

1. SBC (Standard Bender’s Cut): SBC solves an integrated sub-problem and generates only one cut that coupled all

periods for each iteration;

2. DBC (Decoupled Bender’s Cuts): DBC solves T problems and generates one decoupled cut for each period, the cuts

are coupled in the objective function;

3. UBC (Unified Bender’s Cuts): UBC generates N decoupled cuts for each period, the cuts are coupled in the objective

function (Velásquez, 2018).

Minx i diTxi |

Wixi = hi - Tiy

xi Si ; i1,N

Minx cTy + q |

Ay = b

q i ik (hi – Ti(y)) k 1,ITE

y R+

Minx diTxi

Wixi =

hi – Ti(y)

xi Si

yik

Minx diTxi

Wixi =

hi - Tiy +

xi Si

Minx diTxi

Wixi =

hi - Tiy +

xi Si

1k

i=1 i=W

Minx cTy + i qi |

Ay = b

qi ik (hi – Ti(y)) , i=1,N , k=1,ITE(i)

y R+

SBC

Standard Bender’s Cuts

General

ik

Minx diTxi

Wixi =

hi - Tiy +

xi Si

Minx cTy + i qi |

Ay = b

qi ik (hi – Ti(y)) , i=1,N , k=1,ITE

y R+

DBC

Decoupled Bender’s Cuts

General

UBC

Unified Bender’s Cuts

Periods

Random Scenarios

diTxi

Wxi = hi – Ti(y)di

Txi

Wixi = hi – Ti(y)

diTxi

Wixi = hi – Ti(y)

y1k

ik

ik

y1k

ik

ik

Figure 1. Benders Decomposition Cuts

Implementation of DBC and UBC cuts implies two levels of loops in the algorithm:

i) The outer loop moves iterations counter of BT; and on

ii) The inner loop moves the subproblems associated with each i-index are solved.

The difference between the two alternatives is:

▪ UBC solves N subproblems (1 ≤ N ≤ I) and DBC always solves I subproblems.

▪ UBC add a cut for each period it is generated by each subproblem, independently of the i-index associated to the

subproblem (N × I cuts) and DBC always add one cut for each i-index it is generated by the associated period

subproblem.

Page 3: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-3

The implementation of the DBC is direct because it hasn’t alternatives for implementation; for UBC there are various

technical aspects that must be analyzed since they can influence the performance of the GDDP (Velásquez, 2018).

1.2. Unified Benders Cuts

Unified Benders Cuts (UBC) theory corresponds to a case in which the sub problems SPi(y): belong to a family of

problems characterized by its matrix/vector elements; its application is possible when the index i is associated to periods

and/or random scenarios in a stochastic process.

1.2.1. Theory

Consider the dual problem of the subproblems SPi(y):

DSPi(y): = { Max Wi(y) = iT [bi - Fi(y)] | i

TAiT ci

T } (4)

The analysis of the structural characteristics of the matrices and vectors of DSPi(y): can generate advantages that allow

to implement effective algorithms for the solution of P:.

When i is associated with physical aspects (i.e. areas, regions, factories, markets, economic sectors, …) is known that the

matrix elements (Ai, ci and bi) depend on each value of index i. The case of interest is related to models in which the

index i is associated with at the time and/or random scenarios, in a stochastic optimization process; in these cases i is

linked to the vision of a system at different points in time and/or under different random conditions of the decisions

environment, and it is expected that the dimension of the problem (number of variables and constraints) for all values of

i is the same.

Three cases must be analyzed: when the resources vector bi, the cost vector ci and the functional techno-economical

matrix Ai depends on i. The important case is when the vector ci and the matrix Ai are independent of i. In this case the

dual subproblem is

DSPi(y): = {Max Wi(y) = iT [bi - Fi(y)] | i

TAT cT } (5)

then, a feasible vector of dual variables for any DSPi(y): is feasible for all DSPi(y): independent of the value of i; when

we solve SPi(y) for a specific value of i we can generate Benders cuts for all periods and the coordinator CX: can be

expressed as

CY: = { Min Z = f(y) + Q(y) |

F0(y) = b0 ; yS ;

Q(y) = i=1,I Qi(y)

Qi(y) (k)T[bi - Fi(y)] , i=1,I, k=1,ITE ;

0 (k)T[bi - Fi(y)] , i=1,I, k1,ITN } (6)

where the dual variables vector is i-index independent; then, for each iteration of the coordinator-sub-problems we

need to solve only one problem, or a sub-group of problems, SPi(y) generates cuts for all i-index values. ITE represents

the set of iterations in which the feasibility of any SPi(y): has been achieved and ITN of the iteration in which the

feasibility has not been achieved. This type of cuts is called Unified Benders Cuts (UBC).

UBCs are very important when: i) the number periods are very large, such as: i) discrete control theory (DCT), that

require many short periods to represent the continuous movement and derivatives constraints of the state variables; and

ii) stochastic optimization that requires many synthetic scenarios to represent continues probabilistic distributions.

This situation is very common for matrix A because it is related with the technology and with the topology of the modeled

system, which is normally time independent for the medium/short term (including real-time).

1.2.2. Special Cases

The vector ct is related with the costs and, in many cases, it is time/scenario dependent. When i is associate to time, two

cases may be considered:

Page 4: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-4

1. Often the time variation of ci may be expressed as ci = i c where i is a discount factor and c is a constant vector of

reference prices. In this case, we can express the sub-problems as static, and include the factor t in the coordinator

CY:

CY: = { Min Z = f(y) + Q(y) |

F0(y) = b0 ; yS ;

Q(y) = i=1,I i Qi(y)

Qi(y) (k)T[bi - Fi(y)] , i=1,I, k=1,ITE ;

0 (k)T[bi - Fi(y)] , i=1,I, k1,ITN } (7)

2. Other special case can be considered when the vector reference price ci has seasonal variations that can’t be modeled

with the transformation ci = i c. In this case we can define families of problems functions SPe(y):, where the index

e represents the seasonal variation of c, that is ce. Each period i belongs to a "season" and we must solve sub-problems

for each type of season.

1.2.3. Partially Unified Benders Cuts

In some cases, the vector ci can be divided two types of elements: the i-dependent and i-independent; then, it is possible

to make some reformulation oriented to have an equivalent problem that has for all subproblems a dual feasible zone

independent of i.

We can divide the vector of dependent variables in: i) zi variables with cost dependent of i, and ii) wi variables with cost

independent of i. The variables zi will be part of the state variables

PPUBC: = { Min Z = i=1,I ( dziTzi + dwTwi ) + f(y) |

F0(y) = b0 ;

Azi zi + Aw wi + Fi(y) = bi , i=1,I ;

ziR+ , i=1,I ; wiR+ , i=1,I ; yS } (8)

then, variables zi are defined in the coordinator and wi in the subproblems, and it is possible to use UBC.

1.3. Sub-Problem Selection

Based on the concept of dual variables storage (database), it is possible define an algorithm such that a cycle coordinator-

subproblem solves a single SPi(yk): (or a group of subproblems) which provides a feasible dual value of or an extreme-

ray of the feasible zone of so that it is used by all the subproblems.

There are many possibilities to establish a strategy to select SPi(yk):. May be use simple rules, such as the following:

▪ ORDTEM(i): sequential order according to the period

▪ ORDPAR(i): order according to a parameter that may critical in the problem; for example, the aggregate water inflow

in a hydro-system.

▪ ORDALT(i): alternate order according to the period (, I, 2, I-2, 3, I-3, … )

The idea is to select the rule that shows better behavior.

Various schemes can be used to establish a more elaborate dynamic rule, ORDDIN(i):. For example, without greater

theoretical basis, it is suggested to select the subproblem SPi(yk): associated to the maximum dual variable associated

with the cuts, if and only if the difference between the dual estimated cost Qi(y) and the primal real cost ciTxi is different

from zero; another possibility is to select SPi(yk): that maximize the difference between estimated cost (dual bound) and

real cost (primal bound), we call this the big-gap criteria.

Another aspect to consider in the implementation of an algorithm is the form of the incorporation of the SP i(yk): during

the optimization process, it is not necessary to manage through the entire process all subproblems associated with the

index i. A gradual process (sampling), according to a “reasonable” criteria, may be define considering that the key factor

is that at the end of the optimization the optimality of problem P: is get it considering all values of i. It is independent of

the way followed to get the solution of P:.

Page 5: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-5

1.4. Algorithmic Improvements

Algorithmic improvements include considerations about:

1. UBC must solve loops of subproblems SPi(y): in which all of them belong to a family of problems identified by the

A matrix and by c vector and differentiated by bi vector. In this case the problem order of solution affects algorithm

performance because the optimal solution x*t of the dual problem DSUt(xt-1,xt) is ever feasible for any period t; then

is possible to use the dual-simplex algorithm to recover the optimality.

If two consecutive problems are feasible, to make the least effort during the re-optimization it is possible reorder the

problems according to a criterion oriented to minimize the “distance” between the optimal solutions of two

consecutive i-index problems; the order of the problems is identified as ORDUBC(i). In the computational

experiments, a superficial study of this topic was done, finding that there are differences between orders and therefore

is a point to keep in mind in the algorithmic process.

2. Short iterations (S-ITE) where a partial number of subproblems (N < I) are solved, which are selected according to

a specific criteria and problem rearrangement. This is aimed to reduce the probability of generating repeated dual

variables, because this implies to duplicate I cuts in the coordinator. These iterations do not allow the evaluation of

the primal upper bound (UBk), because it only have a partial sum of the objective functions of the solved

subproblems.

3. Full iterations (F-ITE) where all I subproblems are solved oriented to obtain a primal upper bound (UBk) to check

the convergence of UBC: process.

4. The “big gap” criterion is used to select the problem to solve in a S-ITE is based on the following principle: a

subproblem will be included in the next S-ITE if the difference between the dual bound, Qi(y), and the primal bound,

cTxki is greater than a tolerance SP; cTxk

i should be evaluated during F-SITE. Mathematically this is expressed as:

ki = | Qi(y) - cTxk

i | / | Qi(y) + | (9)

ki ≤ SP

(10)

ki is a measure of the gap that must be closed in each subproblem SPi(y):, being important include specific

information of the problems with higher gap.

5. The rules used to select a problem to solve in a S-ITE is based on the following process:

▪ Establishes a sequential order to solve subproblems, ORDUBC(i).

▪ Sets a maximum number (N) of subproblems to be solved in S-ITE.

▪ Starting with the first subproblem in the list, solve the first N problems that meet the “big gap” criteria.

▪ The next subproblem to the last solved will be the first to solve in the next S-ITE, it is the first on the list.

6. To avoid duplication in the coefficients of the Benders hyperplanes it is necessary the application of a fast

comparison criteria to disregard previous hyperplane coefficients. This is aimed to reduce the size of the master

problem and speed up the generation of proper cut coefficients. The comparison criterion is based on the square of

the norm of the dual vector k defined as

NUk = ǁ k ǁ (11)

Nk = Minj=k-1( | NUk – NUj | ) (12)

Nk / (NUk+) ≤ NU (13)

where NUk represents the square of the norm of the dual vector solution in the iteration k and Nk the closest square

norm; if Nk is letter that the tolerance NU it is assumed that the vector of dual variables already exists in the previous

coefficients and it is ignored. This criteria may eliminate fundamental cuts to obtain the optimal solution.

The UBC: algorithm is summarized in the following flowchart:

Page 6: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-6

ki≥

NU

SPi(y): =

{Min Qi(y) = ciixi |

Aixi = bi - Fi(y); xiR+ }

CY: = { Min Z = f(y) + Q(y) |F0(y) = b0 ; yS ;

Q(y) = i=1,I Qi(y) , Qi(y) (ik)i[bi - Fi(y)] , i=1,I, k=1,ITE(i) ;

0 (ik)i[bi - Fi(y)] , i=1,I, k1,ITN(i) }

yk

QiA = Qi(y)

O(i)=f(z)

LBK = i=1,I Qi(y)

k+1

QiB = d xi

Zi = QiB - Qi

A

ii = ii+1k = k+1

UBk= UBk + z

ii = ii+1

NOT

i =O(ii)

YESISW=1

ISW=1 → S-kISW=-1 → F-k

UBk – LBk < SP

STOP

YES

NOT

YES

NOT

ii = 1UB=

ki = Qi,h

B – Qi,hA

NOT

YES

NC = #i NC = i

ISW = - ISW

ii > NC

YES

STARTISW = -1O(i)=i | i=1,i

Figure 2. Flow Chart GDDP-UBC

2. G-SDDP Implementation

First, keep in mind that the problem for any scenario h can be solved using the GDDP, it allows to have several

alternatives to solve the coordinator CX:, one of them is to use Lagrangean Relaxation of the non-anticipative constraints,

solving each problem-scenario independently using GDDP. This possibility is not studied in this chapter.

Alternatively, it is possible to solve the coordinator CX: in an integrated manner. In this case, for the integrated solution

may consider a replacement of the pair of indexes <t,h> by a single equivalent index th, ordered by scenarios and then

by period, the new problem has equivalent structure with the coordinator problem solved by the GDDP, except for the

continuity in the state variables when changing scenario h to h+1. Therefore, all analyzed to the GDDP implementation

is valid for G-SDDP; then, this sections only considers the algorithm improvements.

2.1. Algorithmic Improvements

Based in the Unified Bender Cuts theory, when technological matrix Bt,h and cost vector dt,h are time independent, a

solution of a single subproblem SUt,h(xt-1,h,xt,h) can generate appropriate cut coefficients for the piecewise approximation

of the operational cost for all the time-scenarios. In this case G-SDDP is modified to generate coefficients faster than the

traditional BT and UDC approaches, this decrease, significantly, the solution time. Algorithmic improvements include

considerations about:

1. UBC must solve loops of subproblems SUt,h(xt-1,xt): in which all subproblems belong to a family of problems

identified by the B matrix and d vector, and they can be differentiated by bt,h vector. Considering that optimal solution

x*t,h is ever dual feasible for any period-scenario <t,h>, it is possible to use the dual-simplex algorithm the recover

de optimality.

2. Short iterations (S-ITE) where a “little” number subproblems (N < T×H) are solved, which are selected according

to a specific criteria and problem rearrangement. These iterations do not allow the evaluation of the primal upper

bound (UBk), because it only have a partial sum of the subproblems objective functions.

3. Full iterations (F-ITE) where all T×H subproblems are solved oriented to obtain a primal upper bound (UBk) to

check the convergence of G-SDDP process.

4. The “big gap” criteria are used to select a problem to solve in a S-ITE is based on the following principle: a

subproblem will be included in the next S-ITE if the difference between the dual bound, k(xkt-1,h,xk

t,h), and the

primal bound, dTukt,h is greater than a tolerance SU; dTuk

t,h should be evaluated during F-SITE. Mathematically this

is expressed as:

kt,h = | k(xt-1,h,xt,h) - dTuk

t,h | / | k(xt-1,h,xt,h) + | (14)

Page 7: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-7

kt,h ≤ SU

(15)

kt,h is a measure of the gap that must be closed to the each subproblem SUt,h(xt-1,h,xt,h):.This indicator can be used

to establish a dynamic order for chose the problems to be included in S-ITE.

5. The process used to select a problem to solve in a S-ITE is based on the following rules:

▪ Establishes a sequential order to solve subproblems, ORDUBC(t,h).

▪ Sets a maximum number (N) of subproblems to be solved in S-ITE.

▪ Starting with the first subproblem in the list, solve the first N problems that meet the big gap criteria.

▪ The next subproblem to the last solved will be the first to solve in the next S-ITE, it is the first on the list.

6. To avoid duplication of the Benders hyperplanes it is necessary the application of a fast comparison criteria to

eliminate duplicated hyperplanes. This is aimed to reduce the size of the master problem and speed up the generation

of proper cut coefficients. The comparison criteria is based on the square of the norm of the dual vector k , k

defined as

NUk = ǁ k ǁ + ǁ k ǁ (16)

Nk = Minj=k-1( | NUk – NUj | ) (17)

Nk / (NUk+) ≤ NU (18)

where NUk represents the square of the norm of the dual vector solution in the iteration k and Nk the closest square

norm; if Nk is letter that the tolerance NU it is assumed that the vector of dual variables already exists in the previous

coefficients and it is ignored.

The G-SDDP algorithm is summarized in the following flowchart:

{ min z = dT u |

Bu = bt,h – Ext-1,h - Axt,h

G u=gt,h

uR+ }

X = { xt,h }

Qt,hA = t(xt-1,xt)

O(t,h)=f(z)

LB = z

Qt,hk = qt(t

k)

t,h = t(xt-1,h,xt,h)

h = Probability

k+1

Qt,hB = dTu*

th = th+1k = k+1

UBk= UBk + h z

th = th+1

YES

NOT

t =OT(th)h=OH(th)

YES

ISW=1 → S-k

ISW=-1 → F-k

Ubk - LBk< GDDP

STOPYES

NOT

YES

NOT

NOT

YES

NC = #th NC = T×H

ISW = - ISW

th>NC

YES

START

ISW=1

NOT

ISW=-1

H = HTYES

ISW = 1H=

OT(th)=? | 1,T×HOH(th)= ? | 1,T×H

H1=SC(HT-H)H0=H+H1

Zt,h = | h=H1

NOT

th =1UB = 0

kt = Qt,h

B – Qt,hA

CX: = { min z = c(x1 , x2 , … , xT) + t= t(xt-1,xt) |

F(x1 , x2 , … , xT) = f

t(xt-1,xt) + (k)TEt-1 xt-1 + (k)TA(x1 , x2 , … , xT) (k)Tbt + (k) Tgt "t= "h=H "kIU

uAt,h = ut,h , xA

t,h = xt,h "t "nN(t) "h(n)

xt,hSt,h "t= "hH }

HT # Scenarios

kt,h ≤

NU

Maxk=1,k

| ǁkǁ - ǁǁ |>YES

NOT

Figure 3. Flow Chart G-SDDP-UBC

2.2. Stochastic Convergence

The convergence of a stochastic programming optimization model can get from two points of view:

▪ Equivalent Deterministic: in this case it is assumed that "all" random scenarios of the decision environment are

known before the optimization; then, the equivalent deterministic of the stochastic problem is generated and it solved

accurately.

▪ Stochastic Convergence: in this case the solution of the stochastic model is faced as a sampling process which

calculate an estimator of a random variable of the model, usually the objective function. The convergence of the

optimization process is based on accuracy (standard deviation) of the estimator.

In the second case the random scenarios can be known a priori or can be synthetically generated during the optimization

process. As in any process of parameters estimation, based on a simulation model, in both cases the question of number

Page 8: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-8

of scenarios required to obtain the desired accuracy must be met. If the set of scenarios H describes partially the universe

of possible paths of the stochastic process, the value of the objective function, z, corresponds to an estimator of the true

value of the average of the probability function of z, with a variance inversely proportional to the size of the sample and

directly proportional to the variability z.

In this case the optimization can faced using the following process:

1. An initial set of scenarios, H, is defined a priori to be used to estimate the standard deviation of z;

2. The stochastic optimization problem with H scenarios is solved;

3. Check if the solution meets the accuracy required for the estimator of average of z; if it is ok the optimization process

end;

4. Estimate the number of additional scenarios H that are required to comply with accuracy, these scenarios are

incorporated into the optimization process, H=H+H;

5. Return to step 2.

It should be noted that in the selection of scenarios can be performed using variance reduction techniques, to accelerate

the convergence of the estimation process. The previous process is convergent, provided that the desired level of precision

is greater than the true standard deviation of the real distribution function.

For this type of approach, GDDP-UBC cuts has advantages in the sense that Benders cuts are independent of the duple

<t,h>; therefore, at the time of incorporation of new scenarios, automatically all the coefficients of the cuts may use to

generate hyperplanes that define an approximation for the objective function of the subproblem for each new time-

scenario.

3. ELECTRIC SECTOR GDDP/G-SDDP MODELING

GDDP/G-SDDP formulation represents many industrial systems in which state variables (xt) may be associated with: i)

stocks, ii) dynamic capacities and iii) production units state (on-off); and control variables (ut) with the

production/distribution activities through the supply-chain which are separable between periods.

The GDDP/G-SDDP implementation only considers Feasible Benders Cuts (FBCs). In all cases, FULL case corresponds

to an integrated model or to the deterministic equivalent of the stochastic optimization problem, solved without using

large scale methodologies.

GDDP/G-SDDP methodologies were applied to an electric system from the IEEE test cases (Diniz, 2010) composed of

12 hydro plants, 8 reservoirs, 6 thermal plants, 1 “deficit” plant and 1 demand node; transmission network wasn’t

considered (figure 4). Two applications were studied: i) Economic Dispatch and ii) Optimal Expansion. The number of

periods for all cases was 24. All cases were solved using GAMS-CPLEX v12.4, in a personal computer HP with a CPU

i7-7500U (4 cores), 2.9 GHz and 12 MBytes of cache memory. The detailed data of the electric system is in Diniz (2010).

BUS

THERMO-ELECTRIC

HYDRO-ELECTRIC

RESERVOIR CONSUMER

~

Figure 4. Reference Electric System

HYDRO PLANTS - CONFIGURATION

12 Hydro Plants8 Reservoirs6 Thermal Plants1 Deficit Plant 24 Hour Planning Horizon

3.1. Economic Dispatch

Page 9: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-9

The objective of all economic dispatch models is to determine the minimum expected generation cost of the hydro plants

and thermal units, subject to several physical, operational and electricity demand constraints. Three cases were studied:

i) MIP-ED: Linear Dispatch, ii) MIP-ED: Mixed Dispatch, iii) MINLP-ED: Mixed-Non-Linear Dispatch.

3.1.1. Algebraic Formulation

The tables 1, 2, 3 and 4 show the determinist mathematical model. To obtain the stochastic formulation is necessary to

include: 1. the scenario index h in: i) all variables, ii) all constraints and iii) the random parameters (water inflow and

demand); and 2. the non-anticipative variables and constraints.

Table 1. Indexes of Electric Model

Index Description

i,p Hydro plant

d Deficit plant

j Thermal unit

k Hydro unit

t Period

Table 2. Sets of Electric Model

Sets Description

I Hydro plants

J Thermal generation units

T Time stages

UI(i) Hydro generation units installed in plant i

UP(i) Hydro plants upstream of plant i

PS Hydro plants i with pumping station

Table 3. Parameters of Electric Model

Parameter Description Units

Lt Electricity demand MWh

k Generation efficiency MWh/(m3/s)

GHmaxk Upper hydro generation bound MWh

QHmaxk Upper hydro unit outflow m3/s

Vmini Lower reservoir volume hm3

Vmaxi Upper reservoir volume hm3

Qmaxi Upper turbined outflow limit m3/s

At,i Natural water inflow m3/s

GTmaxj Upper thermal generation limit MW/h

PUmini Pumping station lower limit hm3/period

PUmaxi Pumping station upper limit hm3/period

CTj Thermal plant variable generation cost $/MWh

CARR Thermal plant start cost $

CU1i Pumping cost (linear coefficient) $/hm3

CU2i Pumping cost (quadratic coefficient) $/(hm3)2

Table 4. Variables of Electric Model

Variable Description Units

UHt,k Hydro unit outflow m3/s

QHt,k Hydro unit power generation MW

GHt Total hydraulic generation MW

Vt,i Reservoir operating volume hm3

Qt,i Turbined outflow m3/s

SPt,i Spillage outflow m3/s

GTt,j Thermal generation MW

SRt,j Start thermal plant (0 stop, 1 start) 0-1

Page 10: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-10

Table 4. Variables of Electric Model

Variable Description Units

STt,j State thermal plant (0 off, 1 on) 0-1

PUt,i,p Water pumped from i to p hm3

PWt,i Power used in pumping station i hm3

BPt Binary pumping (1 pumping) 0-1

GDDP/G-SDDP formulation represents many industrial systems in which state variables (xt) may be associated with: i)

stocks, ii) dynamic capacities and iii) production units state (on-off); and control variables (ut) with the

production/distribution activities through the supply-chain which are separable between periods.

For this case, GDDP/G-SDDP implementation only considers Feasible Benders Cuts (FBCs). In all cases, FULL case

corresponds to an integrated model or to the deterministic equivalent of the stochastic optimization problem, solved

without using large scale methodologies.

To ensure that all solution generated, for the state variables, by coordinators problems always generates feasible solutions

in the subproblems is required to include in the master problem a restriction on the maximum of hydroelectric generation

as a function of the demand of the system.

This restriction limits the maximum hydraulic generation (MGHt), this restriction avoids the subproblem to reach values

of the hydraulic generation that require negative thermal generation, for the case that the total of the hydraulic generation

exceeds demand. MGHt may be included as an operational bound.

To implement GDDP/G-SDDP it is necessary the division of variables between state variables and control variables

(figure 5). In this case the state variables are related with reservoir level, hydro generation, water releases and state and

start of thermal plants; the control variables are associated with thermal generation.

LP-ED, MIP-ED and MINLP-ED models must be decomposed into multiple problems, masters and subproblems,

according the principles of GDDP. The problems are:

▪ M-LP-ED: Master of LP-ED

▪ SP-LP-ED(t): Subproblems of LP-ED, indexed in t

▪ M-MIP-ED: Master of MIP-ED

▪ SP-MIP-ED(t): Subproblems of MIP-ED, indexed in t

▪ M-MINLP-ED: Master of MINLP-ED

▪ SP-MINLP-ED(t): Subproblems of MINLP-ED, indexed in t

For stochastic version, the subproblem depends on the duple <t,h>.

ut

xt-1

Control

Variables

State

Variables

State

Variables

Cost Function

xt

Thermal Generation

Reservoir Level

Hydro Generation

Spillage

Water Releases

Start Thermal Plants

State Thermal Plants

Pumping Variables

ctTxt + dt

Tut

xt = { Vt,i , St,i , Qt,i , GHt , GUt,j, SRt,j STt,j , PUt,i,p , St,i , PWt,i , BPt,I }

ut = { GTt,j }

Figure 5. Dynamic Representation of the Electric System

3.1.1.1. LP-ED: Linear Dispatch Constraints

The LP-ED model equations are presented in the table 5.

Page 11: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Mathematical Programing 4.0 for Industry 4.0 Cyber-Physical Systems

GDDP/G-SDDP – Implementation and Electric Sector Applications

II-5-11

Table 5. Model LP-ED - Constraints

Description Symbol Equation Existence Conditions

Operational bounds

Vmini ≤ Vt,i ≤ Vmaxi "t "i (19)

0 ≤ Qt,i ≤ Qmaxi "t "i (20)

0 ≤ QHt,k ≤ QHmaxk "t "i "kUI(i) (21)

0 ≤ GUt,k ≤ GUmaxt,k "t "i "kUI(i) (22)

0 ≤ GTt,j ≤ GTmaxj "t "jJ (23)

Turbinated outflow QOHt,i Qt,i = kUI(i) QHt,k " t "i (24)

Water balance WATt,i Vt,i - Vt-1,i = At,i + pUP(i) (Qt,p + SPt,p) –

(Qt,i + SPt,i) "t "i (25)

Hydraulic generation GQTt,i GHt,k = k × QHt,k "t "i "kUI(i) (26)

Total hydraulic generation GUTt GHt =iI kUI(i) UHt,k "t (27)

Maximum hydraulic

generation MGHt GHt ≤ Lt "tT (28)

Electricity demand ELDt,i GHt +jJ GTt,j = Lt "tT (29)

The objective function of MIP-ED is

min t jJ CTj × GTt,j (30)

The table 6 shows the structure of the model under the concepts of GDDP.

Table 6. Model LP-ED – GDDP Formulation

Model Problem Variables Constraints

LP

ED

M-

LP-ED

UHt,k Hydro unit outflow

QHt,k Hydro unit power generation

GHt Total hydraulic generation

Vt,I Reservoir operating volume

Qt,i Turbined outflow

SPt,i Spillage outflow

QQHt,i Turbinated outflow

WATt,i Water balance

GQTt,i Hydraulic generation

GUTt,i Total hydraulic generation

MGHt Maximum hydraulic generation

SP-

LP-ED(t) GTt,j Thermal generation ELDt,i Electricity demand

Two versions of LP-ED were studied: i) deterministic and ii) stochastic; these aim to prove the convergence of GDDP/G-

SDDP and compare the performance of: i) GDDP using DBCs and UBCs (GDDP), ii) NBD/SNBD and iii) G-SDDP

using an NBD/SNBD as coordinator. FULL corresponds to the deterministic equivalent of the stochastic optimization

problem. Table 7 presents the results for the deterministic case, FULL corresponds to the integrated model. Two types

of cut were analyzed: DBC (decoupled) and UBC (unified) (Velásquez 2018a).

Table 7. Results for the GDDP Deterministic Linear Case

Methodology Coordinator Benders

Cuts

Order

UBC

GAP

(%)

Solution Time

(secs)

Times

FULL SPACE

Times

GDDP Unified

FULL 0.0000 0.078 1 0.04

GDDP Integrated Unified TEM 0.0061 1.651 21.17 1.00

GDDP Integrated Unified DEM 0.0061 1.970 25.26 1.19

GDDP Integrated Unified ALT 0.0001 2.006 25.72 1.22

GDDP Integrated Decoupled 0.0030 2.775 35.58 1.68

NBD 0.0019 12.696 162.77 7.69

GDDP NBD Decoupled TEM 0.0071 42.912 550.15 25.99

The conclusions are:

1. The complexity of the case does not justify LSOM; but it is useable to compare GDDP and NBD.

2. The experiments show that GDDP is 7.69 times faster than NBD, for deterministic problems.

3. The integrated coordinator is 3.37 faster than NBD coordinator

Table 8 presents the results for the stochastic case, FULL corresponds to the integrated model.

Page 12: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

2 J. Velásquez- Bermúdez

Table 8. Results for the GDDP Stochastic Linear Case

Scenarios Periods Method Benders

Coordinator

T. Solution

(secs)

Times

G-SDDP

10 24

FULL 0.402 0.093

G-SDDP Integrated 4.297 1

SNBD 458.00 106.59

G-SDDP SNBD 25.172 5.85

20 24

FULL SPACE 0.606 0.086

G-SDDP Integrated 7.005 1

SNBD 687.00 98.07

G-SDDP SNBD 53.092 7.58

The conclusions for this case are:

1. The complexity of the case does not justify LSOM; but it is useable to compare G-SDDP and SNBD.

2. The experiments show that G-SDDP is, approximately, 100 times faster than NBD

3. The experiments show that G-SDDP with SNBD coordinator is, approximately, 15 times faster than NBD

3.1.1.2. MIP-ED: Mixed Linear Dispatch Constraints

The difference between LP-ED and MIP-ED is that MIP-ED considers start-up and shutdown of the thermal plants,

including the start-up cost. This implies a MIP coordinator modeling thermal plants start/stop of the. This type of problem

cannot be solved by the models type NBD.

The MIP-ED model includes all the restrictions of the LP-ED model plus the constraints required to represent the thermal

plants start/stop process, which requires binary variables. The additional equations of MIP-ED are (table 9):

Table 9. Model MIP-ED - Constraints

Description Symbol Equation Existence Conditions

Thermal availability lower bound STNt,j STt,j × GMINt,j ≤ GTt,p "t "jJ (31)

Thermal availability upper bound STXt,j GTt,p ≤ STt,j × GMAXt,j "t "jJ (32)

Start/stop process SSTt,j STt,j - STt-1,j ≤ SRt,j "tt (33)

The objective function of MIP-ED is

min t jJ ( CTj × GTt,j + CARRj × SRt,j ) (34)

The table 10 shows the structure of the model under the concepts of GDDP.

Table 10. Model MIP-ED - GDDP Formulation

Model Problem Variables Constraints

MIP

ED

M-

UC

UHt,k Hydro unit outflow

QHt,k Hydro unit power generation

GHt Total hydraulic generation

Vt,I Reservoir operating volume

Qt,i Turbined outflow

SPt,i Spillage outflow

SRt,j Start thermal plant

STt,j State thermal plant (off, on)

QQHt,i Turbinated outflow

WATt,i Water balance

GQTt,i Hydraulic generation

GUTt,i Total hydraulic generation

MGHt Maximum hydraulic generation

STNt,j Maximum thermal availability

STXt,j Maximum thermal availability

SSTt,j Start/stop process

SP-LP-

ED(t) GTt,j Thermal generation

GUTt,i Total hydraulic generation

ELDt,i Electricity demand

Two versions of LP-ED were studied: i) deterministic and ii) stochastic; these experiments aim to: i) Prove the

convergence GDDP/G-SDDP for mixed coordinator ii) evaluate the performance of UBC and DBC as function of the number (periods), in the deterministic case, and evaluate the performance of G-SDDP with UBC as function of scenarios. The figure

6 shows a resume of results for determinists cases, was 6 experiments for {24, 48, 96, 192, 384, 768} periods.

Page 13: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

16 J. Velásquez-Bermudez

0

20

40

60

80

100

120

140

160

180

200

0 200 400 600 800

FULL DBC UBC

MIP-ED - Solution Time(seconds)

0.000

0.050

0.100

0.150

0.200

0.250

0 200 400 600 800

FULL DBC UBC

MIP-ED - Time per Period(seconds)

Figure 6. Results for the GDDP Deterministic Mix-Linear Case

The conclusions are: i) UBC and DBC are convergent, ii) for small cases DBC is faster than UBC, iii) UBC is faster than

DBC, and iv) for large cases the basic solver (CPLEX 12.4) can’t solve the problem (2 largest experiments). The table

11 presents the behavior of G-SDDP/UBC as a function of the number of scenarios

Table 11. G-SDDP/UBC Performance - Mix-Linear Case

Scenarios Time

(secs)

Time/Scenario

(secs/unit) Variables

Binaries

Variables Constraints NO-Ceros

20 12 0,601 29.924 5.760 16.221 69.521

50 127 2,537 67.224 14.400 40.551 173.801

100 387 3,867 134.444 28.800 81.101 347.601

200 1.092 5,461 268.844 57.600 162.201 695.201

500 1.321 2,642 672.044 144.000 440.501 1’738.001

1000 1.570 1,570 1’344.044 288.000 811.001 3’476.001

2000 2.524 1,262 2’688.044 576.000 1’622.001 6’952.001

4000 4.634 1,159 5’376.044 1’152.000 3’244.001 13’904.001

8000 10.852 1,356 10’752.044 2’304.000 6’488.001 27’808.001

If we studied the relation solution time versus dimensionality (number of scenarios), we can see that it is lineal, that

implies that is possible to manage very large problems; additionally, solution time per period indicated a learning process

that it creases in the first part of the optimization process and decreases. The figure 7 shows the time solution per scenario

it tends to remain constant once the algorithm has made the initial learning process. The figure 8 shows the time solution

per scenario it tends to remain constant once the algorithm has made the initial learning process.

0

2000

4000

6000

8000

10000

12000

0 1000 2000 3000 4000 5000 6000 7000 8000

SCENARIOS

TIME(sec)

STOCHASTIC UNIT COMMITMENTMIXED MODEL – UNIFIED CUTS + INEXACT SOLUTIONS

Figure 7. Stochastic Unit Commitment - Total Time

Page 14: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Dynamic & Stochastic Benders Theory 17

0

1

2

3

4

5

6

0 1000 2000 3000 4000 5000 6000 7000 8000

STOCHASTIC UNIT COMMITMENTMIXED MODEL – UNIFIED CUTS + INEXACT SOLUTIONS

TIME(sec)

SCENARIOS

Figure 8. Stochastic Unit Commitment - Time per Scenario

3.1.1.3. MINLP-ED: Mixed Non-Linear Dispatch Constraints

In this case, the hydro-electric system includes a station of pumping water to a reservoir; to simulate the operation is used

a non-linear equation that determines the amount of power needed for pumping, which is fixed on pressure and variable

on flow. The pumping station link the reservoir 12 with the reservoir 1 (figure 9).

BUS

THERMO-ELECTRIC

HYDRO-ELECTRIC

RESERVOIR CONSUMER

~

HYDRO PLANTS - CONFIGURATION

1 Water Pumping Station12 Hydro Plants8 Reservoirs6 Thermal Plants1 Deficit Plant 24 Hour Planning Horizon

MIXED NON-LINEAR MODELS

Figure 9. Mixed Non-Linear Electric System

The MINLP-ED model includes all the restrictions of the LP-ED plus the constraints required to represent water

pumping process. The next diagram presents the physical system. The MINLP-ED model includes all the restrictions of

the LP-ED model plus the constraints required to represent the activation pumping process, which requires a binary

variable, and the variables associates with the power and flow in the pumping station. The additional equations of

MINLP-ED are presented in the table 12.

Table 12. Model MINLP-ED - Constraints

Description Symbol Equation Existence Conditions

Pumping availability lower bound BPNt,i Qmini × BPt,i ≤ Qt,i "t "iPS (35)

Pumping availability upper bound BPXt,i Qt,i ≤ Qmaxi × BPt,i "t "iPS (36)

Water balance including pumping WAPt,i Vt,i - Vt-1,i = At,i + pUP(i) (Qt,p + SPt,p)

– (Qt,i + SPt,i) + pRB(i) PUt,p

- pRB(i)

PUt,p

"t "iPS (37)

Power use in pumping POWt,i PWt,i = 9.8 × 0.001 × pBR(i)

PUt,i "t "iPS (38)

Pumping power lower bound PWNt,i PUmini × BPt,i ≤ pBR(i) PWt,i

"t "iPS (39)

Pumping power upper bound PWXt,i pBR(i) PWt,i

≤ PUmaxi × BPt,i "t "iPS (40)

The objective function of MINLP-ED is

Page 15: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

2 J. Velásquez-Bermudez

Min t jJ ( CTj × GTt,j + i CU1t,i × PWt,i + CU2t,i × PWt,i

2 ) (41)

The table 13 shows the structure of the model under the concepts of GDDP.

Table 13. Model MINLP-ED - GDDP Formulation

Model Problem Variables Constraints

MINLP

ED

M

MINLP

ED

UHt,k Hydro unit outflow

QHt,k Hydro unit power generation

GHt Total hydraulic generation

Vt,I Reservoir operating volume

Qt,i Turbined outflow

SPt,i Spillage outflow

PUt,i,p Water pumped

PWt,i Power used in pumping station

BPt,i Binary variable control pumping

QQHt,i Turbinated outflow

GQTt,i Hydraulic generation

GUTt,i Total hydraulic generation

MGHt Maximum hydraulic generation

BPNt,i Minimum pumping availability

BPXt,i Maximum pumping availability

WAPt,i Water balance including pumping

POWt,i Power use in pumping

PWNt,i Minimum pumping power

availability

PWXt,i Maximum pumping power

availability

BP

MINLP

ED

GTt,j Thermal generation ELDt,i Electricity demand

Using the MINLP-ED was generated two non-linear economic dispatch models:

▪ MINLP-ED, model includes all the variables and constraints related with water pumping, including a positive lower

bound (greater than cero) for flow that required a binary variable.

▪ NLP-ED, model includes all the variables and constraints related with water pumping but relaxed the positive lower

bound for flow.

In both cases the G-SDDP model uses UBC. The results for different solvers are presented in the table 14. The conclusion

is that the G-SDDP is convergent for mixed non-linear convex problems.

Table 14. Results for the G-SDDP Stochastic Mixed Non-Linear Case

Model

Type Scenarios

Dual

Bound

Primal

Bound

Solution

Time (secs)

Time/Scenario

(secs)

Solver

QPC/MQPC

NLP-ED

1

2718504 2718504 3.737 3.74 CPLEX

2718499 2718499 4.102 4.10 XPRESS

2718507 2718507 4.905 4.91 MINOS

2718504 2718504 63.855 63.86 IPOPT

20

2290453 2290453 38.888 1.94 CPLEX

2290450 2290450 40.075 2.00 XPRESS

2290456 2290456 217.467 10.87 MINOS

NS NS IPOPT

50 2256641 2256641 95.831 1.92 CPLEX

2256620 2256620 102.706 2.05 XPRESS

MINLP-ED

1

12998260 12998260 9.475 9.48 CPLEX

12998260 12998260 24.160 24.16 XPRESS

NS NS BONMIN

5 12302500 12302500 15.901 3.18 CPLEX

12302500 12302500 301.267 60.25 XPRESS

3.2. Electric Sector Stochastic Supply Chain Design

The expansion model, MIP-EX, corresponds to LP-ED joined with restrictions on investment logic that allows to activate,

or not, the use of infrastructure in expansion. Given the academic nature of the case, it does not include coordination of

the investment restrictions, such as: budget investment, alternative projects, stages in the alternatives. When these

restrictions exist, they should be incorporated into the G-SDDP coordinator. The risk management was made using the

CVaR (Conditional Value-at-Risk, Velásquez 2019b).

Page 16: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Dynamic & Stochastic Benders Theory 3

3.2.1. Algebraic Formulation

The table 15 shows the additional variables including in MIP-EX

Table 15. Model MIP-EX - Variables

Variable Description Units

AVi,t Reservoir availability (0 no available, 1 available) 0-1

AQt,j Hydro-plant expansion 0-1

AT,i,j Thermal expansion 0-1

AVi,t Reservoir expansion (0 no expansion, 1 expansion) 0-1

EQt,j Hydro-plant expansion 0-1

ET,i,j Thermal expansion 0-1

The additional equations included in MIP-EX are presented in the table 16.

Table 16. Model MIP-EX - Constraints

Description Symbol Equation Existence Conditions

Reservoirs availability lower bounds AVNt,i Vmini × EVt,i ≤ Vt,i "t "i (42)

Reservoirs availability upper bounds AVXt,i Vt,i ≤ Vmaxi × AVt,i "t "i (43)

Hydro-plants availability upper bounds AQt,i Qt,i ≤ Qmaxi × AQt,i "t "i (44)

Thermal-plants availability upper bounds ATt,j GTt,j ≤ GTmaxj × ATt,j "t "iJ (45)

Reservoirs expansion-operations CEVt,i q=1,t EVt,i = AVt,i "t "i (46)

Hydro-plants expansion-operations CEQt,i q=1,t EHt,i = AHt,i "t "i (47)

Thermal-plants expansion-operations CETt,i q=1,t ETt,j = ATt,j "t "iJ (48)

The non-anticipative constraints are represented by the variables associated with the investment; since they are

independent of the stochastic process and do not include the h-index. MIP-EX does not consider operational non-

anticipative constraints, it is two stage stochastic optimization. The objective function is equal to the sum of the

deterministic investment cost, INV plus the expected value of operation cost, ECV,

Min z = INV + ECV = INV + tH qh AECh (49)

The equations required for modeling financial risk management are (they must be in the coordinator model) (table 17):

Table 17. Model MIP-EX - Risk Management Constraints

Description Symbol Equation Existence

Conditions

Investment INV INV = t iI INEQi,t × EQt,i + t iI INEHi,t ×

EHt,i + t iJ INETi,t × ETt,i

(50)

Future expected total cost ECV ECV = tH qh AECh (51)

Future expected scenario

operation cost AECh AECh = t jJ CTj × GTt,j,h

"hH (52)

Future expected scenario

total cost ATTh ATTh = INV + AECh

"hH (53)

Excess loss EXLh EXLh VaR + ATTh "hH (54)

CVaR CVaR CVaR = VaR - (1-)-1 h=1,NE qh EXLh (55)

CVaR Upper Bound CVaRMAX CVaR ≤ CVARMAX (56)

where qh represents the probability of h-scenario and is the probability of excess the CVaR. In the above equations, the

h-index has been included in variable GTt,j,h, which comes from the split variables process that is required for the

conversion of the deterministic (core) model in one of stochastic optimization.

There are at least two ways to solve MIP-EX using the G-SDDP:

▪ Benders tri-level: at the upper level is formulated a coordinator based on the investments; the second and third levels

contain the operation problems that is solved using the G-SDDP.

Page 17: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

2 J. Velásquez-Bermudez

▪ Benders bi-level: form a single coordinator that integrates investment and state variables, and, in a second level

multiple subproblems associated to the control variables.

The last case is presented below.

MIP-EX must be decomposed into multiple problems, master and subproblems, the problems are:

▪ M- MIP-EX: Master of MIP-EX

▪ SP- MIP-EX (t,h): Subproblems of MIP-EX, indexed in t and h

The table 18 shows the structure of the model under the concepts of GDDP.

Table 18. Model MIP-EX – GDDP Formulation

Model Problem Variables Constraints

MIP-EX

M-

MIP-EX

UHt,k Hydro unit outflow

QHt,k Hydro unit power generation

GHt Total hydraulic generation

Vt,I Reservoir operating volume

Qt,i Turbined outflow

SPt,i Spillage outflow

AVi,t Reservoir availability

AQi,t Hydro-plant availability

ATi,t Thermal availability

EVi,t Reservoir expansion

EQi,t Hydro-plant expansion

ETi,t Thermal expansion

QQHt,i Turbinated outflow

WATt,i Water balance

GQTt,i Hydraulic generation

GUTt,i Total hydraulic generation

MGHt Maximum hydraulic generation

AVNt,i Minimum reservoir availability

AVXt,i Maximum reservoir availability

AVQt,i Maximum hydro-plant availability

AVTt,j Maximum thermal-plant availability

CENt,i Coordination expansion reservoir

CEQt,i Coordination expansion hydro-plant

CETt,j Coordination expansion thermal-plant

Risk Management Constraints

SP-MIP

EX(t,h) GTt,j Thermal generation ELDt,i Electricity demand

3.2.2. Results of Realistic Experiments

The expansion considered investments to install new capacity in 4 plants generation, 2 reservoirs and 3 thermal plants.

▪ Risk Prone of Expansion of Electric Systems

Below, are presented the results obtained in the analysis of the behavior of the G-SDDP in the solution of the problem

MIP-EX without risk management. The figure 10 shows solution time.

0

5000

10000

15000

20000

25000

0 1000 2000 3000 4000

MIP EXPANSION: SOLUTION TIME VS. COMPLEXITYUNIFIED BENDERS CUTS – INEXACT SOLUTIONS

Time(sec)

SCENARIOS

Figure 10. Electric System Expansion - Total Time

The figure 11 shows the time per scenario as functions of the number of scenarios. The conclusion is that the relation

solution time versus dimensionality (number of scenarios-periods) it is not exponential, seems lineal, that implies that is

possible to manage very large problems; additionally, solution time per period indicated a learning process that it

decreases in the first part of the optimization process.

Page 18: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Dynamic & Stochastic Benders Theory 3

Figure 11. Electric System Expansion - Time per Scenario

MIP EXPANSION: SCENARIO SOLUTION TIME VS. COMPLEXITYUNIFIED BENDERS CUTS – INEXACT SOLUTIONS

0.000

2.500

5.000

7.500

10.000

0 1000 2000 3000 4000

Time(sec)

SCENARIOS

▪ Risk Rational of Expansion of Electric Systems

The table 19 shows the comparative results of the solution of the problem for two cases: i) with the CVaR control (risk

rational) and ii) without control (risk irrational). From the point of view of financial risk management, the parameters of

the model are: i) the limit CVaRMAX imposed to the CVaR and ii) the level of probability of exceeding it, . The number

of scenarios was 100.

Table 19. Expansion of Electric Systems Including Risk Management

Case

Parameters Results

CVaR

Limit Probability VaR CVaR Mean Deviation Maximum Minimum

Risk

Irrational 387.09 35.74 486.29 307.57

Risk

Rational 444 0.05 442.94 444 392.84 36.89 459.50 307.57

The inclusion of control over the CVaR carries a cost in terms of the expected value in exchange for a decrease in risk

measures/indicators, as it is the range of costs, standard deviation, VaR and CVaR. The figure 12 presents the empirical

function of probability distribution of the total cost of system operation: investments plus operational costs.

$

$

Scenarios

ScenariosWith

CVaR Control

WithoutCVaR Control

Figure 12. G-SDDP & Risk Management

3.3. Conclusions

The conceptual formulation of the G-SDDP problem enables development of efficient algorithms based on the partition

and the decomposition of the original problem using Benders' Theory and the conceptualization of Dynamic

Programming. The solution of the original problem is found by the coordinated solution of multiple problems of small

Page 19: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

4 J. Velásquez-Bermudez

dimension. In some cases, it is possible to visualize special matrix structures to generate Benders´ cuts for all combination

of periods-scenarios and eliminates the need to solve a problem for each duple period-scenario. This is of special

importance when the number of combinations periods-scenarios is very large.

The experimental results show that the G-SDDP is solid since it solves effectively multiple types of problems (LP, MIP,

NLP and MINLP) and, for LP problems, the solution time is significantly less than the methodologies based on Nested

Benders Decomposition (NBD). The programs may be downloaded from Velásquez (2019c)

4. Acknowledgments

The author is grateful, in very special way, to Eng. Juan José Torres the work done in the implementation of the G-SDDP

and the controlled experiments. This research has been financed by DecisionWare and DO Analytics. The GDDP is a

large-scale methodology implemented in OPTEX Optimization Expert System (Velásquez, 2017).

References

1. Abrahamson , P. G. (1983). A Nested Decomposition Approach for Solving Staircase Programs. Technical

Report SOL 83-4, Systems Optimization Laboratory, (Stanford, CA, 1983).

2. Abrahamson, P. G. (1980). A Nested-Decomposition Approach for Solving Staircase-Structured Linear

Programs. Technical RE70R L-89-20, Systems Optimization Laboratory Department of Operations Research,

Stanford University, August 1980

3. Bellman, R.E. (1957). Dynamic Programming. Princeton University Press.

4. Benders, J.F. (1962). Partitioning Procedures for Solving Mixed Variables Programming Problems. Numer. Math

4, 238-252.

5. Birge J. (1985). Decomposition and Partitioning Methods for Multistage Stochastic Linear Programs. Operations

Research, 33 (1985), 989-1007.

6. Chen Z-L. and Powell W. (1998). A Convergent Cutting-Plane and Partial-Sampling Algorithm for Multistage

Stochastic Linear Programs with Recourse. Department of Civil Engineering and Operations Research Princeton

University Princeton, NJ 08544 Technical Report SOR-97-11.

7. Corvera Poire X. (1995). Model Generation and Sampling Algorithms for Dynamic Stochastic Programming. Ph.

D. Thesis, Department of Mathematics, University of Essex (September 1995).

8. Corvera Poire X. and Dempster M. (1995). Simplifying Multistage Stochastic Programming Problems. IMA

Journal on Mathematics in Industry (1995).

9. Dempster M. (1988). On Stochastic Programming II: Dynamic Problems Under Risk. Stochastics 25.1 (1988).

15-42.

10. Diniz, A. L. (2010). Test Cases for Unit Commitment and Hydrothermal Scheduling Problems. Power and Energy

Society General Meeting, 2010 IEEE

11. Donohue C. and Birge J. (2000). The Abridged Nested Decomposition Method for Multistage Stochastic Linear

Programs with Relatively Complete Recourse. White Paper in web.

https://www.researchgate.net/publication/220464205_The_Abridged_Nested_Decomposition_Method_for_Mu

ltistage_Stochastic_Linear_Programs_with_Relatively_Complete_Recourse

12. Gade, D., Küçükyavuz, S. and Sen, S. (2014). Decomposition Algorithms with Parametric Gomory Cuts for Two-

Stage Stochastic Integer Programs. Mathematical Programming, April 2014, Volume 144, Issue 1–2, pp 39–64

13. Gade, D., Kucukyavuz, S., and Sen, S. (2012). Decomposition Algorithms with Parametric Gomory Cuts for

Two-Stage Stochastic Integer Programs. Mathematical Programming, pages 1{26.

14. Gassman H. (1990). MSLiP: A Computer Code for the Multistage Stochastic Linear Programming Problem.

Mathematical Programming, 47,407-423.

15. Geoffrion, A. M. (1972). Generalized Benders Decomposition. Journal of Optimization Theory and

Applications,10 237–259.

16. Georghiou, A., Tsoukalas, A. and Wiesemann, W. (2018), Robust Dual Dynamic Programming).

https://www.researchgate.net/publication/312020933_Robust_Dual_Dynamic_Programming

17. Gomory, R. (1958). Outline of an Algorithm for Integer Solutions to Linear Programs. Bulletin of the American

Mathematical Society 64(5), 275{278 (1958)

18. Gomory, R. (1960). An Algorithm for the Mixed Integer Problem. Tech. Rep. RM-2597, RAND Corporation

(1960)

19. Higle, J. and Sen, S. (1991). Stochastic Decomposition: An Algorithm for Two Stage Linear Programs with

Recourse. Mathematics of Operations Research, 16(3):650-669.

20. Infanger, G. and Morton, D.P (1996). Cut Sharing for Multistage Stochastic Linear Programs with Interstate

Dependency. Mathematical Programming, 75:241-256.

Page 20: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

Dynamic & Stochastic Benders Theory 5

21. Jörnsten, K., Näsberg, M. and Smeds P. A. (1985). Variable Splitting: A New Lagrangean Relaxation Approach

to Some Mathematical Programming Models. University of Linköping, Department of Mathematics, 1985.

22. Kalman, R. E. (1960). A New Approach to Linear Filtering and Prediction Problems. Transactions of the ASME.

Journal of Basic Engineering, Vol. 82, Series D. Pages 35-45.,

23. Küchler, C. and Vigerske, S. (2007). Decomposition of Multistage Stochastic Programs with Recombining

Scenario Trees. 2007-08-05Buch , Stochastic Programming E-print Series (SPEPS). Volume 2007 DOI:

10.18452/8381

24. McShane, E. J. (1974), Stochastic Calculus and Stochastic Models, Paperback – January 1, 1974.

25. Murphy, J. (2013). Benders, Nested Benders and Stochastic Programming: An Intuitive Introduction, Cambridge

University Engineering Department Technical Report CUED/F-INFENG/TR.675 December 2013.

https://arxiv.org/abs/1312.3158v1

26. Nemhauser, G. L. (1970). Introduction to Dynamic Programming. Jhon Wiley & Sons (1970)

27. Pereira M. (1989). Stochastic Operation Scheduling of Large Hydroelectric Systems. Electric Power & Energy

Systems, Vol 11(3-1989)

28. Pereira M. and Pinto L. (1991). Multi-stage Stochastic Optimization Applied to Energy Planning. Mathematical

Programming, 52, 359-375, (1991)

29. Pereira, M. and Pinto, L. (1985). Stochastic Optimization of a Multireservoir Hydroelectric System: A

Decomposition Approach, Water Resources Research. 21, 779-792, 1985.

30. Pontryagin, L. S., Boltyanskii, V. G., Gamkrelidze, R. V. and Mishchenko, E. F. (1962). The Mathematical

Theory of Optimal Processes. Wiley (1962). English translation from Russian. Interscience. ISBN 2-88124-077-

1.

31. Powell, W., Ruszczyński A. and Topaloglu, H. (2004). Learning Algorithms for Separable Approximations of

Discrete Stochastic Optimization Problems. Mathematics of Operations Research, Vol. 29, No. 4

32. Thompson, R.T. (1997). Fast Sequential and Parallel Methods for Solving Multistage Stochastic Linear

Programmes. Ph. D. Thesis, Department of Mathematics, University of Essex.

33. Van Ackooij, W. and Warin, X. (2017). On Conditional Cuts for Stochastic Dual Dynamic Programming.

arXiv:1704.06205 [math.OC]

34. Van Slyke R. and Wets R. (1969). L-shaped Linear Programs with Applications to Optimal Control and

Stochastic Programming. SIAM Journal on Applied Mathematics 17, 638-663.

35. Velásquez, J. M. (1995). OEDM: Optimización Estocástica Dinámica Multinivel. Teoría General. Revista

Energética No. 13 (http://www.doanalytics.net/Documents/OEDM.pdf).

36. Velásquez, J. M. (2005). Optimización Estocástica Multi-Etapa con Manejo de Riesgo. Tesis Doctoral

Universidad Nacional de Colombia.

http://intranet.minas.medellin.unal.edu.co/index.php?option=com_docman&task=cat_view&gid=207&limit=8

&order=date&dir=DESC&Itemid=285

37. Velásquez, J. M. (2006). Nonlinear Dual Dynamic Programming.

http://www.doanalytics.net/Documents/Nonlinear-Dual-Dynamic-Programming.pdf

38. Velásquez, J. M. (2017). OPTEX – Optimization Expert System. https://www.linkedin.com/pulse/optex-

optimization-expert-system-new-approah-make-models-Velásquez/

39. Velásquez, J. M. (2018a). Benders Decomposition Using Unified Cuts.

http://www.doanalytics.net/Documents/Benders-Decomposition-Using-Unified-Cuts.pdf

40. Velásquez, J. M. (2018b). GDDP: Generalized Dual Dynamic Programming Theory & Electric Sector

Applications. http://www.doanalytics.net/Documents/GDDP-Generalized-Dual-Dynamic-Programming-

Theory-&-Electric-Sector-Applications.pdf

41. Velásquez, J. M. (2018c). G-SDDP: Generalized Stochastic Dual Dynamic Programming Theory & Electric

Sector Applications, White Paper DW-DT-049-2018, http://www.doanalytics.net/Documents/G-SDDP-

Generalized-Stochastic-Dual-Dynamic-Programming-Theory-&-Electric-Sector-Applications.pdf

42. Velásquez, J. M. (2019a). J. F. Benders: Theory, Variations and Enhancements, Chapter in the Book Large Scale

Optimization Applied to Supply Chain & Smart Manufacturing: Theory & Real-Life Applications. Springer

(2019).

43. Velásquez, J. M. (2019b). Stochastic Optimization: Fundamentals, Chapter in the Book Large Scale Optimization

Applied to Supply Chain & Smart Manufacturing: Theory & Real-Life Applications. Springer (2019)

44. Velásquez, J. M. (2019c). GDDP Programs & Experiments. http://www.doanalytics.net/Documents/G-SDDP-

GDDP-Programs-Experiments.pdf

45. Velásquez, J. M., Restrepo P. J., and Campo R. (1999). Dual Dynamic Programming: A Note on Implementation.

Water Resources Research Vol 35. No. 7 (July 1999).

46. Wittrock R.J. (1983). Advanced in a Nested Decomposition Algorithm for Solving Staircase Linear Programs),

Technical Reporte SOL-83-2, Systems Optimization Laboratory, (Stanford, CA, 1983)

Page 21: Implementation and Electric Sector Applications Jesus Velásquez … · 2020. 6. 9. · Optimization System (Velasquez 2018). The first paper about GDDP/G-SDDP was published in 2002

6 J. Velásquez-Bermudez

47. Wittrock, R.J. (1985). Dual nested decomposition of staircase linear programs. Mathematical Programming Study

24 65-86.

48. Wolf, C. (2013). Advanced Acceleration Techniques for Nested Benders Decomposition in Stochastic

Programming. Decision Support & Operations Research (DS&OR). Lab, University of Paderborn, Germany.

https://d-nb.info/1046905090/34

49. Wolf, C., Koberstein, A., & Hultberg, T. H. (2011). Stochastic Extensions to FlopC++, in B. Hu, K. Morasch, S.

Pickl, & M. Siegle (Eds.), Operations Research Proceedings

50. Zou, J., Ahmed, S. & Sun, X.A. Math. Program. (2018). https://doi.org/10.1007/s10107-018-1249-5