eflips-depot 4.4.1__py3-none-any.whl → 4.4.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.

Potentially problematic release.


This version of eflips-depot might be problematic. Click here for more details.

@@ -220,6 +220,7 @@ def simple_consumption_simulation(
220
220
  scenario_id=scenario.id,
221
221
  vehicle_type_id=vehicle.vehicle_type_id,
222
222
  vehicle=vehicle,
223
+ station_id=area.depot.station_id,
223
224
  area_id=area.id,
224
225
  subloc_no=area.capacity,
225
226
  time_start=standby_start,
@@ -399,11 +399,16 @@ def add_events_into_database(
399
399
  logger.warning("Refusing to create an event with zero duration.")
400
400
  continue
401
401
 
402
+ # Get station_id of the current depot through area
403
+
404
+ current_area = session.query(Area).filter(Area.id == process_dict["area"]).one()
405
+ station_id = current_area.depot.station_id
406
+
402
407
  current_event = Event(
403
408
  scenario=scenario,
404
409
  vehicle_type_id=db_vehicle.vehicle_type_id,
405
410
  vehicle=db_vehicle,
406
- station_id=None,
411
+ station_id=station_id,
407
412
  area_id=int(process_dict["area"]),
408
413
  subloc_no=int(process_dict["slot"]) - 1
409
414
  if "slot" in process_dict.keys()
@@ -445,7 +450,8 @@ def update_vehicle_in_rotation(session, scenario, list_of_assigned_schedules) ->
445
450
  # Delete all non-depot events
446
451
  session.query(Event).filter(
447
452
  Event.scenario == scenario,
448
- Event.trip_id.isnot(None) | Event.station_id.isnot(None),
453
+ Event.trip_id.isnot(None)
454
+ | (Event.station_id.isnot(None) & Event.area_id.is_(None)),
449
455
  ).delete(synchronize_session="auto")
450
456
 
451
457
  session.flush()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eflips-depot
3
- Version: 4.4.1
3
+ Version: 4.4.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
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Requires-Dist: eflips (>=0.1.3,<0.2.0)
17
- Requires-Dist: eflips-model (>=5.0.0,<6.0.0)
17
+ Requires-Dist: eflips-model (>=6.0.0,<7.0.0)
18
18
  Requires-Dist: pandas (>=2.1.4,<3.0.0)
19
19
  Requires-Dist: scipy (>=1.13.1,<2.0.0)
20
20
  Requires-Dist: simpy (>=4.0.1,<5.0.0)
@@ -1,9 +1,9 @@
1
1
  eflips/depot/__init__.py,sha256=n7jte8R6j_Ad4Mp4hkklKwil5r8u8Q_SbXrCC-nf5jM,1556
2
- eflips/depot/api/__init__.py,sha256=Usdwsf1OdyoRGJVsvaczuRortD5qRGo980-q_uOoxr8,45933
2
+ eflips/depot/api/__init__.py,sha256=b_9a248tY_U-511FVJJmPDsmyYV5VLwbEQx2mNV7Gag,45991
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=v5Edb0sQP2QNIyBLvccVzAK9_kxCszar0cOu5ciFyrw,40780
6
- eflips/depot/api/private/results_to_database.py,sha256=PIH1GWYpdtCQJRL7PEAy-Z0HFxB-g1KfIdemLsQd4Rs,24342
6
+ eflips/depot/api/private/results_to_database.py,sha256=Sh2VJ3k60QJ5RGkc8sw-7XbljiMe65EHeoagKIpYlHM,24585
7
7
  eflips/depot/api/private/smart_charging.py,sha256=MQ9fXdKByHAz6RSKXYcpJXDBccdJKZ2qGReCHagVCyo,13033
8
8
  eflips/depot/api/private/util.py,sha256=gk5TJZrcvtkyrqnjR3Cq-hPRGRCovhzKz3LrBDIvN0E,16799
9
9
  eflips/depot/configuration.py,sha256=Op3hlir-dEN7yHr0kTqbYANoCBKFWK6uKOv3NJl8w_w,35678
@@ -36,7 +36,7 @@ eflips/depot/simulation.py,sha256=ee0qTzOzG-8ybN36ie_NJallXfC7jUaS9JZvaYFziLs,10
36
36
  eflips/depot/smart_charging.py,sha256=C3BYqzn2-OYY4ipXm0ETtavbAM9QXZMYULBpVoChf0E,54311
37
37
  eflips/depot/standalone.py,sha256=VxcTzBaB67fNJUMmjPRwKXjhqTy6oQ41Coote2LvAmk,22338
38
38
  eflips/depot/validation.py,sha256=TIuY7cQtEJI4H2VVMSuY5IIVkacEEZ67weeMuY3NSAM,7097
39
- eflips_depot-4.4.1.dist-info/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
40
- eflips_depot-4.4.1.dist-info/METADATA,sha256=Hr85HZRB03l_R_dpMauSH97RyiG6Q1S2LtzTnsLQbwg,5928
41
- eflips_depot-4.4.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
42
- eflips_depot-4.4.1.dist-info/RECORD,,
39
+ eflips_depot-4.4.2.dist-info/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
40
+ eflips_depot-4.4.2.dist-info/METADATA,sha256=EFYoLiFKoqEcdzwuWh50kZ4Lrt8Eun0Xv1aFrxlZDQE,5928
41
+ eflips_depot-4.4.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
42
+ eflips_depot-4.4.2.dist-info/RECORD,,