Skip to content

Commit 09475ef

Browse files
committed
Add 'retail' to allowed use cases in sector validation
1 parent bf4fd13 commit 09475ef

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

edisgo/network/timeseries.py

+15-13
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ def _worst_case_charging_points(self, cases, df, configs):
962962

963963
# check that there is no invalid sector (only "home", "work", "public", and
964964
# "hpc" allowed)
965-
use_cases = ["home", "work", "public", "hpc"]
965+
use_cases = ["home", "work", "public", "hpc", "retail"]
966966
sectors = df.sector.unique()
967967
diff = list(set(sectors) - set(use_cases))
968968
if diff:
@@ -981,9 +981,9 @@ def _worst_case_charging_points(self, cases, df, configs):
981981
for s in sectors:
982982
for case in cases:
983983
for voltage_level in ["mv", "lv"]:
984-
power_scaling.at[
985-
f"{case}_{voltage_level}", s
986-
] = worst_case_scale_factors[f"{voltage_level}_{case}_cp_{s}"]
984+
power_scaling.at[f"{case}_{voltage_level}", s] = (
985+
worst_case_scale_factors[f"{voltage_level}_{case}_cp_{s}"]
986+
)
987987

988988
# calculate active power of charging points
989989
active_power = pd.concat(
@@ -1375,9 +1375,11 @@ def predefined_dispatchable_generators_by_technology(
13751375

13761376
# scale time series by nominal power
13771377
ts_scaled = generators_df.apply(
1378-
lambda x: ts_generators[x.type] * x.p_nom
1379-
if x.type in ts_generators.columns
1380-
else ts_generators["other"] * x.p_nom,
1378+
lambda x: (
1379+
ts_generators[x.type] * x.p_nom
1380+
if x.type in ts_generators.columns
1381+
else ts_generators["other"] * x.p_nom
1382+
),
13811383
axis=1,
13821384
).T
13831385
if not ts_scaled.empty:
@@ -1435,9 +1437,9 @@ def predefined_conventional_loads_by_sector(
14351437

14361438
# write to TimeSeriesRaw
14371439
for col in ts_loads:
1438-
self.time_series_raw.conventional_loads_active_power_by_sector[
1439-
col
1440-
] = ts_loads[col]
1440+
self.time_series_raw.conventional_loads_active_power_by_sector[col] = (
1441+
ts_loads[col]
1442+
)
14411443

14421444
# set load_names if None
14431445
if load_names is None:
@@ -1494,9 +1496,9 @@ def predefined_charging_points_by_use_case(
14941496

14951497
# write to TimeSeriesRaw
14961498
for col in ts_loads:
1497-
self.time_series_raw.charging_points_active_power_by_use_case[
1498-
col
1499-
] = ts_loads[col]
1499+
self.time_series_raw.charging_points_active_power_by_use_case[col] = (
1500+
ts_loads[col]
1501+
)
15001502

15011503
# set load_names if None
15021504
if load_names is None:

0 commit comments

Comments
 (0)