Shor SDP#

API path: power_flow_relaxations.models.shor

class Shor(scenario, configuration, **kwargs)[source]#

Bases: NodalBaseModel

Dense Shor SDP relaxation of ACOPF using a real-valued lifted matrix.

The model uses a single PSD matrix per period to represent quadratic voltage products, then links active/reactive branch flows to linear expressions in that matrix. This is the non-chordal baseline SDP formulation.

Initialize the dense SDP relaxation and create lifted PSD variables.

Parameters:
  • scenario – Unit-based scenario with network/bids.

  • configuration – Solver configuration; relaxation mode is forced to True.

  • **kwargs – Forwarded to NodalBaseModel.

Notes

Creates one PSD matrix W[t] of size (2N x 2N) for each period, where N is the number of buses.

get_V_vt_values()[source]#

Recover approximate bus voltages from the solved Shor SDP matrices.

For each period, symmetrizes W[t], extracts a rank-1 approximation from the dominant eigenpair, reconstructs complex voltages, rotates them so the reference-bus angle is zero, and returns (V_d, V_q) per node and period.

Return type:

dict

power_constraints()[source]#

Add lifted AC power-flow constraints from the Shor SDP formulation.

For each period: - constructs real/imag surrogate matrices from W[t], - enforces symmetry of W[t], - imposes linearized active/reactive flow equations with tolerances, - bounds nodal squared voltage magnitudes via diagonal terms, - applies branch current-rating constraints.

reference_constraints()[source]#

Anchor reference-bus voltage angle and magnitude in lifted coordinates.

Enforces: - zero imaginary component at the reference bus, - unit real component magnitude at the reference bus.