roseau.load_flow.models.branches#

Module Contents#

Classes#

AbstractBranch

Base class of all the branches (lines, switches and transformers) of the network.

class AbstractBranch(id: Id, bus1: Bus, bus2: Bus, *, phases1: str, phases2: str, geometry: shapely.geometry.base.BaseGeometry | None = None)#

Bases: roseau.load_flow.models.core.Element

Base class of all the branches (lines, switches and transformers) of the network.

AbstractBranch constructor.

Parameters:
  • id – A unique ID of the branch in the network branches.

  • phases1 – The phases of the first extremity of the branch.

  • phases2 – The phases of the second extremity of the branch.

  • bus1 – The bus to connect the first extremity of the branch to.

  • bus2 – The bus to connect the second extremity of the branch to.

  • geometry – The geometry of the branch.

property phases1: str#

The phases of the branch at the first bus.

property phases2: str#

The phases of the branch at the second bus.

property bus1: Bus#

The first bus of the branch.

property bus2: Bus#

The second bus of the branch.

property res_currents: tuple[Q_[ComplexArray], Q_[ComplexArray]]#

The load flow result of the branch currents (A).

property res_powers: tuple[Q_[ComplexArray], Q_[ComplexArray]]#

The load flow result of the branch powers (VA).

property res_potentials: tuple[Q_[ComplexArray], Q_[ComplexArray]]#

The load flow result of the branch potentials (V).

property res_voltages: tuple[Q_[ComplexArray], Q_[ComplexArray]]#

The load flow result of the branch voltages (V).

classmethod from_dict(data: JsonDict, *, include_results: bool = True) typing_extensions.Self#

Create an element from a dictionary created with to_dict().

Note

This method does not work on all classes that define it as some of them require additional information to be constructed. It can only be safely used on the ElectricNetwork, LineParameters and TransformerParameters classes.

Parameters:
  • data – The dictionary containing the element’s data.

  • include_results – If True (default) and the results of the load flow are included in the dictionary, the results are also loaded into the element.

Returns:

The constructed element.