A Graphical and Open Source Matlab-GAMS interface for Electricity Market Models Federico Milano Departamento de Ingenier´ ıa El´ ectrica, Electr´ onica y Autom´ atica E.T.S.I.I., Universidad de Castilla-La Mancha Campus de Ciudad Real, 13071 Ciudad Real (Espa ˜ na) Tel: +34 926 295 219, fax: 926 295 361, e-mail: Federico.Milano@uclm.es Abstract. This paper describes the PSAT-GAMS interface to solve a variety of optimization models. The Power System Analysis Toolbox (PSAT) is an open source Matlab-based soft- ware package for analysis and design of small to medium size electric power systems. While the General Algebraic Modeling System (GAMS) is a high-level modeling system for mathe- matical programing problems. It consists of a language com- piler and a variety of integrated high-performance solvers. A bridge between GAMS and Matlab allows using sophisticated nonlinear optimization tools with the visualization tools pro- vided by Matlab. Examples based on a didactic 3-bus test sys- tem and the RTS-96 24-bus system are presented to illustrate the capabilities of the interface. Keywords Electricity markets, optimal power flow, linear program- ming, nonlinear programming, Matlab, GAMS. 1. Introduction In recent years, the increasing interest for competitive and secure electricity markets and their mathematical ex- ploitations have led to the proposal of a huge variety of market clearing models. This results in a variety of mod- els and mathematical techniques proposed in the litera- ture to take into account diverse market features and be- haviors. Recent relevant contributions on this topic are [1], [2], [3], [4], [5], and [6]. In order to develop and fast prototype new market clear- ing models there is the need of a versatile software tool which is able to combine powerful optimization solvers and a power system dedicated software. This pa- per describes a novel open-source software tool, namely the PSAT-GAMS interface, for solving market clearing problems as well as stability constrained optimal power flows. The proposed program is suited for the analysis of small to realistic size electric power systems and is ori- ented to (under)graduate students and researchers in the field of electricity markets and power system analysis. PSAT is a Matlab toolbox for electric power system anal- ysis and control [7]. PSAT includes power flow, continu- ation power flow, optimal power flow, small signal stabil- ity analysis and time domain simulation. All operations can be assessed by means of graphical user interfaces (GUIs) and a Simulink-based library provides an user- friendly tool for network design. One of the key point of PSAT is that it is completely open source and free. This allows exchanging ideas and effectively improving scientific research [8]. At this aim, the command line version of PSAT can run on GNU/Octave [9], which is a free Matlab clone. In the field of general purpose optimization techniques, one of researchers’ favorite choice is the General Alge- braic Modeling System (GAMS) [10]. GAMS is a high- level modeling system for mathematical programming problems. It consists of a language compiler and a va- riety of integrated high-performance solvers. GAMS is specifically designed for large and complex scale prob- lems, and allows creating and maintaining models for a wide variety of applications and disciplines [10]. GAMS is able to formulate models in many different types of problem classes, such as linear programming (LP), non- linear programming (NLP), mixed-integer linear pro- gramming (MILP) and (relaxed) mixed-integer nonlinear programming (MINLP). The paper is organized as follows. Firstly the main fea- tures of PSAT are illustrated in Section 2. Section 3 gives the outlines of the PSAT-GAMS interface while Section 4 gives a brief insight on the mathematical models cur- rently implemented in the PSAT-GAMS interface. Sec- tion 5 depicts a variety of examples based on a didactic 3-bus test system and the RTS-96 test system [11]. Fi- nally Section 6 summarizes the main contributions of this paper.