Interpreting infeasible OPF results and slack variables

Explore in depthLeer en español

An optimal power flow (OPF) result can terminate without providing an operating point that meets the original study requirements. A solver may fail to converge, report an infeasible formulation or solve a modified problem in which selected violations have been permitted. These outcomes require different engineering responses, because a numerical status and an acceptable network state describe different aspects of the calculation.

The existing OPF Explore introduces the formulations and their applications. This page addresses the next question: how should a result be investigated when the dispatch, network limits or required security conditions cannot all be satisfied as modeled? The workflow applies to planning and operational studies, with checks adapted to the selected formulation.

Feasibility, convergence and optimality

A feasible point satisfies the constraints of the stated problem within the accepted tolerances. An optimum additionally meets the optimization requirements applicable to that formulation. Convergence describes the termination of a numerical procedure and must be interpreted using the solver’s documented status, residuals and options.

For a nonconvex AC formulation, failure to find a feasible point does not generally prove that no feasible point exists. Initialization, scaling and numerical difficulties may affect the solve. A solver-supported infeasibility certificate for a suitable linear formulation has a different evidential meaning from a generic failure message in a nonlinear calculation.

The distinction becomes particularly relevant when load shedding or other violations are allowed. The modified problem can have a converged optimum even though full demand service or the original network limits remain unsatisfied. The KKT conditions, where applicable, then concern the problem actually solved.

What a slack variable represents

A mathematical slack variable can measure unused allowance when an inequality is written as an equality. That quantity should be distinguished from a violation variable introduced to relax the original requirement. Software interfaces sometimes use the word slack for both, so interpretation requires the underlying equation and sign convention.

For a flow below an upper bound, unused allowance is compatible with the original constraint. A penalized overload variable, by contrast, permits flow beyond that bound in the modified model. Load shedding reduces the demand that must be served, while generation shedding can represent a different adjustment with its own limits and costs. Their physical quantities and units must be retained rather than combined into an unexplained sum.

In VeraGrid, available OPF outputs include convergence information, dispatch, loading, load shedding, generation shedding, overload-related results and bus shadow prices. Availability and interpretation depend on the selected solver and study mode. The inspected result definitions and driver implementation should be read together. A field name alone does not establish whether a reported value is signed, aggregated or applicable to every formulation.

A synthetic supply and transfer example

Consider a simplified lossless, single-period active-power model. Demand is 70 MW, local generation is limited to 20 MW and the modeled import path is limited to 40 MW. No other source or control is available. The import limit in this example is an active-power bound in the simplified formulation, not a conversion from an equipment MVA rating.

The maximum supply under those assumptions is 60 MW, leaving a 10 MW deficit. The following alternatives explain what different diagnostic results mean. They are constructed examples, not measured grid data or a VeraGrid simulation.

Synthetic alternatives in a simplified active-power model
CaseModel changeEngineering interpretation
Original requirementsFull 70 MW demand, 20 MW local generation limit and 40 MW import limitSupply is insufficient under the stated assumptions.
Demand relaxationPermit 10 MW of load sheddingThe modified problem can serve 60 MW. Full demand service has not been demonstrated.
Import-limit relaxationPermit import to reach 50 MWDemand can be balanced, but the original import limit is exceeded by 10 MW.
Revised physical scenarioIncrease available local generation to 30 MW, if deliverableThe active-power deficit is removed in this simplified model. Other required network checks remain necessary.

The same deficit can therefore appear through different relaxation variables. The selected outcome depends on which relaxations are permitted and on their penalties. A solution with the lowest penalized objective does not establish which physical intervention is available, permitted or economically preferable for the actual project.

A reproducible diagnostic workflow

  1. Record the original problem. Retain the model version, topology, scenario, objective, units, time horizon, solver and options. Identify which limits and service requirements must remain hard constraints.
  2. Read the termination evidence. Inspect the status, residuals and diagnostics before interpreting dispatch or prices. Separate a declared infeasibility from nonconvergence, a time limit or an interrupted run.
  3. Check the input model. Review disconnected islands, equipment status, base values, sign conventions, generator bounds, ratings and control settings. Compare an available reference state where appropriate.
  4. Inspect relaxations by asset and interval. Retain physical units, signs and tolerances. Distinguish unused allowance, accepted curtailment, unserved demand and violations of limits that the study originally required.
  5. Run controlled sensitivity cases. Change one relevant assumption at a time, such as an availability limit or a specific permitted relaxation. Keep penalties and objective scaling explicit so that the comparison remains interpretable.
  6. Recheck the required physics and security scope. Validate a linear dispatch using an appropriate AC calculation and assess the required contingency set. Additional voltage or dynamic studies may still be needed.
  7. Record the disposition. Classify the result as acceptable under the original requirements, acceptable under an explicitly revised scope, unresolved numerically or unsuitable for the study decision.

These steps support diagnosis without implying that every solver provides an irreducible infeasible subsystem or an automatic explanation of every conflict. Where such facilities exist, their output must still be interpreted against the electrical model and the constraints selected.

Security constraints and time coupling

In a security-constrained OPF, the base case may be feasible while a modeled outage state requires an overload relaxation or an unavailable corrective action. The diagnostic record must identify that contingency and the relevant normal or emergency limit. A preventive decision and a post-contingency corrective response are different modeling choices.

For storage and other coupled resources, intertemporal constraints can create a conflict that is absent from independent snapshots. An apparently adequate discharge schedule may violate the initial energy, charging opportunities or terminal requirement. The time-step duration and energy units must remain visible when those conditions are investigated.

Reading shadow prices and penalties

A binding constraint is at its boundary and need not be violated. Its shadow price, when a meaningful multiplier is available, expresses a local sensitivity of the optimized objective under a declared sign and scaling convention. It should not automatically be treated as a market price or the annual value of reinforcement.

When violations carry large penalties, the resulting multipliers can reflect those penalties and the modified formulation. Nonlinear, degenerate and mixed-integer problems also require care in interpreting dual information. Physical remediation should therefore be evaluated through explicit scenarios rather than inferred from one multiplier alone.

Applying the result to a planning decision

A useful handoff contains the original requirements, the failed or relaxed conditions, the affected assets and intervals, the tested alternatives and the remaining checks. This allows the distinction between a data correction, a numerical problem, a revised operating assumption and a potential physical reinforcement to be maintained through the decision process.

Related reading