eflips-depot 4.1.1__tar.gz → 4.1.3__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.
Files changed (41) hide show
  1. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/PKG-INFO +2 -2
  2. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/README.md +1 -1
  3. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/api/__init__.py +5 -1
  4. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/api/private/smart_charging.py +7 -5
  5. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/pyproject.toml +1 -1
  6. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/LICENSE.md +0 -0
  7. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/__init__.py +0 -0
  8. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/api/defaults/default_settings.json +0 -0
  9. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/api/private/__init__.py +0 -0
  10. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/api/private/depot.py +0 -0
  11. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/api/private/util.py +0 -0
  12. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/configuration.py +0 -0
  13. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/depot.py +0 -0
  14. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/evaluation.py +0 -0
  15. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/filters.py +0 -0
  16. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/input_epex_power_price.py +0 -0
  17. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/__init__.py +0 -0
  18. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/doc/__init__.py +0 -0
  19. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
  20. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/evaluation.py +0 -0
  21. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
  22. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
  23. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
  24. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
  25. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
  26. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
  27. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
  28. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/packing.py +0 -0
  29. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/settings.py +0 -0
  30. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/template_creation.py +0 -0
  31. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/layout_opt/util.py +0 -0
  32. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/plots.py +0 -0
  33. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/processes.py +0 -0
  34. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/rating.py +0 -0
  35. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/resources.py +0 -0
  36. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/settings_config.py +0 -0
  37. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/simple_vehicle.py +0 -0
  38. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/simulation.py +0 -0
  39. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/smart_charging.py +0 -0
  40. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/eflips/depot/standalone.py +0 -0
  41. {eflips_depot-4.1.1 → eflips_depot-4.1.3}/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.1
3
+ Version: 4.1.3
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
@@ -128,5 +128,5 @@ This project is licensed under the AGPLv3 license - see the [LICENSE](LICENSE.md
128
128
 
129
129
  ## Funding Notice
130
130
 
131
- This code was developed as part of the project [eBus2030+](https://www.eflip.de/) funded by the Federal German Ministry for Digital and Transport (BMDV) under grant number 03EMF0402.
131
+ This code was developed as part of the project [eBus2030+]([https://www.eflip.de/](https://www.now-gmbh.de/projektfinder/e-bus-2030/)) funded by the Federal German Ministry for Digital and Transport (BMDV) under grant number 03EMF0402.
132
132
 
@@ -104,4 +104,4 @@ This project is licensed under the AGPLv3 license - see the [LICENSE](LICENSE.md
104
104
 
105
105
  ## Funding Notice
106
106
 
107
- This code was developed as part of the project [eBus2030+](https://www.eflip.de/) funded by the Federal German Ministry for Digital and Transport (BMDV) under grant number 03EMF0402.
107
+ This code was developed as part of the project [eBus2030+]([https://www.eflip.de/](https://www.now-gmbh.de/projektfinder/e-bus-2030/)) funded by the Federal German Ministry for Digital and Transport (BMDV) under grant number 03EMF0402.
@@ -33,6 +33,7 @@ import warnings
33
33
  from collections import OrderedDict
34
34
  from datetime import timedelta
35
35
  from enum import Enum
36
+ from math import ceil
36
37
  from typing import Any, Dict, Optional, Union, List
37
38
 
38
39
  import numpy as np
@@ -47,7 +48,6 @@ from eflips.model import (
47
48
  Trip,
48
49
  Vehicle,
49
50
  )
50
- from math import ceil
51
51
  from sqlalchemy.orm import Session
52
52
  from sqlalchemy.sql import select
53
53
 
@@ -1270,7 +1270,11 @@ def _add_soc_to_events(dict_of_events, battery_log) -> None:
1270
1270
  if log[0] < process_dict["end"] < battery_log_list[j + 1][0]:
1271
1271
  soc_end = log[1]
1272
1272
 
1273
+ if soc_start is not None:
1274
+ soc_start = min(soc_start, 1) # so
1273
1275
  process_dict["soc_start"] = soc_start
1276
+ if soc_end is not None:
1277
+ soc_end = min(soc_end, 1) # soc should not exceed 1
1274
1278
  process_dict["soc_end"] = soc_end
1275
1279
 
1276
1280
  else:
@@ -153,7 +153,7 @@ def optimize_charging_events_even(charging_events: List[Event]) -> None:
153
153
 
154
154
  # Make sure the transferred energy is the same
155
155
  post_opt_energy = (
156
- scipy.integrate.trapz(optimized_power, total_time) / 3600
156
+ scipy.integrate.trapezoid(optimized_power, total_time) / 3600
157
157
  ) # kWh
158
158
 
159
159
  if False:
@@ -238,7 +238,7 @@ def optimize_charging_events_even(charging_events: List[Event]) -> None:
238
238
  ) # +1 to include the last index
239
239
  powers = params_for_event["optimized_power"][start_index:end_index]
240
240
 
241
- energies = scipy.integrate.cumtrapz(powers, initial=0) / (
241
+ energies = scipy.integrate.cumulative_trapezoid(powers, initial=0) / (
242
242
  3600 / TEMPORAL_RESOLUTION.total_seconds()
243
243
  ) # kWh
244
244
  socs = event.soc_start + energies / event.vehicle.vehicle_type.battery_capacity
@@ -306,13 +306,15 @@ def optimize_charging_events_even(charging_events: List[Event]) -> None:
306
306
  )
307
307
 
308
308
  # Energy transferred
309
- total_energy = scipy.integrate.cumtrapz(total_power, total_time, initial=0)
309
+ total_energy = scipy.integrate.cumulative_trapezoid(
310
+ total_power, total_time, initial=0
311
+ )
310
312
  axs[1].plot(total_time, total_energy, label="Original energy transferred")
311
- optimized_energy = scipy.integrate.cumtrapz(
313
+ optimized_energy = scipy.integrate.cumulative_trapezoid(
312
314
  optimized_power, total_time, initial=0
313
315
  )
314
316
  axs[1].plot(total_time, optimized_energy, label="Optimized energy transferred")
315
- optimized_energy2 = scipy.integrate.cumtrapz(
317
+ optimized_energy2 = scipy.integrate.cumulative_trapezoid(
316
318
  optimized_power2, total_time, initial=0
317
319
  )
318
320
  axs[1].plot(total_time, optimized_energy2, label="Mean energy transferred")
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "eflips-depot"
3
- version = "4.1.1"
3
+ version = "4.1.3"
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