Skip to content

Commit

Permalink
Mopo case sudy first run
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar-Usmani committed Dec 19, 2024
1 parent b41f4a3 commit 07a550e
Show file tree
Hide file tree
Showing 1,176 changed files with 3,312,920 additions and 52 deletions.
4 changes: 2 additions & 2 deletions ChaProEV.toml
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ sessions_values_columns = [
]

[sessions]
produce = false
generate_profiles = false
produce = true
generate_profiles = true
[standard_profiles]
produce = true

Expand Down
33 changes: 33 additions & 0 deletions Mopo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import shutil
import typing as ty

import pandas as pd
from ChaProEV import ChaProEV
from ETS_CookBook import ETS_CookBook as cook

Expand All @@ -28,9 +29,41 @@ def copy_select_files(case_name: str) -> None:
)


def rename_files_with_country_codes(case_name: str) -> None:
select_output_folder: str = f'select_output/{case_name}/'
country_codes: pd.DataFrame = pd.read_csv('country_codes.csv').set_index(
'Country'
)
print(country_codes.loc['United_Kingdom']['Code'])
for country_name in country_codes.index:
country_files: ty.List[str] = [
data_file
for data_file in os.listdir(select_output_folder)
if data_file.startswith(country_name)
]
country_files_with_code: ty.List[str] = [
country_file.replace(
country_name, country_codes.loc[country_name]['Code']
)
for country_file in country_files
]
for country_file, country_file_with_code in zip(
country_files, country_files_with_code
):
os.rename(
f'{select_output_folder}/{country_file}',
f'{select_output_folder}/{country_file_with_code}',
)


if __name__ == '__main__':
case_name: str = 'Mopo'
ChaProEV.run_ChaProEV(case_name)

copy_select_files(case_name)
rename_files_with_country_codes(case_name)
print(
' line 81 in car home parking needs an if sessions and '
'if generate profiles'
)
# test use profile from net * effective effiicency (replace errors by zeros)
31 changes: 31 additions & 0 deletions country_codes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Code,Country
AT,Austria
BE,Belgium
BG,Bulgaria
HR,Croatia
CY,Cyprus
CZ,Czechia
DK,Denmark
EE,Estonia
FI,Finland
FR,France
DE,Germany
GR,Greece
HU,Hungary
IE,Ireland
IT,Italy
LV,Latvia
LT,Lithuania
LU,Luxembourg
MT,Malta
NL,Netherlands
NO,Norway
PL,Poland
PT,Portugal
RO,Romania
SK,Slovakia
SI,Slovenia
ES,Spain
SE,Sweden
CH,Switzerland
UK,United_Kingdom
Binary file modified input/Mopo/Inputs for variants.xlsm
Binary file not shown.
96 changes: 90 additions & 6 deletions input/Mopo/car_own_driveway_percentage.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,91 @@
Variant name,own_driveway_percentage
Netherlands_urban_car_2030,0.1
Netherlands_semiurban_car_2030,0.6
Netherlands_rural_car_2030,0.9
Netherlands_urban_car_2050,0.1
Netherlands_semiurban_car_2050,0.6
Netherlands_rural_car_2050,0.9
Austria_car_2030,0.048
Belgium_car_2030,0.137
Bulgaria_car_2030,0.093
Croatia_car_2030,0.142
Cyprus_car_2030,0.311
Czechia_car_2030,0.052
Denmark_car_2030,0.119
Estonia_car_2030,0.113
Finland_car_2030,0.154
France_car_2030,0.21
Germany_car_2030,0.079
Greece_car_2030,0.048
Hungary_car_2030,0.126
Ireland_car_2030,0.301
Italy_car_2030,0.086
Latvia_car_2030,0.059
Lithuania_car_2030,0.056
Luxembourg_car_2030,0.049
Malta_car_2030,0.397
Netherlands_car_2030,0.369
Norway_car_2030,0.162
Poland_car_2030,0.078
Portugal_car_2030,0.153
Romania_car_2030,0.06
Slovakia_car_2030,0.031
Slovenia_car_2030,0.082
Spain_car_2030,0.079
Sweden_car_2030,0.142
Switzerland_car_2030,0.053
United_Kingdom_car_2030,0.469
Austria_car_2040,0.048
Belgium_car_2040,0.137
Bulgaria_car_2040,0.093
Croatia_car_2040,0.142
Cyprus_car_2040,0.311
Czechia_car_2040,0.052
Denmark_car_2040,0.119
Estonia_car_2040,0.113
Finland_car_2040,0.154
France_car_2040,0.21
Germany_car_2040,0.079
Greece_car_2040,0.048
Hungary_car_2040,0.126
Ireland_car_2040,0.301
Italy_car_2040,0.086
Latvia_car_2040,0.059
Lithuania_car_2040,0.056
Luxembourg_car_2040,0.049
Malta_car_2040,0.397
Netherlands_car_2040,0.369
Norway_car_2040,0.162
Poland_car_2040,0.078
Portugal_car_2040,0.153
Romania_car_2040,0.06
Slovakia_car_2040,0.031
Slovenia_car_2040,0.082
Spain_car_2040,0.079
Sweden_car_2040,0.142
Switzerland_car_2040,0.053
United_Kingdom_car_2040,0.469
Austria_car_2050,0.048
Belgium_car_2050,0.137
Bulgaria_car_2050,0.093
Croatia_car_2050,0.142
Cyprus_car_2050,0.311
Czechia_car_2050,0.052
Denmark_car_2050,0.119
Estonia_car_2050,0.113
Finland_car_2050,0.154
France_car_2050,0.21
Germany_car_2050,0.079
Greece_car_2050,0.048
Hungary_car_2050,0.126
Ireland_car_2050,0.301
Italy_car_2050,0.086
Latvia_car_2050,0.059
Lithuania_car_2050,0.056
Luxembourg_car_2050,0.049
Malta_car_2050,0.397
Netherlands_car_2050,0.369
Norway_car_2050,0.162
Poland_car_2050,0.078
Portugal_car_2050,0.153
Romania_car_2050,0.06
Slovakia_car_2050,0.031
Slovenia_car_2050,0.082
Spain_car_2050,0.079
Sweden_car_2050,0.142
Switzerland_car_2050,0.053
United_Kingdom_car_2050,0.469
Loading

0 comments on commit 07a550e

Please sign in to comment.