Allow for including trade input file
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the linked suggestion and the proposed trade.csv schema in this issue. Trace how commodity levies are read and stored, then determine where trade relationships and separate import/export levies should be built; done means supporting the stated year, region, levy, and overlap-error rules.
Written by the indexing model from the issue text.
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:
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.
- Dominant language
- Rust
- Stars
- 8
- Forks
- 5
- Avg merge
- 11h 31m
- Merged PRs (30d)
- 33
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EnergySystemsModellingLab/MUSE2
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
EnergySystemsModellingLab/MUSE2#1367 · 1 comment ·
-
Remove the `ironing out iteration 0` prefix from debug files when the ironing out loop is turned off Openmuse xiii question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
EnergySystemsModellingLab/MUSE2#1221 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
EnergySystemsModellingLab/MUSE2#1554 ·
-
bug
EnergySystemsModellingLab/MUSE2#1541 · 2 comments · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
EnergySystemsModellingLab/MUSE2#1526 ·
All issues in EnergySystemsModellingLab/MUSE2
Similar issues
-
bug CLI custom-model
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
Difficulty 2/5 1-3 hours Newbie friendliness 75/100