ChaProEV 1.1.8__tar.gz → 1.2.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.
- {chaproev-1.1.8 → chaproev-1.2.0}/ChaProEV.toml +5 -1
- {chaproev-1.1.8/src/ChaProEV.egg-info → chaproev-1.2.0}/PKG-INFO +1 -1
- {chaproev-1.1.8 → chaproev-1.2.0}/pyproject.toml +1 -1
- {chaproev-1.1.8 → chaproev-1.2.0}/scenarios/Mopo/XX_bus.toml +20 -3
- {chaproev-1.1.8 → chaproev-1.2.0}/scenarios/Mopo/XX_car.toml +36 -5
- {chaproev-1.1.8 → chaproev-1.2.0}/scenarios/Mopo/XX_truck.toml +14 -2
- {chaproev-1.1.8 → chaproev-1.2.0}/scenarios/Mopo/XX_van.toml +14 -2
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/ChaProEV.py +129 -6
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/charging.py +132 -23
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/consumption.py +6 -4
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/define.py +2 -2
- {chaproev-1.1.8 → chaproev-1.2.0/src/ChaProEV.egg-info}/PKG-INFO +1 -1
- {chaproev-1.1.8 → chaproev-1.2.0}/tests/test_charge_and_consumption.py +1 -1
- {chaproev-1.1.8 → chaproev-1.2.0}/tests/test_empty_values.py +1 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/.flake8 +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/.gitignore +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/.vscode/ltex.dictionary.en-US.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/.vscode/settings.json +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/ChaProEV.pptx +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/Gemfile +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/LICENCE +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/MOPO_logo_chaproev on wht.svg +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/MOPO_logo_chaproev.png +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/MOPO_logo_chaproev.svg +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/MOPO_logo_main.svg +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/MOPO_logo_main_onwhite.svg +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/README.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/comparisons/comparison_template.toml +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/ChaProEV_workflow.png +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/Legs.png +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/Locations.png +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/Makefile +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/README.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/Trips.png +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/Vehicle_Temperature_correction_factor.svg +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/_config.yml +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/doctrees/environment.pickle +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/doctrees/index.doctree +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/.buildinfo +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_sources/index.rst.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/alabaster.css +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/basic.css +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/custom.css +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/doctools.js +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/documentation_options.js +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/file.png +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/language_data.js +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/minus.png +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/plus.png +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/pygments.css +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/searchtools.js +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/_static/sphinx_highlight.js +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/genindex.html +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/index.html +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/objects.inv +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/search.html +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/build/html/searchindex.js +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/charging.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/consumption.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/define.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/index.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/make.bat +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/mobility.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/running_model,md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/scenario.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/source/index.rst +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/using.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/docs/weather.md +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/eu-emblem-low-res.jpg +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/mkdocs.yml +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/requirements.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/scenarios/local_impact_BEVs/baseline.toml +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/setup.cfg +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/__init__.py +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/make_variants.py +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/mobility.py +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/py.typed +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/run_time.py +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/weather.py +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV/writing.py +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV.egg-info/PKG-INFO-PC-28624 +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV.egg-info/PKG-INFO-PC-28624-2 +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV.egg-info/SOURCES-PC-28624-2.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV.egg-info/SOURCES-PC-28624.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV.egg-info/SOURCES.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV.egg-info/dependency_links.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV.egg-info/requires-PC-28624-2.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV.egg-info/requires-PC-28624.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/src/ChaProEV.egg-info/top_level.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/tests/test_battery_space.py +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/tests/test_same_output.py +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/todo.txt +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/variants/Mopo/XX_car.csv +0 -0
- {chaproev-1.1.8 → chaproev-1.2.0}/variants/Mopo.toml +0 -0
|
@@ -257,4 +257,8 @@ produce = true
|
|
|
257
257
|
display_scenario_run = true
|
|
258
258
|
scenario_run_description = 'Scenarios started'
|
|
259
259
|
display_saving_pool_run = true
|
|
260
|
-
saving_pool_run_description = 'Saving extra end outputs started'
|
|
260
|
+
saving_pool_run_description = 'Saving extra end outputs started'
|
|
261
|
+
|
|
262
|
+
[discharge]
|
|
263
|
+
no_discharge_efficiency_output = 'No discharge'
|
|
264
|
+
no_charge_efficiency_output = 'No charge'
|
|
@@ -70,7 +70,7 @@ charging_power = 600 # kW
|
|
|
70
70
|
charger_efficiency = 0.85
|
|
71
71
|
latitude = 52
|
|
72
72
|
longitude = 6.2
|
|
73
|
-
|
|
73
|
+
charging_price = 0.25 # €/kWh
|
|
74
74
|
charging_desirability = 1
|
|
75
75
|
# An indicator (0-1) of how much people like to charge at this location
|
|
76
76
|
percentage_in_location_at_run_start = 1
|
|
@@ -78,6 +78,11 @@ percentage_in_location_at_run_start = 1
|
|
|
78
78
|
# compute_start_location_split in mobility_module below)
|
|
79
79
|
vehicle_discharge_power = 400 # kW
|
|
80
80
|
proportion_of_discharge_to_network = 0.9
|
|
81
|
+
time_modulation_factors = [
|
|
82
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
83
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
84
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
85
|
+
] # Starts at midinight
|
|
81
86
|
[locations.bus_route_start]
|
|
82
87
|
vehicle = 'bus'
|
|
83
88
|
connectivity = 1
|
|
@@ -85,7 +90,7 @@ charging_power = 600 # kW
|
|
|
85
90
|
charger_efficiency = 0.85
|
|
86
91
|
latitude = 52
|
|
87
92
|
longitude = 6.2
|
|
88
|
-
|
|
93
|
+
charging_price = 0.25 # €/kWh
|
|
89
94
|
charging_desirability = 1
|
|
90
95
|
# An indicator (0-1) of how much people like to charge at this location
|
|
91
96
|
percentage_in_location_at_run_start = 1
|
|
@@ -93,6 +98,11 @@ percentage_in_location_at_run_start = 1
|
|
|
93
98
|
# compute_start_location_split in mobility_module below)
|
|
94
99
|
vehicle_discharge_power = 0 # kW
|
|
95
100
|
proportion_of_discharge_to_network = 0.9
|
|
101
|
+
time_modulation_factors = [
|
|
102
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
103
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
104
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
105
|
+
] # Starts at midinight
|
|
96
106
|
[locations.bus_route_end]
|
|
97
107
|
vehicle = 'bus'
|
|
98
108
|
connectivity = 1
|
|
@@ -100,7 +110,7 @@ charging_power = 600 # kW
|
|
|
100
110
|
charger_efficiency = 0.85
|
|
101
111
|
latitude = 52
|
|
102
112
|
longitude = 6.2
|
|
103
|
-
|
|
113
|
+
charging_price = 0.25 # €/kWh
|
|
104
114
|
charging_desirability = 1
|
|
105
115
|
# An indicator (0-1) of how much people like to charge at this location
|
|
106
116
|
percentage_in_location_at_run_start = 1
|
|
@@ -108,6 +118,11 @@ percentage_in_location_at_run_start = 1
|
|
|
108
118
|
# compute_start_location_split in mobility_module below)
|
|
109
119
|
vehicle_discharge_power = 0 # kW
|
|
110
120
|
proportion_of_discharge_to_network = 0.9
|
|
121
|
+
time_modulation_factors = [
|
|
122
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
123
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
124
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
125
|
+
] # Starts at midinight
|
|
111
126
|
|
|
112
127
|
[legs]
|
|
113
128
|
# You can add legs here by copying existing legs,
|
|
@@ -555,6 +570,8 @@ fitting_polynomial_order = 6
|
|
|
555
570
|
|
|
556
571
|
|
|
557
572
|
[charging]
|
|
573
|
+
price_reaction_exponent = 0 # 0.5
|
|
574
|
+
desirability_reaction_exponent = 0 # 1
|
|
558
575
|
|
|
559
576
|
[charging_sessions]
|
|
560
577
|
resolution = 1 # subdivisions from main unit of time
|
|
@@ -70,7 +70,7 @@ charging_power = 8.9 # kW
|
|
|
70
70
|
charger_efficiency = 0.77
|
|
71
71
|
latitude = 52
|
|
72
72
|
longitude = 6.2
|
|
73
|
-
|
|
73
|
+
charging_price = 0.25 # €/kWh
|
|
74
74
|
charging_desirability = 1
|
|
75
75
|
# An indicator (0-1) of how much people like to charge at this location
|
|
76
76
|
percentage_in_location_at_run_start = 1
|
|
@@ -78,6 +78,12 @@ percentage_in_location_at_run_start = 1
|
|
|
78
78
|
# compute_start_location_split in mobility_module below)
|
|
79
79
|
vehicle_discharge_power = 4.2 # kW
|
|
80
80
|
proportion_of_discharge_to_network = 0.6
|
|
81
|
+
time_modulation_factors = [
|
|
82
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
83
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
84
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
85
|
+
# 1, 1, 0.25, 0.25, 0.5, 0.5, 1, 1,
|
|
86
|
+
] # Starts at midinight
|
|
81
87
|
[locations.work]
|
|
82
88
|
vehicle = 'car'
|
|
83
89
|
connectivity = 0.25
|
|
@@ -85,7 +91,7 @@ charging_power = 11 # kW
|
|
|
85
91
|
charger_efficiency = 0.85
|
|
86
92
|
latitude = 52.1
|
|
87
93
|
longitude = 5.8
|
|
88
|
-
|
|
94
|
+
charging_price = 0.15 # €/kWh
|
|
89
95
|
charging_desirability = 1
|
|
90
96
|
# An indicator (0-1) of how much people like to charge at this location
|
|
91
97
|
percentage_in_location_at_run_start = 0
|
|
@@ -93,6 +99,11 @@ percentage_in_location_at_run_start = 0
|
|
|
93
99
|
# compute_start_location_split in mobility_module below)
|
|
94
100
|
vehicle_discharge_power = 6.6 # kW
|
|
95
101
|
proportion_of_discharge_to_network = 0.7
|
|
102
|
+
time_modulation_factors = [
|
|
103
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
104
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
105
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
106
|
+
] # Starts at midinight
|
|
96
107
|
[locations.leisure]
|
|
97
108
|
vehicle = 'car'
|
|
98
109
|
connectivity = 0.25
|
|
@@ -100,7 +111,7 @@ charging_power = 22 # kW
|
|
|
100
111
|
charger_efficiency = 0.85
|
|
101
112
|
latitude = 52.1
|
|
102
113
|
longitude = 6.2
|
|
103
|
-
|
|
114
|
+
charging_price = 0.35 # €/kWh
|
|
104
115
|
charging_desirability = 0.25
|
|
105
116
|
# An indicator (0-1) of how much people like to charge at this location
|
|
106
117
|
percentage_in_location_at_run_start = 0
|
|
@@ -108,6 +119,12 @@ percentage_in_location_at_run_start = 0
|
|
|
108
119
|
# compute_start_location_split in mobility_module below)
|
|
109
120
|
vehicle_discharge_power = 0 # kW
|
|
110
121
|
proportion_of_discharge_to_network = 0.7
|
|
122
|
+
time_modulation_factors = [
|
|
123
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
124
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
125
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
126
|
+
# 1, 1, 0.5, 0.5, 0.5, 0.5, 1, 1,
|
|
127
|
+
] # Starts at midinight
|
|
111
128
|
[locations.weekend]
|
|
112
129
|
vehicle = 'car'
|
|
113
130
|
connectivity = 0.1
|
|
@@ -115,7 +132,7 @@ charging_power = 22 # kW
|
|
|
115
132
|
charger_efficiency = 0.89
|
|
116
133
|
latitude = 51.8
|
|
117
134
|
longitude = 6.2
|
|
118
|
-
|
|
135
|
+
charging_price = 0.35 # €/kWh
|
|
119
136
|
charging_desirability = 0.1
|
|
120
137
|
# An indicator (0-1) of how much people like to charge at this location
|
|
121
138
|
percentage_in_location_at_run_start = 0
|
|
@@ -123,6 +140,12 @@ percentage_in_location_at_run_start = 0
|
|
|
123
140
|
# compute_start_location_split in mobility_module below)
|
|
124
141
|
vehicle_discharge_power = 0 # kW
|
|
125
142
|
proportion_of_discharge_to_network = 0.9
|
|
143
|
+
time_modulation_factors = [
|
|
144
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
145
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
146
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
147
|
+
# 1, 1, 0.25, 0.25, 0.25, 0.25, 1, 1,
|
|
148
|
+
] # Starts at midinight
|
|
126
149
|
[locations.holiday]
|
|
127
150
|
vehicle = 'car'
|
|
128
151
|
connectivity = 1
|
|
@@ -130,7 +153,7 @@ charging_power = 22 # kW
|
|
|
130
153
|
charger_efficiency = 0.89
|
|
131
154
|
latitude = 53.0
|
|
132
155
|
longitude = 6.2
|
|
133
|
-
|
|
156
|
+
charging_price = 0.35 # €/kWh
|
|
134
157
|
charging_desirability = 0.2
|
|
135
158
|
# An indicator (0-1) of how much people like to charge at this location
|
|
136
159
|
percentage_in_location_at_run_start = 0
|
|
@@ -138,6 +161,12 @@ percentage_in_location_at_run_start = 0
|
|
|
138
161
|
# compute_start_location_split in mobility_module below)
|
|
139
162
|
vehicle_discharge_power = 11 # kW
|
|
140
163
|
proportion_of_discharge_to_network = 0.9
|
|
164
|
+
time_modulation_factors = [
|
|
165
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
166
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
167
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
168
|
+
# 1, 1, 0.5, 0.5, 0.75, 0.75, 1, 1,
|
|
169
|
+
] # Starts at midinight
|
|
141
170
|
|
|
142
171
|
[legs]
|
|
143
172
|
# You can add legs here by copying existing legs,
|
|
@@ -715,6 +744,8 @@ fitting_polynomial_order = 6
|
|
|
715
744
|
|
|
716
745
|
|
|
717
746
|
[charging]
|
|
747
|
+
price_reaction_exponent = 0 # 0.5
|
|
748
|
+
desirability_reaction_exponent = 0 # 1
|
|
718
749
|
|
|
719
750
|
[charging_sessions]
|
|
720
751
|
resolution = 1 # subdivisions from main unit of time
|
|
@@ -70,7 +70,7 @@ charging_power = 200 # kW
|
|
|
70
70
|
charger_efficiency = 0.85
|
|
71
71
|
latitude = 52
|
|
72
72
|
longitude = 6.2
|
|
73
|
-
|
|
73
|
+
charging_price = 0.25 # €/kWh
|
|
74
74
|
charging_desirability = 1
|
|
75
75
|
# An indicator (0-1) of how much people like to charge at this location
|
|
76
76
|
percentage_in_location_at_run_start = 1
|
|
@@ -78,6 +78,11 @@ percentage_in_location_at_run_start = 1
|
|
|
78
78
|
# compute_start_location_split in mobility_module below)
|
|
79
79
|
vehicle_discharge_power = 150 # kW
|
|
80
80
|
proportion_of_discharge_to_network = 0.9
|
|
81
|
+
time_modulation_factors = [
|
|
82
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
83
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
84
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
85
|
+
] # Starts at midinight
|
|
81
86
|
[locations.truck_customer]
|
|
82
87
|
vehicle = 'truck'
|
|
83
88
|
connectivity = 0.1
|
|
@@ -85,7 +90,7 @@ charging_power = 200 # kW
|
|
|
85
90
|
charger_efficiency = 0.85
|
|
86
91
|
latitude = 52
|
|
87
92
|
longitude = 6.2
|
|
88
|
-
|
|
93
|
+
charging_price = 0.25 # €/kWh
|
|
89
94
|
charging_desirability = 1
|
|
90
95
|
# An indicator (0-1) of how much people like to charge at this location
|
|
91
96
|
percentage_in_location_at_run_start = 1
|
|
@@ -93,6 +98,11 @@ percentage_in_location_at_run_start = 1
|
|
|
93
98
|
# compute_start_location_split in mobility_module below)
|
|
94
99
|
vehicle_discharge_power = 0 # kW
|
|
95
100
|
proportion_of_discharge_to_network = 0.9
|
|
101
|
+
time_modulation_factors = [
|
|
102
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
103
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
104
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
105
|
+
] # Starts at midinight
|
|
96
106
|
|
|
97
107
|
[legs]
|
|
98
108
|
# You can add legs here by copying existing legs,
|
|
@@ -413,6 +423,8 @@ fitting_polynomial_order = 6
|
|
|
413
423
|
|
|
414
424
|
|
|
415
425
|
[charging]
|
|
426
|
+
price_reaction_exponent = 0 # 0.5
|
|
427
|
+
desirability_reaction_exponent = 0 # 1
|
|
416
428
|
|
|
417
429
|
[charging_sessions]
|
|
418
430
|
resolution = 1 # subdivisions from main unit of time
|
|
@@ -70,7 +70,7 @@ charging_power = 200 # kW
|
|
|
70
70
|
charger_efficiency = 0.85
|
|
71
71
|
latitude = 52
|
|
72
72
|
longitude = 6.2
|
|
73
|
-
|
|
73
|
+
charging_price = 0.25 # €/kWh
|
|
74
74
|
charging_desirability = 1
|
|
75
75
|
# An indicator (0-1) of how much people like to charge at this location
|
|
76
76
|
percentage_in_location_at_run_start = 1
|
|
@@ -78,6 +78,11 @@ percentage_in_location_at_run_start = 1
|
|
|
78
78
|
# compute_start_location_split in mobility_module below)
|
|
79
79
|
vehicle_discharge_power = 100 # kW
|
|
80
80
|
proportion_of_discharge_to_network = 0.9
|
|
81
|
+
time_modulation_factors = [
|
|
82
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
83
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
84
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
85
|
+
] # Starts at midinight
|
|
81
86
|
[locations.van_customer]
|
|
82
87
|
vehicle = 'van'
|
|
83
88
|
connectivity = 0.1
|
|
@@ -85,7 +90,7 @@ charging_power = 200 # kW
|
|
|
85
90
|
charger_efficiency = 0.85
|
|
86
91
|
latitude = 52
|
|
87
92
|
longitude = 6.2
|
|
88
|
-
|
|
93
|
+
charging_price = 0.25 # €/kWh
|
|
89
94
|
charging_desirability = 1
|
|
90
95
|
# An indicator (0-1) of how much people like to charge at this location
|
|
91
96
|
percentage_in_location_at_run_start = 1
|
|
@@ -93,6 +98,11 @@ percentage_in_location_at_run_start = 1
|
|
|
93
98
|
# compute_start_location_split in mobility_module below)
|
|
94
99
|
vehicle_discharge_power = 0 # kW
|
|
95
100
|
proportion_of_discharge_to_network = 0.9
|
|
101
|
+
time_modulation_factors = [
|
|
102
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
103
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
104
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
|
105
|
+
] # Starts at midinight
|
|
96
106
|
|
|
97
107
|
|
|
98
108
|
[legs]
|
|
@@ -433,6 +443,8 @@ fitting_polynomial_order = 6
|
|
|
433
443
|
|
|
434
444
|
|
|
435
445
|
[charging]
|
|
446
|
+
price_reaction_exponent = 0 # 0.5
|
|
447
|
+
desirability_reaction_exponent = 0 # 1
|
|
436
448
|
|
|
437
449
|
[charging_sessions]
|
|
438
450
|
resolution = 1 # subdivisions from main unit of time
|
|
@@ -246,6 +246,7 @@ def car_home_parking(case_name: str, general_parameters: Box) -> None:
|
|
|
246
246
|
own_driveway_percentage * own_driveway_values[quantity]
|
|
247
247
|
+ (1 - own_driveway_percentage) * on_street_values[quantity]
|
|
248
248
|
)
|
|
249
|
+
for quantity in combined_values_to_vehicles_from_sessions.columns:
|
|
249
250
|
combined_values_to_vehicles_from_sessions[quantity] = (
|
|
250
251
|
own_driveway_percentage
|
|
251
252
|
* own_driveway_values_to_vehicles_from_sessions[quantity]
|
|
@@ -261,11 +262,11 @@ def car_home_parking(case_name: str, general_parameters: Box) -> None:
|
|
|
261
262
|
sessions_values_columns: ty.List[str] = (
|
|
262
263
|
home_type_parameters.sessions_values_columns
|
|
263
264
|
)
|
|
264
|
-
for
|
|
265
|
+
for quantity in sessions_values_columns:
|
|
265
266
|
charging_sessions_own_driveway_values[
|
|
266
|
-
|
|
267
|
+
quantity
|
|
267
268
|
] *= own_driveway_percentage
|
|
268
|
-
charging_sessions_on_street_values[
|
|
269
|
+
charging_sessions_on_street_values[quantity] *= (
|
|
269
270
|
1 - own_driveway_percentage
|
|
270
271
|
)
|
|
271
272
|
|
|
@@ -342,7 +343,7 @@ def fleet_profiles(
|
|
|
342
343
|
|
|
343
344
|
fleet_split: pd.DataFrame = pd.read_csv(
|
|
344
345
|
f'{input_folder}/{fleet_file_name}'
|
|
345
|
-
).set_index('
|
|
346
|
+
).set_index('Scenario')
|
|
346
347
|
|
|
347
348
|
total_fleet_thousands: float = float(
|
|
348
349
|
fleet_split.loc[scenario_name]['Total Fleet (thousands)']
|
|
@@ -382,7 +383,7 @@ def fleet_profiles(
|
|
|
382
383
|
)
|
|
383
384
|
.reset_index()
|
|
384
385
|
.set_index(profiles_index)
|
|
385
|
-
.astype(float)
|
|
386
|
+
# .astype(float)
|
|
386
387
|
)
|
|
387
388
|
fleet_profile: pd.DataFrame = pd.DataFrame(
|
|
388
389
|
columns=fleet_headers, index=reference_profile.index
|
|
@@ -403,6 +404,16 @@ def fleet_profiles(
|
|
|
403
404
|
fleet_profile['Discharge Power to Network (MW)']
|
|
404
405
|
/ fleet_profile['Vehicle Discharge Power (MW)']
|
|
405
406
|
)
|
|
407
|
+
fleet_profile[
|
|
408
|
+
'Effective discharge efficiency'
|
|
409
|
+
] = fleet_profile['Effective discharge efficiency'].fillna(
|
|
410
|
+
general_parameters.discharge.no_discharge_efficiency_output
|
|
411
|
+
)
|
|
412
|
+
fleet_profile['Effective charging efficiency'] = fleet_profile[
|
|
413
|
+
'Effective charging efficiency'
|
|
414
|
+
].fillna(
|
|
415
|
+
general_parameters.discharge.no_charge_efficiency_output
|
|
416
|
+
)
|
|
406
417
|
fleet_profile.to_pickle(
|
|
407
418
|
f'{output_folder}/{scenario_name}_profile_fleet.pkl'
|
|
408
419
|
)
|
|
@@ -436,6 +447,16 @@ def fleet_profiles(
|
|
|
436
447
|
fleet_sessions['Discharge Power to Network (MW)']
|
|
437
448
|
/ fleet_sessions['Vehicle Discharge Power (MW)']
|
|
438
449
|
)
|
|
450
|
+
fleet_sessions[
|
|
451
|
+
'Effective discharge efficiency'
|
|
452
|
+
] = fleet_sessions['Effective discharge efficiency'].fillna(
|
|
453
|
+
general_parameters.discharge.no_discharge_efficiency_output
|
|
454
|
+
)
|
|
455
|
+
fleet_sessions[
|
|
456
|
+
'Effective charging efficiency'
|
|
457
|
+
] = fleet_sessions['Effective charging efficiency'].fillna(
|
|
458
|
+
general_parameters.discharge.no_charge_efficiency_output
|
|
459
|
+
)
|
|
439
460
|
|
|
440
461
|
fleet_consumption_table.to_pickle(
|
|
441
462
|
f'{output_folder}/{scenario_name}_{consumption_table_name}_fleet.pkl'
|
|
@@ -529,6 +550,12 @@ def make_profile_display_dataframe(
|
|
|
529
550
|
profile_dataframe['Discharge Power to Network (kW)']
|
|
530
551
|
/ profile_dataframe['Vehicle Discharge Power (kW)']
|
|
531
552
|
)
|
|
553
|
+
profile_dataframe['Effective discharge efficiency'] = profile_dataframe[
|
|
554
|
+
'Effective discharge efficiency'
|
|
555
|
+
].fillna(general_parameters.discharge.no_discharge_efficiency_output)
|
|
556
|
+
profile_dataframe['Effective charging efficiency'] = profile_dataframe[
|
|
557
|
+
'Effective charging efficiency'
|
|
558
|
+
].fillna(general_parameters.discharge.no_charge_efficiency_output)
|
|
532
559
|
profile_dataframe.to_pickle(f'{output_folder}/{scenario.name}_profile.pkl')
|
|
533
560
|
|
|
534
561
|
|
|
@@ -572,6 +599,17 @@ def make_sessions_display_dataframes(
|
|
|
572
599
|
/ display_charging_sessions['Vehicle Discharge Power (kW)']
|
|
573
600
|
)
|
|
574
601
|
|
|
602
|
+
display_charging_sessions['Effective discharge efficiency'] = (
|
|
603
|
+
display_charging_sessions['Effective discharge efficiency'].fillna(
|
|
604
|
+
general_parameters.discharge.no_discharge_efficiency_output
|
|
605
|
+
)
|
|
606
|
+
)
|
|
607
|
+
display_charging_sessions['Effective charging efficiency'] = (
|
|
608
|
+
display_charging_sessions['Effective charging efficiency'].fillna(
|
|
609
|
+
general_parameters.discharge.no_charge_efficiency_output
|
|
610
|
+
)
|
|
611
|
+
)
|
|
612
|
+
|
|
575
613
|
display_charging_sessions.to_pickle(
|
|
576
614
|
f'{output_folder}/{scenario.name}_charging_sessions.pkl'
|
|
577
615
|
)
|
|
@@ -612,7 +650,7 @@ def run_scenario(
|
|
|
612
650
|
general_parameters,
|
|
613
651
|
)
|
|
614
652
|
|
|
615
|
-
consumption.get_consumption_data(
|
|
653
|
+
consumption_table: pd.DataFrame = consumption.get_consumption_data(
|
|
616
654
|
run_mobility_matrix,
|
|
617
655
|
run_next_leg_kilometers,
|
|
618
656
|
run_next_leg_kilometers_cumulative,
|
|
@@ -641,6 +679,7 @@ def run_scenario(
|
|
|
641
679
|
total_battery_space_per_location,
|
|
642
680
|
charge_drawn_by_vehicles,
|
|
643
681
|
charge_drawn_from_network,
|
|
682
|
+
charging_costs,
|
|
644
683
|
) = charging.get_charging_profile(
|
|
645
684
|
location_split,
|
|
646
685
|
run_mobility_matrix,
|
|
@@ -695,6 +734,89 @@ def run_scenario(
|
|
|
695
734
|
if do_fleet_tables:
|
|
696
735
|
fleet_profiles(case_name, scenario_name, general_parameters)
|
|
697
736
|
|
|
737
|
+
display_run_totals, display_fleet_run_totals = make_display_totals(
|
|
738
|
+
charging_costs,
|
|
739
|
+
charge_drawn_from_network,
|
|
740
|
+
charge_drawn_by_vehicles,
|
|
741
|
+
consumption_table,
|
|
742
|
+
scenario,
|
|
743
|
+
general_parameters,
|
|
744
|
+
case_name,
|
|
745
|
+
)
|
|
746
|
+
# print(scenario.name)
|
|
747
|
+
# print(display_run_totals)
|
|
748
|
+
# print(display_fleet_run_totals)
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
def make_display_totals(
|
|
752
|
+
charging_costs: pd.DataFrame,
|
|
753
|
+
charge_drawn_from_network: pd.DataFrame,
|
|
754
|
+
charge_drawn_by_vehicles: pd.DataFrame,
|
|
755
|
+
consumption_table: pd.DataFrame,
|
|
756
|
+
scenario: Box,
|
|
757
|
+
general_parameters: Box,
|
|
758
|
+
case_name: str,
|
|
759
|
+
) -> ty.Tuple[pd.Series, pd.Series]:
|
|
760
|
+
display_range: pd.DatetimeIndex = run_time.get_time_range(
|
|
761
|
+
scenario, general_parameters
|
|
762
|
+
)[2]
|
|
763
|
+
display_run_charging_costs: float = (
|
|
764
|
+
charging_costs.loc[display_range].sum().sum()
|
|
765
|
+
)
|
|
766
|
+
display_run_charge_from_network: float = (
|
|
767
|
+
charge_drawn_from_network.loc[display_range].sum().sum()
|
|
768
|
+
)
|
|
769
|
+
display_run_charge_drwan_by_vehicles: float = (
|
|
770
|
+
charge_drawn_by_vehicles.loc[display_range].sum().sum()
|
|
771
|
+
)
|
|
772
|
+
display_run_kilometrage: float = consumption_table.loc[display_range][
|
|
773
|
+
'Kilometers'
|
|
774
|
+
].sum()
|
|
775
|
+
display_run_totals: pd.Series = pd.Series()
|
|
776
|
+
display_run_totals['Kilometers'] = display_run_kilometrage
|
|
777
|
+
display_run_totals['Charge drawn by vehicles (kWh)'] = (
|
|
778
|
+
display_run_charge_drwan_by_vehicles
|
|
779
|
+
)
|
|
780
|
+
display_run_totals['Charge drawn from network (kWh)'] = (
|
|
781
|
+
display_run_charge_from_network
|
|
782
|
+
)
|
|
783
|
+
display_run_totals['Charging costs (€)'] = display_run_charging_costs
|
|
784
|
+
input_root: str = general_parameters.files.input_root
|
|
785
|
+
input_folder: str = f'{input_root}/{case_name}'
|
|
786
|
+
fleet_file_name: str = general_parameters.profile_dataframe.fleet_file_name
|
|
787
|
+
fleet_split: pd.DataFrame = pd.read_csv(
|
|
788
|
+
f'{input_folder}/{fleet_file_name}'
|
|
789
|
+
).set_index('Scenario')
|
|
790
|
+
|
|
791
|
+
total_electric_fleet_thousands: float = float(
|
|
792
|
+
fleet_split.loc[scenario.name]['Total Fleet (thousands)']
|
|
793
|
+
* fleet_split.loc[scenario.name]['electricity proportion']
|
|
794
|
+
)
|
|
795
|
+
display_fleet_run_totals: pd.Series = pd.Series()
|
|
796
|
+
display_fleet_run_totals['Thousand Kilometers'] = (
|
|
797
|
+
display_run_kilometrage * total_electric_fleet_thousands
|
|
798
|
+
)
|
|
799
|
+
display_fleet_run_totals['Charge drawn by vehicles (MWh)'] = (
|
|
800
|
+
display_run_charge_drwan_by_vehicles * total_electric_fleet_thousands
|
|
801
|
+
)
|
|
802
|
+
display_fleet_run_totals['Charge drawn from network (MWh)'] = (
|
|
803
|
+
display_run_charge_from_network * total_electric_fleet_thousands
|
|
804
|
+
)
|
|
805
|
+
display_fleet_run_totals['Charging costs (thousand €)'] = (
|
|
806
|
+
display_run_charging_costs * total_electric_fleet_thousands
|
|
807
|
+
)
|
|
808
|
+
output_root: str = general_parameters.files.output_root
|
|
809
|
+
output_folder: str = f'{output_root}/{case_name}'
|
|
810
|
+
display_run_totals.to_pickle(
|
|
811
|
+
f'{output_folder}/{scenario.name}_display_run_totals.pkl'
|
|
812
|
+
)
|
|
813
|
+
display_fleet_run_totals.to_pickle(
|
|
814
|
+
f'{output_folder}/{scenario.name}'
|
|
815
|
+
f'_display_electric_fleet_run_totals.pkl'
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
return display_run_totals, display_fleet_run_totals
|
|
819
|
+
|
|
698
820
|
|
|
699
821
|
# @cook.function_timer
|
|
700
822
|
def load_scenarios(case_name: str) -> ty.List[Box]:
|
|
@@ -780,6 +902,7 @@ if __name__ == '__main__':
|
|
|
780
902
|
case_name = 'Mopo'
|
|
781
903
|
|
|
782
904
|
run_ChaProEV(case_name)
|
|
905
|
+
|
|
783
906
|
# print('Add sessions into next day')
|
|
784
907
|
# print('Iterate through sessions and send remainder to next session')
|
|
785
908
|
# print('Compute session first pass')
|
|
@@ -34,6 +34,91 @@ except ModuleNotFoundError:
|
|
|
34
34
|
# we are importing again
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
def get_time_modulation(
|
|
38
|
+
run_range: pd.DatetimeIndex, scenario: Box, general_parameters: Box
|
|
39
|
+
) -> pd.DataFrame:
|
|
40
|
+
time_modulation: pd.DataFrame = pd.DataFrame(
|
|
41
|
+
np.ones((len(run_range), len(scenario.locations))),
|
|
42
|
+
columns=scenario.locations,
|
|
43
|
+
index=run_range,
|
|
44
|
+
)
|
|
45
|
+
for location in scenario.locations:
|
|
46
|
+
time_modulation_factors: ty.List[float] = scenario.locations[
|
|
47
|
+
location
|
|
48
|
+
].time_modulation_factors
|
|
49
|
+
for hour_index, time_modulation_factor in enumerate(
|
|
50
|
+
time_modulation_factors
|
|
51
|
+
):
|
|
52
|
+
time_modulation.loc[
|
|
53
|
+
pd.to_datetime(time_modulation.index).hour == hour_index,
|
|
54
|
+
location,
|
|
55
|
+
] = time_modulation_factor
|
|
56
|
+
|
|
57
|
+
return time_modulation
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def get_charging_modulation(
|
|
61
|
+
run_range: pd.DatetimeIndex,
|
|
62
|
+
scenario: Box,
|
|
63
|
+
general_parameters: Box,
|
|
64
|
+
) -> pd.DataFrame:
|
|
65
|
+
charging_modulation: pd.DataFrame = get_time_modulation(
|
|
66
|
+
run_range, scenario, general_parameters
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
location_prices: ty.List[float] = [
|
|
70
|
+
scenario.locations[location_tested].charging_price
|
|
71
|
+
for location_tested in scenario.locations
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
if scenario.charging.price_reaction_exponent > 0:
|
|
75
|
+
location_price_factor: pd.Series = pd.Series(
|
|
76
|
+
[
|
|
77
|
+
(
|
|
78
|
+
(min(location_prices) / (location_price))
|
|
79
|
+
** scenario.charging.price_reaction_exponent
|
|
80
|
+
if location_price > 0
|
|
81
|
+
else 1
|
|
82
|
+
)
|
|
83
|
+
for location_price in location_prices
|
|
84
|
+
],
|
|
85
|
+
index=scenario.locations,
|
|
86
|
+
)
|
|
87
|
+
else:
|
|
88
|
+
location_price_factor = pd.Series(
|
|
89
|
+
np.ones(len(scenario.locations)), index=scenario.locations
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
location_desirabilities: ty.List[float] = [
|
|
93
|
+
scenario.locations[location_tested].charging_desirability
|
|
94
|
+
for location_tested in scenario.locations
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
if scenario.charging.desirability_reaction_exponent > 0:
|
|
98
|
+
location_desirability_factor: pd.Series = pd.Series(
|
|
99
|
+
[
|
|
100
|
+
(
|
|
101
|
+
(location_desirability / max(location_desirabilities))
|
|
102
|
+
** scenario.charging.desirability_reaction_exponent
|
|
103
|
+
)
|
|
104
|
+
for location_desirability in location_desirabilities
|
|
105
|
+
],
|
|
106
|
+
index=scenario.locations,
|
|
107
|
+
)
|
|
108
|
+
else:
|
|
109
|
+
location_desirability_factor = pd.Series(
|
|
110
|
+
np.ones(len(scenario.locations)), index=scenario.locations
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
for location in scenario.locations:
|
|
114
|
+
charging_modulation[location] *= (
|
|
115
|
+
location_price_factor[location]
|
|
116
|
+
* location_desirability_factor[location]
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
return charging_modulation
|
|
120
|
+
|
|
121
|
+
|
|
37
122
|
def get_charging_framework(
|
|
38
123
|
location_split: pd.DataFrame,
|
|
39
124
|
run_mobility_matrix: pd.DataFrame,
|
|
@@ -52,12 +137,15 @@ def get_charging_framework(
|
|
|
52
137
|
pd.Series,
|
|
53
138
|
pd.DataFrame,
|
|
54
139
|
pd.DataFrame,
|
|
140
|
+
pd.DataFrame,
|
|
55
141
|
]:
|
|
56
142
|
'''
|
|
57
143
|
Produces the structures we want for the charging profiles
|
|
58
144
|
'''
|
|
59
145
|
|
|
60
|
-
run_range = run_time.get_time_range(
|
|
146
|
+
run_range: pd.DatetimeIndex = run_time.get_time_range(
|
|
147
|
+
scenario, general_parameters
|
|
148
|
+
)[0]
|
|
61
149
|
|
|
62
150
|
vehicle_parameters: Box = scenario.vehicle
|
|
63
151
|
vehicle_name: str = vehicle_parameters.name
|
|
@@ -149,6 +237,9 @@ def get_charging_framework(
|
|
|
149
237
|
columns=[float(0)],
|
|
150
238
|
index=mobility_locations_index,
|
|
151
239
|
)
|
|
240
|
+
charging_modulation: pd.DataFrame = get_charging_modulation(
|
|
241
|
+
run_range, scenario, general_parameters
|
|
242
|
+
)
|
|
152
243
|
|
|
153
244
|
return (
|
|
154
245
|
battery_spaces,
|
|
@@ -162,6 +253,7 @@ def get_charging_framework(
|
|
|
162
253
|
run_departures_impact_gaps,
|
|
163
254
|
travelling_battery_spaces,
|
|
164
255
|
total_battery_space_per_location,
|
|
256
|
+
charging_modulation,
|
|
165
257
|
)
|
|
166
258
|
|
|
167
259
|
|
|
@@ -546,6 +638,7 @@ def compute_charging_events(
|
|
|
546
638
|
scenario: Box,
|
|
547
639
|
general_parameters: Box,
|
|
548
640
|
location_names: ty.List[str],
|
|
641
|
+
charging_modulation: pd.DataFrame,
|
|
549
642
|
) -> ty.Tuple[ty.Dict[str, pd.DataFrame], pd.DataFrame, pd.DataFrame]:
|
|
550
643
|
|
|
551
644
|
zero_threshold: float = general_parameters.numbers.zero_threshold
|
|
@@ -561,7 +654,13 @@ def compute_charging_events(
|
|
|
561
654
|
)
|
|
562
655
|
|
|
563
656
|
percent_charging: float = charging_location_parameters.connectivity
|
|
564
|
-
|
|
657
|
+
location_charging_power: float = (
|
|
658
|
+
charging_location_parameters.charging_power
|
|
659
|
+
)
|
|
660
|
+
location_modulated_charging_power: float = (
|
|
661
|
+
location_charging_power
|
|
662
|
+
* float(charging_modulation.loc[time_tag][charging_location])
|
|
663
|
+
)
|
|
565
664
|
|
|
566
665
|
# This variable is useful if new battery spaces
|
|
567
666
|
# are added within this charging procedure
|
|
@@ -570,7 +669,7 @@ def compute_charging_events(
|
|
|
570
669
|
].columns.values
|
|
571
670
|
charge_drawn_per_charging_vehicle: np.ndarray = np.array(
|
|
572
671
|
[
|
|
573
|
-
min(this_battery_space,
|
|
672
|
+
min(this_battery_space, location_modulated_charging_power)
|
|
574
673
|
for this_battery_space in original_battery_spaces
|
|
575
674
|
]
|
|
576
675
|
)
|
|
@@ -580,7 +679,7 @@ def compute_charging_events(
|
|
|
580
679
|
|
|
581
680
|
vehicles_charging: ty.Any = (
|
|
582
681
|
percent_charging * battery_spaces[charging_location].loc[time_tag]
|
|
583
|
-
) # It is a
|
|
682
|
+
) # It is a float, but MyPy does not get it
|
|
584
683
|
|
|
585
684
|
charge_drawn_by_vehicles_this_time_tag_per_battery_space: (
|
|
586
685
|
pd.Series[float] | pd.DataFrame
|
|
@@ -807,6 +906,7 @@ def copy_day_type_profiles_to_whole_run(
|
|
|
807
906
|
run_departures_impact_gaps,
|
|
808
907
|
spillover_travelling_battery_spaces,
|
|
809
908
|
total_battery_space_per_location,
|
|
909
|
+
charging_modulation,
|
|
810
910
|
) = get_charging_framework(
|
|
811
911
|
location_split,
|
|
812
912
|
run_mobility_matrix,
|
|
@@ -973,6 +1073,7 @@ def copy_day_type_profiles_to_whole_run(
|
|
|
973
1073
|
scenario,
|
|
974
1074
|
general_parameters,
|
|
975
1075
|
location_names,
|
|
1076
|
+
charging_modulation,
|
|
976
1077
|
)
|
|
977
1078
|
|
|
978
1079
|
spillover_battery_spaces_after_charging: pd.Series = (
|
|
@@ -1047,6 +1148,7 @@ def write_output(
|
|
|
1047
1148
|
total_battery_space_per_location: pd.DataFrame,
|
|
1048
1149
|
charge_drawn_by_vehicles: pd.DataFrame,
|
|
1049
1150
|
charge_drawn_from_network: pd.DataFrame,
|
|
1151
|
+
charging_costs: pd.DataFrame,
|
|
1050
1152
|
scenario: Box,
|
|
1051
1153
|
case_name: str,
|
|
1052
1154
|
maximal_delivered_power_per_location: pd.DataFrame,
|
|
@@ -1104,6 +1206,9 @@ def write_output(
|
|
|
1104
1206
|
charge_drawn_from_network.to_pickle(
|
|
1105
1207
|
f'{output_folder}/{scenario.name}_charge_drawn_from_network.pkl'
|
|
1106
1208
|
)
|
|
1209
|
+
charging_costs.to_pickle(
|
|
1210
|
+
f'{output_folder}/{scenario.name}_charging_costs.pkl'
|
|
1211
|
+
)
|
|
1107
1212
|
|
|
1108
1213
|
charge_drawn_from_network_total: pd.DataFrame = pd.DataFrame(
|
|
1109
1214
|
index=charge_drawn_from_network.index
|
|
@@ -1111,6 +1216,8 @@ def write_output(
|
|
|
1111
1216
|
charge_drawn_from_network_total['Total Charge Drawn (kWh)'] = (
|
|
1112
1217
|
charge_drawn_from_network.sum(axis=1)
|
|
1113
1218
|
)
|
|
1219
|
+
|
|
1220
|
+
charging_costs_total: pd.Series = charging_costs.sum(axis=1)
|
|
1114
1221
|
percentage_of_maximal_delivered_power_used_per_location: pd.DataFrame = (
|
|
1115
1222
|
pd.DataFrame(index=charge_drawn_from_network.index)
|
|
1116
1223
|
)
|
|
@@ -1119,6 +1226,9 @@ def write_output(
|
|
|
1119
1226
|
f'{output_folder}/{scenario.name}_'
|
|
1120
1227
|
'charge_drawn_from_network_total.pkl'
|
|
1121
1228
|
)
|
|
1229
|
+
charging_costs_total.to_pickle(
|
|
1230
|
+
f'{output_folder}/{scenario.name}_total_charging_costs.pkl'
|
|
1231
|
+
)
|
|
1122
1232
|
|
|
1123
1233
|
if pickle_interim_files:
|
|
1124
1234
|
total_battery_space_per_location.to_pickle(
|
|
@@ -1224,7 +1334,11 @@ def get_charging_profile(
|
|
|
1224
1334
|
case_name: str,
|
|
1225
1335
|
general_parameters: Box,
|
|
1226
1336
|
) -> ty.Tuple[
|
|
1227
|
-
ty.Dict[str, pd.DataFrame],
|
|
1337
|
+
ty.Dict[str, pd.DataFrame],
|
|
1338
|
+
pd.DataFrame,
|
|
1339
|
+
pd.DataFrame,
|
|
1340
|
+
pd.DataFrame,
|
|
1341
|
+
pd.DataFrame,
|
|
1228
1342
|
]:
|
|
1229
1343
|
'''
|
|
1230
1344
|
This is the main function of the charging module.
|
|
@@ -1243,6 +1357,7 @@ def get_charging_profile(
|
|
|
1243
1357
|
run_departures_impact_gaps,
|
|
1244
1358
|
travelling_battery_spaces,
|
|
1245
1359
|
total_battery_space_per_location,
|
|
1360
|
+
charging_modulation,
|
|
1246
1361
|
) = get_charging_framework(
|
|
1247
1362
|
location_split,
|
|
1248
1363
|
run_mobility_matrix,
|
|
@@ -1383,6 +1498,7 @@ def get_charging_profile(
|
|
|
1383
1498
|
scenario,
|
|
1384
1499
|
general_parameters,
|
|
1385
1500
|
location_names,
|
|
1501
|
+
charging_modulation,
|
|
1386
1502
|
)
|
|
1387
1503
|
|
|
1388
1504
|
if use_day_types_in_charge_computing and (
|
|
@@ -1428,11 +1544,15 @@ def get_charging_profile(
|
|
|
1428
1544
|
total_battery_space_per_location[location_name] = (
|
|
1429
1545
|
location_total_battery_space
|
|
1430
1546
|
)
|
|
1547
|
+
charging_costs: pd.DataFrame = charge_drawn_from_network.copy()
|
|
1548
|
+
for location in scenario.locations:
|
|
1549
|
+
charging_costs[location] *= scenario.locations[location].charging_price
|
|
1431
1550
|
write_output(
|
|
1432
1551
|
battery_spaces,
|
|
1433
1552
|
total_battery_space_per_location,
|
|
1434
1553
|
charge_drawn_by_vehicles,
|
|
1435
1554
|
charge_drawn_from_network,
|
|
1555
|
+
charging_costs,
|
|
1436
1556
|
scenario,
|
|
1437
1557
|
case_name,
|
|
1438
1558
|
maximal_delivered_power_per_location,
|
|
@@ -1445,6 +1565,7 @@ def get_charging_profile(
|
|
|
1445
1565
|
total_battery_space_per_location,
|
|
1446
1566
|
charge_drawn_by_vehicles,
|
|
1447
1567
|
charge_drawn_from_network,
|
|
1568
|
+
charging_costs,
|
|
1448
1569
|
)
|
|
1449
1570
|
|
|
1450
1571
|
|
|
@@ -1747,15 +1868,15 @@ def get_profile_from_sessions(
|
|
|
1747
1868
|
# def shift to next session (do this wile not setisfied?)
|
|
1748
1869
|
if __name__ == '__main__':
|
|
1749
1870
|
case_name = 'Mopo'
|
|
1750
|
-
|
|
1871
|
+
scenario_name = 'XX_car'
|
|
1751
1872
|
general_parameters_file_name = 'ChaProEV.toml'
|
|
1752
1873
|
general_parameters = Box(
|
|
1753
1874
|
cook.parameters_from_TOML(general_parameters_file_name)
|
|
1754
1875
|
)
|
|
1755
|
-
scenario_file_name: str =
|
|
1756
|
-
f'scenarios/{case_name}/{test_scenario_name}.toml'
|
|
1757
|
-
)
|
|
1876
|
+
scenario_file_name: str = f'scenarios/{case_name}/{scenario_name}.toml'
|
|
1758
1877
|
scenario = Box(cook.parameters_from_TOML(scenario_file_name))
|
|
1878
|
+
scenario.name = scenario_name
|
|
1879
|
+
|
|
1759
1880
|
run_charging_sessions_dataframe: pd.DataFrame = pd.read_pickle(
|
|
1760
1881
|
'output/Mopo/XX_car_run_charging_sessions.pkl'
|
|
1761
1882
|
)
|
|
@@ -1777,25 +1898,12 @@ if __name__ == '__main__':
|
|
|
1777
1898
|
general_parameters,
|
|
1778
1899
|
case_name,
|
|
1779
1900
|
)
|
|
1780
|
-
print(
|
|
1781
|
-
charging_profile_to_vehicle_from_sessions,
|
|
1782
|
-
charging_profile_from_network_from_sessions,
|
|
1783
|
-
)
|
|
1784
1901
|
|
|
1785
|
-
# print(charging_sessions_with_charged_amounts)
|
|
1786
|
-
# print(charging_sessions_with_charged_amounts.info())
|
|
1787
|
-
# exit()
|
|
1788
1902
|
charging_sessions_with_charged_amounts['Start time'] = (
|
|
1789
1903
|
charging_sessions_with_charged_amounts['Start time'].astype(
|
|
1790
1904
|
'datetime64[ns]'
|
|
1791
1905
|
)
|
|
1792
1906
|
)
|
|
1793
|
-
sessions_2018 = charging_sessions_with_charged_amounts.loc[
|
|
1794
|
-
charging_sessions_with_charged_amounts['Start time'].dt.year == 2018
|
|
1795
|
-
]
|
|
1796
|
-
print(sessions_2018['Charging Power to Vehicles (kW)'].sum())
|
|
1797
|
-
print(sessions_2018['Charging Power from Network (kW)'].sum())
|
|
1798
|
-
print(sessions_2018)
|
|
1799
1907
|
|
|
1800
1908
|
case_name = 'Mopo'
|
|
1801
1909
|
scenario_name = 'XX_car'
|
|
@@ -1810,7 +1918,7 @@ if __name__ == '__main__':
|
|
|
1810
1918
|
)
|
|
1811
1919
|
file_parameters: Box = general_parameters.files
|
|
1812
1920
|
output_folder: str = f'{file_parameters.output_root}/{case_name}'
|
|
1813
|
-
location_split_table_name: str = f'{
|
|
1921
|
+
location_split_table_name: str = f'{scenario_name}_location_split'
|
|
1814
1922
|
location_split: pd.DataFrame = pd.read_pickle(
|
|
1815
1923
|
f'{output_folder}/{location_split_table_name}.pkl'
|
|
1816
1924
|
)
|
|
@@ -1831,6 +1939,7 @@ if __name__ == '__main__':
|
|
|
1831
1939
|
charge_drawn_by_vehicles,
|
|
1832
1940
|
charge_drawn_from_network,
|
|
1833
1941
|
total_battery_space_per_location,
|
|
1942
|
+
charging_costs,
|
|
1834
1943
|
) = get_charging_profile(
|
|
1835
1944
|
location_split,
|
|
1836
1945
|
run_mobility_matrix,
|
|
@@ -28,7 +28,7 @@ def create_consumption_tables(
|
|
|
28
28
|
scenario: Box,
|
|
29
29
|
case_name: str,
|
|
30
30
|
general_parameters: Box,
|
|
31
|
-
) ->
|
|
31
|
+
) -> pd.DataFrame:
|
|
32
32
|
'''
|
|
33
33
|
Creates the consumption tables
|
|
34
34
|
'''
|
|
@@ -168,6 +168,7 @@ def create_consumption_tables(
|
|
|
168
168
|
yearly_consumption_table.to_pickle(
|
|
169
169
|
f'{output_folder}/{scenario_name}_yearly_consumption_table.pkl'
|
|
170
170
|
)
|
|
171
|
+
return consumption_table
|
|
171
172
|
|
|
172
173
|
|
|
173
174
|
def get_energy_for_next_leg(
|
|
@@ -215,8 +216,8 @@ def get_consumption_data(
|
|
|
215
216
|
scenario: Box,
|
|
216
217
|
case_name: str,
|
|
217
218
|
general_parameters: Box,
|
|
218
|
-
) ->
|
|
219
|
-
create_consumption_tables(
|
|
219
|
+
) -> pd.DataFrame:
|
|
220
|
+
consumption_table = create_consumption_tables(
|
|
220
221
|
run_mobility_matrix, scenario, case_name, general_parameters
|
|
221
222
|
)
|
|
222
223
|
get_energy_for_next_leg(
|
|
@@ -226,6 +227,7 @@ def get_consumption_data(
|
|
|
226
227
|
case_name,
|
|
227
228
|
general_parameters,
|
|
228
229
|
)
|
|
230
|
+
return consumption_table
|
|
229
231
|
|
|
230
232
|
|
|
231
233
|
if __name__ == '__main__':
|
|
@@ -251,7 +253,7 @@ if __name__ == '__main__':
|
|
|
251
253
|
f'{output_folder}/{scenario_name}_'
|
|
252
254
|
'next_leg_kilometers_cumulative.pkl',
|
|
253
255
|
)
|
|
254
|
-
get_consumption_data(
|
|
256
|
+
consumption_table: pd.DataFrame = get_consumption_data(
|
|
255
257
|
run_mobility_matrix,
|
|
256
258
|
next_leg_kilometers,
|
|
257
259
|
next_leg_kilometers_cumulative,
|
|
@@ -721,8 +721,8 @@ class Location:
|
|
|
721
721
|
)
|
|
722
722
|
location.latitude: float = this_location_parameters.latitude
|
|
723
723
|
location.longitude: float = this_location_parameters.longitude
|
|
724
|
-
location.
|
|
725
|
-
this_location_parameters.
|
|
724
|
+
location.charging_price: float = (
|
|
725
|
+
this_location_parameters.charging_price
|
|
726
726
|
)
|
|
727
727
|
location.charging_desirability: float = (
|
|
728
728
|
this_location_parameters.charging_desirability
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|