eflips-depot 4.3.9__py3-none-any.whl → 4.3.11__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.
- eflips/depot/api/__init__.py +24 -3
- {eflips_depot-4.3.9.dist-info → eflips_depot-4.3.11.dist-info}/METADATA +1 -1
- {eflips_depot-4.3.9.dist-info → eflips_depot-4.3.11.dist-info}/RECORD +5 -5
- {eflips_depot-4.3.9.dist-info → eflips_depot-4.3.11.dist-info}/LICENSE.md +0 -0
- {eflips_depot-4.3.9.dist-info → eflips_depot-4.3.11.dist-info}/WHEEL +0 -0
eflips/depot/api/__init__.py
CHANGED
|
@@ -809,7 +809,7 @@ def generate_realistic_depot_layout(
|
|
|
809
809
|
for (
|
|
810
810
|
first_last_stop_tup,
|
|
811
811
|
vehicle_type_rotation_dict,
|
|
812
|
-
) in
|
|
812
|
+
) in depot_stations_and_vehicle_types.items():
|
|
813
813
|
first_stop, last_stop = first_last_stop_tup
|
|
814
814
|
if first_stop != last_stop:
|
|
815
815
|
raise ValueError("First and last stop of a rotation are not the same.")
|
|
@@ -1005,7 +1005,6 @@ def vehicle_counts_for_direct_layout(
|
|
|
1005
1005
|
ret_val: Dict[Station, Dict[VehicleType, int]] = dict()
|
|
1006
1006
|
|
|
1007
1007
|
for depot_id_as_str, ev in depot_evaluations.items():
|
|
1008
|
-
ev = next(iter(depot_evaluations.values()))
|
|
1009
1008
|
assert isinstance(ev, DepotEvaluation)
|
|
1010
1009
|
counts: Dict[str, int] = real_peak_vehicle_count(ev)
|
|
1011
1010
|
# The key of the dictionary is the vehicle type ID as a string. We need to convert it to a vehicle type object
|
|
@@ -1500,12 +1499,15 @@ def _add_evaluation_to_database(
|
|
|
1500
1499
|
)
|
|
1501
1500
|
|
|
1502
1501
|
|
|
1503
|
-
def insert_dummy_standby_departure_events(
|
|
1502
|
+
def insert_dummy_standby_departure_events(
|
|
1503
|
+
depot_id: int, session: Session, sim_time_end: Optional[datetime.datetime] = None
|
|
1504
|
+
) -> None:
|
|
1504
1505
|
"""
|
|
1505
1506
|
Workaround for the missing STANDBY_DEPARTURE events in the database.
|
|
1506
1507
|
|
|
1507
1508
|
:param session: The database session
|
|
1508
1509
|
:param scenario: A scenario object
|
|
1510
|
+
:param sim_time_end: The end time of the simulation. If None, final events might not be properly handled.
|
|
1509
1511
|
:return:
|
|
1510
1512
|
"""
|
|
1511
1513
|
logger = logging.getLogger(__name__)
|
|
@@ -1549,6 +1551,25 @@ def insert_dummy_standby_departure_events(depot_id: int, session: Session) -> No
|
|
|
1549
1551
|
description="Dummy STANDBY_DEPARTURE event",
|
|
1550
1552
|
)
|
|
1551
1553
|
session.add(dummy_event)
|
|
1554
|
+
elif next_event is None and sim_time_end is not None:
|
|
1555
|
+
# If the event's end is before the simulation end, insert a dummy STANDBY_DEPARTURE event
|
|
1556
|
+
# From the end of the charging event to the end of the simulation
|
|
1557
|
+
logger.warning("Inserting dummy STANDBY_DEPARTURE event")
|
|
1558
|
+
if charging_event.time_end < sim_time_end:
|
|
1559
|
+
dummy_event = Event(
|
|
1560
|
+
vehicle_id=charging_event.vehicle_id,
|
|
1561
|
+
vehicle_type_id=charging_event.vehicle.vehicle_type_id,
|
|
1562
|
+
time_start=charging_event.time_end,
|
|
1563
|
+
time_end=sim_time_end,
|
|
1564
|
+
event_type=EventType.STANDBY_DEPARTURE,
|
|
1565
|
+
area_id=charging_event.area_id,
|
|
1566
|
+
subloc_no=charging_event.subloc_no,
|
|
1567
|
+
scenario_id=charging_event.scenario_id,
|
|
1568
|
+
soc_start=charging_event.soc_end,
|
|
1569
|
+
soc_end=charging_event.soc_end,
|
|
1570
|
+
description="Dummy STANDBY_DEPARTURE event",
|
|
1571
|
+
)
|
|
1572
|
+
session.add(dummy_event)
|
|
1552
1573
|
|
|
1553
1574
|
|
|
1554
1575
|
def add_evaluation_to_database(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
eflips/depot/__init__.py,sha256=n7jte8R6j_Ad4Mp4hkklKwil5r8u8Q_SbXrCC-nf5jM,1556
|
|
2
|
-
eflips/depot/api/__init__.py,sha256=
|
|
2
|
+
eflips/depot/api/__init__.py,sha256=iNr2Qbqce8Qepbls8QVvFg50iDc6VInUQasKO_HBXSw,95664
|
|
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/depot.py,sha256=IpXQR2GuEUuilP02njKpvExgSkktkyHPmcn2j_Q3YPk,21276
|
|
@@ -35,7 +35,7 @@ eflips/depot/simulation.py,sha256=ee0qTzOzG-8ybN36ie_NJallXfC7jUaS9JZvaYFziLs,10
|
|
|
35
35
|
eflips/depot/smart_charging.py,sha256=C3BYqzn2-OYY4ipXm0ETtavbAM9QXZMYULBpVoChf0E,54311
|
|
36
36
|
eflips/depot/standalone.py,sha256=VxcTzBaB67fNJUMmjPRwKXjhqTy6oQ41Coote2LvAmk,22338
|
|
37
37
|
eflips/depot/validation.py,sha256=TIuY7cQtEJI4H2VVMSuY5IIVkacEEZ67weeMuY3NSAM,7097
|
|
38
|
-
eflips_depot-4.3.
|
|
39
|
-
eflips_depot-4.3.
|
|
40
|
-
eflips_depot-4.3.
|
|
41
|
-
eflips_depot-4.3.
|
|
38
|
+
eflips_depot-4.3.11.dist-info/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
|
|
39
|
+
eflips_depot-4.3.11.dist-info/METADATA,sha256=N0Bti0D_U33jdfuwuqNo0NLZcZP15bqdw19joIM65Ho,5840
|
|
40
|
+
eflips_depot-4.3.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
41
|
+
eflips_depot-4.3.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|