@@ -962,7 +962,7 @@ def _worst_case_charging_points(self, cases, df, configs):
962
962
963
963
# check that there is no invalid sector (only "home", "work", "public", and
964
964
# "hpc" allowed)
965
- use_cases = ["home" , "work" , "public" , "hpc" ]
965
+ use_cases = ["home" , "work" , "public" , "hpc" , "retail" ]
966
966
sectors = df .sector .unique ()
967
967
diff = list (set (sectors ) - set (use_cases ))
968
968
if diff :
@@ -981,9 +981,9 @@ def _worst_case_charging_points(self, cases, df, configs):
981
981
for s in sectors :
982
982
for case in cases :
983
983
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
+ )
987
987
988
988
# calculate active power of charging points
989
989
active_power = pd .concat (
@@ -1375,9 +1375,11 @@ def predefined_dispatchable_generators_by_technology(
1375
1375
1376
1376
# scale time series by nominal power
1377
1377
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
+ ),
1381
1383
axis = 1 ,
1382
1384
).T
1383
1385
if not ts_scaled .empty :
@@ -1435,9 +1437,9 @@ def predefined_conventional_loads_by_sector(
1435
1437
1436
1438
# write to TimeSeriesRaw
1437
1439
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
+ )
1441
1443
1442
1444
# set load_names if None
1443
1445
if load_names is None :
@@ -1494,9 +1496,9 @@ def predefined_charging_points_by_use_case(
1494
1496
1495
1497
# write to TimeSeriesRaw
1496
1498
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
+ )
1500
1502
1501
1503
# set load_names if None
1502
1504
if load_names is None :
0 commit comments