eflips-depot 4.3.0__tar.gz → 4.3.1__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.3.0 → eflips_depot-4.3.1}/PKG-INFO +1 -1
  2. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/api/__init__.py +6 -31
  3. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/pyproject.toml +1 -1
  4. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/LICENSE.md +0 -0
  5. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/README.md +0 -0
  6. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/__init__.py +0 -0
  7. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/api/defaults/default_settings.json +0 -0
  8. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/api/private/__init__.py +0 -0
  9. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/api/private/depot.py +0 -0
  10. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/api/private/smart_charging.py +0 -0
  11. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/api/private/util.py +0 -0
  12. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/configuration.py +0 -0
  13. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/depot.py +0 -0
  14. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/evaluation.py +0 -0
  15. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/filters.py +0 -0
  16. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/input_epex_power_price.py +0 -0
  17. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/__init__.py +0 -0
  18. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/doc/__init__.py +0 -0
  19. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
  20. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/evaluation.py +0 -0
  21. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
  22. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
  23. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
  24. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
  25. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
  26. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
  27. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
  28. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/packing.py +0 -0
  29. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/settings.py +0 -0
  30. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/template_creation.py +0 -0
  31. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/layout_opt/util.py +0 -0
  32. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/plots.py +0 -0
  33. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/processes.py +0 -0
  34. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/rating.py +0 -0
  35. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/resources.py +0 -0
  36. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/settings_config.py +0 -0
  37. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/simple_vehicle.py +0 -0
  38. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/simulation.py +0 -0
  39. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/smart_charging.py +0 -0
  40. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/standalone.py +0 -0
  41. {eflips_depot-4.3.0 → eflips_depot-4.3.1}/eflips/depot/validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eflips-depot
3
- Version: 4.3.0
3
+ Version: 4.3.1
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
- session.flush() # TODO
281
+
282
282
  # Create a driving event
283
283
  current_event = Event(
284
284
  scenario_id=scenario.id,
@@ -294,7 +294,6 @@ def simple_consumption_simulation(
294
294
  timeseries=timeseries,
295
295
  )
296
296
  session.add(current_event)
297
- session.flush() # TODO
298
297
 
299
298
  # If the vehicle is
300
299
  # - Capable of opportunity charging
@@ -365,7 +364,7 @@ def simple_consumption_simulation(
365
364
  soc_end=post_charge_soc,
366
365
  event_type=EventType.CHARGING_OPPORTUNITY,
367
366
  description=f"Opportunity charging event for trip {trip.id}.",
368
- timeseries=None,
367
+ timeseries=timeseries,
369
368
  )
370
369
  current_soc = post_charge_soc
371
370
  session.add(current_event)
@@ -493,8 +492,6 @@ def apply_even_smart_charging(
493
492
 
494
493
  :return: None. The results are added to the database.
495
494
  """
496
- logger = logging.getLogger(__name__)
497
-
498
495
  with create_session(scenario, database_url) as (session, scenario):
499
496
  depots = session.query(Depot).filter(Depot.scenario_id == scenario.id).all()
500
497
  for depot in depots:
@@ -523,7 +520,7 @@ def apply_even_smart_charging(
523
520
  next_event is None
524
521
  or next_event.event_type != EventType.STANDBY_DEPARTURE
525
522
  ):
526
- logger.info(
523
+ warnings.warn(
527
524
  f"Event {charging_event.id} has no STANDBY_DEPARTURE event after a CHARGING_DEPOT "
528
525
  f"event. No room for smart charging."
529
526
  )
@@ -1102,8 +1099,6 @@ def _generate_vehicle_events(
1102
1099
  :return: None. The results are added to the dictionary.
1103
1100
  """
1104
1101
 
1105
- logger = logging.getLogger(__name__)
1106
-
1107
1102
  # For convenience
1108
1103
  area_log = current_vehicle.logger.loggedData["dwd.current_area"]
1109
1104
  slot_log = current_vehicle.logger.loggedData["dwd.current_slot"]
@@ -1123,7 +1118,7 @@ def _generate_vehicle_events(
1123
1118
  if waiting_info["waiting_time"] == 0:
1124
1119
  continue
1125
1120
 
1126
- logger.info(
1121
+ warnings.warn(
1127
1122
  f"Vehicle {current_vehicle.ID} has been waiting for {waiting_info['waiting_time']} seconds. "
1128
1123
  )
1129
1124
 
@@ -1193,24 +1188,6 @@ def _generate_vehicle_events(
1193
1188
  and "end" in dict_of_events[time_stamp].keys()
1194
1189
  ):
1195
1190
  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
-
1214
1191
  dict_of_events[start_this_event] = {
1215
1192
  "type": type(process).__name__,
1216
1193
  "area": current_area.ID,
@@ -1460,8 +1437,6 @@ def _update_waiting_events(session, scenario, waiting_area_id) -> None:
1460
1437
 
1461
1438
  :return: None. The results are added to the database.
1462
1439
  """
1463
- logger = logging.getLogger(__name__)
1464
-
1465
1440
  # Process all the STANDBY (waiting) events #
1466
1441
  all_waiting_starts = (
1467
1442
  session.query(Event)
@@ -1488,7 +1463,7 @@ def _update_waiting_events(session, scenario, waiting_area_id) -> None:
1488
1463
  ), f"Number of waiting events starts {len(all_waiting_starts)} is not equal to the number of waiting event ends"
1489
1464
 
1490
1465
  if len(all_waiting_starts) == 0:
1491
- logger.info(
1466
+ print(
1492
1467
  "No waiting events found. The depot has enough capacity for waiting. Change the waiting area capacity to 10 as buffer."
1493
1468
  )
1494
1469
 
@@ -1519,7 +1494,7 @@ def _update_waiting_events(session, scenario, waiting_area_id) -> None:
1519
1494
  waiting_area_id = all_waiting_starts[0].area_id
1520
1495
  waiting_area = session.query(Area).filter(Area.id == waiting_area_id).first()
1521
1496
  if waiting_area.capacity > peak_waiting_occupancy:
1522
- logger.info(
1497
+ warnings.warn(
1523
1498
  f"Current waiting area capacity {waiting_area.capacity} "
1524
1499
  f"is greater than the peak waiting occupancy. Updating the capacity to {peak_waiting_occupancy}."
1525
1500
  )
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "eflips-depot"
3
- version = "4.3.0"
3
+ version = "4.3.1"
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