ORNL / ORNL/ExaGO

SCOPFLOW with EMPAR solver always reports CONVERGED, does not enforce N-1 security

Open
#42 1 comment 0 reactions 1 assignee View on GitHub

@pelesh is already working on this.

Since Apr 24, 2026.

bug scopflow
Dominant language
Python
Stars
15
Forks
9
Avg merge
4h 34m
Merged PRs (30d)
1

Description

Issue applies to:
  • pflow
  • OPFLOW
  • TCOPFLOW
  • SCOPFLOW
  • SOPFLOW
  • CMake and build system
  • Spack
  • Visualization
  • Documentation
  • Other
Summary

The EMPAR (embarrassingly parallel) solver for SCOPFLOW always reports CONVERGED status regardless of whether individual contingency subproblems actually converged. This makes it impossible to determine N-1-secure loadability limits when using EMPAR, and produces misleadingly optimistic results compared to the IPOPT solver.

Description how to reproduce the issue
Description

When SCOPFLOW is executed with the EMPAR solver (multi-core), the function SCOPFLOWSolverGetConvergenceStatus_EMPAR always returns PETSC_TRUE:

File: src/scopflow/solver/empar/scopflow_empar.cpp (lines 147–155)

PetscErrorCode SCOPFLOWSolverGetConvergenceStatus_EMPAR(SCOPFLOW scopflow,
                                                         PetscBool *status)
{
  (void)scopflow;
  PetscFunctionBegin;
  *status = PETSC_TRUE;
  PetscFunctionReturn(0);
}

This means:

  1. SCOPFLOW always prints Convergence status CONVERGED when using EMPAR, even when individual OPFLOW subproblems fail to converge.
  2. The base-case solution is printed as if it were N-1-secure, but EMPAR solves each contingency as an independent OPFLOW subproblem and never couples the results back to adjust the base-case preventive dispatch.
  3. EMPAR does not implement preventive SCOPFLOW — it solves a sequence of corrective (post-contingency) OPFLOW problems without ensuring a single base-case dispatch satisfies all contingencies simultaneously.
Observed Impact

Running SCOPFLOW on the same network (case9mod) with the same goal (maximum N-1-secure loadability) produces dramatically different results:

Solver                                Loadability Boundary	          What it actually measures
IPOPT (single-core)          ~1.40× base load	                  True N-1-secure limit (base case + all contingencies solved simultaneously)
EMPAR (10-core)	             ~2.92× base load	                  Base-case feasibility only (no N-1 security verification)

The EMPAR result is ~2× higher because it only checks whether the base case OPF converges, not whether the dispatch survives contingencies.

Additionally, EMPAR does not produce IPOPT's EXIT: status line in its output, so downstream tools cannot distinguish between optimal and non-optimal subproblem solutions.

Steps to Reproduce
  1. Run SCOPFLOW with EMPAR on any network with a contingency file:
    scopflow -netfile case9mod.m -ctgcfile case9mod.cont -scopflow_solver EMPAR
  2. Scale loads aggressively (e.g., 3× base load) — SCOPFLOW reports CONVERGED with 0 infeasible solutions even though it should not be N-1-secure.
  3. Compare with IPOPT on the same case at the same load level — IPOPT correctly reports DID NOT CONVERGE.
ExaGO version

current main branch

System and environment details
  • ExaGO version: current main branch
  • Solver: EMPAR (multi-core SCOPFLOW)
  • Network: case9mod
  • Observed on both OpenSUSE Leap 15.6 and standard Linux distributions
Additional information

No response

Possible fix or workaround
Suggested Fix

SCOPFLOWSolverGetConvergenceStatus_EMPAR should aggregate individual OPFLOW subproblem convergence statuses:

PetscErrorCode SCOPFLOWSolverGetConvergenceStatus_EMPPAR(SCOPFLOW scopflow,
                                                          PetscBool *status)
{
  // Check each OPFLOW subproblem's convergence status
  // Return PETSC_TRUE only if ALL subproblems converged
  // Return PETSC_FALSE if any subproblem failed to converge
}

Additionally, EMPAR should either:

  • (Option A) Track each subproblem's OPFLOWSolve return status and report DID NOT CONVERGE if any contingency subproblem fails, or
  • (Option B) Implement the preventive coupling (adjusting the base-case dispatch based on contingency results), which would make EMPAR a true security-constrained solver.
Workaround

External tools (like LLM-Sim) can partially mitigate this by:

  • Checking power balance (generation must exceed load) to flag physically impossible solutions
  • Warning users that EMPAR results reflect base-case feasibility only, not N-1-secure loadability
  • Preferring IPOPT for any N-1 security analysis
  • However, the correct fix needs to be in ExaGO itself.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.