eflips-depot 4.13.3__tar.gz → 4.13.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 (42) hide show
  1. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/PKG-INFO +1 -1
  2. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/api/private/consumption.py +25 -11
  3. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/pyproject.toml +1 -1
  4. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/LICENSE.md +0 -0
  5. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/README.md +0 -0
  6. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/__init__.py +0 -0
  7. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/api/__init__.py +0 -0
  8. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/api/defaults/default_settings.json +0 -0
  9. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/api/private/__init__.py +0 -0
  10. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/api/private/depot.py +0 -0
  11. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/api/private/results_to_database.py +0 -0
  12. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/api/private/util.py +0 -0
  13. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/configuration.py +0 -0
  14. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/depot.py +0 -0
  15. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/evaluation.py +0 -0
  16. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/filters.py +0 -0
  17. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/input_epex_power_price.py +0 -0
  18. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/__init__.py +0 -0
  19. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/doc/__init__.py +0 -0
  20. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
  21. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/evaluation.py +0 -0
  22. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
  23. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
  24. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
  25. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
  26. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
  27. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
  28. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
  29. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/packing.py +0 -0
  30. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/settings.py +0 -0
  31. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/template_creation.py +0 -0
  32. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/layout_opt/util.py +0 -0
  33. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/plots.py +0 -0
  34. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/processes.py +0 -0
  35. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/rating.py +0 -0
  36. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/resources.py +0 -0
  37. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/settings_config.py +0 -0
  38. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/simple_vehicle.py +0 -0
  39. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/simulation.py +0 -0
  40. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/smart_charging.py +0 -0
  41. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/standalone.py +0 -0
  42. {eflips_depot-4.13.3 → eflips_depot-4.13.4}/eflips/depot/validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: eflips-depot
3
- Version: 4.13.3
3
+ Version: 4.13.4
4
4
  Summary: Depot Simulation for eFLIPS
5
5
  License: AGPL-3.0-or-later
6
6
  Author: Enrico Lauth
@@ -5,9 +5,9 @@ from datetime import timedelta, datetime
5
5
  from math import ceil
6
6
  from typing import Tuple, List
7
7
  from zoneinfo import ZoneInfo
8
- import scipy
9
8
 
10
9
  import numpy as np
10
+ import scipy
11
11
  import sqlalchemy.orm
12
12
  from eflips.model import (
13
13
  Event,
@@ -99,7 +99,9 @@ class ConsumptionInformation:
99
99
 
100
100
  def calculate(self):
101
101
  """
102
- Calculates the consumption for the trip. Returns a float in kWh.
102
+ Calculates the consumption for the trip.
103
+
104
+ Returns a float in kWh.
103
105
 
104
106
  :return: The energy consumption in kWh. This is already the consumption for the whole trip.
105
107
  """
@@ -171,12 +173,26 @@ class ConsumptionInformation:
171
173
  ConsistencyWarning,
172
174
  )
173
175
 
174
- interpolator_nn = scipy.interpolate.RegularGridInterpolator(
175
- (incline_scale, temperature_scale, level_of_loading_scale, speed_scale),
176
- consumption_lut,
177
- bounds_error=False,
178
- fill_value=None, # Fill NaN with 0.0
179
- method="nearest",
176
+ x, y, z, alpha = np.meshgrid(
177
+ incline_scale,
178
+ temperature_scale,
179
+ level_of_loading_scale,
180
+ speed_scale,
181
+ indexing="ij",
182
+ )
183
+ points_array = np.column_stack(
184
+ [x.ravel(), y.ravel(), z.ravel(), alpha.ravel()]
185
+ )
186
+ consumption_lut_flattened = consumption_lut.ravel()
187
+
188
+ # Remove the NaN entries from consumption_lut and points_array
189
+ valid_mask = ~np.isnan(consumption_lut_flattened)
190
+ points_array = points_array[valid_mask]
191
+ consumption_lut = consumption_lut_flattened[valid_mask]
192
+
193
+ interpolator_nn = scipy.interpolate.NearestNDInterpolator(
194
+ x=points_array,
195
+ y=consumption_lut.ravel(),
180
196
  )
181
197
  consumption_per_km = interpolator_nn(
182
198
  [
@@ -228,9 +244,7 @@ def extract_trip_information(
228
244
  passenger_mass=68,
229
245
  passenger_count=17.6,
230
246
  ) -> ConsumptionInformation:
231
- """
232
- Extracts the information needed for the consumption simulation from a trip.
233
- """
247
+ """Extracts the information needed for the consumption simulation from a trip."""
234
248
 
235
249
  with create_session(scenario) as (session, scenario):
236
250
  # Load the trip with its route and rotation, including vehicle type and consumption LUT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "eflips-depot"
3
- version = "4.13.3"
3
+ version = "4.13.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