Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Romain #171

Merged
merged 51 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
dca20ea
added rail transport lci import
JonasKlimt Apr 18, 2024
98bcca4
additional rail freight transport LCIs
JonasKlimt Apr 18, 2024
7a5b10a
updated REMIND output files (now incl. detailed transport variables)
JonasKlimt Apr 18, 2024
811cb98
created transport variables mapping file (only rail transport so far)
JonasKlimt Apr 18, 2024
e460e80
added transport variables to the data collection (so far only rail fr…
JonasKlimt Apr 18, 2024
0445420
created base layout for new transport script
JonasKlimt Apr 18, 2024
f594da1
Fix import of train LCIs
Apr 19, 2024
eb76255
added transport logger
JonasKlimt Apr 24, 2024
13bdd4c
updated energy consumption
JonasKlimt Apr 24, 2024
b08b600
added _update_transport function
JonasKlimt Apr 24, 2024
59dafcd
Merge branch 'polca:master' into master
JonasKlimt Apr 24, 2024
8c553b7
replaced IAM files with new REMIND files (incl. transport variables)
JonasKlimt Apr 24, 2024
97160b9
updated REMIND file with all transport variables
JonasKlimt Apr 25, 2024
22df207
added a logger to track transport_efficiencies
JonasKlimt Apr 26, 2024
264bc67
new update transport script (work in progress)
JonasKlimt Apr 26, 2024
1586464
updated transport variable mapping (so far only for train)
JonasKlimt Apr 26, 2024
65c4661
Merge branch 'master' of https://github.com/JonasKlimt/premise_transport
JonasKlimt Apr 26, 2024
cc6c5be
all Iam variables are now in a list
JonasKlimt Apr 26, 2024
b1c6fc8
implemented transport efficiency adjustements
JonasKlimt Apr 26, 2024
e0827aa
added some loggers
JonasKlimt Apr 27, 2024
b96f04c
integrated rail transport into the update function (road freight stil…
JonasKlimt Apr 27, 2024
2622fec
added trucks (newly created lci datasheet)
JonasKlimt Apr 29, 2024
65f7b99
truck freight lci import added
JonasKlimt Apr 29, 2024
ac3c226
created two seperate freight transport variable mapping .yaml files
JonasKlimt Apr 30, 2024
8d3bd89
type corrected
JonasKlimt May 1, 2024
3a40087
new vehicle mapping file created (contains econvent to remind dataset…
JonasKlimt May 1, 2024
bdd32ca
implemented road freight transport (relink exchanges doesnt work yet …
JonasKlimt May 1, 2024
bd74ca4
changed lists/dicts in script into yaml file
JonasKlimt May 2, 2024
83a60a9
spelling mistake
JonasKlimt May 2, 2024
1a4d2be
corrected deleting function of old ecoinvent freight transport datasets
JonasKlimt May 2, 2024
a0064b2
finalized transport update script, issues with matrix not being squar…
JonasKlimt May 5, 2024
74a2831
corrected spelling for weight specific (unspecified powertrain) regio…
JonasKlimt May 6, 2024
0bd1b10
correction of information
JonasKlimt May 6, 2024
4dd6b57
added vehicle size specific world markets
JonasKlimt May 6, 2024
7720335
non-square matrix problem (more activites than products) resolved
JonasKlimt May 6, 2024
534403e
Merge branch 'master' of https://github.com/polca/premise
JonasKlimt May 7, 2024
3006338
adapted change of inventories battery cell
JonasKlimt May 7, 2024
d09c60a
lci-pass_cars adapted to last update from premise master (main), as p…
JonasKlimt May 7, 2024
2cb98af
finalized matching of activity exchanges and products
JonasKlimt May 7, 2024
38d3c76
cleaned up script
JonasKlimt May 8, 2024
82ca519
inserted transport validation
JonasKlimt May 8, 2024
ae2d642
Clean IAM data (remove non-numeric values, last column and unused var…
May 8, 2024
d199f7d
Clean IAM data (remove non-numeric values, last column and unused var…
May 8, 2024
92945e4
Add reporting of truck and rail transport to scenario report.
romainsacchi May 9, 2024
5008eae
Add variables and reporting of two-wheelers, cars and buses to scenar…
romainsacchi May 9, 2024
d19ad5c
Add logging of created and updated transport datasets
romainsacchi May 10, 2024
7cdbfe8
Fix issue with database loading/dumping
romainsacchi May 13, 2024
e382018
Fix issue with incorrect datasets for size-specific fleet average veh…
romainsacchi May 16, 2024
81b8e88
Fix fuel efficiency adjustment.
romainsacchi May 17, 2024
739942d
Clean YAML files.
romainsacchi Jun 9, 2024
4b24072
Add 2050 data points for PEMEL ad PEMFC for iridium and platinum
romainsacchi Jul 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,295 changes: 1,252 additions & 43 deletions dev/Untitled.ipynb

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions premise/activity_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
DATA_DIR / "GAINS_emission_factors" / "gains_ecoinvent_sectoral_mapping.yaml"
)
HEAT_TECHS = VARIABLES_DIR / "heat_variables.yaml"
PASSENGER_CARS = VARIABLES_DIR / "transport_passenger_cars_variables.yaml"
TWO_WHEELERS = VARIABLES_DIR / "transport_two_wheelers_variables.yaml"
BUSES = VARIABLES_DIR / "transport_bus_variables.yaml"
TRUCKS = VARIABLES_DIR / "transport_roadfreight_variables.yaml"
TRAINS = VARIABLES_DIR / "transport_railfreight_variables.yaml"


def get_mapping(filepath: Path, var: str, model: str = None) -> dict:
Expand Down Expand Up @@ -264,6 +269,60 @@ def generate_material_map(self) -> dict:
"""
return self.generate_sets_from_filters(self.materials_filters)

def generate_transport_map(self, transport_type: str) -> dict:
"""
Filter ecoinvent processes related to transport.
Rerurns a dictionary with transport type as keys (see below) and
a set of related ecoinvent activities' names as values.
"""
if transport_type == "car":
return self.generate_sets_from_filters(
get_mapping(filepath=PASSENGER_CARS, var="ecoinvent_aliases")
)
elif transport_type == "two-wheeler":
return self.generate_sets_from_filters(
get_mapping(filepath=TWO_WHEELERS, var="ecoinvent_aliases")
)
elif transport_type == "bus":
return self.generate_sets_from_filters(
get_mapping(filepath=BUSES, var="ecoinvent_aliases")
)
elif transport_type == "truck":
return self.generate_sets_from_filters(
get_mapping(filepath=TRUCKS, var="ecoinvent_aliases")
)
elif transport_type == "train":
return self.generate_sets_from_filters(
get_mapping(filepath=TRAINS, var="ecoinvent_aliases")
)

def generate_vehicle_fuel_map(self, transport_type: str) -> dict:
"""
Filter ecoinvent processes related to transport fuels.
Rerurns a dictionary with transport type as keys (see below) and
a set of related ecoinvent activities' names as values.
"""
if transport_type == "car":
return self.generate_sets_from_filters(
get_mapping(filepath=PASSENGER_CARS, var="ecoinvent_fuel_aliases")
)
elif transport_type == "two-wheeler":
return self.generate_sets_from_filters(
get_mapping(filepath=TWO_WHEELERS, var="ecoinvent_fuel_aliases")
)
elif transport_type == "bus":
return self.generate_sets_from_filters(
get_mapping(filepath=BUSES, var="ecoinvent_fuel_aliases")
)
elif transport_type == "truck":
return self.generate_sets_from_filters(
get_mapping(filepath=TRUCKS, var="ecoinvent_fuel_aliases")
)
elif transport_type == "train":
return self.generate_sets_from_filters(
get_mapping(filepath=TRAINS, var="ecoinvent_fuel_aliases")
)

def generate_sets_from_filters(self, filtr: dict, database=None) -> dict:
"""
Generate a dictionary with sets of activity names for
Expand Down
Binary file modified premise/data/additional_inventories/lci-buses.xlsx
Binary file not shown.
Binary file not shown.
Binary file modified premise/data/additional_inventories/lci-pass_cars.xlsx
Binary file not shown.
Binary file not shown.
Binary file modified premise/data/additional_inventories/lci-two_wheelers.xlsx
Binary file not shown.
Loading
Loading