Efficient operation of an interconnected, multi-source power network is challenging. The alternating current optimal power flow (ACOPF) problem can be solved to determine the optimal generator setpoints that minimize the total operating cost across an electrical transmission network under nominal conditions. However, to guarantee the electrical system reliability and resiliency to failure, many possible contingencies, such as transmission line outages, must be taken into consideration. It is possible to formulate a two-stage stochastic programming problem that solves the ACOPF problem while including all possible single-line outage scenarios.
In this paper, the N-1 contingency-constrained ACOPF problem is formulated as a nonlinear stochastic programming problem within Pyomo, a flexible, Python-based mathematical modeling language. This problem uses a variant of the rectangular current-voltage (IV) formulation within a two-stage stochastic programming formulation whose extensive form includes instances of the ACOPF for nominal operation and each valid N-1 contingency. In this formulation, each scenario is a complete two-stage ACOPF formulation with one of the transmission lines broken. While the nonlinear ACOPF problem itself is solvable to local optimality using off-the-shelf NLP solvers, when considering realistic network sizes and all N-1 contingencies, the resulting nonlinear extensive form outstrips the capabilities of existing serial solvers. For example, in the well-known example case2383wp the single-scenario ACOPF problem has over 60,000 variables, while the N-1 contingency-constrained problem has tens of millions of variables. We present the N-1 contingency-constrained problem formulation, two parallel decomposition approaches, and computational timing results that demonstrate efficient solution of this problem on realistic network sizes.