pypowsybl.network.create_generator_bay#

create_generator_bay(network, df=None, raise_exception=False, reporter=None, **kwargs)[source]#

Creates a generator, connects it to the network on a given bus or busbar section and creates the associated topology.

Parameters:
  • network (Network) – the network to which we want to add the generator

  • df (Optional[DataFrame]) – Attributes as a dataframe.

  • raise_exception (bool) – optionally, whether the calculation should throw exceptions. In any case, errors will be logged. Default is False.

  • reporter (Optional[Reporter]) – optionally, the reporter to be used to create an execution report, default is None (no report).

  • kwargs (Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]) – Attributes as keyword arguments.

Return type:

None

Notes

The voltage level containing the busbar section can be described in node/breaker or bus/breaker topology. If the voltage level is node/breaker, the generator is connected to the busbar with a breaker and a closed disconnector. If the network has position extensions, the generator will also be connected to every parallel busbar section with an open disconnector. If the voltage level is bus/breaker, the generator is just connected to the bus.

Valid attributes are:

  • id: the identifier of the new generator

  • energy_source: the type of energy source (HYDRO, NUCLEAR, …)

  • max_p: maximum active power in MW

  • min_p: minimum active power in MW

  • target_p: target active power in MW

  • target_q: target reactive power in MVar, when the generator does not regulate voltage

  • rated_s: nominal power in MVA

  • target_v: target voltage in kV, when the generator regulates voltage

  • voltage_regulator_on: true if the generator regulates voltage

  • bus_or_busbar_section_id: id of the bus or of the busbar section to which the injection will be connected with a closed disconnector.

  • position_order: in node/breaker, the order of the generator, will fill the ConnectablePosition extension

  • direction: optionally, in node/breaker, the direction of the generator, will fill the ConnectablePosition extension, default is BOTTOM.