EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE2

Allow for including trade input file

Open
#1,306 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Rust
Stars
8
Forks
5
Avg merge
1d 2m
Merged PRs (30d)
37

Description

We probably want this to be broadly like @tsmbland's suggestion here: https://github.com/EnergySystemsModellingLab/MUSE2/issues/523#issuecomment-4499524654

I don't think we should use the word "processes" in the file name. We can call these relationships "trade processes" among ourselves, but I think it might confuse users who aren't aware of the internal code structure. How about we just call this file `trade.csv`?

Here's what I personally think the file should look like, for the first implentation:

```csv
commodity_id,start_year,end_year,source_regions,destination_regions,import_levy,export_levy
COAL,,,UK,FRA,1,0
```

There are a few extra features compared to Tom's initial suggestion:

- You can limit the trade relationship to a specified year range (or omit, meaning all milestone years)
- You can specify multiple source and destination regions (if you put either as `all`, we obvs wouldn't apply these properties to regions "trading" with themselves)
- You can have different levies for import/export

I think the way we should implement this is by building up maps of trade relationships as we go through the CSV file, line by line and storing import/export levies separately (as we do for commodity levies). If two entries overlap in commodity, milestone year, source region, destination region and whether its an import or export levy, then we give an error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.