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.
@@ -1499,12 +1499,15 @@ def _add_evaluation_to_database(
1499
1499
  )
1500
1500
 
1501
1501
 
1502
- def insert_dummy_standby_departure_events(depot_id: int, session: Session) -> None:
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eflips-depot
3
- Version: 4.3.10
3
+ Version: 4.3.11
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
@@ -1,5 +1,5 @@
1
1
  eflips/depot/__init__.py,sha256=n7jte8R6j_Ad4Mp4hkklKwil5r8u8Q_SbXrCC-nf5jM,1556
2
- eflips/depot/api/__init__.py,sha256=jgzYf4PNuWeXjnttq_wtxfgvXkQTWA02X_x-saFqmPA,94403
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.10.dist-info/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
39
- eflips_depot-4.3.10.dist-info/METADATA,sha256=qChE3OeL0pcNAwogo3qcH4wKpuysPek-gEN4jmbdo6M,5840
40
- eflips_depot-4.3.10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
41
- eflips_depot-4.3.10.dist-info/RECORD,,
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,,