eflips-depot 4.3.10__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 +23 -1
- {eflips_depot-4.3.10.dist-info → eflips_depot-4.3.11.dist-info}/METADATA +1 -1
- {eflips_depot-4.3.10.dist-info → eflips_depot-4.3.11.dist-info}/RECORD +5 -5
- {eflips_depot-4.3.10.dist-info → eflips_depot-4.3.11.dist-info}/LICENSE.md +0 -0
- {eflips_depot-4.3.10.dist-info → eflips_depot-4.3.11.dist-info}/WHEEL +0 -0
eflips/depot/api/__init__.py
CHANGED
|
@@ -1499,12 +1499,15 @@ def _add_evaluation_to_database(
|
|
|
1499
1499
|
)
|
|
1500
1500
|
|
|
1501
1501
|
|
|
1502
|
-
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:
|
|
1503
1505
|
"""
|
|
1504
1506
|
Workaround for the missing STANDBY_DEPARTURE events in the database.
|
|
1505
1507
|
|
|
1506
1508
|
:param session: The database session
|
|
1507
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.
|
|
1508
1511
|
:return:
|
|
1509
1512
|
"""
|
|
1510
1513
|
logger = logging.getLogger(__name__)
|
|
@@ -1548,6 +1551,25 @@ def insert_dummy_standby_departure_events(depot_id: int, session: Session) -> No
|
|
|
1548
1551
|
description="Dummy STANDBY_DEPARTURE event",
|
|
1549
1552
|
)
|
|
1550
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)
|
|
1551
1573
|
|
|
1552
1574
|
|
|
1553
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
|