Skip to content

Commit

Permalink
adjusting docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
joda9 committed Sep 6, 2024
1 parent b54a29e commit 64aa833
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions edisgo/network/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -2369,6 +2369,42 @@ def connect_to_lv_based_on_geolocation(
`max_distance_from_target_bus`. Otherwise, the new component is directly
connected to the nearest bus.
* Method:
* Voltage level 6:
If the voltage level is 6, the component is connected to the closest
MV/LV substation or MV bus, depending whether MV connection is allowed
or not. Therefore, the distance to the substations and MV buses is
calculated and the closest one is chosen as target bus.
If the distance is greater than the specified maximum distance, a new
bus is created for the component.
* Voltage level 7:
If the voltage level is 7, the component is connected to the closest
LV bus.
* No MV connection allowed:
If the distance to the closest LV bus is less than the specified
maximum distance, the component is connected to the closest LV bus.
If the distance is greater, a new bus is created for the component.
If there are already components of the same type connected to the
target bus, the component is connected to the closest LV bus with
fewer connected components of the same type within the maximum
distance. If no such bus is found, the component is connected to
the closest LV bus again. If all buses within the allowed distance
have equal or more components of the same type connected to them
than allowed, the component is connected to a new LV bus.
* MV connection allowed:
If the distance to the closest LV bus is less than the specified
maximum distance, the component is connected to the closest LV bus.
If the distance is greater, the distance to the closest MV bus is
calculated. If the distance to the closest MV bus multiplied with
the factor is less than the distance to the closest LV bus, the
component is connected to the closest MV bus. The is no restriction
on the number of components of the same type connected to
the MV bus. If the distance is greater, the component
is connected to a new LV bus.
Parameters
----------
edisgo_object : :class:`~.EDisGo`
Expand Down Expand Up @@ -2414,40 +2450,6 @@ def connect_to_lv_based_on_geolocation(
:attr:`~.network.topology.Topology.loads_df` or
:attr:`~.network.topology.Topology.storage_units_df`, depending on component
type.
Method
------
1. Extract and validate voltage level
- Voltage level 6:
If the voltage level is 6, the component is connected to the closest
MV/LV substation or MV bus. Therefore, the distance to the substations
and MV buses is calculated and the closest one is chosen as target bus.
If the distance is greater than the specified maximum distance, a new
bus is created for the component.
- Voltage level 7:
If the voltage level is 7, the component is connected to the closest
LV bus.
- No MV connection allowed:
If the distance to the closest LV bus is less than the specified
maximum distance, the component is connected to the closest LV bus.
If the distance is greater, a new bus is created for the component.
If there are already components of the same type connected to the
target bus, the component is connected to the closest LV bus with
fewer connected components of the same type within the maximum
distance. If no such bus is found, the component is connected to
the closest LV bus again. If all buses within the allowed distance
have equal or more components of the same type connected to them
than allowed, the component is connected to a new LV bus.
- MV connection:
If the distance to the closest LV bus is less than the specified
maximum distance, the component is connected to the closest LV bus.
If the distance is greater, the distance to the closest MV bus is
calculated. If the distance to the closest MV bus multiplied with
the factor is less than the distance to the closest LV bus, the
component is connected to the closest MV bus. The is no restriction
on the number of components of the same type connected to
the MV bus. If the distance is greater, the component
is connected to a new LV bus.
"""

def validate_voltage_level(voltage_level):
Expand Down

0 comments on commit 64aa833

Please sign in to comment.