DCOPF#
API path: power_flow_relaxations.models.dcopf
- class DCOPF(scenario, configuration, **kwargs)[source]#
Bases:
NodalBaseModelLinearized DC optimal power flow (DCOPF) relaxation on the nodal model scaffold.
This model keeps only active-power network physics with voltage-angle variables and branch susceptances. Reactive-power AC relations are omitted, yielding a fast linear approximation commonly used as a baseline.
Note: this is the relaxation-benchmark DCOPF variant (MOSEK-based), not the APEM market-clearing Gurobi DCOPF.
Initialize the DCOPF model and create bus-angle decision variables.
- Parameters:
scenario – Unit-based scenario containing bids and transmission network.
configuration – Solver configuration passed to the base nodal model.
**kwargs – Optional arguments forwarded to
NodalBaseModel.
Notes
Creates theta_vt with shape [n_nodes, n_periods], representing voltage phase angles used in linearized flow equations.
- get_V_vt_values()[source]#
Reconstruct unit-magnitude complex voltage components from bus angles.
- Returns:
Mapping (node, period) -> (V_d, V_q) where V_d = cos(theta) and V_q = sin(theta).
- Return type:
dict[tuple[int, int], tuple[float, float]]