eflips-depot 4.1.3__tar.gz → 4.1.5__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.
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/PKG-INFO +1 -1
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/api/__init__.py +15 -64
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/api/private/depot.py +1 -1
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/api/private/util.py +6 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/processes.py +5 -5
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/pyproject.toml +1 -1
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/LICENSE.md +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/README.md +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/__init__.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/api/defaults/default_settings.json +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/api/private/__init__.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/api/private/smart_charging.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/configuration.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/depot.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/evaluation.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/filters.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/input_epex_power_price.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/__init__.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/doc/__init__.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/evaluation.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/packing.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/settings.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/template_creation.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/util.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/plots.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/rating.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/resources.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/settings_config.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/simple_vehicle.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/simulation.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/smart_charging.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/standalone.py +0 -0
- {eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/validation.py +0 -0
|
@@ -1017,21 +1017,24 @@ 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
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
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
|
-
|
|
1028
|
-
|
|
1027
|
+
elif i != 0 and i == len(list_of_finished_trips) - 1:
|
|
1028
|
+
# Vehicle's last trip is a non-copy trip
|
|
1029
|
+
if earliest_time is None:
|
|
1030
|
+
earliest_time = list_of_finished_trips[i - 1].atd
|
|
1031
|
+
latest_time = list_of_finished_trips[i].ata
|
|
1029
1032
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1033
|
+
else:
|
|
1034
|
+
if list_of_finished_trips[i - 1].is_copy is True:
|
|
1035
|
+
earliest_time = list_of_finished_trips[i - 1].ata
|
|
1036
|
+
if list_of_finished_trips[i + 1].is_copy is True:
|
|
1037
|
+
latest_time = list_of_finished_trips[i + 1].atd
|
|
1035
1038
|
|
|
1036
1039
|
return finished_schedules, earliest_time, latest_time
|
|
1037
1040
|
|
|
@@ -1352,58 +1355,6 @@ def _add_events_into_database(
|
|
|
1352
1355
|
|
|
1353
1356
|
session.add(current_event)
|
|
1354
1357
|
|
|
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
1358
|
|
|
1408
1359
|
def _update_vehicle_in_rotation(session, scenario, list_of_assigned_schedules) -> None:
|
|
1409
1360
|
"""
|
|
@@ -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
|
-
|
|
580
|
-
|
|
581
|
-
|
|
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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{eflips_depot-4.1.3 → eflips_depot-4.1.5}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|