eflips-depot 3.2.1__py3-none-any.whl → 3.2.2__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.
@@ -45,6 +45,7 @@ from eflips.model import (
45
45
  Vehicle,
46
46
  Process,
47
47
  AssocAreaProcess,
48
+ Station,
48
49
  )
49
50
  from sqlalchemy.orm import Session
50
51
  from sqlalchemy.sql import select
@@ -842,8 +843,8 @@ def add_evaluation_to_database(
842
843
  # In case there are no copy trips before or after the non-copy trip
843
844
  continue
844
845
 
845
- # The range of time of events to be generated. It is between the copy trip before the first non-copy trip and the
846
- # copy trip after the last non-copy trip
846
+ # The range of time of events to be generated. It is between the copy trip before the first non-copy trip
847
+ # and the copy trip after the last non-copy trip
847
848
  earliest_time = sorted(dict_of_events.keys())[0]
848
849
  latest_time = sorted(dict_of_events.keys())[-1]
849
850
 
@@ -874,6 +875,21 @@ def add_evaluation_to_database(
874
875
  expected_area = waiting_info["area"]
875
876
  # Find the area for standby arrival event
876
877
 
878
+ # Get the corresponding depot id first by grabbing one of the rotations and get its departure station
879
+ some_rotation_id = current_vehicle.finished_trips[0].ID
880
+ some_rotation = (
881
+ session.query(Rotation)
882
+ .filter(Rotation.id == some_rotation_id)
883
+ .one()
884
+ )
885
+ start_station = some_rotation.trips[0].route.departure_station_id
886
+ depot_id = (
887
+ session.query(Depot.id)
888
+ .join(Station)
889
+ .filter(Station.id == start_station)
890
+ .one()[0]
891
+ )
892
+
877
893
  waiting_area_id = (
878
894
  session.query(Area.id)
879
895
  .join(AssocAreaProcess, AssocAreaProcess.area_id == Area.id)
@@ -886,6 +902,7 @@ def add_evaluation_to_database(
886
902
  Area.vehicle_type_id
887
903
  == int(current_vehicle.vehicle_type.ID),
888
904
  Area.scenario_id == scenario.id,
905
+ Area.depot_id == depot_id,
889
906
  )
890
907
  .one()[0]
891
908
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eflips-depot
3
- Version: 3.2.1
3
+ Version: 3.2.2
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=sSNY1CBO2AmekxdNi-o_mCbWUlMpsBUfVaYT6jYFuxo,57378
2
+ eflips/depot/api/__init__.py,sha256=OhjCyPvGZ-XYuyfaCqCp8XHyN9MvJVUGBayB3IoNKBI,58172
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=GlIk6vuanbQP3a4e9TYt6xJ-XJTdaFbaxxz_ni17zgo,17136
@@ -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-3.2.1.dist-info/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
39
- eflips_depot-3.2.1.dist-info/METADATA,sha256=yQQVxr8UEGtM9z_1O6E2v0yA7s1tJCZ_kuPkHx-7k3g,5840
40
- eflips_depot-3.2.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
41
- eflips_depot-3.2.1.dist-info/RECORD,,
38
+ eflips_depot-3.2.2.dist-info/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
39
+ eflips_depot-3.2.2.dist-info/METADATA,sha256=UWxPQcC7Ml5aWUmfKTtYKxEgKkV9-JfCVhh6OiqD7C8,5840
40
+ eflips_depot-3.2.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
41
+ eflips_depot-3.2.2.dist-info/RECORD,,