eflips-depot 1.1.0__py3-none-any.whl → 1.1.1__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.
Potentially problematic release.
This version of eflips-depot might be problematic. Click here for more details.
- eflips/depot/api/__init__.py +14 -7
- {eflips_depot-1.1.0.dist-info → eflips_depot-1.1.1.dist-info}/METADATA +1 -1
- {eflips_depot-1.1.0.dist-info → eflips_depot-1.1.1.dist-info}/RECORD +5 -5
- {eflips_depot-1.1.0.dist-info → eflips_depot-1.1.1.dist-info}/LICENSE.md +0 -0
- {eflips_depot-1.1.0.dist-info → eflips_depot-1.1.1.dist-info}/WHEEL +0 -0
eflips/depot/api/__init__.py
CHANGED
|
@@ -833,13 +833,20 @@ def _add_evaluation_to_database(
|
|
|
833
833
|
f"Could not find Rotation {schedule_id} in scenario {scenario_id}."
|
|
834
834
|
)
|
|
835
835
|
else:
|
|
836
|
-
rotation_q.
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
836
|
+
old_vehicle_id = rotation_q.one().vehicle_id
|
|
837
|
+
if old_vehicle_id is None:
|
|
838
|
+
rotation_q.update({"vehicle_id": vehicle_id})
|
|
839
|
+
for trip in rotation_q.one().trips:
|
|
840
|
+
for event in trip.events:
|
|
841
|
+
event.vehicle_id = vehicle_id
|
|
842
|
+
else:
|
|
843
|
+
# If there already is a vehicle assigned to this rotation, we need to change all teh events by this
|
|
844
|
+
# vehicle to the new vehicle
|
|
845
|
+
event_q = session.query(Event).filter(
|
|
846
|
+
Event.vehicle_id == old_vehicle_id
|
|
847
|
+
)
|
|
848
|
+
event_q.update({"vehicle_id": vehicle_id})
|
|
849
|
+
rotation_q.update({"vehicle_id": vehicle_id})
|
|
843
850
|
|
|
844
851
|
# Write Events
|
|
845
852
|
session.add_all(list_of_events)
|
|
@@ -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=0gORABah_O9IHEzKNYNje2XhzY9pZ1RsC5hw0aEzxEE,36171
|
|
3
3
|
eflips/depot/api/defaults/default_settings.json,sha256=0eUDTw_rtLQFvthP8oJL93iRXlmAOravAg-4qqGMQAY,5375
|
|
4
4
|
eflips/depot/api/private.py,sha256=69YtWfg4s62YJW5qsdycUfxwNR1rSfCAOcuLp-kBabw,22129
|
|
5
5
|
eflips/depot/configuration.py,sha256=Op3hlir-dEN7yHr0kTqbYANoCBKFWK6uKOv3NJl8w_w,35678
|
|
@@ -32,7 +32,7 @@ eflips/depot/simulation.py,sha256=tJHUVCGMf-7aZGYmb5lz02TRcTRxV1RRRqxmIuEtlJ4,10
|
|
|
32
32
|
eflips/depot/smart_charging.py,sha256=C3BYqzn2-OYY4ipXm0ETtavbAM9QXZMYULBpVoChf0E,54311
|
|
33
33
|
eflips/depot/standalone.py,sha256=VxcTzBaB67fNJUMmjPRwKXjhqTy6oQ41Coote2LvAmk,22338
|
|
34
34
|
eflips/depot/validation.py,sha256=TIuY7cQtEJI4H2VVMSuY5IIVkacEEZ67weeMuY3NSAM,7097
|
|
35
|
-
eflips_depot-1.1.
|
|
36
|
-
eflips_depot-1.1.
|
|
37
|
-
eflips_depot-1.1.
|
|
38
|
-
eflips_depot-1.1.
|
|
35
|
+
eflips_depot-1.1.1.dist-info/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
|
|
36
|
+
eflips_depot-1.1.1.dist-info/METADATA,sha256=9Cy7r42VIiwAcO3SAz-ti0KXuhFIvcVsNLvGFxh_pOc,5597
|
|
37
|
+
eflips_depot-1.1.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
38
|
+
eflips_depot-1.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|