Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

413 feature improve connection of charging points #419

Closed
wants to merge 29 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
db6af07
home charging points residential load
joda9 Aug 6, 2024
01ba22a
add test_connect_to_lv_based_on_geolocation
joda9 Aug 6, 2024
c3ff9f9
update connect_to_lv_based_on_geolocation function
joda9 Aug 8, 2024
ae9f79a
add docstring and update comments assure_minimum_potential_charging_p…
khelfen Aug 12, 2024
de013e8
update docstring and comments get_weights_df function
khelfen Aug 12, 2024
d68e4d4
small bug fix in topology connect_to_lv
khelfen Aug 12, 2024
fe662bd
Revert "update connect_to_lv_based_on_geolocation function"
joda9 Aug 14, 2024
5bf5696
Revert "add test_connect_to_lv_based_on_geolocation"
joda9 Aug 14, 2024
6fdaf74
Revert "home charging points residential load"
joda9 Aug 14, 2024
6c33380
update connect_to_lv_based_on_geolocation function
joda9 Aug 15, 2024
d678279
Add warning maximum components per bus
joda9 Aug 15, 2024
944ab2c
mv_buses only if allowed
joda9 Aug 15, 2024
9251439
Merge pull request #416 from openego/413-feature-improve-connection-o…
khelfen Aug 16, 2024
32dce1d
move 'calculate_distance_to_buses_df' to geo.py
joda9 Aug 19, 2024
333a37b
Adjusting docstring to new method
joda9 Aug 19, 2024
9013d10
changes to new method in 'connect_to_lv_based_on_geolocation'
joda9 Aug 19, 2024
59d8758
Merge branch '413-feature-improve-connection-of-charging-points' of g…
joda9 Aug 19, 2024
0822f25
Adjusting docstring to new method
joda9 Aug 19, 2024
ad48999
changes to new method in 'connect_to_lv_based_on_geolocation'
joda9 Aug 19, 2024
46cc865
add tests for 'connect_to_lv_based_on_geolocation'
joda9 Aug 19, 2024
f530637
adding tests
joda9 Aug 20, 2024
8dbf59f
fixing tests
joda9 Aug 20, 2024
00d3d58
improve readability of 'connect_to_lv_based_on_geolocation'
joda9 Aug 21, 2024
962c9e3
fixing pandas warning
joda9 Aug 21, 2024
5e72bcc
using .loc instead of .copy
joda9 Aug 21, 2024
c7525d5
Rename parameters to make consistent with find_nearest_bus and reuse …
birgits Aug 21, 2024
62b92ea
Merge branch 'dev' into 413-feature-improve-connection-of-charging-po…
birgits Aug 21, 2024
a324890
Merge branch '413-feature-improve-connection-of-charging-points' of g…
joda9 Aug 21, 2024
3b09a5f
fixing issues
joda9 Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changes to new method in 'connect_to_lv_based_on_geolocation'
joda9 committed Aug 19, 2024
commit ad48999adc5b3bc9dbb79c048aefb8e6a08bd889
19 changes: 17 additions & 2 deletions edisgo/network/topology.py
Original file line number Diff line number Diff line change
@@ -2468,13 +2468,17 @@ def connect_to_lv_based_on_geolocation(
# Set the component type in comp_data if necessary
if comp_type in ["charging_point", "heat_pump"]:
comp_data["type"] = comp_type
elif comp_type in ["generator", "storage_unit"]:
comp_data["p_nom"] = comp_data["p"]

# Determine the appropriate add function based on component type
add_func = add_func_map.get(comp_type)

if add_func is None:
logger.error(f"Component type {comp_type} is not a valid option.")
return
raise ValueError(
f"Provided component type {comp_type} is not valid. Must either be"
f"'generator', 'charging_point', 'heat_pump' or 'storage_unit'."
)

# Find the nearest substation or MV bus
if voltage_level == 6:
@@ -2512,16 +2516,27 @@ def connect_to_lv_based_on_geolocation(
lv_loads = self.loads_df[
self.loads_df.sector.isin(["residential", "home"])
]
lv_loads = lv_loads.loc[
~lv_loads.bus.isin(self.mv_grid.buses_df.index)
]
elif comp_data["sector"] == "work":
lv_loads = self.loads_df[
self.loads_df.sector.isin(
["industrial", "cts", "agricultural", "work"]
)
]
lv_loads = lv_loads.loc[
~lv_loads.bus.isin(self.mv_grid.buses_df.index)
]

else:
# public charging points should not be in buildings
lv_loads = self.loads_df
lv_loads = lv_loads.loc[
~lv_loads.bus.isin(self.mv_grid.buses_df.index)
]
lv_buses = lv_buses.loc[~lv_buses.in_building]

lv_buses = lv_buses.loc[lv_loads.bus]

# Calculate distances to LV buses