pypowsybl.network.Network.create_voltage_angle_limits

Network.create_voltage_angle_limits(df=None, **kwargs)[source]

Creates voltage angle limits.

Notes

Data may be provided as a dataframe or as keyword arguments. In the latter case, all arguments must have the same length.

Valid attributes are:

  • id: identifier of the voltage angle limit

  • from_element_id: identifier of the connectable owning the “from” terminal

  • from_side: side of the “from” terminal for sided elements (ONE, TWO, THREE)

  • to_element_id: identifier of the connectable owning the “to” terminal

  • to_side: side of the “to” terminal for sided elements (ONE, TWO, THREE)

  • low_limit: optional lower angle limit value, in degrees

  • high_limit: optional upper angle limit value, in degrees

If a voltage angle limit already exists with the same identifier, it is replaced. At least one of low_limit or high_limit must be provided.

Parameters:
  • df (DataFrame | None) – Attributes as a dataframe.

  • kwargs (ArrayLike) – Attributes as keyword arguments.

Return type:

None

Examples

Create a symmetric angle window on a line, between its two terminals:

import pypowsybl as pp

network = pp.network.create_eurostag_tutorial_example1_network()
network.create_voltage_angle_limits(
    id='NHV1_NHV2_1_ANGLE',
    from_element_id='NHV1_NHV2_1',
    from_side='ONE',
    to_element_id='NHV1_NHV2_1',
    to_side='TWO',
    low_limit=-30.0,
    high_limit=30.0,
)

Create a limit with only an upper bound:

network.create_voltage_angle_limits(
    id='NHV1_NHV2_2_MAX_ANGLE',
    from_element_id='NHV1_NHV2_2',
    from_side='ONE',
    to_element_id='NHV1_NHV2_2',
    to_side='TWO',
    high_limit=25.0,
)