eflips-depot 4.12.0__tar.gz → 4.12.1__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.12.0 → eflips_depot-4.12.1}/PKG-INFO +1 -1
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/api/__init__.py +8 -5
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/api/private/depot.py +11 -1
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/pyproject.toml +1 -1
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/LICENSE.md +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/README.md +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/__init__.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/api/defaults/default_settings.json +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/api/private/__init__.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/api/private/consumption.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/api/private/results_to_database.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/api/private/util.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/configuration.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/depot.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/evaluation.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/filters.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/input_epex_power_price.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/__init__.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/doc/__init__.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/doc/direct_details.pdf +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/evaluation.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/opt_tools/__init__.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/opt_tools/crossover.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/opt_tools/fitness_util.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/opt_tools/init.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/opt_tools/mutation.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/optimize_c_urfd.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/packing.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/settings.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/template_creation.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/util.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/plots.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/processes.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/rating.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/resources.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/settings_config.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/simple_vehicle.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/simulation.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/smart_charging.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/standalone.py +0 -0
- {eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/validation.py +0 -0
|
@@ -1106,7 +1106,7 @@ def add_evaluation_to_database(
|
|
|
1106
1106
|
|
|
1107
1107
|
|
|
1108
1108
|
def generate_depot_optimal_size(
|
|
1109
|
-
scenario: Scenario,
|
|
1109
|
+
scenario: Union[Scenario, int, Any],
|
|
1110
1110
|
standard_block_length: int = 6,
|
|
1111
1111
|
charging_power: float = 90,
|
|
1112
1112
|
database_url: Optional[str] = None,
|
|
@@ -1117,7 +1117,9 @@ def generate_depot_optimal_size(
|
|
|
1117
1117
|
Generates an optimal depot layout with the smallest possible size for each depot in the scenario. Line charging areas
|
|
1118
1118
|
with given block length area preferred. The existing depot will be deleted if `delete_existing_depot` is set to True.
|
|
1119
1119
|
|
|
1120
|
-
:param scenario:
|
|
1120
|
+
:param scenario: Either a :class:`eflips.model.Scenario` object containing the input data for the simulation. Or
|
|
1121
|
+
an integer specifying the ID of a scenario in the database. Or any other object that has an attribute "id" containing
|
|
1122
|
+
an integer pointing to a unique scenario id.
|
|
1121
1123
|
:param standard_block_length: The standard block length for the depot layout in meters. Default is 6.
|
|
1122
1124
|
:param charging_power: The charging power of the charging area in kW. Default is 90.
|
|
1123
1125
|
:param database_url: An optional database URL. Used if no database url is given by the environment variable.
|
|
@@ -1142,7 +1144,9 @@ def generate_depot_optimal_size(
|
|
|
1142
1144
|
# Handles existing depot
|
|
1143
1145
|
if session.query(Depot).filter(Depot.scenario_id == scenario.id).count() != 0:
|
|
1144
1146
|
if delete_existing_depot is False:
|
|
1145
|
-
raise ValueError(
|
|
1147
|
+
raise ValueError(
|
|
1148
|
+
"Depot already exists. Set delete_existing_depot to True to delete it."
|
|
1149
|
+
)
|
|
1146
1150
|
|
|
1147
1151
|
delete_depots(scenario, session)
|
|
1148
1152
|
|
|
@@ -1226,9 +1230,8 @@ def generate_depot_optimal_size(
|
|
|
1226
1230
|
finally:
|
|
1227
1231
|
savepoint.rollback()
|
|
1228
1232
|
|
|
1229
|
-
|
|
1233
|
+
# Create depot using the calculated capacities
|
|
1230
1234
|
|
|
1231
|
-
with create_session(scenario, database_url) as (session, scenario):
|
|
1232
1235
|
for depot_station, capacities in depot_capacities_for_scenario.items():
|
|
1233
1236
|
generate_depot(
|
|
1234
1237
|
capacities,
|
|
@@ -28,6 +28,10 @@ from sqlalchemy import or_
|
|
|
28
28
|
from sqlalchemy.orm import Session
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
class MissingVehicleDimensionError(ValueError):
|
|
32
|
+
pass
|
|
33
|
+
|
|
34
|
+
|
|
31
35
|
def delete_depots(scenario: Scenario, session: Session) -> None:
|
|
32
36
|
"""This function deletes all depot-related data from the database for a given scenario.
|
|
33
37
|
|
|
@@ -676,7 +680,10 @@ def area_needed_for_vehicle_parking(
|
|
|
676
680
|
width = vehicle_type.width
|
|
677
681
|
|
|
678
682
|
if length is None or width is None:
|
|
679
|
-
raise
|
|
683
|
+
raise MissingVehicleDimensionError(
|
|
684
|
+
f"No length or width found for VehicleType {vehicle_type}. VehicleType dimensions are required to "
|
|
685
|
+
f"calculate the area needed for parking."
|
|
686
|
+
)
|
|
680
687
|
|
|
681
688
|
# This is the angle the vehicles are parked at in direct areas
|
|
682
689
|
# zero is equivalent to the direction they would be parked in a line area
|
|
@@ -1070,6 +1077,9 @@ def depot_smallest_possible_size(
|
|
|
1070
1077
|
logger.debug(
|
|
1071
1078
|
f"Vehicle count for {vt.name} in {amount_of_line_areas} line areas configuration: {vehicle_count_q}. This is > than the all-direct configuration ({vehicle_counts_all_direct[vt]})."
|
|
1072
1079
|
)
|
|
1080
|
+
|
|
1081
|
+
except MissingVehicleDimensionError as e:
|
|
1082
|
+
raise e
|
|
1073
1083
|
except Exception as e:
|
|
1074
1084
|
# This change is made after Unstable exception and delay exceptions are introduced
|
|
1075
1085
|
if (
|
|
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
|
{eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/opt_tools/fitness_c_urfd.py
RENAMED
|
File without changes
|
{eflips_depot-4.12.0 → eflips_depot-4.12.1}/eflips/depot/layout_opt/opt_tools/fitness_util.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
|