Power System Simulation Toolbox (PSST)
Power System Simulation Toolbox (PSST) in Python is a collection of functions developed for rapid, fast-iterative design of models for power systems. It provides a wrapper over Pyomo for SCUC/SCED formulations. PSST allows tailoring the number and type of constraints to build a single model dynamically. It can model interface flow limits, curtailable generation, zonal reserves, storage modeling. It also has the ability to build multiple formulations. It has allowed for improved maintainability in AMES (V4.0). It also provides integration with existing power flow tools such as PYPOWER/MATPOWER. PSST can be found in the AMES (V4.0) repository .
Implementation of Pyomo solver in AMES (V4.0)
Pyomo is an open source software package which supports the definition and solution of optimization applications using the Python scripting language. Pyomo includes Python classes for defining sparse sets, parameters, and variables, which can be used to formulate algebraic expressions that define objectives and constraints. Pyomo can be used to represent linear, mixed-integer, nonlinear, and nonlinear mixed-integer models for large-scale, real-world problems that involve thousands of constraints and variables. This capability is commonly associated with algebraic modeling languages (AMLs) such as AMPL and GAMS. Pyomo models can be analyzed with a wide array of optimization solvers including GLPK, CBC, SCIP, CPLEX, GUROBI, and IPOPT. Pyomo allows an external program to use system call that can read a Python file (conventionally referred to as “ReferenceModel.py”). This file typically contains sets, parameters, and variables, objective functions and constraints, and describes a formulation of a problem. The model described in this file is typically an “Abstract Model”. An “Abstract Model” is a Pyomo construct that describes a model that does not have data in it. When this file is executed, the “Abstract Model” is constructed that declared the sets, parameters, variables, objective functions and constraints. However, since an “Abstract Model” does not contain data to define the values of sets and parameters, a reference to a separate data file must be included in the system call that contains values for the sets and parameters. The implementation of the Pyomo solver in AMES (V4.0) is shown in Figure 2.1. For every DAM SCUC solve, AMES (V4.0) writes out a file “AMES.dat” in the current working directory. AMES (V4.0) then issues a system call to run the command pyomo solve ReferenceModel.py AMES.dat. As described above, the system call from AMES (V4.0) to solve a model constructed by the “ReferenceModel” requires an argument that links to the file “AMES.dat” that contains data defining the values of the parameters, sets etc. This system call runs Pyomo which in turn builds the abstract model in “ReferenceModel.py” and attaches the data in “AMES.dat” to the “Abstract Model”. Once a model has been built, it can be solved using a solver in the environment. When a successful solution has been attained Pyomo returns results to a file, which in turn are read by AMES (V4.0). These results include LMP at all nodes, and unit commitment status and dispatch levels for all generators. While this implementation is straightforward and easy to understand, it offers little flexibility in solving different formulations, increasing solver accuracy or decreasing solver times. This is addressed by using the PSST solver, as described in the following subsection.