eflips-depot 3.2.4__tar.gz → 3.2.6__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.
Files changed (41) hide show
  1. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/PKG-INFO +6 -2
  2. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/README.md +5 -1
  3. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/api/__init__.py +26 -17
  4. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/pyproject.toml +1 -1
  5. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/LICENSE.md +0 -0
  6. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/__init__.py +0 -0
  7. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/api/defaults/default_settings.json +0 -0
  8. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/api/private/__init__.py +0 -0
  9. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/api/private/depot.py +0 -0
  10. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/api/private/smart_charging.py +0 -0
  11. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/api/private/util.py +0 -0
  12. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/configuration.py +0 -0
  13. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/depot.py +0 -0
  14. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/evaluation.py +0 -0
  15. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/filters.py +0 -0
  16. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/input_epex_power_price.py +0 -0
  17. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/__init__.py +0 -0
  18. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/doc/__init__.py +0 -0
  19. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
  20. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/evaluation.py +0 -0
  21. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
  22. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
  23. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
  24. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
  25. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
  26. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
  27. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
  28. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/packing.py +0 -0
  29. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/settings.py +0 -0
  30. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/template_creation.py +0 -0
  31. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/layout_opt/util.py +0 -0
  32. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/plots.py +0 -0
  33. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/processes.py +0 -0
  34. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/rating.py +0 -0
  35. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/resources.py +0 -0
  36. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/settings_config.py +0 -0
  37. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/simple_vehicle.py +0 -0
  38. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/simulation.py +0 -0
  39. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/smart_charging.py +0 -0
  40. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/standalone.py +0 -0
  41. {eflips_depot-3.2.4 → eflips_depot-3.2.6}/eflips/depot/validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eflips-depot
3
- Version: 3.2.4
3
+ Version: 3.2.6
4
4
  Summary: Depot Simulation for eFLIPS
5
5
  Home-page: https://github.com/mpm-tu-berlin/eflips-depot
6
6
  License: AGPL-3.0-or-later
@@ -98,7 +98,11 @@ Testing is done using the `pytest` framework with tests located in the `tests`di
98
98
  ```
99
99
  ## Documentation
100
100
 
101
- Documentation is automatically created from the docstrings in the code using [sphinx-autoapi](https://sphinx-autoapi.readthedocs.io/en/latest/). If you have downloaded a specific release, the documentation is included in the `docs` directory. If you have cloned the repository, you can create the documentation yourself by executing the following command in the root directory of the repository:
101
+ Documentation is available on [Read the Docs](https://eflips-depot.readthedocs.io/en/latest/).
102
+
103
+ To locally create the documentaiton from the docstrings in the code
104
+ using [sphinx-autoapi](https://sphinx-autoapi.readthedocs.io/en/latest/), you can create the documentation execute the
105
+ following command in the root directory of the repository:
102
106
 
103
107
  ```bash
104
108
  cd docs/
@@ -74,7 +74,11 @@ Testing is done using the `pytest` framework with tests located in the `tests`di
74
74
  ```
75
75
  ## Documentation
76
76
 
77
- Documentation is automatically created from the docstrings in the code using [sphinx-autoapi](https://sphinx-autoapi.readthedocs.io/en/latest/). If you have downloaded a specific release, the documentation is included in the `docs` directory. If you have cloned the repository, you can create the documentation yourself by executing the following command in the root directory of the repository:
77
+ Documentation is available on [Read the Docs](https://eflips-depot.readthedocs.io/en/latest/).
78
+
79
+ To locally create the documentaiton from the docstrings in the code
80
+ using [sphinx-autoapi](https://sphinx-autoapi.readthedocs.io/en/latest/), you can create the documentation execute the
81
+ following command in the root directory of the repository:
78
82
 
79
83
  ```bash
80
84
  cd docs/
@@ -28,7 +28,7 @@ import copy
28
28
  import os
29
29
  import warnings
30
30
  from datetime import timedelta
31
- from enum import Enum, auto
31
+ from enum import Enum
32
32
  from math import ceil
33
33
  from typing import Any, Dict, Optional, Union
34
34
 
@@ -68,24 +68,24 @@ from eflips.depot.api.private.util import (
68
68
  )
69
69
 
70
70
 
71
- class SmartChargingStragegy(Enum):
71
+ class SmartChargingStrategy(Enum):
72
72
  """Enum class for different smart charging strategies."""
73
73
 
74
- NONE = auto
74
+ NONE = 0
75
75
  """
76
76
  Do not use smart charging.
77
77
 
78
78
  Buses are charged with the maximum power available, from the time they arrive at the depot
79
79
  until they are full (or leave the depot).
80
80
  """
81
- EVEN = auto
81
+ EVEN = 1
82
82
  """
83
83
  Use smart charging with an even distribution of charging power over the time the bus is at the depot.
84
84
 
85
85
  This aims to
86
86
  minimize the peak power demand.
87
87
  """
88
- MIN_PRICE = auto
88
+ MIN_PRICE = 2
89
89
  """
90
90
  Use smart charging in order to minimize the cost of charging.
91
91
 
@@ -422,8 +422,17 @@ def apply_even_smart_charging(
422
422
  .order_by(Event.time_start)
423
423
  .first()
424
424
  )
425
- assert next_event is not None
426
- assert next_event.event_type == EventType.STANDBY_DEPARTURE
425
+
426
+ if (
427
+ next_event is None
428
+ or next_event.event_type != EventType.STANDBY_DEPARTURE
429
+ ):
430
+ warnings.warn(
431
+ f"Event {charging_event.id} has no STANDBY_DEPARTURE event after a CHARGING_DEPOT "
432
+ f"event. No room for smart charging."
433
+ )
434
+ continue
435
+
427
436
  assert next_event.time_start == charging_event.time_end
428
437
 
429
438
  if (
@@ -457,7 +466,7 @@ def simulate_scenario(
457
466
  scenario: Union[Scenario, int, Any],
458
467
  repetition_period: Optional[timedelta] = None,
459
468
  database_url: Optional[str] = None,
460
- smart_charging_strategy: SmartChargingStragegy = SmartChargingStragegy.EVEN,
469
+ smart_charging_strategy: SmartChargingStrategy = SmartChargingStrategy.EVEN,
461
470
  ) -> None:
462
471
  """
463
472
  This method simulates a scenario and adds the results to the database.
@@ -497,15 +506,15 @@ def simulate_scenario(
497
506
  ev = run_simulation(simulation_host)
498
507
  add_evaluation_to_database(scenario, ev, session)
499
508
 
500
- match smart_charging_strategy:
501
- case SmartChargingStragegy.NONE:
502
- pass
503
- case SmartChargingStragegy.EVEN:
504
- apply_even_smart_charging(scenario, database_url)
505
- case SmartChargingStragegy.MIN_PRICE:
506
- raise NotImplementedError("MIN_PRICE strategy is not implemented yet.")
507
- case _:
508
- raise NotImplementedError()
509
+ match smart_charging_strategy:
510
+ case SmartChargingStrategy.NONE:
511
+ pass
512
+ case SmartChargingStrategy.EVEN:
513
+ apply_even_smart_charging(scenario, database_url)
514
+ case SmartChargingStrategy.MIN_PRICE:
515
+ raise NotImplementedError("MIN_PRICE strategy is not implemented yet.")
516
+ case _:
517
+ raise NotImplementedError()
509
518
 
510
519
 
511
520
  def _init_simulation(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "eflips-depot"
3
- version = "3.2.4"
3
+ version = "3.2.6"
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",
File without changes