commonpower.models.powerflow.DCPowerFlowModel
- class DCPowerFlowModel[source]
Bases:
PowerFlowModelModels DC power flow constraints. Based on https://www.mech.kuleuven.be/en/tme/research/energy_environment/Pdf/wpen2014-12.pdf.
Methods
add_to_modelSpecifies the power flow constraints and adds them to the given model instance.
empty_copyCreates a fresh copy of the power flow model.
- _set_bus_constraint(model: ConcreteModel, nid: int, node: Bus, connected_lines: list[Line])[source]
Set DC bus constraints and voltage angle of first bus fixed at zero.
\[\begin{split}p_i = \sum_{j=1}^{N} ( B_{ij}(d_i - d_j) ) \\ d_0 = 0\end{split}\]
- _set_line_constraint(model: ConcreteModel, lid: int, line: Line)[source]
Sets line flow constraints. Technically,we want a limit on the line current I_l. However, we will use the line power flow p_l (I~p/v in DCOPF).
\[p_l = B_l (d_{src} - d_{dst})\]The system is then factually constrained by the bounds on I_l.