RedundancyRemoval for Fast Security Constraint Optimal Power Flow
Overview
Determining contingency aware dispatch decisions by solving a security-constrained optimal power flow (SCOPF)is challenging for real-world power systems, as the high problem dimensionality often leads to impractical computational requirements. This problem becomes more severe when the SCOPF has to be solved not only for a single instance, but for multiple periods, e.g. in the context of electricity market analyses. The RedundancyRemoval algorithm identifies the minimal set of constraints that exactly define the space of feasible nodal injections for a given network and contingency scenarios. Please see the corresponding publication for further information.
Installation
This package is meant to be used in conjunction with the python POMATO model, which embeds its features and installs it automatically.
Stand alone usage is possible, however specificity formatted data.
Installation can be done directly from git via:
] add https://github.com/richard-weinhold/RedundancyRemoval
or from a local clone/fork of the repository via:
] add develop --local path-to-repository
The recommended julia version is 1.5, although compatibility is given for version >= 1.3, but not continuously tested.
Example
The algorithm relies on the (N-1) PTDF, the corresponding line capacities and optionally upper/lower bounds on nodal injections as inputs. The example folder contains these files compiled for the IEEE 118 bus network and the test folder uses a small example to illustrate its functionality.
The algorithm can be run for the exemplary data with the following code:
using RedundancyRemoval
wdir = <path to /examples>
file_suffix = "ieee118"
run_redundancy_removal(wdir, file_suffix)
The main function runredundancyremoval can also directly take the input PTDF matrix A, line capacity vector b and the vector x_bounds as input, as shown in the test/runtests.jl.
Exposed function of the MarketModel
RedundancyRemoval.run_redundancy_removal
— Functionrun_redundancy_removal(
wdir::String,
file_suffix::String,
input_optimizer;
kwargs...)
run_redundancy_removal(
A::Array{Float64},
b::Vector{Float64},
x_bounds::Vector{Float64},
input_optimizer;
filter_only::Bool=true,
parallel::Bool=true,
preprocessing::Bool=true)
Runs the RedundancyRemoval on files in wdir, the files that the program is looking for are A.csv, b.csv and x_bounds.csv with suffix or directly supply the inputs Array and Vectors.
See the examples folder for exact formatting. Generally the input matrix A represents a PTDF matrix, where rows represent lines/contingencies and columns nodal power injections, vector b the line capacity for each row in the PTDF matrix and the x_bounds vector represents the symmetrical bounds for nodal injections.
The resulting vector I holds indices of rows where A[:, I] x <= b[I] is a non-redundant system of inequalities equivalent to the full system of inequalities.
Optional arguments can be used to influence the execution of the algorithm. The algorithm can be executed using multiple threads. In that case sections of the checked indices are run in parallel to filter out redundant indices. After each pass, sections are combined and re-run. When parallel=False, the algorithm will be run single threaded, meaning all indices will be checked sequentially in a single pass. If parallel=True, segements will be filtered and then combines. If filteronly=True, the last pass will be executed single threaded, if filteronly=False the method LPTest will be executed in paralell for all remaining indices.
The resulting essential set will be saved to the wdir.
RedundancyRemoval.run_redundancy_removal_fbmc_domain
— Functionrun_redundancy_removal_fbmc_domain(
wdir::String,
input_optimizer;
parallel::Bool=false)
Run the RedundancyRemoval algorithm for each timedependant system of inequalities, namely zonal day-ahead domains for commercial exchange (FBMC Domains). This function will go through each timestep and presolve the system of inequalities Ax <= b, where A is the zonal PTDF, x zonal net positions and b the remaining capacitiy on the network elements (RAM).
See the examples folder for exact formatting of the input data (Ab_info.csv).
The optional argument parallel makes the process run in parallel, generally the default setting false seems to work best, as the overhead of Threading the problem outweighs its benefits since the systems are of low dimensionality (< 20).
Related Publications
- (preprint) Weinhold and Mieth (2020), Power Market Tool (POMATO) for the Analysis of Zonal Electricity Markets
- Weinhold and Mieth (2020), Fast Security-Constrained Optimal Power Flow through Low-Impact and Redundancy Screening
- Schönheit, Weinhold, Dierstein (2020), The impact of different strategies for generation shift keys (GSKs) on the flow-based market coupling domain: A model-based analysis of Central Western Europe