eflips-depot 4.13.2__tar.gz → 4.13.3__tar.gz

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.

Potentially problematic release.


This version of eflips-depot might be problematic. Click here for more details.

Files changed (42) hide show
  1. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/PKG-INFO +2 -3
  2. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/__init__.py +0 -5
  3. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/api/__init__.py +17 -25
  4. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/api/private/depot.py +10 -7
  5. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/pyproject.toml +2 -2
  6. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/LICENSE.md +0 -0
  7. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/README.md +0 -0
  8. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/api/defaults/default_settings.json +0 -0
  9. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/api/private/__init__.py +0 -0
  10. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/api/private/consumption.py +0 -0
  11. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/api/private/results_to_database.py +0 -0
  12. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/api/private/util.py +0 -0
  13. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/configuration.py +0 -0
  14. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/depot.py +0 -0
  15. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/evaluation.py +0 -0
  16. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/filters.py +0 -0
  17. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/input_epex_power_price.py +0 -0
  18. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/__init__.py +0 -0
  19. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/doc/__init__.py +0 -0
  20. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
  21. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/evaluation.py +0 -0
  22. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
  23. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
  24. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
  25. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
  26. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
  27. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
  28. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
  29. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/packing.py +0 -0
  30. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/settings.py +0 -0
  31. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/template_creation.py +0 -0
  32. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/layout_opt/util.py +0 -0
  33. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/plots.py +0 -0
  34. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/processes.py +0 -0
  35. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/rating.py +0 -0
  36. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/resources.py +0 -0
  37. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/settings_config.py +0 -0
  38. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/simple_vehicle.py +0 -0
  39. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/simulation.py +0 -0
  40. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/smart_charging.py +0 -0
  41. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/standalone.py +0 -0
  42. {eflips_depot-4.13.2 → eflips_depot-4.13.3}/eflips/depot/validation.py +0 -0
@@ -1,14 +1,13 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: eflips-depot
3
- Version: 4.13.2
3
+ Version: 4.13.3
4
4
  Summary: Depot Simulation for eFLIPS
5
5
  License: AGPL-3.0-or-later
6
6
  Author: Enrico Lauth
7
7
  Author-email: enrico.lauth@tu-berlin.de
8
- Requires-Python: >=3.10,<3.14
8
+ Requires-Python: >=3.11,<3.14
9
9
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
10
10
  Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.10
12
11
  Classifier: Programming Language :: Python :: 3.11
13
12
  Classifier: Programming Language :: Python :: 3.12
14
13
  Classifier: Programming Language :: Python :: 3.13
@@ -95,8 +95,3 @@ class UnstableSimulationException(Exception):
95
95
  f"The following blocks/rotations require a new vehicle. This suggests an unstable "
96
96
  f" simulation result, where a repeated schedule might require more vehicles: {trip_names}"
97
97
  )
98
-
99
-
100
- class MultipleErrors(Exception):
101
- def __init__(self, errors):
102
- self.errors = errors
@@ -60,7 +60,6 @@ from eflips.depot import (
60
60
  SimulationHost,
61
61
  UnstableSimulationException,
62
62
  DelayedTripException,
63
- MultipleErrors,
64
63
  )
65
64
  from eflips.depot.api.private.consumption import ConsumptionResult
66
65
  from eflips.depot.api.private.consumption import (
@@ -640,29 +639,20 @@ def simulate_scenario(
640
639
  try:
641
640
  add_evaluation_to_database(scenario, ev, session)
642
641
 
643
- except MultipleErrors as e:
644
- if e.errors:
645
- for error in e.errors:
646
- if (
647
- isinstance(error, DelayedTripException)
648
- and not ignore_delayed_trips
649
- ):
650
- logger.error(
651
- "There are delayed trips in the simulation. "
652
- "Please check the input data and try again."
653
- )
654
- raise error
655
- if (
656
- isinstance(error, UnstableSimulationException)
657
- and not ignore_unstable_simulation
658
- ):
659
- logger.error(
660
- "Simulation became unstable. "
661
- "Please check the input data and try again."
662
- )
663
- raise error
664
-
665
- logger.warning("An error occurred during the simulation: %s", error)
642
+ except* DelayedTripException as delay_exp:
643
+ if not ignore_delayed_trips:
644
+ logger.error(
645
+ "There are delayed trips in the simulation. "
646
+ "Please check the input data and try again."
647
+ )
648
+ raise delay_exp
649
+ except* UnstableSimulationException as unstable_exp:
650
+ if not ignore_unstable_simulation:
651
+ logger.error(
652
+ "The simulation became unstable. "
653
+ "Please check the input data and try again."
654
+ )
655
+ raise unstable_exp
666
656
 
667
657
  match smart_charging_strategy:
668
658
  case SmartChargingStrategy.NONE:
@@ -1104,7 +1094,9 @@ def add_evaluation_to_database(
1104
1094
  errors.append(unstable_exp)
1105
1095
 
1106
1096
  if len(errors) > 0:
1107
- raise MultipleErrors(errors)
1097
+ raise ExceptionGroup(
1098
+ "Simulation is either unstable or including delayed blocks", errors
1099
+ )
1108
1100
 
1109
1101
 
1110
1102
  def generate_depot_optimal_size(
@@ -27,6 +27,8 @@ from eflips.model import (
27
27
  from sqlalchemy import or_
28
28
  from sqlalchemy.orm import Session
29
29
 
30
+ from eflips.depot import UnstableSimulationException, DelayedTripException
31
+
30
32
 
31
33
  class MissingVehicleDimensionError(ValueError):
32
34
  pass
@@ -1091,14 +1093,15 @@ def depot_smallest_possible_size(
1091
1093
 
1092
1094
  except MissingVehicleDimensionError as e:
1093
1095
  raise e
1094
- except Exception as e:
1096
+ except UnstableSimulationException as e:
1095
1097
  # This change is made after Unstable exception and delay exceptions are introduced
1096
- if (
1097
- "which suggests the fleet or the infrastructure might not be enough for the full electrification. Please add charging interfaces or increase charging power ."
1098
- in repr(e)
1099
- ):
1100
- logger.debug(f"Depot is too small.")
1101
- continue
1098
+ logger.debug(
1099
+ f"Results are unstable, suggesting depot is too small."
1100
+ )
1101
+ continue
1102
+ except DelayedTripException as e:
1103
+ logger.debug(f"Trips are delayed, suggesting depot is too small.")
1104
+ continue
1102
1105
  finally:
1103
1106
  inner_savepoint.rollback()
1104
1107
  savepoint.rollback()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "eflips-depot"
3
- version = "4.13.2"
3
+ version = "4.13.3"
4
4
  description = "Depot Simulation for eFLIPS"
5
5
  authors = ["Enrico Lauth <enrico.lauth@tu-berlin.de>",
6
6
  "Ludger Heide <ludger.heide@tu-berlin.de",
@@ -12,7 +12,7 @@ repository = "https://github.com/mpm-tu-berlin/eflips-depot"
12
12
  packages = [{ include = "eflips/depot" }]
13
13
 
14
14
  [tool.poetry.dependencies]
15
- python = ">=3.10, <3.14"
15
+ python = ">=3.11, <3.14"
16
16
  simpy = "^4.0.1"
17
17
  tqdm = "^4.67.0"
18
18
 
File without changes
File without changes