ChaProEV 1.0.0__tar.gz → 1.0.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.0.0 → chaproev-1.0.2}/ChaProEV.toml +2 -1
- {chaproev-1.0.0 → chaproev-1.0.2}/PKG-INFO +12 -12
- {chaproev-1.0.0 → chaproev-1.0.2}/pyproject.toml +1 -1
- {chaproev-1.0.0 → chaproev-1.0.2}/requirements.txt +11 -11
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/ChaProEV.py +3 -2
- chaproev-1.0.2/src/ChaProEV/make_variants.py +139 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/PKG-INFO +12 -12
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/SOURCES.txt +2 -2
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/requires.txt +11 -11
- chaproev-1.0.2/variants/Mopo/XX_car.csv +4 -0
- chaproev-1.0.0/ETS_CookBook-1.0.30-py3-none-any.whl +0 -0
- chaproev-1.0.0/src/ChaProEV/make_variants.py +0 -72
- {chaproev-1.0.0 → chaproev-1.0.2}/.flake8 +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/.gitignore +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/.vscode/ltex.dictionary.en-US.txt +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/.vscode/settings.json +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/ChaProEV.pptx +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/Gemfile +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/LICENCE +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/MOPO_logo_chaproev on wht.svg +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/MOPO_logo_chaproev.png +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/MOPO_logo_chaproev.svg +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/MOPO_logo_main.svg +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/MOPO_logo_main_onwhite.svg +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/README.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/comparisons/comparison_template.toml +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/Makefile +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/README.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/Vehicle_Temperature_correction_factor.svg +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/_config.yml +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/doctrees/environment.pickle +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/doctrees/index.doctree +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/.buildinfo +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_sources/index.rst.txt +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/alabaster.css +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/basic.css +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/custom.css +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/doctools.js +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/documentation_options.js +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/file.png +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/language_data.js +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/minus.png +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/plus.png +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/pygments.css +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/searchtools.js +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/_static/sphinx_highlight.js +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/genindex.html +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/index.html +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/objects.inv +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/search.html +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/build/html/searchindex.js +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/charging.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/consumption.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/define.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/index.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/make.bat +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/mobility.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/scenario.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/source/index.rst +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/using.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/docs/weather.md +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/eu-emblem-low-res.jpg +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/mkdocs.yml +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/scenarios/Mopo/XX_bus.toml +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/scenarios/Mopo/XX_car.toml +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/scenarios/Mopo/XX_truck.toml +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/scenarios/Mopo/XX_van.toml +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/scenarios/local_impact_BEVs/baseline.toml +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/setup.cfg +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/__init__.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/charging.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/consumption.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/define.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/mobility.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/py.typed +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/run_time.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/weather.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV/writing.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/PKG-INFO-PC-28624 +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/PKG-INFO-PC-28624-2 +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/SOURCES-PC-28624-2.txt +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/SOURCES-PC-28624.txt +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/dependency_links.txt +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/requires-PC-28624-2.txt +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/requires-PC-28624.txt +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/src/ChaProEV.egg-info/top_level.txt +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/tests/test_battery_space.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/tests/test_same_output.py +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/todo.txt +0 -0
- {chaproev-1.0.0 → chaproev-1.0.2}/variants/Mopo.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ChaProEV
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: ChaProEV: Charging Profiles of Electric Vehicles
|
|
5
5
|
Author-email: Omar Usmani <Omar.Usmani@TNO.nl>
|
|
6
6
|
Project-URL: Homepage, https://github.com/TNO/ChaProEV
|
|
@@ -10,12 +10,12 @@ Classifier: Operating System :: OS Independent
|
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENCE
|
|
13
|
-
Requires-Dist: attrs==
|
|
13
|
+
Requires-Dist: attrs==23.2.0
|
|
14
14
|
Requires-Dist: beautifulsoup4==4.12.3
|
|
15
15
|
Requires-Dist: black==24.10.0
|
|
16
|
-
Requires-Dist: build==1.2.
|
|
17
|
-
Requires-Dist: cads-api-client==1.
|
|
18
|
-
Requires-Dist: cdsapi==0.7.
|
|
16
|
+
Requires-Dist: build==1.2.1
|
|
17
|
+
Requires-Dist: cads-api-client==1.1.0
|
|
18
|
+
Requires-Dist: cdsapi==0.7.0
|
|
19
19
|
Requires-Dist: certifi==2024.6.2
|
|
20
20
|
Requires-Dist: charset-normalizer==3.3.2
|
|
21
21
|
Requires-Dist: click==8.1.7
|
|
@@ -25,6 +25,7 @@ Requires-Dist: cycler==0.12.1
|
|
|
25
25
|
Requires-Dist: docutils==0.21.2
|
|
26
26
|
Requires-Dist: docx==0.2.4
|
|
27
27
|
Requires-Dist: et-xmlfile==1.1.0
|
|
28
|
+
Requires-Dist: ETS_CookBook==1.0.31
|
|
28
29
|
Requires-Dist: fonttools==4.53.0
|
|
29
30
|
Requires-Dist: geopandas==1.0.1
|
|
30
31
|
Requires-Dist: ghp-import==2.1.0
|
|
@@ -59,7 +60,7 @@ Requires-Dist: pandas-stubs==2.2.2.240603
|
|
|
59
60
|
Requires-Dist: pathspec==0.12.1
|
|
60
61
|
Requires-Dist: pillow==10.4.0
|
|
61
62
|
Requires-Dist: pip-review==1.3.0
|
|
62
|
-
Requires-Dist: pkginfo==1.
|
|
63
|
+
Requires-Dist: pkginfo==1.10.0
|
|
63
64
|
Requires-Dist: platformdirs==4.2.2
|
|
64
65
|
Requires-Dist: plotly==5.22.0
|
|
65
66
|
Requires-Dist: pluggy==1.5.0
|
|
@@ -80,16 +81,15 @@ Requires-Dist: requests==2.32.3
|
|
|
80
81
|
Requires-Dist: requests-toolbelt==1.0.0
|
|
81
82
|
Requires-Dist: rfc3986==2.0.0
|
|
82
83
|
Requires-Dist: rich==13.7.1
|
|
83
|
-
Requires-Dist: setuptools==
|
|
84
|
+
Requires-Dist: setuptools==70.2.0
|
|
84
85
|
Requires-Dist: shapely==2.0.4
|
|
85
86
|
Requires-Dist: six==1.16.0
|
|
86
|
-
Requires-Dist: soupsieve==2.
|
|
87
|
+
Requires-Dist: soupsieve==2.5
|
|
87
88
|
Requires-Dist: tenacity==8.4.2
|
|
88
89
|
Requires-Dist: toml==0.10.2
|
|
89
|
-
Requires-Dist: tqdm==4.66.
|
|
90
|
-
Requires-Dist:
|
|
91
|
-
Requires-Dist: types-
|
|
92
|
-
Requires-Dist: types-html5lib==1.1.11.20240806
|
|
90
|
+
Requires-Dist: tqdm==4.66.4
|
|
91
|
+
Requires-Dist: types-beautifulsoup4==4.12.0.20240511
|
|
92
|
+
Requires-Dist: types-html5lib==1.1.11.20240228
|
|
93
93
|
Requires-Dist: types-openpyxl==3.1.5.20240630
|
|
94
94
|
Requires-Dist: types-pytz==2024.1.0.20240417
|
|
95
95
|
Requires-Dist: types-requests==2.32.0.20240622
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
attrs==
|
|
1
|
+
attrs==23.2.0
|
|
2
2
|
beautifulsoup4==4.12.3
|
|
3
3
|
black==24.10.0
|
|
4
|
-
build==1.2.
|
|
5
|
-
cads-api-client==1.
|
|
6
|
-
cdsapi==0.7.
|
|
4
|
+
build==1.2.1
|
|
5
|
+
cads-api-client==1.1.0
|
|
6
|
+
cdsapi==0.7.0
|
|
7
7
|
certifi==2024.6.2
|
|
8
8
|
charset-normalizer==3.3.2
|
|
9
9
|
click==8.1.7
|
|
@@ -13,6 +13,7 @@ cycler==0.12.1
|
|
|
13
13
|
docutils==0.21.2
|
|
14
14
|
docx==0.2.4
|
|
15
15
|
et-xmlfile==1.1.0
|
|
16
|
+
ETS_CookBook==1.0.31
|
|
16
17
|
fonttools==4.53.0
|
|
17
18
|
geopandas==1.0.1
|
|
18
19
|
ghp-import==2.1.0
|
|
@@ -47,7 +48,7 @@ pandas-stubs==2.2.2.240603
|
|
|
47
48
|
pathspec==0.12.1
|
|
48
49
|
pillow==10.4.0
|
|
49
50
|
pip-review==1.3.0
|
|
50
|
-
pkginfo==1.
|
|
51
|
+
pkginfo==1.10.0
|
|
51
52
|
platformdirs==4.2.2
|
|
52
53
|
plotly==5.22.0
|
|
53
54
|
pluggy==1.5.0
|
|
@@ -68,16 +69,15 @@ requests==2.32.3
|
|
|
68
69
|
requests-toolbelt==1.0.0
|
|
69
70
|
rfc3986==2.0.0
|
|
70
71
|
rich==13.7.1
|
|
71
|
-
setuptools==
|
|
72
|
+
setuptools==70.2.0
|
|
72
73
|
shapely==2.0.4
|
|
73
74
|
six==1.16.0
|
|
74
|
-
soupsieve==2.
|
|
75
|
+
soupsieve==2.5
|
|
75
76
|
tenacity==8.4.2
|
|
76
77
|
toml==0.10.2
|
|
77
|
-
tqdm==4.66.
|
|
78
|
-
|
|
79
|
-
types-
|
|
80
|
-
types-html5lib==1.1.11.20240806
|
|
78
|
+
tqdm==4.66.4
|
|
79
|
+
types-beautifulsoup4==4.12.0.20240511
|
|
80
|
+
types-html5lib==1.1.11.20240228
|
|
81
81
|
types-openpyxl==3.1.5.20240630
|
|
82
82
|
types-pytz==2024.1.0.20240417
|
|
83
83
|
types-requests==2.32.0.20240622
|
|
@@ -95,9 +95,10 @@ def run_ChaProEV(case_name: str) -> None:
|
|
|
95
95
|
general_parameters_file_name
|
|
96
96
|
)
|
|
97
97
|
cook.check_if_folder_exists(f'output/{case_name}')
|
|
98
|
-
use_variants = general_parameters['use_variants']
|
|
98
|
+
use_variants = general_parameters['variants']['use_variants']
|
|
99
99
|
if use_variants:
|
|
100
|
-
|
|
100
|
+
csv_version = general_parameters['variants']['csv_version']
|
|
101
|
+
make_variants.make_variants(case_name, csv_version)
|
|
101
102
|
for scenario_file in os.listdir(f'scenarios/{case_name}'):
|
|
102
103
|
# To avoid issues if some files are not configuration files
|
|
103
104
|
if scenario_file.split('.')[1] == 'toml':
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import typing as ty
|
|
3
|
+
|
|
4
|
+
import pandas as pd
|
|
5
|
+
import toml
|
|
6
|
+
from ETS_CookBook import ETS_CookBook as cook
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def make_variants(case_name: str, csv_version: bool = True) -> None:
|
|
10
|
+
|
|
11
|
+
if csv_version:
|
|
12
|
+
make_csv_variants(case_name)
|
|
13
|
+
else:
|
|
14
|
+
make_toml_variants(case_name)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def make_csv_variants(case_name: str) -> None:
|
|
18
|
+
'''
|
|
19
|
+
This uses a csv, with commas as separators.
|
|
20
|
+
If you want to put a list as a value, do it as such:
|
|
21
|
+
"[1, 2.5, 5]"
|
|
22
|
+
(with the quotes: note that this is not necessary in Excel, where you can
|
|
23
|
+
just put the list with brackets without the quotes)
|
|
24
|
+
'''
|
|
25
|
+
|
|
26
|
+
variant_files_folder: str = f'variants/{case_name}/'
|
|
27
|
+
variant_files: ty.List[str] = os.listdir(variant_files_folder)
|
|
28
|
+
for variant_file in variant_files:
|
|
29
|
+
|
|
30
|
+
reference_scenario_name: str = variant_file.split('.')[0]
|
|
31
|
+
|
|
32
|
+
reference_scenario: ty.Dict = cook.parameters_from_TOML(
|
|
33
|
+
f'scenarios/{case_name}/{reference_scenario_name}.toml'
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
variant_data: pd.DataFrame = pd.read_csv(
|
|
37
|
+
f'{variant_files_folder}/{variant_file}'
|
|
38
|
+
).set_index('Variant name')
|
|
39
|
+
|
|
40
|
+
variant_names: ty.List[str] = list(variant_data.index)
|
|
41
|
+
|
|
42
|
+
for variant_name in variant_names:
|
|
43
|
+
|
|
44
|
+
variant_scenario: ty.Dict = reference_scenario.copy()
|
|
45
|
+
|
|
46
|
+
for quantity_string in variant_data.columns:
|
|
47
|
+
|
|
48
|
+
variant_name_list = quantity_string.split('.')
|
|
49
|
+
variant_value = variant_data.loc[variant_name][quantity_string]
|
|
50
|
+
|
|
51
|
+
if isinstance(variant_value, float):
|
|
52
|
+
variant_value = float(variant_value)
|
|
53
|
+
elif variant_value.startswith('['):
|
|
54
|
+
variant_value = variant_value.replace('[', '')
|
|
55
|
+
variant_value = variant_value.replace(']', '')
|
|
56
|
+
variant_value = variant_value.split(',')
|
|
57
|
+
variant_value = [
|
|
58
|
+
float(value_item) for value_item in variant_value
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
cook.set_nested_value(
|
|
62
|
+
variant_scenario, variant_name_list, variant_value
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
with open(
|
|
66
|
+
f'scenarios/{case_name}/{variant_name}.toml',
|
|
67
|
+
'w',
|
|
68
|
+
encoding='utf-8',
|
|
69
|
+
) as file_to_write:
|
|
70
|
+
toml.dump(variant_scenario, file_to_write)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def make_toml_variants(case_name: str) -> None:
|
|
74
|
+
variant_configuration: ty.Dict = cook.parameters_from_TOML(
|
|
75
|
+
f'variants/{case_name}.toml'
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
for reference_scenario_name in variant_configuration[
|
|
79
|
+
'reference_scenarios'
|
|
80
|
+
]:
|
|
81
|
+
reference_scenario: ty.Dict = cook.parameters_from_TOML(
|
|
82
|
+
f'scenarios/{case_name}/{reference_scenario_name}.toml'
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
variant_names: ty.List[str] = variant_configuration[
|
|
86
|
+
'reference_scenarios'
|
|
87
|
+
][reference_scenario_name]['variants']
|
|
88
|
+
|
|
89
|
+
variant_scenarios: ty.Dict[str, ty.Dict] = {}
|
|
90
|
+
for variant_name in variant_names:
|
|
91
|
+
variant_scenarios[variant_name] = reference_scenario.copy()
|
|
92
|
+
|
|
93
|
+
modified_parameters: ty.Dict = variant_configuration[
|
|
94
|
+
'reference_scenarios'
|
|
95
|
+
][reference_scenario_name]['modified_parameters']
|
|
96
|
+
|
|
97
|
+
modified_parameters_names: ty.List[ty.List[str]] = []
|
|
98
|
+
|
|
99
|
+
for modified_parameter in modified_parameters:
|
|
100
|
+
this_modification_names: ty.List[str] = [modified_parameter]
|
|
101
|
+
next_step_in_modification = modified_parameters[modified_parameter]
|
|
102
|
+
next_level: str = list(next_step_in_modification.keys())[0]
|
|
103
|
+
while next_level not in variant_names:
|
|
104
|
+
|
|
105
|
+
this_modification_names.append(next_level)
|
|
106
|
+
next_step_in_modification = next_step_in_modification[
|
|
107
|
+
next_level
|
|
108
|
+
]
|
|
109
|
+
next_level = list(next_step_in_modification.keys())[0]
|
|
110
|
+
|
|
111
|
+
modified_parameters_names.append(this_modification_names)
|
|
112
|
+
|
|
113
|
+
for modified_parameter_names in modified_parameters_names:
|
|
114
|
+
for variant_name in variant_names:
|
|
115
|
+
variant_scenario = variant_scenarios[variant_name]
|
|
116
|
+
|
|
117
|
+
variant_nested_keys: ty.List[str] = (
|
|
118
|
+
modified_parameter_names + [variant_name]
|
|
119
|
+
)
|
|
120
|
+
modified_value = cook.get_nested_value(
|
|
121
|
+
modified_parameters, variant_nested_keys
|
|
122
|
+
)
|
|
123
|
+
cook.set_nested_value(
|
|
124
|
+
variant_scenario, modified_parameter_names, modified_value
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
for variant_name in variant_names:
|
|
128
|
+
with open(
|
|
129
|
+
f'scenarios/{case_name}/{variant_name}.toml',
|
|
130
|
+
'w',
|
|
131
|
+
encoding='utf-8',
|
|
132
|
+
) as file_to_write:
|
|
133
|
+
toml.dump(variant_scenarios[variant_name], file_to_write)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
if __name__ == '__main__':
|
|
137
|
+
case_name = 'Mopo'
|
|
138
|
+
csv_version = True
|
|
139
|
+
make_variants(case_name, csv_version)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ChaProEV
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: ChaProEV: Charging Profiles of Electric Vehicles
|
|
5
5
|
Author-email: Omar Usmani <Omar.Usmani@TNO.nl>
|
|
6
6
|
Project-URL: Homepage, https://github.com/TNO/ChaProEV
|
|
@@ -10,12 +10,12 @@ Classifier: Operating System :: OS Independent
|
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENCE
|
|
13
|
-
Requires-Dist: attrs==
|
|
13
|
+
Requires-Dist: attrs==23.2.0
|
|
14
14
|
Requires-Dist: beautifulsoup4==4.12.3
|
|
15
15
|
Requires-Dist: black==24.10.0
|
|
16
|
-
Requires-Dist: build==1.2.
|
|
17
|
-
Requires-Dist: cads-api-client==1.
|
|
18
|
-
Requires-Dist: cdsapi==0.7.
|
|
16
|
+
Requires-Dist: build==1.2.1
|
|
17
|
+
Requires-Dist: cads-api-client==1.1.0
|
|
18
|
+
Requires-Dist: cdsapi==0.7.0
|
|
19
19
|
Requires-Dist: certifi==2024.6.2
|
|
20
20
|
Requires-Dist: charset-normalizer==3.3.2
|
|
21
21
|
Requires-Dist: click==8.1.7
|
|
@@ -25,6 +25,7 @@ Requires-Dist: cycler==0.12.1
|
|
|
25
25
|
Requires-Dist: docutils==0.21.2
|
|
26
26
|
Requires-Dist: docx==0.2.4
|
|
27
27
|
Requires-Dist: et-xmlfile==1.1.0
|
|
28
|
+
Requires-Dist: ETS_CookBook==1.0.31
|
|
28
29
|
Requires-Dist: fonttools==4.53.0
|
|
29
30
|
Requires-Dist: geopandas==1.0.1
|
|
30
31
|
Requires-Dist: ghp-import==2.1.0
|
|
@@ -59,7 +60,7 @@ Requires-Dist: pandas-stubs==2.2.2.240603
|
|
|
59
60
|
Requires-Dist: pathspec==0.12.1
|
|
60
61
|
Requires-Dist: pillow==10.4.0
|
|
61
62
|
Requires-Dist: pip-review==1.3.0
|
|
62
|
-
Requires-Dist: pkginfo==1.
|
|
63
|
+
Requires-Dist: pkginfo==1.10.0
|
|
63
64
|
Requires-Dist: platformdirs==4.2.2
|
|
64
65
|
Requires-Dist: plotly==5.22.0
|
|
65
66
|
Requires-Dist: pluggy==1.5.0
|
|
@@ -80,16 +81,15 @@ Requires-Dist: requests==2.32.3
|
|
|
80
81
|
Requires-Dist: requests-toolbelt==1.0.0
|
|
81
82
|
Requires-Dist: rfc3986==2.0.0
|
|
82
83
|
Requires-Dist: rich==13.7.1
|
|
83
|
-
Requires-Dist: setuptools==
|
|
84
|
+
Requires-Dist: setuptools==70.2.0
|
|
84
85
|
Requires-Dist: shapely==2.0.4
|
|
85
86
|
Requires-Dist: six==1.16.0
|
|
86
|
-
Requires-Dist: soupsieve==2.
|
|
87
|
+
Requires-Dist: soupsieve==2.5
|
|
87
88
|
Requires-Dist: tenacity==8.4.2
|
|
88
89
|
Requires-Dist: toml==0.10.2
|
|
89
|
-
Requires-Dist: tqdm==4.66.
|
|
90
|
-
Requires-Dist:
|
|
91
|
-
Requires-Dist: types-
|
|
92
|
-
Requires-Dist: types-html5lib==1.1.11.20240806
|
|
90
|
+
Requires-Dist: tqdm==4.66.4
|
|
91
|
+
Requires-Dist: types-beautifulsoup4==4.12.0.20240511
|
|
92
|
+
Requires-Dist: types-html5lib==1.1.11.20240228
|
|
93
93
|
Requires-Dist: types-openpyxl==3.1.5.20240630
|
|
94
94
|
Requires-Dist: types-pytz==2024.1.0.20240417
|
|
95
95
|
Requires-Dist: types-requests==2.32.0.20240622
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
.gitignore
|
|
3
3
|
ChaProEV.pptx
|
|
4
4
|
ChaProEV.toml
|
|
5
|
-
ETS_CookBook-1.0.30-py3-none-any.whl
|
|
6
5
|
Gemfile
|
|
7
6
|
LICENCE
|
|
8
7
|
MOPO_logo_chaproev on wht.svg
|
|
@@ -83,4 +82,5 @@ src/ChaProEV.egg-info/requires.txt
|
|
|
83
82
|
src/ChaProEV.egg-info/top_level.txt
|
|
84
83
|
tests/test_battery_space.py
|
|
85
84
|
tests/test_same_output.py
|
|
86
|
-
variants/Mopo.toml
|
|
85
|
+
variants/Mopo.toml
|
|
86
|
+
variants/Mopo/XX_car.csv
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
attrs==
|
|
1
|
+
attrs==23.2.0
|
|
2
2
|
beautifulsoup4==4.12.3
|
|
3
3
|
black==24.10.0
|
|
4
|
-
build==1.2.
|
|
5
|
-
cads-api-client==1.
|
|
6
|
-
cdsapi==0.7.
|
|
4
|
+
build==1.2.1
|
|
5
|
+
cads-api-client==1.1.0
|
|
6
|
+
cdsapi==0.7.0
|
|
7
7
|
certifi==2024.6.2
|
|
8
8
|
charset-normalizer==3.3.2
|
|
9
9
|
click==8.1.7
|
|
@@ -13,6 +13,7 @@ cycler==0.12.1
|
|
|
13
13
|
docutils==0.21.2
|
|
14
14
|
docx==0.2.4
|
|
15
15
|
et-xmlfile==1.1.0
|
|
16
|
+
ETS_CookBook==1.0.31
|
|
16
17
|
fonttools==4.53.0
|
|
17
18
|
geopandas==1.0.1
|
|
18
19
|
ghp-import==2.1.0
|
|
@@ -47,7 +48,7 @@ pandas-stubs==2.2.2.240603
|
|
|
47
48
|
pathspec==0.12.1
|
|
48
49
|
pillow==10.4.0
|
|
49
50
|
pip-review==1.3.0
|
|
50
|
-
pkginfo==1.
|
|
51
|
+
pkginfo==1.10.0
|
|
51
52
|
platformdirs==4.2.2
|
|
52
53
|
plotly==5.22.0
|
|
53
54
|
pluggy==1.5.0
|
|
@@ -68,16 +69,15 @@ requests==2.32.3
|
|
|
68
69
|
requests-toolbelt==1.0.0
|
|
69
70
|
rfc3986==2.0.0
|
|
70
71
|
rich==13.7.1
|
|
71
|
-
setuptools==
|
|
72
|
+
setuptools==70.2.0
|
|
72
73
|
shapely==2.0.4
|
|
73
74
|
six==1.16.0
|
|
74
|
-
soupsieve==2.
|
|
75
|
+
soupsieve==2.5
|
|
75
76
|
tenacity==8.4.2
|
|
76
77
|
toml==0.10.2
|
|
77
|
-
tqdm==4.66.
|
|
78
|
-
|
|
79
|
-
types-
|
|
80
|
-
types-html5lib==1.1.11.20240806
|
|
78
|
+
tqdm==4.66.4
|
|
79
|
+
types-beautifulsoup4==4.12.0.20240511
|
|
80
|
+
types-html5lib==1.1.11.20240228
|
|
81
81
|
types-openpyxl==3.1.5.20240630
|
|
82
82
|
types-pytz==2024.1.0.20240417
|
|
83
83
|
types-requests==2.32.0.20240622
|
|
Binary file
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import typing as ty
|
|
2
|
-
|
|
3
|
-
import toml
|
|
4
|
-
from ETS_CookBook import ETS_CookBook as cook
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def make_variants(scenario_name: str) -> None:
|
|
8
|
-
variant_configuration: ty.Dict = cook.parameters_from_TOML(
|
|
9
|
-
f'variants/{scenario_name}.toml'
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
for reference_scenario_name in variant_configuration[
|
|
13
|
-
'reference_scenarios'
|
|
14
|
-
]:
|
|
15
|
-
reference_scenario: ty.Dict = cook.parameters_from_TOML(
|
|
16
|
-
f'scenarios/{scenario_name}/{reference_scenario_name}.toml'
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
variant_names: ty.List[str] = variant_configuration[
|
|
20
|
-
'reference_scenarios'
|
|
21
|
-
][reference_scenario_name]['variants']
|
|
22
|
-
|
|
23
|
-
variant_scenarios: ty.Dict[str, ty.Dict] = {}
|
|
24
|
-
for variant_name in variant_names:
|
|
25
|
-
variant_scenarios[variant_name] = reference_scenario.copy()
|
|
26
|
-
|
|
27
|
-
modified_parameters: ty.Dict = variant_configuration[
|
|
28
|
-
'reference_scenarios'
|
|
29
|
-
][reference_scenario_name]['modified_parameters']
|
|
30
|
-
|
|
31
|
-
modified_parameters_names: ty.List[ty.List[str]] = []
|
|
32
|
-
|
|
33
|
-
for modified_parameter in modified_parameters:
|
|
34
|
-
this_modification_names: ty.List[str] = [modified_parameter]
|
|
35
|
-
next_step_in_modification = modified_parameters[modified_parameter]
|
|
36
|
-
next_level: str = list(next_step_in_modification.keys())[0]
|
|
37
|
-
while next_level not in variant_names:
|
|
38
|
-
|
|
39
|
-
this_modification_names.append(next_level)
|
|
40
|
-
next_step_in_modification = next_step_in_modification[
|
|
41
|
-
next_level
|
|
42
|
-
]
|
|
43
|
-
next_level = list(next_step_in_modification.keys())[0]
|
|
44
|
-
|
|
45
|
-
modified_parameters_names.append(this_modification_names)
|
|
46
|
-
|
|
47
|
-
for modified_parameter_names in modified_parameters_names:
|
|
48
|
-
for variant_name in variant_names:
|
|
49
|
-
variant_scenario = variant_scenarios[variant_name]
|
|
50
|
-
|
|
51
|
-
variant_nested_keys: ty.List[str] = (
|
|
52
|
-
modified_parameter_names + [variant_name]
|
|
53
|
-
)
|
|
54
|
-
modified_value = cook.get_nested_value(
|
|
55
|
-
modified_parameters, variant_nested_keys
|
|
56
|
-
)
|
|
57
|
-
cook.set_nested_value(
|
|
58
|
-
variant_scenario, modified_parameter_names, modified_value
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
for variant_name in variant_names:
|
|
62
|
-
with open(
|
|
63
|
-
f'scenarios/{scenario_name}/{variant_name}.toml',
|
|
64
|
-
'w',
|
|
65
|
-
encoding='utf-8',
|
|
66
|
-
) as file_to_write:
|
|
67
|
-
toml.dump(variant_scenarios[variant_name], file_to_write)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if __name__ == '__main__':
|
|
71
|
-
case_name = 'Mopo'
|
|
72
|
-
make_variants(case_name)
|
|
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
|