eflips-depot 4.13.4__py3-none-any.whl → 4.13.5__py3-none-any.whl
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/api/private/consumption.py +47 -11
- {eflips_depot-4.13.4.dist-info → eflips_depot-4.13.5.dist-info}/METADATA +1 -1
- {eflips_depot-4.13.4.dist-info → eflips_depot-4.13.5.dist-info}/RECORD +5 -5
- {eflips_depot-4.13.4.dist-info → eflips_depot-4.13.5.dist-info}/LICENSE.md +0 -0
- {eflips_depot-4.13.4.dist-info → eflips_depot-4.13.5.dist-info}/WHEEL +0 -0
|
@@ -106,26 +106,54 @@ class ConsumptionInformation:
|
|
|
106
106
|
:return: The energy consumption in kWh. This is already the consumption for the whole trip.
|
|
107
107
|
"""
|
|
108
108
|
|
|
109
|
-
# Make sure the consumption lut has 4 dimensions
|
|
110
|
-
if
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
109
|
+
# Make sure the consumption lut has 4 dimensions with the correct columns
|
|
110
|
+
if not all(
|
|
111
|
+
col in self.consumption_lut.columns
|
|
112
|
+
for col in [
|
|
113
|
+
"incline",
|
|
114
|
+
"t_amb",
|
|
115
|
+
"level_of_loading",
|
|
116
|
+
"mean_speed_kmh",
|
|
117
|
+
]
|
|
118
|
+
):
|
|
116
119
|
raise ValueError(
|
|
117
120
|
"The consumption LUT must have the columns 'incline', 't_amb', 'level_of_loading', 'mean_speed_kmh'"
|
|
118
121
|
)
|
|
119
122
|
|
|
120
123
|
# Recover the scales along each of the four axes from the datapoints
|
|
121
|
-
|
|
124
|
+
|
|
125
|
+
incline_scale = sorted(
|
|
126
|
+
set(
|
|
127
|
+
[
|
|
128
|
+
x[self.consumption_lut.columns.index("incline")]
|
|
129
|
+
for x in self.consumption_lut.data_points
|
|
130
|
+
]
|
|
131
|
+
)
|
|
132
|
+
)
|
|
122
133
|
temperature_scale = sorted(
|
|
123
|
-
set(
|
|
134
|
+
set(
|
|
135
|
+
[
|
|
136
|
+
x[self.consumption_lut.columns.index("t_amb")]
|
|
137
|
+
for x in self.consumption_lut.data_points
|
|
138
|
+
]
|
|
139
|
+
)
|
|
124
140
|
)
|
|
125
141
|
level_of_loading_scale = sorted(
|
|
126
|
-
set(
|
|
142
|
+
set(
|
|
143
|
+
[
|
|
144
|
+
x[self.consumption_lut.columns.index("level_of_loading")]
|
|
145
|
+
for x in self.consumption_lut.data_points
|
|
146
|
+
]
|
|
147
|
+
)
|
|
148
|
+
)
|
|
149
|
+
speed_scale = sorted(
|
|
150
|
+
set(
|
|
151
|
+
[
|
|
152
|
+
x[self.consumption_lut.columns.index("mean_speed_kmh")]
|
|
153
|
+
for x in self.consumption_lut.data_points
|
|
154
|
+
]
|
|
155
|
+
)
|
|
127
156
|
)
|
|
128
|
-
speed_scale = sorted(set([x[3] for x in self.consumption_lut.data_points]))
|
|
129
157
|
|
|
130
158
|
# Create the 4d array
|
|
131
159
|
consumption_lut = np.zeros(
|
|
@@ -286,6 +314,14 @@ def extract_trip_information(
|
|
|
286
314
|
temperature = temperature_for_trip(trip_id, session)
|
|
287
315
|
|
|
288
316
|
payload_mass = passenger_mass * passenger_count
|
|
317
|
+
assert (
|
|
318
|
+
trip.rotation.vehicle_type.allowed_mass is not None
|
|
319
|
+
), f"allowed_mass of vehicle {trip.rotation.vehicle_type} must be set"
|
|
320
|
+
|
|
321
|
+
assert (
|
|
322
|
+
trip.rotation.vehicle_type.empty_mass is not None
|
|
323
|
+
), f"empty_mass of vehicle {trip.rotation.vehicle_type} must be set"
|
|
324
|
+
|
|
289
325
|
full_payload = (
|
|
290
326
|
trip.rotation.vehicle_type.allowed_mass
|
|
291
327
|
- trip.rotation.vehicle_type.empty_mass
|
|
@@ -2,7 +2,7 @@ eflips/depot/__init__.py,sha256=I42xmkE7GDZfoZeSn_ey85sYGI7xyGqAt6Xd4UZpHLw,2872
|
|
|
2
2
|
eflips/depot/api/__init__.py,sha256=I0KQ_lDAWWPaH4HJfNLPxkv2eFKai9by2WqX0AKNsP4,58571
|
|
3
3
|
eflips/depot/api/defaults/default_settings.json,sha256=0eUDTw_rtLQFvthP8oJL93iRXlmAOravAg-4qqGMQAY,5375
|
|
4
4
|
eflips/depot/api/private/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
eflips/depot/api/private/consumption.py,sha256=
|
|
5
|
+
eflips/depot/api/private/consumption.py,sha256=wlC3uKD0H9XjES2Jfow4PTzQ0Jd7fxryIj57H1mY50g,28743
|
|
6
6
|
eflips/depot/api/private/depot.py,sha256=NLrRBjb-wq7E3hnVAiX08IzUSVjfMV_NgRqzIx53CE0,44120
|
|
7
7
|
eflips/depot/api/private/results_to_database.py,sha256=FBlZRKqAIG80tFyuf5vCGHRycWKYkm53jFxJEk9t1NA,25984
|
|
8
8
|
eflips/depot/api/private/util.py,sha256=DasTkuGUhlBpY_BtTFWoxSNZU_CRyM3RqEDgO07Eks8,17990
|
|
@@ -36,7 +36,7 @@ eflips/depot/simulation.py,sha256=ee0qTzOzG-8ybN36ie_NJallXfC7jUaS9JZvaYFziLs,10
|
|
|
36
36
|
eflips/depot/smart_charging.py,sha256=C3BYqzn2-OYY4ipXm0ETtavbAM9QXZMYULBpVoChf0E,54311
|
|
37
37
|
eflips/depot/standalone.py,sha256=8O01zEXghFG9zZBu0fUD0sXvbHQ-AXw6RB5M750a_sM,22419
|
|
38
38
|
eflips/depot/validation.py,sha256=TIuY7cQtEJI4H2VVMSuY5IIVkacEEZ67weeMuY3NSAM,7097
|
|
39
|
-
eflips_depot-4.13.
|
|
40
|
-
eflips_depot-4.13.
|
|
41
|
-
eflips_depot-4.13.
|
|
42
|
-
eflips_depot-4.13.
|
|
39
|
+
eflips_depot-4.13.5.dist-info/LICENSE.md,sha256=KB4XTk1fPHjtZCYDyPyreu6h1LVJVZXYg-5vePcWZAc,34143
|
|
40
|
+
eflips_depot-4.13.5.dist-info/METADATA,sha256=Kqpu7ovbq_bx3MkZbE2_SDAqfp9mWkFp2G_hYUWmwBI,5936
|
|
41
|
+
eflips_depot-4.13.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
42
|
+
eflips_depot-4.13.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|