eflips-depot 4.7.1__tar.gz → 4.8.0__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.
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/PKG-INFO +3 -2
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/api/__init__.py +5 -1
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/api/private/depot.py +64 -17
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/api/private/results_to_database.py +16 -5
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/pyproject.toml +3 -3
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/LICENSE.md +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/README.md +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/__init__.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/api/defaults/default_settings.json +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/api/private/__init__.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/api/private/consumption.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/api/private/util.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/configuration.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/depot.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/evaluation.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/filters.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/input_epex_power_price.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/__init__.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/doc/__init__.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/evaluation.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/packing.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/settings.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/template_creation.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/layout_opt/util.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/plots.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/processes.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/rating.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/resources.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/settings_config.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/simple_vehicle.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/simulation.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/smart_charging.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/standalone.py +0 -0
- {eflips_depot-4.7.1 → eflips_depot-4.8.0}/eflips/depot/validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: eflips-depot
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.8.0
|
|
4
4
|
Summary: Depot Simulation for eFLIPS
|
|
5
5
|
License: AGPL-3.0-or-later
|
|
6
6
|
Author: Enrico Lauth
|
|
@@ -13,7 +13,8 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Requires-Dist: eflips (>=0.1.3,<0.2.0)
|
|
16
|
-
Requires-Dist: eflips-model (>=
|
|
16
|
+
Requires-Dist: eflips-model (>=7.0.0,<8.0.0)
|
|
17
|
+
Requires-Dist: eflips-opt (>=0.3.0,<0.4.0)
|
|
17
18
|
Requires-Dist: pandas (>=2.2.0,<3.0.0)
|
|
18
19
|
Requires-Dist: scipy (>=1.14.0,<2.0.0)
|
|
19
20
|
Requires-Dist: simpy (>=4.0.1,<5.0.0)
|
|
@@ -812,7 +812,11 @@ def init_simulation(
|
|
|
812
812
|
# The areas allow either one type, or all vehicle types
|
|
813
813
|
for p in area.processes:
|
|
814
814
|
if p.electric_power is not None and p.duration is None:
|
|
815
|
-
|
|
815
|
+
row_count = (
|
|
816
|
+
area.row_count if area.row_count is not None else 1
|
|
817
|
+
)
|
|
818
|
+
|
|
819
|
+
vehicle_count += area.capacity * row_count
|
|
816
820
|
|
|
817
821
|
assert (
|
|
818
822
|
vehicle_count > 0
|
|
@@ -90,6 +90,7 @@ def depot_to_template(depot: Depot) -> Dict[str, str | Dict[str, str | int]]:
|
|
|
90
90
|
list_of_processes = []
|
|
91
91
|
|
|
92
92
|
# Get dictionary of each area
|
|
93
|
+
# For line areas, generate an dictionary item for total areas, later it will be split into individual lines
|
|
93
94
|
for area in depot.areas:
|
|
94
95
|
area_name = str(area.id)
|
|
95
96
|
template["areas"][area_name] = {
|
|
@@ -101,6 +102,8 @@ def depot_to_template(depot: Depot) -> Dict[str, str | Dict[str, str | int]]:
|
|
|
101
102
|
"issink": False,
|
|
102
103
|
"entry_filter": None,
|
|
103
104
|
}
|
|
105
|
+
if area.area_type == AreaType.LINE:
|
|
106
|
+
template["areas"][area_name]["row_count"] = area.row_count
|
|
104
107
|
|
|
105
108
|
# Fill in vehicle_filter.
|
|
106
109
|
# If the vehicle type id is set, the area is only for this vehicle type
|
|
@@ -142,6 +145,33 @@ def depot_to_template(depot: Depot) -> Dict[str, str | Dict[str, str | int]]:
|
|
|
142
145
|
if process_type(process) == ProcessType.STANDBY_DEPARTURE:
|
|
143
146
|
template["areas"][area_name]["issink"] = True
|
|
144
147
|
|
|
148
|
+
# Generate line areas in the unit of a single line for the simulation core and assigning charging interfaces
|
|
149
|
+
area_template = template["areas"]
|
|
150
|
+
|
|
151
|
+
line_area_template = {}
|
|
152
|
+
line_areas_to_delete = []
|
|
153
|
+
for name, area in area_template.items():
|
|
154
|
+
if area["typename"] == "LineArea":
|
|
155
|
+
line_areas_to_delete.append(name)
|
|
156
|
+
capacity_per_line = int(area["capacity"] / area["row_count"])
|
|
157
|
+
for i in range(area["row_count"]):
|
|
158
|
+
area_name = name + "_row_" + str(i)
|
|
159
|
+
line_area_template[area_name] = {
|
|
160
|
+
"typename": "LineArea",
|
|
161
|
+
"capacity": capacity_per_line,
|
|
162
|
+
"available_processes": area["available_processes"],
|
|
163
|
+
"issink": area["issink"],
|
|
164
|
+
"entry_filter": area["entry_filter"],
|
|
165
|
+
"charging_interfaces": area["charging_interfaces"][
|
|
166
|
+
i * capacity_per_line : (i + 1) * capacity_per_line
|
|
167
|
+
],
|
|
168
|
+
}
|
|
169
|
+
area_template.update(line_area_template)
|
|
170
|
+
|
|
171
|
+
for name in line_areas_to_delete:
|
|
172
|
+
del area_template[name]
|
|
173
|
+
|
|
174
|
+
# Fill in the dictionary of processess
|
|
145
175
|
for process in list_of_processes:
|
|
146
176
|
process_name = str(process.id)
|
|
147
177
|
# Shared template for all processes
|
|
@@ -240,11 +270,27 @@ def depot_to_template(depot: Depot) -> Dict[str, str | Dict[str, str | int]]:
|
|
|
240
270
|
group_name = str(process.name) + "_group"
|
|
241
271
|
template["groups"][group_name] = {
|
|
242
272
|
"typename": "AreaGroup",
|
|
243
|
-
"stores": [
|
|
273
|
+
"stores": [
|
|
274
|
+
str(area.id)
|
|
275
|
+
for area in process.areas
|
|
276
|
+
if area.area_type != AreaType.LINE
|
|
277
|
+
],
|
|
244
278
|
}
|
|
245
|
-
if
|
|
246
|
-
|
|
247
|
-
|
|
279
|
+
if (
|
|
280
|
+
process_type(process) == ProcessType.CHARGING
|
|
281
|
+
or process_type(process) == ProcessType.STANDBY_DEPARTURE
|
|
282
|
+
):
|
|
283
|
+
areas_this_process = process.areas
|
|
284
|
+
for area in areas_this_process:
|
|
285
|
+
if area.area_type == AreaType.LINE:
|
|
286
|
+
for i in range(area.row_count):
|
|
287
|
+
template["groups"][group_name]["stores"].append(
|
|
288
|
+
str(area.id) + "_row_" + str(i)
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
if process_type(process) == ProcessType.CHARGING:
|
|
292
|
+
template["groups"][group_name]["typename"] = "ParkingAreaGroup"
|
|
293
|
+
template["groups"][group_name]["parking_strategy_name"] = "FIRST"
|
|
248
294
|
|
|
249
295
|
# Fill in locations of the plan
|
|
250
296
|
template["plans"]["default"]["locations"].append(group_name)
|
|
@@ -547,19 +593,20 @@ def generate_depot(
|
|
|
547
593
|
capacities: Dict[AreaType, None | int]
|
|
548
594
|
if capacities[AreaType.LINE] is not None and capacities[AreaType.LINE] > 0:
|
|
549
595
|
# Create a number of LINE areas
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
596
|
+
number_of_rows = capacities[AreaType.LINE] // standard_block_length
|
|
597
|
+
|
|
598
|
+
area = Area(
|
|
599
|
+
scenario=scenario,
|
|
600
|
+
name=f"Line Area for {vehicle_type.name_short}",
|
|
601
|
+
depot=depot,
|
|
602
|
+
area_type=AreaType.LINE,
|
|
603
|
+
vehicle_type=vehicle_type,
|
|
604
|
+
capacity=capacities[AreaType.LINE],
|
|
605
|
+
row_count=number_of_rows,
|
|
606
|
+
)
|
|
607
|
+
area.processes.append(charging)
|
|
608
|
+
area.processes.append(standby_departure)
|
|
609
|
+
session.add(area)
|
|
563
610
|
if (
|
|
564
611
|
capacities[AreaType.DIRECT_ONESIDE] is not None
|
|
565
612
|
and capacities[AreaType.DIRECT_ONESIDE] > 0
|
|
@@ -410,18 +410,29 @@ def add_events_into_database(
|
|
|
410
410
|
|
|
411
411
|
# Get station_id of the current depot through area
|
|
412
412
|
|
|
413
|
-
|
|
413
|
+
# TODO needs better implementation
|
|
414
|
+
if type(process_dict["area"]) == str and "_" in process_dict["area"]:
|
|
415
|
+
area_name = process_dict["area"].split("_")
|
|
416
|
+
area_id = int(area_name[0])
|
|
417
|
+
row = int(area_name[-1])
|
|
418
|
+
|
|
419
|
+
else:
|
|
420
|
+
area_id = int(process_dict["area"])
|
|
421
|
+
|
|
422
|
+
current_area = session.query(Area).filter(Area.id == area_id).one()
|
|
414
423
|
station_id = current_area.depot.station_id
|
|
415
424
|
|
|
425
|
+
if current_area.area_type == AreaType.LINE:
|
|
426
|
+
capacity_per_line = int(current_area.capacity / current_area.row_count)
|
|
427
|
+
process_dict["slot"] = capacity_per_line * row + process_dict["slot"] - 1
|
|
428
|
+
|
|
416
429
|
current_event = Event(
|
|
417
430
|
scenario=scenario,
|
|
418
431
|
vehicle_type_id=db_vehicle.vehicle_type_id,
|
|
419
432
|
vehicle=db_vehicle,
|
|
420
433
|
station_id=station_id,
|
|
421
|
-
area_id=
|
|
422
|
-
subloc_no=
|
|
423
|
-
if "slot" in process_dict.keys()
|
|
424
|
-
else 00,
|
|
434
|
+
area_id=area_id,
|
|
435
|
+
subloc_no=process_dict["slot"] if "slot" in process_dict.keys() else 00,
|
|
425
436
|
trip_id=None,
|
|
426
437
|
time_start=timedelta(seconds=start_time) + simulation_start_time,
|
|
427
438
|
time_end=timedelta(seconds=process_dict["end"]) + simulation_start_time,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "eflips-depot"
|
|
3
|
-
version = "4.
|
|
3
|
+
version = "4.8.0"
|
|
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",
|
|
@@ -14,7 +14,6 @@ packages = [{ include = "eflips/depot" }]
|
|
|
14
14
|
[tool.poetry.dependencies]
|
|
15
15
|
python = ">=3.10, <3.14"
|
|
16
16
|
simpy = "^4.0.1"
|
|
17
|
-
eflips-model = ">=6.0.6, <7.0.0"
|
|
18
17
|
tqdm = "^4.67.0"
|
|
19
18
|
|
|
20
19
|
# Legacy dependencies, which are still needed until we refactor the code
|
|
@@ -23,6 +22,8 @@ xlsxwriter = "^3.1.9"
|
|
|
23
22
|
pandas = "^2.2.0"
|
|
24
23
|
xlrd = "<=1.2.0"
|
|
25
24
|
scipy = "^1.14.0"
|
|
25
|
+
eflips-model = "^7.0.0"
|
|
26
|
+
eflips-opt = "^0.3.0"
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
[tool.pytest.ini_options]
|
|
@@ -45,7 +46,6 @@ django-environ = "^0.11.2"
|
|
|
45
46
|
pre-commit = "^3.4.0"
|
|
46
47
|
coverage = "^7.3.2"
|
|
47
48
|
openpyxl = "^3.1.2"
|
|
48
|
-
eflips-opt = ">=0.2.0"
|
|
49
49
|
|
|
50
50
|
[build-system]
|
|
51
51
|
requires = ["poetry-core"]
|
|
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
|
{eflips_depot-4.7.1 → eflips_depot-4.8.0}/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
|
|
File without changes
|