DCOPFJ (Java): A Free Open-Source Solver for
Bid/Offer-Based DC Optimal Power Flow Problems
-
Software Release Disclaimer:
- All software provided below is unsupported and provided as-is, without
warranty of any kind.
Table of Contents:
As elaborated in Sun and Tesfatsion (2007a) and Sun and Tesfatsion (2007b),
the DCOPFJ package is a free open-source Java solver for bid/offer-based DC optimal power flow (DC-OPF) problems suitable for research, teaching, and training applications. The DCOPFJ package consists of two linked parts: an internal solver QuadProgJ for strictly convex quadratic programming problems, and an outer shell that automates input data preprocessing
and output data display.
QuadProgJ:
QuadProgJ is a stand-alone open-source Java solver for strictly convex quadratic programming (SCQP) problems. QuadProgJ implements the well-known dual active-set SCQP algorithm developed by Goldfarb and Idnani (1983).
As reported in detail in Sun and Tesfatsion (2007a),
QuadProgJ has been successfully tested on small to medium-sized SCQP problems. In particular, QuadProgJ matched or exceeded the accuracy of the proprietary C-language QP solver BPMPD when tested on a public repository of SCQP problems with up to 1500 decision variables plus constraints. In use since 1998, BPMPD is highly recommended for power system applications in Appendix A of the MATPOWER User's Manual (2006). In particular, the following statement appears: "Of all of the packages tested, the bpmpd solver has been the only one which worked reliably for us. It has proven to be very robust and has exceptional performance."
Augmented DC Optimal Power Flow (OPF) Formulation:
Standard DC-OPF problems with fixed real-power demands (loads) can be equivalently represented in the numerically desirable form of an SCQP problem if the nodal balance constraints are used to eliminate voltage angles by substitution. However, this elimination prevents direct generation of solution values for locational marginal prices (LMPs) since, by definition, the LMP for any node k is the solution value for the Lagrangian multiplier (shadow price) for the kth nodal balance constraint.
For this reason, Sun and Tesfatsion (2007a) augment the standard DC-OPF objective function with a soft-penalty constraint on the sum of squared voltage angle differences. This augmentation is
extended in Sun and Tesfatsion (2007c) to handle real power demand bids consisting of both fixed and price-sensitive parts.
The resulting augmented DC-OPF problem formulation provides three principal benefits based on both physical and mathematical considerations, as follows:
- The augmented problem now has a numerically desirable SCQP form permitting the direct generation of solution values for LMPs and voltage angles as well as for real-power generation levels, real-power branch flows, branch flow shadow prices, and real-power price-sensitive demands (if present).
- The validity of the DC-OPF problem as an approximation for the underlying AC-OPF problem relies on an assumption of small voltage angle differences, and the augmented DC-OPF problem permits this assumption to be subjected to systematic sensitivity tests through variations in the soft-penalty weight parameter.
- Solution differences between the non-augmented and augmented forms of the DC-OPF problem can be reduced to arbitrarily small levels by selecting an appropriately small value for the soft-penalty weight parameter.
Solution of Augmented DC-OPF Problems via DCOPFJ:
As explained with care in Sun and Tesfatsion (2007a), augmented DC-OPF problems can be solved by means of the DCOPFJ package, a stand-alone Java DC-OPF solver consisting of QuadProgJ wrapped inside a data-processing shell.
The data-processing shell sequentially carries out the following four actions: (1) conversion of all input data from SI (International System of Units) to normalized pu (Per Unit) form; (2) formation of all needed matrices and vectors for expressing the augmented DC-OPF problem in matrix SCQP form; (3) invocation of QuadProgJ to determine a solution for the resulting matrix SCQP problem; and (4) conversion of all solution output data from pu to SI form. These four actions are
illustrated in detail for a 5-node test case taken from power systems texts and ISO-NE/PJM training manuals.
Using DCOPFJ as a Stand-Alone DC-OPF Solver:
Test cases are included as text files in the "DATA" directory of the DCOPFJ package. The user can specify which of these test case files to run by changing an integer-valued flag in the main file DCOPFJ.java for the DCOPFJ package. The main file DCOPFJ.java can be found in the source code directory "src" of the DCOPFJ package. DCOPFJ automatically looks in the DATA directory for cases to be run.
Users can also use these test case files as templates for creating their own DC-OPF problems. To create a new DC-OPF problem, the user should copy a test case file into a new text file (e.g. MyCase.txt) in the DATA directory. Within MyCase.txt, the user should then substitute their own DC-OPF input data in place of the test case input data in the designated places using the designated formatting. The user should then add the new case file name MyCase.txt to the list of case file names in DCOPFJ.java (the list where the test case file names appear). Finally, right below the list of case file names in DCOPFJ.java the user should set the integer-valued flag accordingly (e.g., first case in list = 0, second case in list = 1, and so on).
The DCOPFJ package is already in the correct directory form of a standard Java package for use in Java Integrated Development Environments (IDEs) such as NetBeans and JBuilder. After setting up DCOPFJ as a standard Java package, with DCOPFJ.java designated as the main class, the DCOPFJ package can be compiled and run. The output appears in formatted text in the IDE output screen. The user can change the content and form of this output by modifying the output statements in DCOPFJ.java.
Incorporation of DCOPFJ Into Other Packages:
DCOPFJ can be incorporated as a DC-OPF solver within other Java applications under the terms of the GNU General Public License
(see below).
For example, as detailed in Sun and Tesfatsion (2007d),
Sun and Tesfatsion (2007e), and
Li, Sun, and Tesfatsion (2008),
DCOPFJ has been incorporated into the
AMES Wholesale Power Market Test Bed,
an open-source Java-implemented model of a restructured wholesale power market with strategically-learning traders operating over an AC transmission grid subject to congestion effects.
Software Downloads and Supporting Materials
Version releases to date for the DCOPFJ package are as follows:
DCOPFJ--Version 1.1 (Sun and Tesfatsion):
Software Download (V1.1)
-
Junjie Sun and Leigh Tesfatsion, DCOPFJ (Java): A Free Open-Source Solver for Bid/Offer-Based DC-OPF Problems--Version 1.1
(zipfile,637KB).
Release Date: 6/20/07
Software Description (V1.1)
- As explained in the above
software overview,
DCOPFJ (V1.1) determines daily (24 hour) solution values for augmented DC-OPF problems with fixed power demand bids (load profiles) and price-sensitive power supply offers for generation. DCOPFJ (V1.1) includes 3-node and 5-node test cases that can be used as templates for new case studies. These test cases are dynamic extensions of 3-node and 5-node test cases frequently used in teaching and training materials.
-
QuadProgJ is included as a Java archive (Jar) file in the library ("lib") directory extracted from the DCOPFJ (V1.1) zip file. DCOPFJ (V1.1) invokes QuadProgJ only through this Jar file, so separate access to the QuadProgJ source code is not needed. However, for the benefit of users who might wish to use QuadProgJ as a general SCQP solver in other problem contexts, the source code for QuadProgJ is included as a separate directory extractable from the DCOPFJ (V1.1) zip file.
Manuals and Tutorials (V1.1)
- Junjie Sun and Leigh Tesfatsion (2007a), "DC Optimal Power Flow Formulation and Testing Using QuadProgJ"
(pdf,526KB),
ISU Economics Working Paper No. 06014, Department of Economics, Iowa State University, revised October.
- "Open-Source Software for Power Industry Research, Teaching, and Training: A DC-OPF Illustration"
(SlideSet,pdf,701KB),
presentation (Leigh Tesfatsion), IEEE Power Engineering Systems General Meeting, Tampa, Florida, June 27, 2007.
DCOPFJ--Version 2.0 (Sun and Tesfatsion):
Software Download (V2.0)
-
Junjie Sun and Leigh Tesfatsion, DCOPFJ (Java): A Free Open-Source Solver for
Bid/Offer-Based DC-OPF Problems--Version 2.0
(zipfile,646KB).
Release Date: 6/20/07
Software Description (V2.0)
-
DCOPFJ (V2.0) determines daily (24 hour) solution values for augmented DC-OPF problems with price-sensitive power demand bids (with or without fixed-demand components) and with price-sensitive power supply offers for generation. This contrasts with DCOPFJ (V1.1), in which all power demand bids are assumed to be fixed (not price sensitive). The handling of price-sensitive power demand bids requires a change in the form of the objective function and the nodal balance constraints for the augmented DC-OPF problem treated in DCOPFJ (V1.1).
-
DCOPFJ (V2.0) includes two test cases that can be used as templates for new case studies. The first test case is a dynamic extension of a 5-node test case taken from ISO-NE/PJM training manuals. The second test case is a dynamic extension of the modified IEEE 30-node bus system developed by M. Shahidehpour, H. Yamin, and Z. Li (Market Operations in Electric Power Systems, 2002, Appendix, Section D.4, pp. 477-478).
-
QuadProgJ is included as a Java archive (Jar) file in the library ("lib") directory extracted from the DCOPFJ (V2.0) zip file. DCOPFJ (V2.0) invokes QuadProgJ only through this Jar file, so separate access to the QuadProgJ source code is not needed. However, for the benefit of users who might wish to use QuadProgJ as a general SCQP solver in other problem contexts, the source code for QuadProgJ is included as a separate directory extractable from the DCOPFJ (V2.0) zip file.
Manuals and Tutorials (V2.0)
- Junjie Sun and Leigh Tesfatsion (2007b), "DC-OPF Formulation with Price-Sensitive Demand Bids"
(pdf,103KB),
Working Paper, Economics Department, Iowa State University, Ames, Iowa.
- Hongyan Li, Junjie Sun, and Leigh Tesfatsion (2008), "Dynamic LMP Response Under Alternative Price-Cap and Price-Sensitive Demand Scenarios"
(pdf,465KB),
Proceedings, IEEE Power Engineering Society General Meetings, Carnegie-Mellon University, Pittsburgh, July 20-24.
Licensing Terms
-
The DCOPFJ package is licensed by the copyright holders (Junjie Sun and Leigh Tesfatsion) as free open-source software under the terms of the
GNU General Public License (GPL).
Anyone who is interested is allowed to view,
modify, and/or improve upon the code used to produce this package, but any
software generated using all or part of this code must be released as free open-source
software in turn. The GNU GPL can be viewed in its entirety
here.
Publications and References
- Hongyan Li, Junjie Sun, and Leigh Tesfatsion (2008), "Dynamic LMP Response Under Alternative Price-Cap and Price-Sensitive Demand Scenarios"
(pdf,465KB),
Proceedings, IEEE Power Engineering Society General Meetings, Carnegie-Mellon University, Pittsburgh, July 20-24.
- Junjie Sun and Leigh Tesfatsion (2007a), "DC Optimal Power Flow Formulation and Testing Using QuadProgJ"
(pdf,526KB),
ISU Economics Working Paper No. 06014, Department of Economics, Iowa State University, Revised October.
- Junjie Sun and Leigh Tesfatsion (2007b), "Open-Source Software for Power Industry Research, Teaching, and Training: A DC-OPF Illustration"
(pdf,115KB),
Proceedings, IEEE Power Engineering Systems General Meeting, Tampa, Florida, June.
- Note: This proceedings paper is a brief summary of Sun and Tesfatsion (2007a).
- Junjie Sun and Leigh Tesfatsion (2007c), "DC-OPF Formulation with Price-Sensitive Demand Bids"
(pdf,103KB),
Working Paper, Economics Department, Iowa State University, Ames, Iowa.
- Junjie Sun and Leigh Tesfatsion (2007d), "Dynamic Testing of Wholesale Power Market Designs: An Open-Source Agent-Based Framework", Computational Economics, Volume 30, Number 3, pp. 291-327.
- Note: This article is an abridged version of ISU Economics Working Paper No. 06025
(pdf,2.2MB).
- Junjie Sun and Leigh Tesfatsion (2007e), "An Agent-Based Computational Laboratory for Wholesale Power Market Design"
(pdf,724KB),
Proceedings, IEEE Power Engineering Systems General Meeting, Tampa, Florida, June.
- Note: This proceedings paper is a brief summary of Sun and Tesfatsion (2007d).
- Donald Goldfarb and Ashok Udhawdas Idnani (1983), "A Numerically Stable Dual Method for Solving Strictly Convex Quadratic Programs", Mathematical Programming, Vo. 27, pp. 1-33.
- R. D. Zimmerman, C. E. Murillo-Sanchez, and D. D. Gan (2006),
"MATPOWER - A MATLAB Power System Simulation Package: User's Manual",
Power Systems Engineering Research Center (PSERC), School of Electrical Engineering, Cornell University.
Acknowledgements
- The work reported at this site has been supported in part by Grant NSF-0527460 awarded by the National Science Foundation and by grants awarded by the ISU Electric Power Research Center.