eflips-depot 4.15.2__py3-none-any.whl → 4.15.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -685,7 +685,9 @@ def simulate_scenario(
685
685
  case SmartChargingStrategy.NONE:
686
686
  pass
687
687
  case SmartChargingStrategy.EVEN:
688
- apply_even_smart_charging(scenario, database_url)
688
+ apply_even_smart_charging(
689
+ scenario, database_url, delete_existing_charging_timeseries=True
690
+ )
689
691
  case SmartChargingStrategy.MIN_PRICE:
690
692
  raise NotImplementedError("MIN_PRICE strategy is not implemented yet.")
691
693
  case _:
@@ -128,7 +128,7 @@ class DepotConfigurationWish:
128
128
  if self.auto_generate is True:
129
129
  if self.default_power is None or self.standard_block_length is None:
130
130
  raise ValueError(
131
- "If auto_generate is True, default_power, standard_block_length, cleaning_slots, cleaning_duration and shunting_slots must be provided."
131
+ "If auto_generate is True, default_power, standard_block_length must be provided."
132
132
  )
133
133
  if (
134
134
  self.cleaning_slots is not None
@@ -1196,7 +1196,9 @@ def depot_smallest_possible_size(
1196
1196
 
1197
1197
  # Simulate the depot
1198
1198
  simulate_scenario(
1199
- scenario, smart_charging_strategy=SmartChargingStrategy.NONE
1199
+ scenario,
1200
+ smart_charging_strategy=SmartChargingStrategy.NONE,
1201
+ ignore_unstable_simulation=True,
1200
1202
  )
1201
1203
 
1202
1204
  # Find the peak usage of the depot
@@ -1260,12 +1262,6 @@ def depot_smallest_possible_size(
1260
1262
 
1261
1263
  except MissingVehicleDimensionError as e:
1262
1264
  raise e
1263
- except UnstableSimulationException as e:
1264
- # This change is made after Unstable exception and delay exceptions are introduced
1265
- logger.debug(
1266
- f"Results are unstable, suggesting depot is too small."
1267
- )
1268
- continue
1269
1265
  except DelayedTripException as e:
1270
1266
  logger.debug(f"Trips are delayed, suggesting depot is too small.")
1271
1267
  continue
@@ -1275,6 +1271,10 @@ def depot_smallest_possible_size(
1275
1271
  # Identify the best configuration for each vehicle type
1276
1272
  ret_val: Dict[VehicleType, Dict[AreaType, int]] = dict()
1277
1273
  for vt in vts_and_rotations.keys():
1274
+ assert area_needed[vt] != {}, (
1275
+ f"No valid configurations found for {vt.name}, "
1276
+ f"please check if there are any delays after simulating scenario."
1277
+ )
1278
1278
  best_config = min(area_needed[vt].keys(), key=lambda x: area_needed[vt][x])
1279
1279
  ret_val[vt] = {
1280
1280
  AreaType.LINE: best_config * standard_block_length,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eflips-depot
3
- Version: 4.15.2
3
+ Version: 4.15.4
4
4
  Summary: Depot Simulation for eFLIPS
5
5
  License: AGPL-3.0-or-later
6
6
  License-File: LICENSE.md
@@ -1,9 +1,9 @@
1
1
  eflips/depot/__init__.py,sha256=FCVnYU7aSfR4BNCo722I1V3uU5336qr1tTt-zT6X4UI,1555
2
- eflips/depot/api/__init__.py,sha256=nq5aHGTOIpDmvDfcGMlCH_jd97E0VZ28KVcT3XTwpbE,67539
2
+ eflips/depot/api/__init__.py,sha256=HvPtHi55hXwGgxD_DcYZxUnws1KRkKnezxI3Bao9TTg,67619
3
3
  eflips/depot/api/defaults/default_settings.json,sha256=0eUDTw_rtLQFvthP8oJL93iRXlmAOravAg-4qqGMQAY,5375
4
4
  eflips/depot/api/private/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  eflips/depot/api/private/consumption.py,sha256=494u6FelymWfI-Yt3ybJpLHUL-6zEqBOT2qSrPhRmMo,30038
6
- eflips/depot/api/private/depot.py,sha256=G08E9yZ18c2oSQVYGRI8nAHtGZ8EHWsRJUOR23a2bao,59720
6
+ eflips/depot/api/private/depot.py,sha256=wFzKYbUTtU-mOGZD6gB_fQBaKGRTXZn4f5hRuuV6gkg,59629
7
7
  eflips/depot/api/private/results_to_database.py,sha256=OewbDwbk54GPORMVavLbJ7DSZpRKBLHM7q9aWKTngs8,30026
8
8
  eflips/depot/api/private/util.py,sha256=e7T_-1AUXoCV9c11zaED2-za7p0TDhYG4Dg0lBZnrZI,18342
9
9
  eflips/depot/configuration.py,sha256=Op3hlir-dEN7yHr0kTqbYANoCBKFWK6uKOv3NJl8w_w,35678
@@ -36,7 +36,7 @@ eflips/depot/simulation.py,sha256=ee0qTzOzG-8ybN36ie_NJallXfC7jUaS9JZvaYFziLs,10
36
36
  eflips/depot/smart_charging.py,sha256=C3BYqzn2-OYY4ipXm0ETtavbAM9QXZMYULBpVoChf0E,54311
37
37
  eflips/depot/standalone.py,sha256=8O01zEXghFG9zZBu0fUD0sXvbHQ-AXw6RB5M750a_sM,22419
38
38
  eflips/depot/validation.py,sha256=TIuY7cQtEJI4H2VVMSuY5IIVkacEEZ67weeMuY3NSAM,7097
39
- eflips_depot-4.15.2.dist-info/METADATA,sha256=vxdX4GRYggcgaLeIG84k6D6teA4g0i_PSYFY-U1IkGg,5961
40
- eflips_depot-4.15.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
41
- eflips_depot-4.15.2.dist-info/licenses/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
42
- eflips_depot-4.15.2.dist-info/RECORD,,
39
+ eflips_depot-4.15.4.dist-info/METADATA,sha256=96QASZxpS3Z6obl3xDrwcEsxD-84hCR2y88o_6Yg0kE,5961
40
+ eflips_depot-4.15.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
41
+ eflips_depot-4.15.4.dist-info/licenses/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
42
+ eflips_depot-4.15.4.dist-info/RECORD,,