ChaProEV 1.2.0__tar.gz → 1.2.2__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.2.0/src/ChaProEV.egg-info → chaproev-1.2.2}/PKG-INFO +1 -1
- chaproev-1.2.2/docs/scenario.md +94 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/pyproject.toml +1 -1
- {chaproev-1.2.0 → chaproev-1.2.2}/scenarios/Mopo/XX_bus.toml +37 -42
- {chaproev-1.2.0 → chaproev-1.2.2}/scenarios/Mopo/XX_car.toml +7 -4
- {chaproev-1.2.0 → chaproev-1.2.2}/scenarios/Mopo/XX_truck.toml +17 -11
- {chaproev-1.2.0 → chaproev-1.2.2}/scenarios/Mopo/XX_van.toml +12 -12
- chaproev-1.2.2/src/ChaProEV/ChaProEV.py +148 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/define.py +1 -4
- chaproev-1.2.0/src/ChaProEV/ChaProEV.py → chaproev-1.2.2/src/ChaProEV/profiles.py +6 -329
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/run_time.py +34 -34
- chaproev-1.2.2/src/ChaProEV/scenarios_module.py +232 -0
- {chaproev-1.2.0 → chaproev-1.2.2/src/ChaProEV.egg-info}/PKG-INFO +1 -1
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV.egg-info/SOURCES.txt +2 -0
- chaproev-1.2.0/docs/scenario.md +0 -64
- {chaproev-1.2.0 → chaproev-1.2.2}/.flake8 +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/.gitignore +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/.vscode/ltex.dictionary.en-US.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/.vscode/settings.json +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/ChaProEV.pptx +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/ChaProEV.toml +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/Gemfile +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/LICENCE +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/MOPO_logo_chaproev on wht.svg +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/MOPO_logo_chaproev.png +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/MOPO_logo_chaproev.svg +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/MOPO_logo_main.svg +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/MOPO_logo_main_onwhite.svg +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/README.md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/comparisons/comparison_template.toml +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/ChaProEV_workflow.png +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/Legs.png +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/Locations.png +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/Makefile +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/README.md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/Trips.png +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/Vehicle_Temperature_correction_factor.svg +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/_config.yml +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/doctrees/environment.pickle +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/doctrees/index.doctree +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/.buildinfo +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_sources/index.rst.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/alabaster.css +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/basic.css +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/custom.css +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/doctools.js +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/documentation_options.js +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/file.png +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/language_data.js +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/minus.png +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/plus.png +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/pygments.css +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/searchtools.js +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/_static/sphinx_highlight.js +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/genindex.html +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/index.html +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/objects.inv +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/search.html +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/build/html/searchindex.js +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/charging.md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/consumption.md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/define.md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/index.md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/make.bat +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/mobility.md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/running_model,md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/source/index.rst +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/using.md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/docs/weather.md +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/eu-emblem-low-res.jpg +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/mkdocs.yml +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/requirements.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/scenarios/local_impact_BEVs/baseline.toml +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/setup.cfg +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/__init__.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/charging.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/consumption.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/make_variants.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/mobility.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/py.typed +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/weather.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV/writing.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV.egg-info/PKG-INFO-PC-28624 +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV.egg-info/PKG-INFO-PC-28624-2 +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV.egg-info/SOURCES-PC-28624-2.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV.egg-info/SOURCES-PC-28624.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV.egg-info/dependency_links.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV.egg-info/requires-PC-28624-2.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV.egg-info/requires-PC-28624.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/src/ChaProEV.egg-info/top_level.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/tests/test_battery_space.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/tests/test_charge_and_consumption.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/tests/test_empty_values.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/tests/test_same_output.py +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/todo.txt +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/variants/Mopo/XX_car.csv +0 -0
- {chaproev-1.2.0 → chaproev-1.2.2}/variants/Mopo.toml +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Scenario file description
|
|
2
|
+
|
|
3
|
+
This page describes the elements of the scenario file
|
|
4
|
+
|
|
5
|
+
## run
|
|
6
|
+
Run parameters give the elements to produce the time tags of the run range.
|
|
7
|
+
### use_day_types_in_charge_computing
|
|
8
|
+
If set to true, the charging computations will be done per day type rather
|
|
9
|
+
than for all days of the run, which fastens the computations.
|
|
10
|
+
### start
|
|
11
|
+
This part gives the year, month, day, hour, and minute of the start of the
|
|
12
|
+
computations. It is best to set this to a day hour start for consistency
|
|
13
|
+
and then cut off the start for display (see below). For example,
|
|
14
|
+
start on 31/12/2019 at 05:00 if your day start hour is 05:00 and if you want
|
|
15
|
+
to show results starting on 1/1/2020 at 00:00.
|
|
16
|
+
### end
|
|
17
|
+
This part gives the year, month, day, hour, and minute of the end of the
|
|
18
|
+
computations. Note that the end time tag is not included in the run,
|
|
19
|
+
so put 1/1/2021 at 00:00 if you want to compute for 2020.
|
|
20
|
+
### display_start
|
|
21
|
+
This is the first time tag you want to show in your end results.
|
|
22
|
+
### display_end
|
|
23
|
+
This is the first time tag that does not appear in your displayed results.
|
|
24
|
+
### frequency
|
|
25
|
+
The time frequency of the run (size and type).
|
|
26
|
+
For the type, use 'H' for hours, 'min' for minutes,
|
|
27
|
+
'S' for seconds, 'D' for days. For more info and other types, see
|
|
28
|
+
[here](https://pandas.pydata.org/docs/user_guide/timeseries.html#timeseries-offset-aliases).
|
|
29
|
+
The current model uses hourly (so 1 and 'h'). Changing that might require
|
|
30
|
+
some adjustments in the code.
|
|
31
|
+
### display frequency
|
|
32
|
+
The frequency of the displayed values can be different than the frequency of the compuatations.
|
|
33
|
+
In the current version, this needs to be the same or less frequent than the computation frequencey above.
|
|
34
|
+
### extra_downloads
|
|
35
|
+
This is to decide if you want to dowload some files (note that this concerns the
|
|
36
|
+
currently inactive weather module).
|
|
37
|
+
## locations
|
|
38
|
+
|
|
39
|
+
## legs
|
|
40
|
+
|
|
41
|
+
### mix
|
|
42
|
+
|
|
43
|
+
## vehicle
|
|
44
|
+
These parameters define the scenario's vehicle. If you want profiles
|
|
45
|
+
for several vehicles, run separate scenarios.
|
|
46
|
+
### vehicle name
|
|
47
|
+
This is the name of the vehicle, which will be checked to see if trips
|
|
48
|
+
and locations are actually declared.
|
|
49
|
+
|
|
50
|
+
## trips
|
|
51
|
+
|
|
52
|
+
## mobility_module
|
|
53
|
+
### day_start_hour
|
|
54
|
+
This parameter defines the start of the day for the scenario. It is chosen
|
|
55
|
+
so that there are no movements during that hour number. It represents the
|
|
56
|
+
shift from midnight, so a day start hour of 5 means that the day starts
|
|
57
|
+
at hour 5 (i.e. 05.00). The idea is to choose an hour that is logical
|
|
58
|
+
for the users/matches their patterns. This is connected to the
|
|
59
|
+
[day types](day_types), as a given day will correspond to a day type.
|
|
60
|
+
For example, the hours between 00:00 and 05:00 on a Saturday belong to
|
|
61
|
+
the Thursday before and are as such on a week day
|
|
62
|
+
(as opposed to a weekend day).
|
|
63
|
+
|
|
64
|
+
### day_types
|
|
65
|
+
|
|
66
|
+
### trips_per_day_type
|
|
67
|
+
For vehicles other than cars, we assume that there is one trip per day type.
|
|
68
|
+
This is where we match the trips to their day type
|
|
69
|
+
|
|
70
|
+
## transport_factors
|
|
71
|
+
|
|
72
|
+
### road_types
|
|
73
|
+
|
|
74
|
+
### weights
|
|
75
|
+
|
|
76
|
+
## weather
|
|
77
|
+
|
|
78
|
+
## charging
|
|
79
|
+
|
|
80
|
+
## plots
|
|
81
|
+
|
|
82
|
+
## files
|
|
83
|
+
|
|
84
|
+
## maps
|
|
85
|
+
|
|
86
|
+
## colors
|
|
87
|
+
|
|
88
|
+
## color_bars
|
|
89
|
+
|
|
90
|
+
## unit_conversion
|
|
91
|
+
|
|
92
|
+
## time
|
|
93
|
+
|
|
94
|
+
## numbers
|
|
@@ -189,8 +189,9 @@ mix = [0.8, 0.2]
|
|
|
189
189
|
|
|
190
190
|
[legs.bus_from_route_start_to_route_end]
|
|
191
191
|
vehicle = 'bus'
|
|
192
|
-
distance =
|
|
193
|
-
duration = 0.
|
|
192
|
+
distance = 13 # km
|
|
193
|
+
duration = 0.66 # hours
|
|
194
|
+
# Bus 28 in The Hague has a 40 minute route that is about 10-15 km (value chosen to be close to 90_000 kilometers per year)
|
|
194
195
|
# This factor adds a correction to the vehicle consumption that depends
|
|
195
196
|
# on the hour in day (the first is for 00:00 to 00:59,
|
|
196
197
|
# the last for 23:00 to 23:59). Note that these are actual hours,
|
|
@@ -217,8 +218,9 @@ mix = [0.8, 0.2]
|
|
|
217
218
|
|
|
218
219
|
[legs.bus_from_route_end_to_route_start]
|
|
219
220
|
vehicle = 'bus'
|
|
220
|
-
distance =
|
|
221
|
-
duration = 0.
|
|
221
|
+
distance = 13 # km
|
|
222
|
+
duration = 0.66 # hours
|
|
223
|
+
# Bus 28 in The Hague has a 40 minute route that is about 10-15 km (value chosen to be close to 90_000 kilometers per year)
|
|
222
224
|
# This factor adds a correction to the vehicle consumption that depends
|
|
223
225
|
# on the hour in day (the first is for 00:00 to 00:59,
|
|
224
226
|
# the last for 23:00 to 23:59). Note that these are actual hours,
|
|
@@ -244,20 +246,27 @@ mix = [0.8, 0.2]
|
|
|
244
246
|
|
|
245
247
|
|
|
246
248
|
|
|
249
|
+
|
|
247
250
|
[vehicle]
|
|
248
251
|
name = 'bus'
|
|
249
252
|
base_location = 'bus_depot' # not relevant for cars
|
|
250
|
-
yearly_kilometrage =
|
|
253
|
+
yearly_kilometrage = 90_000
|
|
254
|
+
# https://www.ebusco.com/wp-content/uploads/Website_Brochure_NL_V1-4.pdf
|
|
251
255
|
# Not relevant for cars, as it is built bottom-up
|
|
252
256
|
kilometers_column_for_consumption = 'Arrivals'
|
|
253
257
|
use_weighted = false
|
|
254
|
-
battery_capacity =
|
|
258
|
+
battery_capacity = 500 # kWh
|
|
259
|
+
# https://www.ebusco.com/wp-content/uploads/Website_Brochure_NL_V1-4.pdf
|
|
255
260
|
solar_panel_size_kWp = 0 # kWp
|
|
256
261
|
[vehicle.base_consumption_per_km]
|
|
257
|
-
electricity_kWh = 0.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
262
|
+
electricity_kWh = 0.76
|
|
263
|
+
# https://www.ebusco.com/wp-content/uploads/Website_Brochure_NL_V1-4.pdf
|
|
264
|
+
# Others scaled accroding to cars
|
|
265
|
+
gasoline_litres = 0.3399
|
|
266
|
+
diesel_litres = 0.2917
|
|
267
|
+
hydrogen_kg = 0.0398
|
|
268
|
+
CNG_kg = 0.2415
|
|
269
|
+
LNG_kg = 0.2415
|
|
261
270
|
|
|
262
271
|
[trips]
|
|
263
272
|
|
|
@@ -268,18 +277,14 @@ legs = [
|
|
|
268
277
|
'bus_from_route_start_to_route_end',
|
|
269
278
|
'bus_from_route_end_to_route_start',
|
|
270
279
|
'bus_from_route_start_to_depot',
|
|
271
|
-
'bus_from_depot_to_route_start',
|
|
272
|
-
'bus_from_route_start_to_route_end',
|
|
273
|
-
'bus_from_route_end_to_route_start',
|
|
274
|
-
'bus_from_route_start_to_depot',
|
|
275
280
|
]
|
|
276
|
-
time_between_legs = [0, 0.
|
|
281
|
+
time_between_legs = [0, 0.1, 0]
|
|
277
282
|
|
|
278
283
|
# This is the time spent at each interim location (same units as used
|
|
279
284
|
# general
|
|
280
285
|
percentage_station_users = 0
|
|
281
286
|
start_probabilities = [
|
|
282
|
-
0, 0, 0.
|
|
287
|
+
0, 0.5, 0.5, 0, 0, 0, 0, 0,
|
|
283
288
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
284
289
|
0, 0, 0, 0, 0, 0, 0, 0
|
|
285
290
|
] # Start at day start hour
|
|
@@ -287,8 +292,8 @@ repeated_sequence = [
|
|
|
287
292
|
'bus_from_route_start_to_route_end',
|
|
288
293
|
'bus_from_route_end_to_route_start'
|
|
289
294
|
]
|
|
290
|
-
repetition_amounts = [
|
|
291
|
-
time_between_repetitions = [0.1
|
|
295
|
+
repetition_amounts = [9]
|
|
296
|
+
time_between_repetitions = [0.1] # hours
|
|
292
297
|
|
|
293
298
|
[trips.bus_weekend_in_workweek]
|
|
294
299
|
vehicle = 'bus'
|
|
@@ -297,17 +302,14 @@ legs = [
|
|
|
297
302
|
'bus_from_route_start_to_route_end',
|
|
298
303
|
'bus_from_route_end_to_route_start',
|
|
299
304
|
'bus_from_route_start_to_depot',
|
|
300
|
-
'bus_from_depot_to_route_start',
|
|
301
|
-
'bus_from_route_start_to_route_end',
|
|
302
|
-
'bus_from_route_end_to_route_start',
|
|
303
|
-
'bus_from_route_start_to_depot',
|
|
304
305
|
]
|
|
305
|
-
time_between_legs = [0, 0.
|
|
306
|
+
time_between_legs = [0, 0.1, 0]
|
|
307
|
+
|
|
306
308
|
# This is the time spent at each interim location (same units as used
|
|
307
309
|
# general
|
|
308
310
|
percentage_station_users = 0
|
|
309
311
|
start_probabilities = [
|
|
310
|
-
0, 0
|
|
312
|
+
0, 0.25, 0.5, 0.25, 0, 0, 0, 0,
|
|
311
313
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
312
314
|
0, 0, 0, 0, 0, 0, 0, 0
|
|
313
315
|
] # Start at day start hour
|
|
@@ -315,8 +317,8 @@ repeated_sequence = [
|
|
|
315
317
|
'bus_from_route_start_to_route_end',
|
|
316
318
|
'bus_from_route_end_to_route_start'
|
|
317
319
|
]
|
|
318
|
-
repetition_amounts = [
|
|
319
|
-
time_between_repetitions = [0.1
|
|
320
|
+
repetition_amounts = [7]
|
|
321
|
+
time_between_repetitions = [0.1] # hours
|
|
320
322
|
|
|
321
323
|
|
|
322
324
|
[trips.bus_weekday_in_holiday_week]
|
|
@@ -326,18 +328,14 @@ legs = [
|
|
|
326
328
|
'bus_from_route_start_to_route_end',
|
|
327
329
|
'bus_from_route_end_to_route_start',
|
|
328
330
|
'bus_from_route_start_to_depot',
|
|
329
|
-
'bus_from_depot_to_route_start',
|
|
330
|
-
'bus_from_route_start_to_route_end',
|
|
331
|
-
'bus_from_route_end_to_route_start',
|
|
332
|
-
'bus_from_route_start_to_depot',
|
|
333
331
|
]
|
|
334
|
-
time_between_legs = [0, 0.
|
|
332
|
+
time_between_legs = [0, 0.1, 0]
|
|
335
333
|
|
|
336
334
|
# This is the time spent at each interim location (same units as used
|
|
337
335
|
# general
|
|
338
336
|
percentage_station_users = 0
|
|
339
337
|
start_probabilities = [
|
|
340
|
-
0, 0, 0.
|
|
338
|
+
0, 0.25, 0.75, 0, 0, 0, 0, 0,
|
|
341
339
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
342
340
|
0, 0, 0, 0, 0, 0, 0, 0
|
|
343
341
|
] # Start at day start hour
|
|
@@ -345,8 +343,8 @@ repeated_sequence = [
|
|
|
345
343
|
'bus_from_route_start_to_route_end',
|
|
346
344
|
'bus_from_route_end_to_route_start'
|
|
347
345
|
]
|
|
348
|
-
repetition_amounts = [
|
|
349
|
-
time_between_repetitions = [0.
|
|
346
|
+
repetition_amounts = [8]
|
|
347
|
+
time_between_repetitions = [0.1] # hours
|
|
350
348
|
|
|
351
349
|
[trips.bus_weekend_in_holiday_week]
|
|
352
350
|
vehicle = 'bus'
|
|
@@ -355,17 +353,14 @@ legs = [
|
|
|
355
353
|
'bus_from_route_start_to_route_end',
|
|
356
354
|
'bus_from_route_end_to_route_start',
|
|
357
355
|
'bus_from_route_start_to_depot',
|
|
358
|
-
'bus_from_depot_to_route_start',
|
|
359
|
-
'bus_from_route_start_to_route_end',
|
|
360
|
-
'bus_from_route_end_to_route_start',
|
|
361
|
-
'bus_from_route_start_to_depot',
|
|
362
356
|
]
|
|
363
|
-
time_between_legs = [0, 0.
|
|
357
|
+
time_between_legs = [0, 0.1, 0]
|
|
358
|
+
|
|
364
359
|
# This is the time spent at each interim location (same units as used
|
|
365
360
|
# general
|
|
366
361
|
percentage_station_users = 0
|
|
367
362
|
start_probabilities = [
|
|
368
|
-
0, 0
|
|
363
|
+
0, 0.25, 0.5, 0.25, 0, 0, 0, 0,
|
|
369
364
|
0, 0, 0, 0, 0, 0, 0, 0,
|
|
370
365
|
0, 0, 0, 0, 0, 0, 0, 0
|
|
371
366
|
] # Start at day start hour
|
|
@@ -373,8 +368,8 @@ repeated_sequence = [
|
|
|
373
368
|
'bus_from_route_start_to_route_end',
|
|
374
369
|
'bus_from_route_end_to_route_start'
|
|
375
370
|
]
|
|
376
|
-
repetition_amounts = [
|
|
377
|
-
time_between_repetitions = [0.1
|
|
371
|
+
repetition_amounts = [7]
|
|
372
|
+
time_between_repetitions = [0.1] # hours
|
|
378
373
|
|
|
379
374
|
|
|
380
375
|
# These parameters are used for the ChaProEV mobility module
|
|
@@ -406,10 +406,13 @@ use_weighted = false
|
|
|
406
406
|
battery_capacity = 80 # kWh
|
|
407
407
|
solar_panel_size_kWp = 0 # kWp
|
|
408
408
|
[vehicle.base_consumption_per_km]
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
409
|
+
# https://www.autoweek.nl/verbruiksmonitor/
|
|
410
|
+
electricity_kWh = 0.1451
|
|
411
|
+
gasoline_litres = 0.0649
|
|
412
|
+
diesel_litres = 0.0557
|
|
413
|
+
hydrogen_kg = 0.0076
|
|
414
|
+
LPG_litres = 0.092
|
|
415
|
+
CNG_kg = 0.0461
|
|
413
416
|
|
|
414
417
|
[trips]
|
|
415
418
|
[trips.commute_to_work]
|
|
@@ -113,8 +113,8 @@ time_modulation_factors = [
|
|
|
113
113
|
# etc.
|
|
114
114
|
[legs.truck_to_customer]
|
|
115
115
|
vehicle = 'truck'
|
|
116
|
-
distance =
|
|
117
|
-
duration =
|
|
116
|
+
distance = 42 # km # To get to about 91_000 km per year
|
|
117
|
+
duration = 1 # hours
|
|
118
118
|
# This factor adds a correction to the vehicle consumption that depends
|
|
119
119
|
# on the hour in day (the first is for 00:00 to 00:59,
|
|
120
120
|
# the last for 23:00 to 23:59). Note that these are actual hours,
|
|
@@ -139,8 +139,8 @@ end = 'truck_customer'
|
|
|
139
139
|
mix = [0.8, 0.2]
|
|
140
140
|
[legs.truck_to_hub]
|
|
141
141
|
vehicle = 'truck'
|
|
142
|
-
distance =
|
|
143
|
-
duration =
|
|
142
|
+
distance = 42 # km # To get to about 91_000 km per year
|
|
143
|
+
duration = 1 # hours
|
|
144
144
|
# This factor adds a correction to the vehicle consumption that depends
|
|
145
145
|
# on the hour in day (the first is for 00:00 to 00:59,
|
|
146
146
|
# the last for 23:00 to 23:59). Note that these are actual hours,
|
|
@@ -164,22 +164,28 @@ end = 'truck_hub'
|
|
|
164
164
|
# road_types = ['highway', 'city']
|
|
165
165
|
mix = [0.8, 0.2]
|
|
166
166
|
|
|
167
|
+
|
|
167
168
|
[vehicle]
|
|
168
169
|
|
|
169
170
|
name = 'truck'
|
|
170
171
|
base_location = 'truck_hub' # not relevant for cars
|
|
171
|
-
yearly_kilometrage =
|
|
172
|
+
yearly_kilometrage = 91_250
|
|
173
|
+
# 250 km per day https://www.agendalaadinfrastructuur.nl/ondersteuning+gemeenten/documenten+en+links/documenten+in+bibliotheek/handlerdownloadfiles.ashx?idnv=2547592#:~:text=Op%20dit%20moment%20gebruikt%20een,dieselvrachtwagen%20(Mobilyze%2C%202023).
|
|
172
174
|
# Not relevant for cars, as it is built bottom-up
|
|
173
175
|
kilometers_column_for_consumption = 'Arrivals'
|
|
174
176
|
use_weighted = false
|
|
175
|
-
battery_capacity =
|
|
177
|
+
battery_capacity = 540 # kWh
|
|
178
|
+
# https://www.volvotrucks.com/en-en/news-stories/press-releases/2022/jan/volvos-heavy-duty-electric-truck-is-put-to-the-test-excels-in-both-range-and-energy-efficiency.html
|
|
176
179
|
solar_panel_size_kWp = 0 # kWp
|
|
177
180
|
[vehicle.base_consumption_per_km]
|
|
178
|
-
electricity_kWh = 0.
|
|
179
|
-
gasoline_litres = 0.
|
|
180
|
-
diesel_litres = 0.
|
|
181
|
-
hydrogen_kg = 0.
|
|
182
|
-
|
|
181
|
+
electricity_kWh = 0.1451
|
|
182
|
+
gasoline_litres = 0.0649
|
|
183
|
+
diesel_litres = 0.0557
|
|
184
|
+
hydrogen_kg = 0.0076
|
|
185
|
+
CNG_kg = 0.0461
|
|
186
|
+
LNG_kg = 0.0461
|
|
187
|
+
|
|
188
|
+
|
|
183
189
|
[trips]
|
|
184
190
|
|
|
185
191
|
[trips.truck_weekday]
|
|
@@ -114,7 +114,7 @@ time_modulation_factors = [
|
|
|
114
114
|
# etc.
|
|
115
115
|
[legs.van_to_customer]
|
|
116
116
|
vehicle = 'van'
|
|
117
|
-
distance =
|
|
117
|
+
distance = 2.6 # km # Chosen to match 18_000 km per year
|
|
118
118
|
duration = 0.25 # hours
|
|
119
119
|
# This factor adds a correction to the vehicle consumption that depends
|
|
120
120
|
# on the hour in day (the first is for 00:00 to 00:59,
|
|
@@ -140,7 +140,7 @@ end = 'van_customer'
|
|
|
140
140
|
mix = [0.8, 0.2]
|
|
141
141
|
[legs.van_to_base]
|
|
142
142
|
vehicle = 'van'
|
|
143
|
-
distance =
|
|
143
|
+
distance = 2.6 # km # Chosen to match 18_000 km per year
|
|
144
144
|
duration = 0.25 # hours
|
|
145
145
|
# This factor adds a correction to the vehicle consumption that depends
|
|
146
146
|
# on the hour in day (the first is for 00:00 to 00:59,
|
|
@@ -165,23 +165,23 @@ end = 'van_base'
|
|
|
165
165
|
# road_types = ['highway', 'city']
|
|
166
166
|
mix = [0.8, 0.2]
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
168
|
[vehicle]
|
|
172
169
|
name = 'van'
|
|
173
170
|
base_location = 'van_base' # not relevant for cars
|
|
174
|
-
yearly_kilometrage =
|
|
171
|
+
yearly_kilometrage = 18_000
|
|
172
|
+
# https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-bestelautos
|
|
175
173
|
# Not relevant for cars, as it is built bottom-up
|
|
176
174
|
kilometers_column_for_consumption = 'Arrivals'
|
|
177
175
|
use_weighted = false
|
|
178
176
|
battery_capacity = 80 # kWh
|
|
179
177
|
solar_panel_size_kWp = 0 # kWp
|
|
180
178
|
[vehicle.base_consumption_per_km]
|
|
181
|
-
electricity_kWh = 0.
|
|
182
|
-
gasoline_litres = 0.
|
|
183
|
-
diesel_litres = 0.
|
|
184
|
-
hydrogen_kg = 0.
|
|
179
|
+
electricity_kWh = 0.1451
|
|
180
|
+
gasoline_litres = 0.0649
|
|
181
|
+
diesel_litres = 0.0557
|
|
182
|
+
hydrogen_kg = 0.0076
|
|
183
|
+
LPG_litres = 0.092
|
|
184
|
+
CNG_kg = 0.0461
|
|
185
185
|
|
|
186
186
|
[trips]
|
|
187
187
|
[trips.van_weekday]
|
|
@@ -211,7 +211,7 @@ repeated_sequence = [
|
|
|
211
211
|
'van_to_customer',
|
|
212
212
|
'van_to_base',
|
|
213
213
|
]
|
|
214
|
-
repetition_amounts = [
|
|
214
|
+
repetition_amounts = [3, 1, 1, 1]
|
|
215
215
|
time_between_repetitions = [0.1, 1, 0.1, 1] # hours
|
|
216
216
|
|
|
217
217
|
[trips.van_weekend]
|
|
@@ -241,7 +241,7 @@ repeated_sequence = [
|
|
|
241
241
|
'van_to_customer',
|
|
242
242
|
'van_to_base',
|
|
243
243
|
]
|
|
244
|
-
repetition_amounts = [
|
|
244
|
+
repetition_amounts = [1, 1, 1, 1]
|
|
245
245
|
time_between_repetitions = [0.1, 2, 0.1, 2] # hours
|
|
246
246
|
|
|
247
247
|
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Author: Omar Usmani (Omar.Usmani@TNO.nl)
|
|
3
|
+
This is where you run the model
|
|
4
|
+
'''
|
|
5
|
+
|
|
6
|
+
import typing as ty
|
|
7
|
+
from itertools import repeat
|
|
8
|
+
from multiprocessing import Pool
|
|
9
|
+
|
|
10
|
+
import tqdm
|
|
11
|
+
from box import Box
|
|
12
|
+
from ETS_CookBook import ETS_CookBook as cook
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
import writing # type: ignore
|
|
16
|
+
|
|
17
|
+
# We need to ignore the type because mypy has its own search path for
|
|
18
|
+
# imports and does not resolve imports exactly as Python does and it
|
|
19
|
+
# isn't able to find the module.
|
|
20
|
+
# https://stackoverflow.com/questions/68695851/mypy-cannot-find-implementation-or-library-stub-for-module
|
|
21
|
+
except ModuleNotFoundError:
|
|
22
|
+
from ChaProEV import writing # type: ignore
|
|
23
|
+
# So that it works both as a standalone (1st) and as a package (2nd)
|
|
24
|
+
# We need to add to type: ignore thing to avoid MypY thinking
|
|
25
|
+
# we are importing again
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
try:
|
|
29
|
+
import make_variants # type: ignore
|
|
30
|
+
|
|
31
|
+
# We need to ignore the type because mypy has its own search path for
|
|
32
|
+
# imports and does not resolve imports exactly as Python does and it
|
|
33
|
+
# isn't able to find the module.
|
|
34
|
+
# https://stackoverflow.com/questions/68695851/mypy-cannot-find-implementation-or-library-stub-for-module
|
|
35
|
+
except ModuleNotFoundError:
|
|
36
|
+
from ChaProEV import make_variants # type: ignore
|
|
37
|
+
# So that it works both as a standalone (1st) and as a package (2nd)
|
|
38
|
+
# We need to add to type: ignore thing to avoid MypY thinking
|
|
39
|
+
# we are importing again
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
try:
|
|
43
|
+
import profiles # type: ignore
|
|
44
|
+
|
|
45
|
+
# We need to ignore the type because mypy has its own search path for
|
|
46
|
+
# imports and does not resolve imports exactly as Python does and it
|
|
47
|
+
# isn't able to find the module.
|
|
48
|
+
# https://stackoverflow.com/questions/68695851/mypy-cannot-find-implementation-or-library-stub-for-module
|
|
49
|
+
except ModuleNotFoundError:
|
|
50
|
+
from ChaProEV import profiles # type: ignore
|
|
51
|
+
# So that it works both as a standalone (1st) and as a package (2nd)
|
|
52
|
+
# We need to add to type: ignore thing to avoid MypY thinking
|
|
53
|
+
# we are importing again
|
|
54
|
+
|
|
55
|
+
try:
|
|
56
|
+
import scenarios_module # type: ignore
|
|
57
|
+
|
|
58
|
+
# We need to ignore the type because mypy has its own search path for
|
|
59
|
+
# imports and does not resolve imports exactly as Python does and it
|
|
60
|
+
# isn't able to find the module.
|
|
61
|
+
# https://stackoverflow.com/questions/68695851/mypy-cannot-find-implementation-or-library-stub-for-module
|
|
62
|
+
except ModuleNotFoundError:
|
|
63
|
+
from ChaProEV import scenarios_module # type: ignore
|
|
64
|
+
# So that it works both as a standalone (1st) and as a package (2nd)
|
|
65
|
+
# We need to add to type: ignore thing to avoid MypY thinking
|
|
66
|
+
# we are importing again
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@cook.function_timer
|
|
70
|
+
def run_ChaProEV(case_name: str) -> None:
|
|
71
|
+
general_parameters_file_name: str = 'ChaProEV.toml'
|
|
72
|
+
general_parameters: Box = Box(
|
|
73
|
+
cook.parameters_from_TOML(general_parameters_file_name)
|
|
74
|
+
)
|
|
75
|
+
output_root: str = general_parameters.files.output_root
|
|
76
|
+
cook.check_if_folder_exists(f'{output_root}/{case_name}')
|
|
77
|
+
variant_parameters: Box = general_parameters.variants
|
|
78
|
+
use_variants: bool = variant_parameters.use_variants
|
|
79
|
+
if use_variants:
|
|
80
|
+
csv_version: bool = variant_parameters.csv_version
|
|
81
|
+
make_variants.make_variants(case_name, csv_version)
|
|
82
|
+
|
|
83
|
+
scenarios: ty.List[Box] = scenarios_module.load_scenarios(case_name)
|
|
84
|
+
|
|
85
|
+
set_amount_of_processes: bool = (
|
|
86
|
+
general_parameters.parallel_processing.set_amount_of_processes
|
|
87
|
+
)
|
|
88
|
+
if set_amount_of_processes:
|
|
89
|
+
amount_of_parallel_processes: int | None = None
|
|
90
|
+
else:
|
|
91
|
+
amount_of_parallel_processes = (
|
|
92
|
+
general_parameters.parallel_processing.amount_for_scenarios
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
pool_inputs: ty.Iterator[ty.Tuple[Box, str, Box]] | ty.Any = zip(
|
|
96
|
+
scenarios, repeat(case_name), repeat(general_parameters)
|
|
97
|
+
)
|
|
98
|
+
# the ty.Any alternative is there because transforming it with the
|
|
99
|
+
# progress bar makes mypy think it change is type
|
|
100
|
+
progress_bars_parameters: Box = general_parameters.progress_bars
|
|
101
|
+
display_scenario_run: bool = progress_bars_parameters.display_scenario_run
|
|
102
|
+
scenario_run_description: str = (
|
|
103
|
+
progress_bars_parameters.scenario_run_description
|
|
104
|
+
)
|
|
105
|
+
if display_scenario_run:
|
|
106
|
+
pool_inputs = tqdm.tqdm(
|
|
107
|
+
pool_inputs,
|
|
108
|
+
desc=scenario_run_description,
|
|
109
|
+
total=len(scenarios),
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
with Pool(amount_of_parallel_processes) as scenarios_pool:
|
|
113
|
+
scenarios_pool.starmap(scenarios_module.run_scenario, pool_inputs)
|
|
114
|
+
|
|
115
|
+
do_car_home_type_split: bool = (
|
|
116
|
+
general_parameters.home_type.do_car_home_type_split
|
|
117
|
+
)
|
|
118
|
+
if do_car_home_type_split:
|
|
119
|
+
profiles.car_home_parking(case_name, general_parameters)
|
|
120
|
+
|
|
121
|
+
writing.extra_end_outputs(case_name, general_parameters)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if __name__ == '__main__':
|
|
125
|
+
# This is a case name, which is the grouping of all your scenarios.
|
|
126
|
+
# This is principally used to label your output files.
|
|
127
|
+
case_name = 'Mopo'
|
|
128
|
+
|
|
129
|
+
run_ChaProEV(case_name)
|
|
130
|
+
|
|
131
|
+
# print('Add sessions into next day')
|
|
132
|
+
# print('Iterate through sessions and send remainder to next session')
|
|
133
|
+
# print('Compute session first pass')
|
|
134
|
+
# print('Do a second compute with passthrough')
|
|
135
|
+
# print('Convert session-basec charge to profile')
|
|
136
|
+
# print('Have parameter that shifts within a session?')
|
|
137
|
+
# print('Do kilometers/consumption split for sessions?')
|
|
138
|
+
# print('Do effetive session end andthen a match between the approaches')
|
|
139
|
+
# print('Make profile DF (with all) from sessions version')
|
|
140
|
+
# print('Make fleet version')
|
|
141
|
+
# print('Compare profiles')
|
|
142
|
+
# Add actual stop time (if using full power)
|
|
143
|
+
# Then infer profiles
|
|
144
|
+
# DO this in a sperate DF that will be used to compare
|
|
145
|
+
# COnnectivity: does the groupneed to be smaller?
|
|
146
|
+
# Also somehow include legs from before that did not charge because
|
|
147
|
+
# of connectivity
|
|
148
|
+
# Base profile is spread according to partial arrivals.
|
|
@@ -557,7 +557,6 @@ def get_travelling_group_travel_impact(
|
|
|
557
557
|
percent_in_first_slot = 1 + percent_in_first_slot
|
|
558
558
|
|
|
559
559
|
if travelling_group_first_slot + 2 >= HOURS_IN_A_DAY:
|
|
560
|
-
|
|
561
560
|
print('Trip extending beyond day end. Check your entry')
|
|
562
561
|
exit()
|
|
563
562
|
|
|
@@ -583,10 +582,9 @@ def get_travelling_group_travel_impact(
|
|
|
583
582
|
if percent_in_first_slot <= 0:
|
|
584
583
|
travelling_group_first_slot += 1
|
|
585
584
|
percent_in_first_slot = 1 + percent_in_first_slot
|
|
586
|
-
|
|
587
585
|
if travelling_group_first_slot + 2 >= HOURS_IN_A_DAY:
|
|
588
|
-
|
|
589
586
|
print('Trip extending beyond day end. Check your entry')
|
|
587
|
+
print('dddd')
|
|
590
588
|
exit()
|
|
591
589
|
|
|
592
590
|
return mobility_matrix
|
|
@@ -1069,7 +1067,6 @@ class Trip:
|
|
|
1069
1067
|
first_leg: str = trip.legs[0]
|
|
1070
1068
|
initial_location: str = scenario.legs[first_leg].locations.start
|
|
1071
1069
|
trip.location_split[initial_location] = 1
|
|
1072
|
-
|
|
1073
1070
|
trip.location_split, trip.mobility_matrix = (
|
|
1074
1071
|
get_location_split_and_impact_of_departures_and_arrivals(
|
|
1075
1072
|
trip.location_names,
|