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

Updates Result Summaries #219

Merged
merged 30 commits into from
Nov 19, 2024
Merged

Updates Result Summaries #219

merged 30 commits into from
Nov 19, 2024

Conversation

trevorb1
Copy link
Member

@trevorb1 trevorb1 commented Oct 28, 2024

Description

Migrates from the the old results summary to new format; does not change the logic. Replaces the old node discount cost with updated result from otoole.

NOTE: We can not merge this until otoole 1.1.4 is released.

Issue Ticket Number

na

Documentation

na

@trevorb1 trevorb1 marked this pull request as ready for review November 13, 2024 21:43
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps on Monday you can walk me through how the values in TradeFlows.csv are derived. Takes me a bit too much time right now to figure that out:)

Copy link
Collaborator

@maartenbrinkerink maartenbrinkerink Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add domestic and international transmission flows as separate entries? E.g. NODE_1 and NODE_2 could be CANXX, 'USAXX' and 'CANXX', 'CANXX' for domestic flows. Note that for domestic flows negative values should first be turned positive and summed after.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally! This remained unchanged from how they were calculated before (ie. it used @abhishek0208's implementation)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add capacities at the country level (simple sum by tech)?

Copy link
Collaborator

@maartenbrinkerink maartenbrinkerink Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add domestic and international transmission capacities as separate entries? E.g. FROM and TO could be 'CANXX`, 'USAXX' and 'CANXX', 'CANXX' for domestic capacities. In the current setup international transmission capacities will already be reported at nodal level, but there are often multiple nodes that import/export from/to the same international node (e.g. multiple nodes between CAN & USA).

Copy link
Member Author

@trevorb1 trevorb1 Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe both of these points have been solved in this commit now! I will do a double check that the international trading is working correctly in the morning with a more robust example.

@maartenbrinkerink
Copy link
Collaborator

maartenbrinkerink commented Nov 14, 2024

@trevorb1 This looks good! Two fixes should be made first I think (changing storage exclusions dynamically and making sure that RENEWABLE filters are in line) with some other suggestions provided (e.g. country level results).

@trevorb1
Copy link
Member Author

Thanks for the detailed feedback, @maartenbrinkerink! I believe most of your comments have now been addressed! One note, I (sorta) reverted your change of adding DiscountedOperatingCost to the missing otoole files list. Ended up being a typo as it should be Operational instead of Operating. Corrected in this commit.

@maartenbrinkerink
Copy link
Collaborator

@trevorb1 I can't run the workflow at the moment. MissingOutputException occurs on my end for a numer of parameters (see below).

image

For the below this can be solved by adding them to missing in the snakefile (not sure if that is the correct approach) but when trying to apply this to "DiscountedCostByStorage" the run still fails as the parameter is called in the calculate_costs rule but doesn't exist. I see that there is a try/except FileExistsError in node_costs.py but perhaps this is not functioning as it should?


"AnnualTechnologyEmissionsPenalty",
"CapitalInvestmentStorage",
"DiscountedCapitalInvestmentStorage",
"DiscountedSalvageValueStorage",  

@trevorb1
Copy link
Member Author

Thanks for flagging those errors, @maartenbrinkerink! I have:

  • Updated the emission intensity to use production with transmission and storage to be removed (pulling storage names from the config file)
  • Corrected issues resulting in failed workflows if storage/emission penalties are not included. This involved add the files you mentioned to the list of missing otoole files, with the exception of AnnualTechnologyEmissionsPenalty. This isnt a supported calculation (as only discounted emission penalty values are supported). That was my fault for not catching it when I merged otoole config file updates for v1.1.4. I have removed this from the otoole config file.

@trevorb1
Copy link
Member Author

trevorb1 commented Nov 19, 2024

Okay. I feel like this should work now!

  • DiscountedCostByStorage was added to the missing files list to avoid snakemake errors (I guess this will happen if no storage exists in the system?) - following your suggestion @maartenbrinkerink.
  • The exception handling in the summary costs.py file was changed from FileExistsError to FileNotFoundError. That was my fault for putting in the wrong error thrown by .read_csv(...) if the file does not exist

@maartenbrinkerink maartenbrinkerink merged commit 69ef3ac into master Nov 19, 2024
0 of 6 checks passed
@maartenbrinkerink maartenbrinkerink deleted the summaries branch November 20, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants