Application Of General Algebraic Modeling System To Power ... - PWP

2 downloads 0 Views 842KB Size Report
W.W. Hogan,"Contract networks for electric power transmission: Technical reference" Energy and .... [A] A. Brooke, D. Kendrick and A. Meeraus. GAMS/Cplex 4.0.
IEEE Transactions on Power Systems, Vol. 14, No. 1, February 1999

15

APPLICATION OF GENERAL ALGEBRAIC MODELING SYSTEM TO POWER SYSTEM OPTIMIZATION Debabrata Chattopadhyay KGM Power Technologies, Inc, - India New Delhi, India Abstract: This paper gives a systematic exposure to modeling language as applied to power system optimization problems. Specific reference to the GAMS (General Algebraic Modeling System) language has been made keeping in mind the popularity, flexibility and available algorithmictools in it. An overview of the GAMS language followed by simplistic examples are provided to illustrate the ease and efficiency with which power system models can be developed and experimentedwith. References are cited to the related mathematicalprogramming literature as well as some selected application of GAMS in power system area. Finally the pros and cons of reliance on modeling languages have been discussed. Keywords: Optimization, Modeling Language, Planning

I. INTRODUCTION Application of optimization techniques to power system problems have been several decades old now and there seems to be a competition among the sophistication of the optimization algorithms and the growing complexity of power system planning and operations related problems. The growth in complexity in power system optimization problems has stemmed fiom three basic objectives: improving accuracy of the power system models to capture the reality better, growing system size because of integration of system over larger geographical areas for better economy and reliability of operation, and also due to new emerging issues e.g., environmental issues, regulatory issues. Research in power system optimization model development, thus, continue to be an active area. Development of optimization models also form a part of learning and understanding several power system phenomena in most of the graduate level power system programs. There has been tremendous growth in mathematical programming techniques and development of computer codes to solve large scale optimization models over the past four decades. There has also been significant development in relational database for improved data organization and PE-640-PWRS-0-12-1997 A paper recommended and approved by the IEEE Power Engineering Education Committee of the IEEE Power Engineering Society for publication in the IEEE Transactions on Power Systems. Manuscript submitted October 7, 1996; made available for printing December 12, 1997.

transformation capabilities. These two developments have enabled the modelers to develop and test optimization models efficiently. The tremendous effort that goes in developin,g an optimization model has a significant part in debugging lengthy computer codes (such as FORTRAN), data preparation, data transformation and report generation. A number of efficientmodeling languageshave been developed which makes use of both the development in improved database management and mathematical programming techniques. One of the most popular and flexible languages among these is the General Algebraic Modeling Sys1.em (GAMS) [I]. GAMS was originally developed through a World Bank funded study in 1988. The initial impetus for the development of GAMS arose 'lout of the frustruting experiences of an economic modeling group at the WorldBank ... The programmers in the group wrote FORTRANprograms to prepare each model for solution; the work was dull but demanding, and errors were easy to make and hard toJind'.Since similar experiences are experienced by and large in most of the application areas of optimization, GAMS as well as other modeling languages have found application in a variety of disciplines like finance, engineering, energy, environment, management, economics and mathematics. It has also found some useful application in power system in recent years. This paper details the various features of GAMS with specific reference to its applicability in various classes of optimizationproblems in power system. It provides some simple examples to illustrate model development in GAMS for power system planning related problems. Finally, it gives a partial list of some applications of GAMS available in the power system literature. In the concluding session, a summary of the various features of GAMS is presented and cases where application of modeling languages should be limited have belen discussed. The prime objective of h s paper has been to motivate students and researchers in the field of power system to make use of the advancement in the modeling languages for optimization model development in an efficient way. The specific reference to GAMS has been made keeping in mind its popularity, flexibility and constant research and development to add new features to it over the years. However, the emphasis has been laid primarily on exposing the readers to a generic description of modeling language features, why, how and where these should be used, rather than "teaching GAMS language". Section I1 of the paper gives an overview of the GAMS language , In section 111, some simple illustrative examples are given to help understanding how the modeling language simpllfy programmingfor model development. Section IV concludes the paper with a caution why blind reliance on modeling languages for power system modeling may not be the best thing to do.

0885-8950/99/$10.00 0 1997 IEEE

16

OW GAMS LANGUAGE

sets

2.1 W h y GAMS? GAMS is a high level language for developing mathematical models with concise algebraic statements. It makes use of relational database theory and mathematical programming and further merges them to suit the need of mathematical modelers. Apart from a wide variety of optimization problems, it can handle simultaneous linear and non-linear equation systems and further development would include (linear and non-linear) complementarity problems and general equilibrium problems. The two most attractive features of a modeling language are: *

.

separability of the mathematical problem and the solution method - concise description of models through algebraic statements independent of the algorithm to be used. So the user can implement different algorithm for the same problem without changing the basic model structure; separability of data and logic - it makes incremental addition to the model convenient . Basically, the mathematical description of the model can be retained while increasing/decreasing the size of the problem;

2.2 How does an optimization model look like in GAMS? The basic structure of a mathematical model coded in GAMS has the components: sets, data, variable, equation, model and output (Fig.1). An example of the elements of an optimal power flow (OPF) model is given for the readers to relate these components to power system problem. In general, any optimizationproblem can be formulated using these components. The data presentation in GAMS can be done in its most elemental form using tables, columns etc. There are standard IF-ELSE, WHILE, LOOP, exception handling (CONTROL statements) logic available which give the mherent flexibility to use GAMS almost like any programming language while retaining the basic advantages. There are p o w e h l output specification facilities like PUT whch can generate reports in any desired format Also, the output can be directly linked to spread-sheet programs for graphical analysis etc. Excellent debugging features exist for quick and effective identification of errors. No attempt is made here to give the syntax of GAMS and the interested readers are referred to GAMS Users' Guide [I] for such details.

Declaration and assignment of members e.g.,{buses, generators, lines etc.}

Data in the form ofscalars, Parameters and Tables

Declaration and assignment of values e.g.,{generator ratings, costs, line parameters, MW and MVAr loads etc}

Decision Variabks

Declaration, assignment of type, bounds, initial values e.g., {generation level, line flow, load bus voltages, tap setting etc}

Equations

Declaration and definition e.g.,(load flow constraints,voltage limit, generation limits on MW and MVAr, cost functioi etc.}

Model and Solve Staemene Declaration, assignment of appropriate solver e.g., {Model OPF; Solve OPF Using NLP Minimizing Cost} output

Display, Put e.g., (display optimal generation level, line flows, voltage levels etc}

2.3 The GAMS Tool kit

Fig.1: Structure of a GAMS model

GAMS provides powefil solvers for the following classes of optimization problems: *

(LP) variants of Simplex methods and Interior Point methods primal, Primal-

Linear programming

Dual and Primal-Dual Prcdiotor-CorreGtor mGthods)

. .

Non-linear programming (TVLP) (variants of Gradient

methods) Linear mixed integer programming (MIL& (various Branch and Bound Algorithms) Non-linear mixed integer programming (MINLP) (based on Outer Approximation Algorithm)

The tool kit in GAMS embodies several man-years of research that has gone into developing and fine tuning the algorithms in each category of problems. GAMS also has the unique feature of providing a common language that can make use of a variety of solvers developed by dmerent research group/companies. Table- 1 gives the list of currently available GAMS solvers. References to the basic literaturelreferencemanuals have been made for further explorationon specific solvers. There is probably no solver which can be labeled as "best" and their performance is closely linked to the structure of the problem. The choice of solver is thus dependent on the understanding of the special structure of the problem and some experimentation.

B-matrix

Table LossCoff (ij) 1

BDMLP,MINOS 5 [2],ZOOM[3], MPSX [4] , SCICOMC [5],APEX IV [6], LAMPS, OSL, XA, CPLEX [71

LP

1 2 3

2

3

0.000136 0.0000175 0.0000175 0.000154 0.000184 0.000283

0.000184 0.000283 0.00161

Scalar Load /300/ ;

MINOS 5 , CONOPT [8], GRG 2 [9], NPSOL [lo]

"3. Declaration of variables with explanatory text

Variables

IV, XA, OSL, LAMPS

I

I DICOPT-H [l 11

I

whlle the available solvers provide access to most of the state of the art optimization tools, new solution algorithms for speclfc applications can be developed using the existing ones and the basic features of GAMS with much lower efforts than needed in a conventional programming language like FORTRAN. Various other optimization techniques like decomposition techniques (Bender's decomposition, Dantzig-Wolfe decomposition), multiobjective analysis (Goal Programming, Compromise Programming), Lagrangian Relaxation, StochasticProgramming, Monte Carlo simulation etc have been implemented using GAMS.

ID.ILLUSTRATIVE EXAMPLES OF MODEL DEVELOPMENT

In this section, three well-known power system problems, Economic Dispatch Calculation (real-time), Unit Commitment (short term) and Investment Planning (long term) are solved using GAMS. Some of the large scale GAMS based programs in various other planning areas have been listed next. 3.1 Example 1: Economic Dkpatch Calculation 1121

The first example is a simple Economic Dispatch Calculationfor a 3-generator system with transmission losses modeled using Bmatrix formulation. The GAMS model is reproduced below (Fig.2) and is nearly self-explanatoxy. All bold words are reserved words in GAMS language. Explanatory texts are inserted at relevant places (precededby asterisk mark).

P(i) optimal generation level of i Cost minimum cost

* Defining variable type vu. positive, negative, binary etc positive variables p ;

* Assigning variable limits by .UP (upper) and .LO (lower) P.UF'(i) = Data(i,"Upp") ; P.LO(i) = Data(i,"Low") ; *4. Declaration of equations with explanatory text Equations

CostEq DemEq

total generation cost Demand-supply balance

* Mathematical expression of the equations - given by * EqunName.. L.H.S =I= {

Suggest Documents