eflips-depot 4.2.0__tar.gz → 4.2.2__tar.gz

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.

Files changed (41) hide show
  1. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/PKG-INFO +1 -1
  2. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/api/__init__.py +30 -5
  3. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/pyproject.toml +1 -1
  4. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/LICENSE.md +0 -0
  5. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/README.md +0 -0
  6. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/__init__.py +0 -0
  7. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/api/defaults/default_settings.json +0 -0
  8. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/api/private/__init__.py +0 -0
  9. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/api/private/depot.py +0 -0
  10. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/api/private/smart_charging.py +0 -0
  11. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/api/private/util.py +0 -0
  12. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/configuration.py +0 -0
  13. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/depot.py +0 -0
  14. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/evaluation.py +0 -0
  15. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/filters.py +0 -0
  16. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/input_epex_power_price.py +0 -0
  17. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/__init__.py +0 -0
  18. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/doc/__init__.py +0 -0
  19. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
  20. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/evaluation.py +0 -0
  21. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
  22. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
  23. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
  24. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
  25. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
  26. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
  27. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
  28. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/packing.py +0 -0
  29. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/settings.py +0 -0
  30. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/template_creation.py +0 -0
  31. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/layout_opt/util.py +0 -0
  32. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/plots.py +0 -0
  33. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/processes.py +0 -0
  34. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/rating.py +0 -0
  35. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/resources.py +0 -0
  36. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/settings_config.py +0 -0
  37. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/simple_vehicle.py +0 -0
  38. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/simulation.py +0 -0
  39. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/smart_charging.py +0 -0
  40. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/standalone.py +0 -0
  41. {eflips_depot-4.2.0 → eflips_depot-4.2.2}/eflips/depot/validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eflips-depot
3
- Version: 4.2.0
3
+ Version: 4.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
@@ -278,7 +278,7 @@ def simple_consumption_simulation(
278
278
  timeseries = None
279
279
  energy_used = consumption * trip.route.distance / 1000 # kWh
280
280
  current_soc = soc_start - energy_used / vehicle_type.battery_capacity
281
-
281
+ session.flush() # TODO
282
282
  # Create a driving event
283
283
  current_event = Event(
284
284
  scenario_id=scenario.id,
@@ -294,6 +294,7 @@ def simple_consumption_simulation(
294
294
  timeseries=timeseries,
295
295
  )
296
296
  session.add(current_event)
297
+ session.flush() # TODO
297
298
 
298
299
  # If the vehicle is
299
300
  # - Capable of opportunity charging
@@ -492,6 +493,8 @@ def apply_even_smart_charging(
492
493
 
493
494
  :return: None. The results are added to the database.
494
495
  """
496
+ logger = logging.getLogger(__name__)
497
+
495
498
  with create_session(scenario, database_url) as (session, scenario):
496
499
  depots = session.query(Depot).filter(Depot.scenario_id == scenario.id).all()
497
500
  for depot in depots:
@@ -520,7 +523,7 @@ def apply_even_smart_charging(
520
523
  next_event is None
521
524
  or next_event.event_type != EventType.STANDBY_DEPARTURE
522
525
  ):
523
- warnings.warn(
526
+ logger.info(
524
527
  f"Event {charging_event.id} has no STANDBY_DEPARTURE event after a CHARGING_DEPOT "
525
528
  f"event. No room for smart charging."
526
529
  )
@@ -1099,6 +1102,8 @@ def _generate_vehicle_events(
1099
1102
  :return: None. The results are added to the dictionary.
1100
1103
  """
1101
1104
 
1105
+ logger = logging.getLogger(__name__)
1106
+
1102
1107
  # For convenience
1103
1108
  area_log = current_vehicle.logger.loggedData["dwd.current_area"]
1104
1109
  slot_log = current_vehicle.logger.loggedData["dwd.current_slot"]
@@ -1118,7 +1123,7 @@ def _generate_vehicle_events(
1118
1123
  if waiting_info["waiting_time"] == 0:
1119
1124
  continue
1120
1125
 
1121
- warnings.warn(
1126
+ logger.info(
1122
1127
  f"Vehicle {current_vehicle.ID} has been waiting for {waiting_info['waiting_time']} seconds. "
1123
1128
  )
1124
1129
 
@@ -1188,6 +1193,24 @@ def _generate_vehicle_events(
1188
1193
  and "end" in dict_of_events[time_stamp].keys()
1189
1194
  ):
1190
1195
  start_this_event = dict_of_events[time_stamp]["end"]
1196
+ if start_this_event in dict_of_events.keys():
1197
+ if (
1198
+ dict_of_events[start_this_event]["type"]
1199
+ == "Trip"
1200
+ ):
1201
+ logger.info(
1202
+ f"Vehicle {current_vehicle.ID} must depart immediately after charged. "
1203
+ f"Thus there will be no STANDBY_DEPARTURE event."
1204
+ )
1205
+
1206
+ else:
1207
+ raise ValueError(
1208
+ f"There is already an event "
1209
+ f"{dict_of_events[start_this_event]} at {start_this_event}."
1210
+ )
1211
+
1212
+ continue
1213
+
1191
1214
  dict_of_events[start_this_event] = {
1192
1215
  "type": type(process).__name__,
1193
1216
  "area": current_area.ID,
@@ -1437,6 +1460,8 @@ def _update_waiting_events(session, scenario, waiting_area_id) -> None:
1437
1460
 
1438
1461
  :return: None. The results are added to the database.
1439
1462
  """
1463
+ logger = logging.getLogger(__name__)
1464
+
1440
1465
  # Process all the STANDBY (waiting) events #
1441
1466
  all_waiting_starts = (
1442
1467
  session.query(Event)
@@ -1463,7 +1488,7 @@ def _update_waiting_events(session, scenario, waiting_area_id) -> None:
1463
1488
  ), f"Number of waiting events starts {len(all_waiting_starts)} is not equal to the number of waiting event ends"
1464
1489
 
1465
1490
  if len(all_waiting_starts) == 0:
1466
- print(
1491
+ logger.info(
1467
1492
  "No waiting events found. The depot has enough capacity for waiting. Change the waiting area capacity to 10 as buffer."
1468
1493
  )
1469
1494
 
@@ -1494,7 +1519,7 @@ def _update_waiting_events(session, scenario, waiting_area_id) -> None:
1494
1519
  waiting_area_id = all_waiting_starts[0].area_id
1495
1520
  waiting_area = session.query(Area).filter(Area.id == waiting_area_id).first()
1496
1521
  if waiting_area.capacity > peak_waiting_occupancy:
1497
- warnings.warn(
1522
+ logger.info(
1498
1523
  f"Current waiting area capacity {waiting_area.capacity} "
1499
1524
  f"is greater than the peak waiting occupancy. Updating the capacity to {peak_waiting_occupancy}."
1500
1525
  )
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "eflips-depot"
3
- version = "4.2.0"
3
+ version = "4.2.2"
4
4
  description = "Depot Simulation for eFLIPS"
5
5
  authors = ["Enrico Lauth <enrico.lauth@tu-berlin.de>",
6
6
  "Ludger Heide <ludger.heide@tu-berlin.de",
File without changes
File without changes