The Affine Scaling Algorithm: An application to the hydrothermal

Transcripción

The Affine Scaling Algorithm: An application to the hydrothermal
15vo CONGRESO NACIONAL DE INGENIERÍA
ELECTROMECÁNICA Y DE SISTEMAS (CNIES 2015)
ARTÍCULO No. ELE 11
The Affine Scaling Algorithm: An application
to the hydrothermal dispatch
Becerril Gordillo C.⇤
Badaoui M.†
Escuela Superior de Ingenierı́a Mecánica y Eléctrica, Unidad Zacatenco, IPN.
Abstract– The formulation of problems as linear
alternativa muy poderosa para la solución de problemas de programación lineal.
Se espera que la descripción a detalle permita
que los estudiantes de ingenierı́a sean capaces de
aplicarlo a cualquier problema de programación
lineal. En este trabajo, se muestra la aplicación
del mismo a la solución de un problema de despacho hidrotérmico local.
Palabras clave– Algoritmo de escalado afı́n, método
de puntos interiores, programación lineal, despacho
económico hidrotérmico.
programs is extensive in planning and operation
of power systems studies. In addition to the traditional method (simplex method) to solve this
type of formulations, there are efficient and ideal
technics for solving large scale problem models.
This paper describes a detailed introduction of
the Affine Scaling Algorithm (ASA). The ASA belongs to the branch of the so-called interior point
algorithms and represents a powerful alternative
for solving linear programming problems.
It is expected that the detailed description
given in this paper, allows engineering students
to be able to apply it to any linear programming
problem. In this paper, the application thereof to
the solution of a problem of local hydrothermal
economic dispatch is shown.
Keywords– Affine scaling algorithm, interior point
method, linear programming, hydrothermal dispatch.
1
A LP is a mathematical structure that is modeled as a
minimization (or maximization) of a linear function over
a region (feasible region) produced by the intersection of a
finite number of constraints which could include equality
and/or inequality –linear– functions.
For easy manipulations –which means adding or subtracting (nonnegative) slack variables in the inequality
constraints– any LP can be transformed into the so-called
standard form:
Resumen– La formulación de problemas por
medio de programas lineales es muy frecuente
en estudios relacionados con la planeación y
operación de sistemas eléctricos de potencia.
Además del método tradicional (método simplex)
para resolver este tipo de formulaciones, existen
técnicas eficientes e ideales para problemas cuyo
modelo es de gran tamaño.
En este artı́culo se describe una introducción
detallada del Algoritmo de Escalado Afı́n. Este
algoritmo pertenece a la rama de algoritmos denominados de puntos interiores y representan una
⇤ e-mail:
† e-mail:
min
subject to
cT x
Ax = 0
x
0
(1)
where x, cT 2 Rn , A 2 Rm⇥n and b 2 Rm . The feasible
region is defined by:
⌦ = {x 2 Rn | Ax = b, x
0}
(2)
Generally speaking, an iterative method that moves in
the interior of the feasible region is as follows:
[email protected]
[email protected]
México D.F., 19 al 23 de octubre 2015
Introduction
1
ARTÍCULO No. ELE 11
15vo CONGRESO NACIONAL DE INGENIERÍA
ELECTROMECÁNICA Y DE SISTEMAS (CNIES 2015)
1. Start with an interior solution.
2.1.1
2. If current solution is good enough, then stop; otherwise continue.
Proposition 1 The feasibility direction vector (search
direction) is an element of the null space of A, i.e.,
xk 2 N ul(A) = { xk 2 Rn | A xk = 0}
3. Check all directions for improvement and move to a
better interior solution. Go to 2.
Proof. If the new point xk+1 is feasible: Axk+1 = b.
From (3) and because ↵ > 0 we obtain: A xk = 0.
2
The Affine Scaling Algorithm (ASA) was the first interior point algorithm for LP and according to the choice
of the direction in step three, we have two variants of the
ASA: the short step and the long step algorithm.
The short step ASA was introduced by Dikin in 1967
and the method takes advantage of the ellipsoid property1
in a feasible region and roughly speaking for a given initial
interior point at each iteration:
Until now, we just know the characteristic of a vector which is a candidate for search direction vector that
preserves feasibility. We need to know what vector can
satisfy this condition.
Proposition 2 Let A 2 Rm⇥n be a full rank matrix and
P the orthogonal projection matrix given by
1. Construct an ellipsoid called “Dikin ellipsoid”, and
P = In
2. take a step in the direction which minimizes the objective function over the ellipsoid
Descent direction
Proposition 3 (Descent condition) If a vector
is a descent direction vector, then cT xk < 0.
(3)
xk
Proof. Let xk be a descent direction vector, then
cT xk+1 < cT xk . Using (3) and reducing, we obtain
cT xk < 0.
2
As usual, xk is the search direction and ↵k > 0 is the
step length.
Thus, if we have an interior initial solution which is not
optimal, we have to decide in which direction to move and
how far to go.
It is known that a negative gradient vector leads to the
maximum descent of a given function. Lets prove that
this is a good choice for our descent direction vector. In
this case, rf (x) = r(cT x) = c. Of course, this
vector must be projected by P in order to satisfy the
feasibility condition, i.e.,
Search direction
A good search direction needs to show two properties:
(i). To preserve feasibility and (ii). To be a descent direction.
Proposition 4 A descent direction vector is given by the
projected gradient P c.
Proof. The orthogonal projection matrix P is idempotent and symmetric, this implies that
cT P c =
cT P 2 c = cT P T P c = (P c)T P c = ||P c||2  0.
2
1 Mathematically, ⌦ forms a convex body and it is known
that every convex body contains a unique ellipsoid of maximal volume and is contained in a unique ellipsoid of minimal
volume [1].
México D.F., 19 al 23 de octubre 2015
A
The search direction vector needs to be a vector which
ensures a descent in the objective function value as well.
First we have to establish the condition that a vector
needs to satisfy for being a descent direction vector.
The Affine Scaling Algorithm
The ASA begins with an interior point and then build
a sequence {xk } ! x⇤ , where x⇤ is the optimum (if there
exists) following the line search procedure:
2.1
1
Then, P d 2 N ul(A) for every d 2 R .
Proof. Considering the orthogonal projection matrix:
A(P d) = A(In AT (AAT ) 1 A)d. Multiplying and reducing, we get: A(P d) = 0.
2
2.1.2
xk+1 = xk + ↵k xk
AT (AAT )
n
until the optimum is reached.
The long step ASA was proposed by Vanderbei et. al
[2] and it will be explained in detail in this work.
2
Feasibility direction
2
15vo CONGRESO NACIONAL DE INGENIERÍA
ELECTROMECÁNICA Y DE SISTEMAS (CNIES 2015)
ARTÍCULO No. ELE 11
It is a better option to compute the projected gradient
(search direction) in a new space called scale space than
in the original space given by (1) (see [3]). This follows to
the idea of getting a better option when calculating the
step length because when xk is close to the boundary, the
step length may be very small (xa in Figure 1); therefore
we need points near to the center of ⌦ where it is possible
to make longer moves (xb in Figure 1).
Hence
min
x̃
sujeta a
c̃T x̃
(4)
à x̃ = b
x̃
0
where c̃ = X k c and à = A X k ; X k x̃
because of the non-singularity of X k .
0 ) x̃
0
According to the Proposition 4, the search direction in
the scale space will be x̃ = P̃ c̃. Consequently
x̃ =
X k (In
AT (A(X k )2 AT )
1
A(X k )2 ) c
(5)
In the new space, x̃k+1 = x̃ + ↵ x̃, but multiplying by
X k , we obtain xk+1 = xk + ↵ X k x̃ and it is clear that
xk = X k x̃. Thus, using (5) we have
xk =
2.2
Figure 1: Centrality.
Scale space and the search direction
In order to satisfy the centrality condition, i.e., being
at the “center” of the non-negative first orthant {x 2
Rn |x 0}, we need to re-scale the coordinates using the
concept of equal distance of the boundary through the
canonical vector e = (1, 1, . . . , 1); this is, we will scale xk
to be x̃ = e by dividing every component of the vector by
itself in the current iteration as follows:
xi
x̃i = k i = 1, . . . , n
xi
Defining the diagonal scaling matrix
0 k
x1
0
B
xk2
B
k
X =B
..
@
.
0
xkn
3
1
C
C
C
A
3.1
Step length
Algorithm
Starting solution
Obtaining an interior feasible starting solution is not
an easy issue. Of course, if we propose x0 > 0 this will
be an interior solution but very probably will not be a
feasible solution, i.e., a solution which satisfies Ax0 = b.
When the ASA is applied, it is a common practice to
construct an artificial linear programm which involves a
large number called the big M. Here, another problem
arise: to estimate the value of this M. Fortunately, there
is a method proposed by Ishihara and Kojima where the
M is updated to a suitable value during the iteration of
the ASA [7].
A X k x̃ = b
0
México D.F., 19 al 23 de octubre 2015
A(X k )2 ) c (6)
At least, two important aspects have to be mentioned
before showing the algorithm: How to start it and how
to stop it.
x̃
X k x̃
1
where ⇢ 2 [0.95, 0.9995] is a correction factor [4, 5].
we get x̃ = (X k ) 1 x. Notice that X k is non-singular
and then invertible because every point is interior, which
means that xki > 0 8i.
It is easy to see that, x = X k x̃ and problem (1) is
written as
min cT X k x̃
sujeta a
AT (A(X k )2 AT )
We must ensure that the new point in (3) remains positive, that is xk+1 0, i.e., that xk + ↵k xk 0. Thence,
xk
↵ k xk .
The feasibility of the current point guarantees that
xk 0, therefore we are interested in negative values for
xk (alpha is already positive). Indeed, the maximum
step length is given by
⇢
xki
↵k = ⇢ min
8i such that xki < 0
(7)
xki
Hence, in the next subsection we will describe first how
to obtain the scale space and then how to get the search
direction in this new space.
2.1.3
(X k )2 (In
3
15vo CONGRESO NACIONAL DE INGENIERÍA
ELECTROMECÁNICA Y DE SISTEMAS (CNIES 2015)
ARTÍCULO No. ELE 11
3.2
4
Stop Criteria
The stop criteria is based on the strong duality theorem, which tells that whenever the primal problem has
an optimal solution, the dual problem has one as well and
there is no duality gap2 [6].
Thus, the stop criteria is
T
k 2
A(X ) A y = A(X ) c
Dis-
A hydrothermal system is composed of hydroelectric
and thermoelectric units. The objective in its operation is
to optimize the use of various energy resources available,
to determine the amount of active power necessary to
meet the demand at minimum cost without violating the
restrictions associated.
If we only consider thermal costs and neglecting
spillages, the local hydrothermal dispatch is formulated
as a linear programming problem as follows [8]:
|cT xk bT y|
"
(8)
1 + |cT xk |
⇥
⇤
where " 2 10 6 , 10 8 . In order to compute y is not
necessary to build the dual problem; it is possible to show
that y can be obtained from (6) by solving [3]:
k 2
Local Hydrothermal
patch Application
T
M in
(9)
⌧ X
N
X
nj CIiT PijT
(10)
j=1 i=1
Subject to:
3.3
T
The algorithm
N
X
The ASA can be written as follows:
H
PijT +
i=1
N
X
PijH = PjD
i=1
Xk(j+1) = Xkj + Wkj
Algorithm 1: Affine Scaling Algorithm
Data: " > 0 and ⇢ 2 [0.95, 0.9995]
Result: The optimum value x⇤
1 begin
2
k
0;
3
Obtain xk > 0 and set X k = diag(xk );
4
Solve equation (9);
5
while inequality (8) is not fulfilled do
6
Compute the search direction xk , using
equation (6);
7
if xk < 0 then
Compute the step length ↵, using
equation (7)
else
Stop, the problem is unbounded
end
8
Update the solution by equation (3);
9
Solve equation (9);
end
10
x⇤
xk ;
end
Ukj
Pmin  PijT  Pmax
Pmin  PijH  Pmax
Xmin  Xkj  Xmax
Umin  Ukj  Umax
where
H
Ukj = Pkj
(
4.1
nj
)
w
Test system modelling
We will consider a test system composed by two
thermal plants and three hydroelectric plants with a
local demand (Figure 2). For the generation we will
use the Garver’s modified system data proposed in [10],
following the operation policy entrance for hydroelectric
plants given in [11, 12]: The hydroelectric plant H1 ,
operates during the three years of the analysis, the
hydroelectric plant H2 starts its operation until the
second year, and the hydroelectric plant H3 operates
only in the last year.
Thus, the model is
2 If
the objective of the primal problem is given by cT x
and the objective of the dual problem is given by bT y, we call
cT x bT y the duality gap
México D.F., 19 al 23 de octubre 2015
T
T
T
M in 0.2628P11
+ 0.2628P12
+ 0.2628P13
T
T
T
+0.3066P21
+ 0.3066P22
+ 0.3066P23
4
15vo CONGRESO NACIONAL DE INGENIERÍA
ELECTROMECÁNICA Y DE SISTEMAS (CNIES 2015)
ARTÍCULO No. ELE 11
5
Subject to:
T
T
H
P11
+ P21
+ P11
T
T
H
H
P12 + P22 + P12
+ P22
T
T
H
H
H
P13 + P23 + P13 + P23
+ P33
X12
X13
X14
X23
X24
X34
=
=
=
=
=
=
=
=
=
The ASA was implemented with a Matlab code and
results for the linear program which models the local hydrothermal dispatch problem were compared with those
obtained with the solver linprog with both interior point
and simplex algorithm. These results are shown in tables
1 to 6.
1107M W
1373M W
1560M W
H
10000 + 7190.2 31.53P11
H
X12 + 21602.1 31.53P12
H
X13 + 1797.5 31.53P13
H
10785 + 7190.2 31.53P22
H
X23 + 1797.5 31.53P23
H
1797.5 + 1797.5 31.53P33
T
P11
 400M W,
T
P12
 400M W,
T
P13
 400M W,
H
P11
 600M W
H
P12
 600M W
H
P13
 600M W
X12  35000M m3
X13  35000M m3
X14  35000M m3
Results
Table 1: Generation dispatch - ASA
Year GT1
1
2
3
400
400
400
Generation Plants
GT2
GH1
GH2
620
73
146
87
600
600
0.0
300
300
GH3
Total[MW]
0.0
0.0
114
1 107
1 373
1 560
Table 2: Generation dispatch - linprog-interior point
T
P21
 700M W
T
P22
 700M W
T
P23
 700M W
Year GT1
1
2
3
H
P22
 300M W
H
P23
 300M W
H
P33
 300M W
400
400
400
Generation Plants
GT2
GH1
GH2
474
199
166
233
474
580
0.0
300
300
GH3
Total[MW]
0.0
0.0
114
1 107
1 373
1 560
Table 3: Generation Dispatch - linprog-simplex
Year GT1
1
2
3
X23  15000M m3
X24  15000M m3
X34  15000M m3
400
400
400
Generation Plants
GT2
GH1
GH2
162
73
604
545
600
142
0.0
300
300
GH3
Total[MW]
0.0
0.0
114
1 107
1 373
1 560
Table 4: Reservoir status - ASA
3
Volume of water [Mm ]
Year
2
3
Final
GH 1
14 434
17 119
0.0
GH 2
0.0
8 516
855
GH 3
0.0
0.0
0.0
Table 5: Reservoir status - linprog-interior point
Volume of water [Mm3 ]
Year
2
3
Final
GH 1
9 840
16 483
0.0
GH 2
0.0
8 516
855
GH 3
0.0
0.0
0.0
Table 6: Reservoir status - linprog-simplex
Volume of water [Mm3 ]
Year
2
3
Final
GH 1
0.0
2 684
0.0
GH 2
0.0
8 516
855
GH 3
0.0
0.0
0.0
Figure 2: Hydrothermal test system.
The optimal operation cost in all cases is: 572.48M $.
The total cpu time used for the ASA was 0.016 s, for
the solver linprog-interior point was 0.086 s and for the
linprog-simplex was 0.604 s.
The methodology and previous computations for the
model are detailed in [13].
México D.F., 19 al 23 de octubre 2015
5
15vo CONGRESO NACIONAL DE INGENIERÍA
ELECTROMECÁNICA Y DE SISTEMAS (CNIES 2015)
ARTÍCULO No. ELE 11
6
Conclusions
Table 10: Data of generators
We have shown in great detail the Affine Scale Algorithm for solving linear programs in standard form; it
is important to say that some easy arrangements must
be done in order to allow free variables in the model
(which may take negative values). This kind of algorithms belongs to the so-called interior point algorithms
which have been demonstrated to be competitive with
the simplex method and usually superior on very large
problems which are not uncommon in engineering applications. In this paper, the application of the ASA to a
small-scale local hydroelectric dispatch problem with 36
variables (18 slacks) and 27 constraints (9 equality constraints and 18 inequality constraints), was successfully
presented. A wider spectrum of applications solved using this algorithm is expected for engineering students,
including large-scale problems.
7
Unit
Thermal
Thermal
Hydroelectric
Hydroelectric
Hydroelectric
All data for the test system are shown in tables 3 to 6.
Table 7: Data of the demand
Demand
[M W ]
Hydroelectric
Plant
PH1
PH2
PH3
Total
demand
1107
1373
1560
4040
Table 8: Inflows
1
[m3 /s]
Year
2
[m3 /s]
3
[m3 /s]
228
342
0.0
685
228
57
57
57
57
References
Table 9: Data of reservoirs
Hydroelectric
Plant
PH1
PH2
PH3
Maximum Maximum Initial
turbinate
volume
volume
[m3 /s]
[Mm3 ]
[Mm3 ]
600
300
300
35,000
15,000
15,000
10,000
México D.F., 19 al 23 de octubre 2015
30
35
0.0
0.0
0.0
Represents the study period
Is the index for generators
Is the index for stages in the period analysis ⌧
Duration of the stage j
Number of thermal generation units
Number of hydroelectric generation units
Electric power generated by the thermal unit i
in stage j
PijH Electric power generated by the hydroelectric
unit i in stage j
PjD Demanded power of the system in stage j
Pmin Minimum power limit for generators (thermal
or hydroelectric generators)
Pmax Maximum power limit for generators (thermal
or hydroelectric generators)
CIiT Incremental cost of the thermal unit i.
Xkj Water volume for reservoir k in stage j
Xk(j+1) Water volume for reservoir k at the end of
stage j
Xmax Maximum water volume of reservoirs
Xmin Minimum water volume of reservoirs
Wkj Inflows at the reservoir k in stage j
Ukj Turbinate discharge water in reservoir k in
stage j
Umax Maximum turbinate discharge in reservoirs
Umin Minimum turbinate discharge in reservoirs
! Conversion factor for the hydroelectric units
Appendix 1: System Data
3
400
700
600
300
300
⌧
i
j
nj
NT
NH
PijT
The authors are grateful to the Instituto Politécnico
Nacional research project SIP-20150027 for the financial
support received for the development of this work.
Year
2
0.0
0.0
0.0
0.0
0.0
Appendix 2: Nomenclature
Acknowledgements
1
Power
Incremental
[MW]
cost
Min Max
[$/MWh]
[1] Ye, Y. Interior point algorithms: Theory and analysis. Wiley-Intersciences Series in Discrete Mathematics and Optimization, (1997).
Conversion
factor
!
[MW/m3 /s]
[2] Vanderbei, R., Meketon, M. and Freedman, B. A
modification of Karmakar’s linear programming algorithm Algorithmica, 1, pp. 395-407, (1986).
1.0
1.0
1.0
6
ARTÍCULO No. ELE 11
15vo CONGRESO NACIONAL DE INGENIERÍA
ELECTROMECÁNICA Y DE SISTEMAS (CNIES 2015)
[3] Castro, J. Una introducción al método del escalado
afı́n para programación lineal. Statistic and Operation research Department, UPC, (2000).
Carlos A. Becerril Gordillo. Electrical engineer by
the Technological Institute of Orizaba (1999). He is in
the final stage of his MsC studies in the Department of
Postgraduate Studies and Research ESIME-ZacatencoIPN with the thesis: An infeasible primal-dual interior
point method as applied to the static transmission
expansion planning problem. Since 2001, he is a teacher
in the Academy of Mathematics in the Department of
Electrical Engineering of the ESIME.
[4] Vanderbei, R. and Shanno, D. An interior-point algorithm for nonconvex nonlinear programming. Computational Optimization and Applications 13, pp.
231-252, (1999).
[5] Lusting, I., Marsten, R. and Shanno, D. Interior
Points methods for linear programming: Computational state of the art. ORSA Journal on Computing.
Vol. 6, No. 1, (1994).
Mohamed Badaoui. Degree in Mathematics from the
University Mohamed I (1998). Master of Science in Mathematics from the School of Physics and Mathematics
(2003) and PhD in Mathematics from the National Autonomous University of Mexico (2012). Currently, he
is Professor of Mathematics at the Section of Graduate
Studies and Research ESIME-Zacatenco-IPN.
[6] Vanderbei, R. Linear programming: Foundations
and extensions. Kluwer Academic Publisher, 2nd ed.
(2001).
[7] Ishihara, T. and Kojima, M. On the big M in the
affine scaling algorithm. Mathematical Programming
62, pp. 85-93, (1993).
[8] Corredor, Pablo. Operación económica de sistemas
de potencia. Serie Nabla-Delta No. 23, (1992).
[9] Tovar, O., Becerril, C. and Badaoui, M. Despacho
económico de un sistema hidrotérmico usando optimización lineal. XIV Congreso Nacional de Ingenierı́a Electromecánica y de Sistemas (XIV CNIES),
México, D. F., noviembre, (2013).
[10] Cruz, R. Herramientas informáticas para la
planeación de la red de transporte de energı́a
eléctrica en ambientes desregulados. Universidad
Pontificia Bolivariana, tesis doctoral, (2004).
[11] Galvis, J., Garcés, A., Escobar, A. Aplicación del
Algoritmo de búsqueda tabú al problema de despacho hidrotérmico. REDALYC, Revistas cientı́ficas de
América Latina, el Caribe, España y Portugal, Scientia et Technica Año XI, No 29, Diciembre, (2005).
[12] Giraldo, M., Franco, F., Gallego, R. Solución
al problema del despacho de energı́a en sistemas
hidrotérmicos usando simulated annealing. REDALYC, Revistas cientı́ficas de América Latina, el
Caribe, España y Portugal, Scientia et Technica Año
XI, No 29, Diciembre, (2005).
[13] Tovar, O. Programación de la generación en un
sistema hidrotérmico usando optimización lineal.
Tesis de licenciatura, Escuela Superior de Ingenierı́a
Mecánica y Eléctrica, Instituto Politécnico Nacional,
México, D. F. (2011).
México D.F., 19 al 23 de octubre 2015
7

Documentos relacionados