eflips-depot 4.1.3__tar.gz → 4.1.4__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.1.3 → eflips_depot-4.1.4}/PKG-INFO +1 -1
  2. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/api/__init__.py +12 -63
  3. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/api/private/depot.py +1 -1
  4. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/api/private/util.py +6 -0
  5. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/processes.py +5 -5
  6. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/pyproject.toml +1 -1
  7. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/LICENSE.md +0 -0
  8. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/README.md +0 -0
  9. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/__init__.py +0 -0
  10. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/api/defaults/default_settings.json +0 -0
  11. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/api/private/__init__.py +0 -0
  12. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/api/private/smart_charging.py +0 -0
  13. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/configuration.py +0 -0
  14. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/depot.py +0 -0
  15. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/evaluation.py +0 -0
  16. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/filters.py +0 -0
  17. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/input_epex_power_price.py +0 -0
  18. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/__init__.py +0 -0
  19. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/doc/__init__.py +0 -0
  20. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
  21. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/evaluation.py +0 -0
  22. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
  23. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
  24. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
  25. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
  26. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
  27. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
  28. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
  29. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/packing.py +0 -0
  30. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/settings.py +0 -0
  31. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/template_creation.py +0 -0
  32. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/layout_opt/util.py +0 -0
  33. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/plots.py +0 -0
  34. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/rating.py +0 -0
  35. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/resources.py +0 -0
  36. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/settings_config.py +0 -0
  37. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/simple_vehicle.py +0 -0
  38. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/simulation.py +0 -0
  39. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/smart_charging.py +0 -0
  40. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/standalone.py +0 -0
  41. {eflips_depot-4.1.3 → eflips_depot-4.1.4}/eflips/depot/validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eflips-depot
3
- Version: 4.1.3
3
+ Version: 4.1.4
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
@@ -1017,21 +1017,22 @@ def _get_finished_schedules_per_vehicle(
1017
1017
  "type": "Trip",
1018
1018
  "id": int(current_trip.ID),
1019
1019
  }
1020
-
1021
1020
  if i == 0:
1022
- earliest_time = current_trip.atd
1023
-
1024
- if i == len(list_of_finished_trips) - 1:
1025
- latest_time = current_trip.atd
1021
+ raise ValueError(
1022
+ f"New Vehicle required for the trip {current_trip.ID}, which suggests the fleet or the "
1023
+ f"infrastructure might not be enough for the full electrification. Please add charging "
1024
+ f"interfaces or increase charging power ."
1025
+ )
1026
1026
 
1027
- if i != 0 and list_of_finished_trips[i - 1].is_copy is True:
1027
+ elif i == len(list_of_finished_trips) - 1:
1028
1028
  earliest_time = list_of_finished_trips[i - 1].atd
1029
+ latest_time = list_of_finished_trips[i].ata
1029
1030
 
1030
- if (
1031
- i != len(list_of_finished_trips) - 1
1032
- or list_of_finished_trips[i + 1].is_copy is True
1033
- ):
1034
- latest_time = list_of_finished_trips[i + 1].atd
1031
+ else:
1032
+ if list_of_finished_trips[i - 1].is_copy is True:
1033
+ earliest_time = list_of_finished_trips[i - 1].ata
1034
+ if list_of_finished_trips[i + 1].is_copy is True:
1035
+ latest_time = list_of_finished_trips[i + 1].atd
1035
1036
 
1036
1037
  return finished_schedules, earliest_time, latest_time
1037
1038
 
@@ -1352,58 +1353,6 @@ def _add_events_into_database(
1352
1353
 
1353
1354
  session.add(current_event)
1354
1355
 
1355
- # For non-copy schedules with no predecessor events, adding a dummy standby-departure
1356
-
1357
- time_keys = sorted(dict_of_events.keys())
1358
- if (
1359
- dict_of_events[time_keys[0]]["type"]
1360
- == "Trip"
1361
- # and dict_of_events[time_keys[0]]["is_copy"] is False
1362
- ):
1363
- standby_start = time_keys[0] - 1
1364
- standby_end = time_keys[0]
1365
- rotation_id = int(dict_of_events[time_keys[0]]["id"])
1366
- area = (
1367
- session.query(Area)
1368
- .filter(Area.vehicle_type_id == db_vehicle.vehicle_type_id)
1369
- .first()
1370
- )
1371
-
1372
- first_trip = (
1373
- session.query(Trip)
1374
- .filter(Trip.rotation_id == rotation_id)
1375
- .order_by(Trip.departure_time)
1376
- .first()
1377
- )
1378
-
1379
- soc = (
1380
- session.query(Event.soc_end)
1381
- .filter(Event.scenario == scenario)
1382
- .filter(Event.trip_id == first_trip.id)
1383
- .first()[0]
1384
- )
1385
-
1386
- standby_event = Event(
1387
- scenario=scenario,
1388
- vehicle_type_id=db_vehicle.vehicle_type_id,
1389
- vehicle=db_vehicle,
1390
- station_id=None,
1391
- area_id=area.id,
1392
- subloc_no=area.capacity,
1393
- trip_id=None,
1394
- time_start=timedelta(seconds=standby_start) + simulation_start_time,
1395
- time_end=timedelta(seconds=standby_end) + simulation_start_time,
1396
- soc_start=soc,
1397
- soc_end=soc,
1398
- event_type=EventType.STANDBY_DEPARTURE,
1399
- description=f"DUMMY Standby event for {rotation_id}.",
1400
- timeseries=None,
1401
- )
1402
-
1403
- session.add(standby_event)
1404
-
1405
- session.flush()
1406
-
1407
1356
 
1408
1357
  def _update_vehicle_in_rotation(session, scenario, list_of_assigned_schedules) -> None:
1409
1358
  """
@@ -353,7 +353,7 @@ def create_simple_depot(
353
353
  charging = Process(
354
354
  name="Charging",
355
355
  scenario=scenario,
356
- dispatchable=False,
356
+ dispatchable=True,
357
357
  electric_power=charging_power,
358
358
  )
359
359
  standby_departure = Process(
@@ -130,6 +130,12 @@ def repeat_vehicle_schedules(
130
130
 
131
131
  for vehicle_schedule in vehicle_schedules:
132
132
  schedule_list_backward.append(vehicle_schedule.repeat(-repetition_period))
133
+ if repetition_period == timedelta(days=1):
134
+ # For daily schedules, repeat the schedule backward twice for the stability of the results
135
+ schedule_list_backward.append(
136
+ vehicle_schedule.repeat(-2 * repetition_period)
137
+ )
138
+
133
139
  schedule_list_forward.append(vehicle_schedule.repeat(repetition_period))
134
140
 
135
141
  vehicle_schedules = (
@@ -575,11 +575,11 @@ class VehicleProcess(BaseDepotProcess, ABC):
575
575
  ]
576
576
  )
577
577
  ):
578
- flexprint(
579
- "NOTIFYING ASSIGNMENT AFTER %s END for vehicle %s"
580
- % (self.ID, self.vehicle.ID),
581
- env=self.env,
582
- )
578
+ # flexprint(
579
+ # "NOTIFYING ASSIGNMENT AFTER %s END for vehicle %s"
580
+ # % (self.ID, self.vehicle.ID),
581
+ # env=self.env,
582
+ # )
583
583
 
584
584
  self.vehicle.dwd.current_depot.depot_control.trigger_dispatch()
585
585
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "eflips-depot"
3
- version = "4.1.3"
3
+ version = "4.1.4"
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