SOPFLOW solves a stochastic security-constrained multi-period optimal power flow problem. The problem is set up as a two-stage optimization problem where the first-stage (base-case) represents the normal operation of the grid (or the most likely forecast) and the second-stage comprises of
where mode
, SOPFLOW can either be preventive
(mode = 0) or corrective
(mode = 1). In the preventive mode, generator real power output is fixed to the base-case values except for any renewable generation (wind, solar), and generators at reference bus(es).The corrective mode allows deviation of the PV and PQ generator real power from the base-case dispatch constrained by its 30-min. ramp rate capability.
Depending on the options chosen, SOPFLOW can be run in three modes:
- Single-period no-contingency stochastic optimal power flow
- Single-period multi-contingency stochastic optimal power flow
- Multi-period multi-contingency stochastic optimal power flow
To use this application, one must have ExaGO built with Ipopt. Even when using HiOp as the main solver, this application still uses Ipopt (to solve the base subproblem).
The SOPFLOW code is executed via
mpiexec -n <N> ./sopflow <options>
where <options> are the available command line options as given in the next section.
The current version has several options available for SOPFLOW. These options can be set either through the options file options/sopflowoptions
or via the command line.
Option Name | Description | Values (Default value) | Compatibility |
---|---|---|---|
-netfile | Name of network file in MATPOWER format | (case9mod.m) | 4096 characters max. |
-windgen | Name of wind scenario list file | (10_scenarios_9bus.csv) | 4096 characters max. Uses a native format for describing scenarios. See 10_scenarios_9bus.csv |
-ctgcfile | Name of contingency list file | 4096 characters max. Uses a native format for describing contingencies. | |
-sopflow_Ns | Number of scenarios | With this option set, SOPFLOW will only pick up the first Ns scenarios in the scenario file. To select all scenarios, use Ns = -1 |
|
-sopflow_model | SOPFLOW model type | GENRAMP, GENRAMPC (GENRAMP) | |
-sopflow_solver | Optimization solver | (Ipopt), HiOp, or EMPAR | See the note below on solvers |
-sopflow_mode | Mode of operation | 0 or 1 (0) | See the note below on mode of operation |
-sopflow_subproblem_solver | Optimization solver for the subproblem when using HiOp solver | Ipopt or HiOp (Ipopt) | See opflow page for description of solvers |
-sopflow_subproblem_model | Model for the subproblem when using HiOp solver | (POWER_BALANCE_POLAR) | See opflow page for available models |
-sopflow_tolerance | Optimization solver tolerance | (1e-6) | All solvers |
-sopflow_enable_multicontingency | Each scenario has multiple contingencies | 0 or 1 (0) | |
-sopflow_Nc | Number of contingencies | With this option set, SOPFLOW will only pick up the first Nc contingencies in the contingency file. To select all contingencies, use Nc = -1 |
|
-sopflow_flatten_contingencies | Flattens out the scenario-contingency structure | 0 or 1 (0) | Only used when multi-contingency is enabled |
-print_output | Print SOPFLOW solution to screen | 0 or 1 (0) | All solvers |
-save_output | Save SOPFLOW solution to file | 0 or 1 (0) | All solvers. Saves solution for each scenario. |
There are two types of uncertainties supported: Wind generation and load (currently not implemented).
Scenarios are specified in a native format. See datafiles/case9/10scenarios_9bus.csv
as an example of a scenario file that describes wind generation scenarios for the 9-bus case.
SOPFLOW supports solving the problem using Ipopt, HiOP, or EMPAR solvers. With Ipopt, SOPFLOW can be only run on one processor (N = 1) as Ipopt only supports single process execution. HiOp supports solving the problem in parallel using a primal-decomposition algorithm. EMPAR is a parallel solver, however it merely executes an embarassingly parallel solver, i.e., all the scenarios are solved independently via optimal power flow.
Set SOPFLOW to either run in preventive
(0) or corrective
(1) mode. In preventive mode, the base-case and scenario real-power dispatch is equal for the PV and PQ generators. Any power surplus/deficit is contributed by the swing generator only. In the corrective mode, the scenario real-power dispatch for all generators is allowed to deviate from the base-case limited by its 30-min ramping limit.