Open Source Software (OSS) for
Electricity Market Research,
Teaching, and Training
- Last Updated: 2 April 2021
- Site Maintained By:
- Research Professor & Professor Emerita of Economics
- Courtesy Research Professor of
Electrical & Computer Engineering
- Heady Hall 260
- Iowa State University
- Ames, Iowa 50011-1054
tesfatsi AT iastate.edu
General Electricity Resources
Agent-Based Electricity Research
Software Release Disclaimer:
- All software provided below is unsupported and provided as-is, without
warranty of any kind, unless otherwise specified by the provider.
- Materials Linked to Date:
The U.S. electric power industry is currently undergoing substantial changes in both its structure (ownership and technology aspects) and its architecture (operational and oversight aspects). These changes involve attempts to move the industry away from highly regulated markets with administered cost-based pricing and towards competitive markets in which prices more fully reflect supply and demand forces. The goal of these changes is to provide industry participants with better incentives to control costs and introduce innovations. The process of enacting and implementing policies and laws to bring about these changes has come to be known as restructuring.
This restructuring process has been controversial. The meltdown in the restructured California wholesale power market in the summer of 2000 has demonstrated how unintended consequences can arise when complex market designs are implemented without sufficient pre-testing. Following the California crisis, many energy researchers have called for the development of test beds combining sound physical understanding of power system operations with economic analysis of incentives to help ensure that electricity market designs have good real-world performance characteristics.
Many commercially available packages for power system analysis now incorporate components critical for the simulation of restructured electricity markets (e.g. optimal power flow solvers). However, lack of open-source access prevents users from gaining a complete and accurate understanding of what has been implemented, restricts the ability of users to experiment with new software features, and hinders users from tailoring software to specific needs. In addition, these packages can be cumbersome to use for research, teaching, and training purposes requiring intensive experimentation and sensitivity analyses.
The goal of this resource site is to encourage the study of restructured electricity markets from a perspective that adequately addresses both economic and engineering concerns. Annotated pointers are provided to
open source software (OSS) facilitating the modeling of electricity markets as commercial networks of strategically interacting traders and regulatory agencies learning to operate through time over realistically rendered transmission grids.
A general annotated listing of power systems software (both commercial and OSS) can be found at the following site:
Power Systems Analysis Software.
A compilation of tools for smart grid modeling and simulation (both commercial and OSS) is presented and discussed in the following article:
Ricardo M. Czekster, "Tools for Modelling and Simulating the Smart Grid"
arXiv:2011.07968v3 [cs.PF], 19 November 2020.
Suggestions regarding additional pertinent links for this OSS resource site are most welcome. Links are sought for OSS libraries, computational laboratories, simulators, toolkits, evaluative studies, and management systems that could potentially facilitate electricity market research, teaching, and training.
OSS for Electricity Market Simulation
AMES Wholesale Power Market Test Bed (Java/Python)
AMES Wholesale Power Market Test Bed
is a modular, extensible, open source software platform developed by an interdisciplinary team of researchers at Iowa State University, with support from researchers at the Pacific Northwest National Laboratory.
AMES captures salient features of U.S. RTO/ISO-managed wholesale power markets operating over high-voltage transmission grids during successive days, with grid congestion handled by locational marginal pricing. AMES is an acronym for Agent-based Modeling of Electricity Systems.
AMES has been specifically designed as a support tool for research, teaching, and training purposes. Documentation, tutorials, and links to code/data software repositories for specific AMES version releases can be accessed at the above-linked AMES homepage.
ERCOT Test System (Java/Python, implemented in part by AMES V5.0)
ERCOT Test System
was developed by Swathi Battula and Leigh Tesfatsion at Iowa State University and Thomas E. McDermott at the Pacific Northwest National Laboratory. The ERCOT Test System is implemented in part by means of
In default mode, the ERCOT Test System models basic operations in the Electric Reliability Council of Texas (ERCOT) energy region: namely, ISO-managed day-ahead and real-time markets operating in tandem over a high-voltage transmission grid during successive days, with grid congestion handled by locational marginal pricing. Modeled participants include dispatchable generators, load-serving entities, and non-dispatchable generation such as unfirmed wind and solar power. Users can configure a broad variety of parameters to study basic ERCOT market and grid features under alternative system conditions.
Users can also easily extend the test system's Java/Python software classes to study modified or newly envisioned market and grid features. In addition, the test system is integrated with a high-level simulation framework that permits it to function as a software component within larger systems, such as multiple seamed energy regions or integrated transmission and distribution systems.
A detailed description of the ERCOT Test System, together with illustrative 8-bus and 200-bus ERCOT test cases, can be found in the following paper:
Swathi Battula, Leigh Tesfatsion, and Thomas E. McDermott, "An ERCOT Test System for Market Design Studies"
Applied Energy, Vol. 275, 2020.
ISO-NE Test System (Java/Python, implemented in part by AMES V4.0)
8-Zone ISO-NE Test System
was developed by Dheepak Krishnamurthy, Wanning Li, and Leigh Tesfatsion at Iowa State University. The 8-Zone ISO-NE Test System is implemented in part by means of
The 8-Zone ISO-NE Test System is based on structural attributes and data from the ISO New England (ISO-NE) energy region. A description of this test system, together with illustrative applications, can be found in the following two papers:
Wanning Li and Leigh Tesfatsion, "An 8-Zone ISO-NE Test System with Physically-Based Wind Power,"
Economics Working Paper No. 17017, Department of Economics, Iowa State University, January 2017.
Dheepak Krishnamurthy, Wanning Li, and Leigh Tesfatsion, "An 8-Zone Test System based on ISO New England Data: Development and Application"
IEEE Transactions on Power Systems, Vol. 31, Issue 1, January 2016, 234-246.
JASA: Java Auction Simulator API
- Steve Phelps (Ripple Software, LTD) has
developed an open-source Java class library called
JASA (Java Auction Simulator API)
for the simulation of auctions with learning traders. Included in JASA are classes specifically
developed for electricity auction simulation.
MASCEM: Electricity Markets Simulator with Strategic Agents
- Zita Vale and her collaborators at the Polytechnic Institute of Porto, Portugal, have developed the
Multiagent Simulator of Competitive
Electricity Markets (MASCEM).
Abstract from above site: "The MASCEM multiagent model includes players with strategies for bid definition, acting in forward, day-ahead, and balancing markets and considering both simple and complex bids. Our goal with MASCEM was to simulate as many market models and player types as possible. This approach makes MASCEM both a short and medium term simulation as well as a tool to support long-term decisions, such as those taken by regulators. This article proposes a new methodology integrated in MASCEM for bid definition in electricity markets. This methodology uses reinforcement learning algorithms to let players perceive changes in the environment, thus helping them react to the dynamic environment and adapt their bids accordingly."
MinPower: Electric Power Market Simulator (Python)
is an open source toolkit for students and researchers in power systems. It is designed to make working with economic dispatch, optimal power flow, and unit commitment problems simple and beautiful. The goal is to foster collaboration with other researchers and to make learning easier for students. MinPower is written in Python, can use many solvers, and creates nice plots. The project is currently developed and maintained by Adam Greenhall, University of Washington, USA.
PowerACE: An Agent-based Computational Economics (ACE) Simulator for Power Systems (RePast)
The primary objective of the
project (Augsburg University, Germany, 2003-2008) led by Daniel Veit, with key contributions from Anke Weidlich, was to investigate the effects of Europe-wide CO2 emissions trading introduced in 2005. For this purpose, the project participants developed an Agent-based Computational Economics (ACE) simulation platform referred to as PowerACE. The PowerACE platform was implemented using the Recursive Porus Agent Simulation Toolkit (RePast), a Java-based class library designed to facilitate agent-based simulations.
Tools for Assessment of Bidding Into Electricity Auctions (Java)
- Steven Puller (Texas A&MB) and Ross Baldick (University of Texas, Austin) have developed a public domain academic-grade tool to assess the competitiveness of offers into electricity auctions operating over transmission grids subject to transmission constraints. The prototype is written in the Java language, and is released as open source software under the terms of the GNU General Public License (GPL). To obtain the zipped tool and example file, visit
Open Source Software for Power Flow and Optimal Power Flow
A key stumbling block to developing OSS for general academic research into restructured electricity markets in the U.S. and elsewhere is the lack of OSS for AC/DC optimal power flow (OPF) problems. In the U.S., market operators of restructured wholesale power markets must repeatedly solve AC/DC OPF problems in order to generate unit commitment and dispatch schedules, as well as locational marginal prices (LMPs), for both spot and forward energy markets.
Developing algorithms for the successful solution of optimization problems involving mixed collections of equality
and inequality constraints, even when specialized to quadratic objective functions (as in some DC OPF approximations to AC OPF problems), is a daunting task full of pitfalls for the unwary. (An excellent introduction to this topic can be found in R. Fletcher, Practical Methods of Optimization, Second Edition, John Wiley & Sons,
New York, c. 1987.)
This section includes annotated pointers to OSS for AC/DC OPF and power flow problems for research, teaching, and training purposes. Readers with a particular interest in the real-world deployment of OSS optimization tools can consult the following review:
Markuc Groissböck, "Are open source energy system optimization tools mature enough for serious use?", Renewable and Sustainable Energy Reviews 102 (2019), 234-248.
ANDES: DAE Power Systems Analysis (Python)
The research center
has released the open-source Python software
for power system analysis developed with NSF and DOE support. This software could be of interest to researchers working on Differential-Algebraic Equation (DAE) modeling, simulation, and control for power systems. It has features that may be useful to researchers applying deep (reinforcement) learning to such systems. In general, ANDES was developed to support simple expandable models for the grid and provide a powerful platform for power system researchers.
DCOPFJ: A Bid/Offer-Based DC-OPF Solver (Java)
developed entirely in Java by a team of researchers at Iowa State University, is a free open-source
stand-alone solver for small to medium-sized bid/offer-based DC optimal power flow problems having a strictly convex quadratic programming (SCQP) formulation.
The DCOPFJ package incorporates an SCQP solver (QuadProgJ) wrapped in an outer SI-to-PU data processing shell. QuadProgJ implements the well-known dual active-set SCQP algorithm developed by Goldfarb and Idnani (1983). QuadProgJ has been shown to match or exceed the accuracy of the proprietary C-language QP solver BPMPD (highly recommended by MATPOWER) when tested on a public repository of small to medium-sized SCQP problems.
The DCOPFJ package has been successfully run on DC-OPF test cases commonly used for training purposes.
is a free Matlab-based open source program for AC/DC power flow analysis. The program uses a sequential power flow algorithm and can be used to simulate interconnected AC systems, HVDC Grids and Voltage Source Converter High Voltage Direct Current (VSC HVDC) systems in general. The package has been fully integrated with the existing AC power flow routines developed in MATPOWER, while keeping the MATPOWER original source code unaltered. The project is currently developed and maintained by Jef Berteen, Katholieke Universiteit Leuven, Belgium.
MatDyn is a free Matlab-based open source program to perform dynamic analysis of electric power systems. It is inspired by Matpower, a power flow and optimal power flow program in Matlab and shares its philosophy: "It is intended as a simulation tool for researchers and educators that is easy to use and modify." The source code for MatDyn is available
The developers note that care been taken to keep it well structured and easy to understand. The project is currently developed and maintained by Stijn Cole, Katholieke Universiteit Leuven, Belgium.
developed by a team of researchers at Cornell University, is a
free open-source software package for power system analysis, aimed primarily at solving power flow and optimal power flow problems. MATPOWER is intended as a simulation tool for researchers and educators that is easy to use and modify. MATPOWER can run on GNU/Octave, which is basically a free Matlab clone. The latest version of MATPOWER can be accessed at
MATPOWER GitHub repository,
where MATPOWER development takes place.
A detailed description of MATPOWER's OPF formulation can be found in the following article:
Ray D. Zimmerman, Carlos E. Murillo-Sánchez, and Robert J. Thomas,
"MATPOWER: Steady-State Operations, Planning, and
Analysis Tools for Power Systems Research and
IEEE Transactions on Power Systems, Vol. 26, No. 1, Feb 2011, 12-19.
MATPOWER (V6.0 and later) includes MOST (The MATPOWER Optimal Scheduling Tool), a framework for solving generalized stead-state electric power scheduling problems.
A description of MOST can be found in the following article:
Carlos E. Murillo-Sánchez, Ray D. Zimmerman, C. Lindsay Anderson, and Robert J. Thomas,
"Secure Planning and Operations of Systems with Stochastic Sources, Energy Storage and Active Demand"
IEEE Transactions on Smart Grid, Vol. 4, No. 4, Dec. 2013, 2220-2229.
PSAT: Power System Analysis Toolbox (Matlab-Based)
Power System Analysis Toolbox (PSAT),
originally developed by Federico Milano, is a Matlab-based software package for analysis and design of
small to medium-sized electric power systems. The main features of PSAT include: power flow; continuation power flow; optimal power flow; small signal stability analysis; time-domain simulation; Phasor Measurement Unit (PMU) placement; FACTS models; and wind turbine models. All operations can be accessed by means of graphical user interfaces, and a Simulink-based library provides a user-friendly tool for network design.
- Matlab is a commercial product whose kernel and libraries
cannot be modified or freely distributed. However, PSAT can run on GNU/Octave, which is basically a free Matlab clone.
PYPOWER is a power flow and Optimal Power Flow (OPF) solver. It is a port of MATPOWER to the Python programming language. Current features include: (i)DC and AC (Newton’s method and Fast Decoupled) power flow; and (ii) DC and AC optimal power flow (OPF). PYPOWER sourcecode can be accessed at
Synthetic Power Flow and OPF (PowerWorld/MATPOWER)
- A set of larger-scale
Synthetic Power Flow and OPF Models
have been developed as OSS by Tom Overbye and collaborators
at Texas A&M, UIUC, Cornell, ASU, and VCU. Synthetic PF/OPF models are fictitious representations designed to be statistically and functionally similar to actual electric power grids while containing no confidental information on critical energy infrastructure. The models are available in a variety of formats, including PowerWorld Simulator and MATPOWER. Visualizations for several of the synthetic electric power grids can be viewed
Other Supporting Open Source Software
Dia: Diagram Creation Program
Dia is a GTK+ based diagram creation program for GNU/Linux, MacOS X, Unix, and Windows, and is released under the GPL license. Dia is roughly inspired by the commercial Windows program 'Visio,' though more geared towards informal diagrams for casual use. It can be used to draw many different kinds of diagrams. It currently has special objects to help draw entity relationship diagrams, UML diagrams, flowcharts, network diagrams, and many other diagrams. It is also possible to add support for new shapes by writing simple XML files, using a subset of SVG to draw the shape. For more information about Dia, visit
DSSim-PC: Graphical Interface for OpenDSS
is the non-deterministic version of the DSSim-RT simulator. It is based on EPRI's OpenDSS and can be used a a graphical interface for OpenDSS. The first version of DSSim-PC was released to the public on July 20, 2013.
EPOCHS: Electric Power and
Communication Synchronizing Simulator
- EPOCHS is an agent-based distributed simulation environment that combines multiple research and commercial off-the-shelf systems: namely, the PSAD/EMTDC electromagnetic transient simulator, the PSLF elctromechanical transient simulator, and the Network Simulator 2 (NS2). The resulting combined simulator permits the study of electric power scenarios incorporating new communication protocols.
For more information about EPOCHS, see
the following article: Kenneth Hopkinson, Xiaoru Wang, Renan Giovanini, James Thorp, Kenneth Birman, and Denis Coury, "EPOCHS: A Platform for Agent-Based Electric Power and Communication Simulation Built from Commercial Off-the-Shelf Components"
IEEE Transactions on Power Systems 21(2), 2006, 548-558.
GridLAB-D: Electric Energy Distribution Platform (C++/C)
is a power distribution simulation platform developed by the U.S.
Department of Energy at Pacific Northwest National Laboratory (PNNL) in Richland, Washington. See
for a useful summary discussion of GridLAB-D features, capabilities, and power system applications.
PNNL maintains a
GridLAB-D Site at SourceForge.
InterPSS: Internet-Based Software System
Internet Technology-based Open-source Power
System Simulation (InterPSS) System
is an open-source project whose goal is to develop a simple to use, yet powerful, Internet technology based software system for design, analysis, and simulation of power systems. Its open and loosely coupled system architecture will allow components developed by others to be easily plugged into the system to augment its functionality, and equally important, allow its components to be integrated into other systems to provide certain power system simulation functionality or services. The project is currently under development by a team of developers living in the United States, Canada and China.
Java Scientific Library (Michael Thomas Flanagan
- Michael Thomas Flanagan (EE, University College London, UKB) has developed and released as open-source software a
Java scientific library
to support both his own electrical engineering research and his undergraduate programming courses and projects. Included in the library are links to source files and documentation for classes handling a wide variety of numerical functions, including: inut/output; graph plotting; mathematical functions and physical constants; random numbers and deviates; error propagation; regression; optimization; Fourier transform and short-time Fourier transform; numerical integration; interpolation; root searching; matrices; complex arithmetic; circuits; impedance spectroscopy; optics; reflexivity; and control and system engineering routines.
LP_Solve: Linear Programming Toolkit
- LP_solve is a free linear (integer) programming solver based on the revised simplex method and the Branch-and-bound method for the integers. It contains full source, examples and manuals. LP_solve solves pure linear, (mixed) integer/binary, semi-continuous and special ordered sets (SOS) models. For general information about LP_Solve, visit
For downloads, go to
LP_Solve versions at sourceforge.net.
Open DSS: Distribution System Simulator (MS Windows Operating Environment)
The Electric Power Research Institute, Inc. (EPRI) has made its
Open Source Distribution System Simulator (OpenDSS)
program available as an open source project. The OpenDSS software is a comprehensive electrical power system simulation tool for electric utility distribution systems. The program has been developed for the Microsoft Windows environment. It supports nearly all frequency domain (sinusoidal steady-state) analyses commonly performed on electric utility power distribution systems. In addition, it supports many new types of analyses that are designed to meet future needs related to grid modernization efforts. Additionally, this open source program may encourage the user community to contribute useful models that might help others active in grid modernization.
Pandapower: Power System Modeling and Analysis (Python, Open Source)
is a Python based, BSD-licensed power system analysis tool aimed at automation of static and quasi-static analysis and optimization of balanced power systems. It provides power flow, optimal power flow, state estimation, topological graph searches and short circuit calculations according to IEC 60909.
Documentation for PandaPower can be found
The code is available through
and through pip (‘pip install pandapower’).
StorageVet: Storage Value
Estimation Tool (Python, Open Source)
Storage Value Estimation Tool (StorageVet)
is an energy storage research and planning tool developed by the Electric Power Research Institute (EPRI). It enables the rapid analysis of scenarios with different storage sizes, costs, and value streams. It can therefore assist the determination of optimal storage size, optimal storage location, and optimal storage control options.
OSS Management Systems
Comparison of Four OSS Configuration Management Systems
- David Wheeler maintains a site titled
Comments on OSS/FS Software Configuration Management Systems
providing comparisons of the following four systems: CVS, Subversion, GNU Arch, and Monotone.
Evaluation of OSS for Electricity Markets
Evaluation of OSS LP Software for Electricity Spot Market Optimization
Stuart R. Thorncraft, Hugh R. Outhred, and David J. Clements, "Evaluation of Open-Source LP Optimization Codes in Solving Electricity Spot Market Optimization Problems"
19th Mini-European Conference on Operations Research Models and Methods in the Energy Sector, Coimbra, Portugal, September 6-8, 2006.
- Abstract: The authors investigate the performance of three linear programming packages --- GLPK, COIN-LP (CLP), and LPSOLVE -- for the determination of optimal locational marginal prices (LMPs) and dispatch levels for electricity spot markets.
OSS General Reference Materials
LF Energy (LFE): Collaborative Open-Source Environment Focused on Power Systems
LF Energy (LFE)
is an open source initiative, focused on power systems, that is overseen and hosted at The Linux Foundation. LFE provides a neutral, collaborative environment to build digital foundations to enable the "electrification of everything to scale." The goal of LFE is to transform the world’s relationship to energy.
Development of Open Source Synthetic Power Grids
Tom Overbye, "Synthetic Power Grid Models: What Are They, How They're Made, and Why They Matter", PSERC Webinar, March 15, 2016.
Development of Open Source Software
- Karl Fogel, "Producing Open Source Software: How to Run a Successful Free Software Project
184 pages, copyright 2005 under a CreativeCommons Attribution-ShareAlike license.
- Abstract: This book is meant for software developers and managers who are either planning to start an OSS project or who are concerned with the effective maintenance of an ongoing OSS project. Topics covered include: (1) History of OSS; (2) Getting Started (choosing a name, mission statement, license, documentation, etc.); (3) Technical Infrastructure (project needs, mailing lists, version control, bug tracker, Wikis, websites); (4) Social and Political Infrastructure; (5) Money (types of involvement, contracting, funding, marketing); (6) Communications (structure and formatting, avoiding common pitfalls, handling difficult people, handling growth, publicity); (7) Packaging, Releasing, and Daily Development (release numbering, packaging, testing and releasing, maintaining multiple release lines); (8) Managing volunteers; (9) Licenses, Copyrights, and Patents (MIT/X Window System License, GNU General Public License, BSD License, copyrighting, dual licensing, patents); (10) Useful Appendices (free version control systems, free bug trackers, copyright forms, etc.).
- Hongyan Li and Leigh Tesfatsion, "Development of Open Source Software for Power Market Research: The AMES Test Bed"
Journal of Energy Markets, Vol. 2, No. 2, Summer 2009, 111-128.
Open Source Software (OSS) expresses the idea that developers should be able to license the publication of their software in a manner permitting anyone to freely use, modify, and distribute the software. Today OSS is widely used in the software industry, such as for language development tools (e.g., NetBeans for Java), office document processors (e.g., OpenOffice), and operating systems (e.g., Linux, OpenSolaris).
Yet OSS has been slow to penetrate the power industry; heavy reliance is still placed on closed-source commercial software packages. The OSS in use tends to be for specialized purposes (e.g., circuit design) rather than for the general-purpose analysis of power systems. This study discusses potential benefits and drawbacks of developing OSS for power market research, using the AMES Wholesale Power Market Test Bed for concrete illustration.
- Stefan Pfenninger et al., "Opening the Black Box of Energy Modelling: Strategies and Lessons Learned"
Energy Strategy Reviews, Vol. 19, 2018, 63-71.
The global energy system is undergoing a major transition, and in energy planning and decision-making across governments, industry and academia, models play a crucial role. Because of their policy relevance and contested nature, the transparency and open availability of energy models and data are of particular
importance. Here we provide a practical how-to guide based on the collective experience of members of the Open Energy Modelling Initiative (Openmod). We discuss key steps to consider when opening code and data, including determining intellectual property ownership, choosing a licence and appropriate
modelling languages, distributing code and data, and providing support and building communities. After illustrating these decisions with examples and lessons learned from the community, we conclude that even though individual researchers' choices are important, institutional changes are still also necessary
for more openness and transparency in energy research.
- Stefan Pfenninger et al., "The Importance of Open Data and Software: Is Energy Research Lagging Behind?"
Energy Policy, Vol. 101, 2017, 211-215.
Energy policy often builds on insights gained from quantitative energy models and their underlying data. As climate change mitigation and economic concerns drive a sustained transformation of the energy sector, transparent and well-founded analyses are more important than ever. We assert that models and their
associated data must be openly available to facilitate higher quality science, greater productivity through less duplicated effort, and a more effective science-policy boundary. There are also valid reasons why data and code are not open: ethical and security concerns, unwanted exposure, additional workload, and institutional or personal inertia. Overall, energy policy research ostensibly lags behind other fields in promoting more open and reproducible science. We take stock of the status quo and propose actionable steps forward for the energy research community to ensure that it can better engage with
decision-makers and continues to deliver robust policy advice in a transparent and reproducible way.
Copyright © Leigh Tesfatsion. All Rights Reserved.