eflips-depot 3.2.4__tar.gz → 3.2.5__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.
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/PKG-INFO +1 -1
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/api/__init__.py +26 -17
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/pyproject.toml +1 -1
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/LICENSE.md +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/README.md +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/__init__.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/api/defaults/default_settings.json +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/api/private/__init__.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/api/private/depot.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/api/private/smart_charging.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/api/private/util.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/configuration.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/depot.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/evaluation.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/filters.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/input_epex_power_price.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/__init__.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/doc/__init__.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/evaluation.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/packing.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/settings.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/template_creation.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/util.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/plots.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/processes.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/rating.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/resources.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/settings_config.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/simple_vehicle.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/simulation.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/smart_charging.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/standalone.py +0 -0
- {eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/validation.py +0 -0
|
@@ -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
|
|
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
|
|
71
|
+
class SmartChargingStrategy(Enum):
|
|
72
72
|
"""Enum class for different smart charging strategies."""
|
|
73
73
|
|
|
74
|
-
NONE =
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
426
|
-
|
|
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:
|
|
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
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
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(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eflips_depot-3.2.4 → eflips_depot-3.2.5}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|