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

H2 Storage incorrect set names #57

Closed
shakesy94 opened this issue Sep 14, 2022 · 5 comments
Closed

H2 Storage incorrect set names #57

shakesy94 opened this issue Sep 14, 2022 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@shakesy94
Copy link
Collaborator

shakesy94 commented Sep 14, 2022

https://github.com/MacroEnergyProject/DOLPHYN-dev/blob/1a8c3bf3dfd92c82aca1a37546f9e66d2726dbd8/src/HSC/model/storage/h2_storage_all.jl#L142

this constraints indexes over H2_STOR_SHORT_DURATION, this should be H2_STOR_LONG_DURATION instead. Moreover, the H2_STOR_LONG_DURATION is not defined. Instead the following line at the beginning of the function should be added H2_STOR_LONG_DURATION = inputs["H2_STOR_LONG_DURATION"]

Additionally, incorrect set names in https://github.com/MacroEnergyProject/DOLPHYN-dev/blob/1a8c3bf3dfd92c82aca1a37546f9e66d2726dbd8/src/HSC/model/storage/h2_long_duration_storage.jl#L98 and https://github.com/MacroEnergyProject/DOLPHYN-dev/blob/1a8c3bf3dfd92c82aca1a37546f9e66d2726dbd8/src/HSC/model/storage/h2_long_duration_storage.jl#L102

Should be H2_STOR_LONG_DURATION instead of STOR_LONG_DURATION

@shakesy94 shakesy94 added bug Something isn't working good first issue Good for newcomers labels Sep 14, 2022
@shakesy94
Copy link
Collaborator Author

@dharik13 could be add to the PR that you already have open. Requires 2 line changes. Otherwise, I can pull a PR and merge it when you merge yours.

@shakesy94 shakesy94 changed the title h2_stor incorrect variable name H2 Storage inccorect set names Sep 14, 2022
@shakesy94 shakesy94 changed the title H2 Storage inccorect set names H2 Storage incorrect set names Sep 14, 2022
@dharik13
Copy link
Collaborator

@shakesy94 thanks for catching these errors. One note, the constraint H2SoCBalStart in h2_storage_all.jl should index over all resources belonging to H2_STOR_SHORT_DURATION (and not H2_STOR_LONG_DURATION as you suggested). The if conditions checks whether the representative weeks are being modeled and if the H2_STOR_LONG_DURATION is non-empty. If yes, then we apply the constraints only to those technologies part of H2_STOR_SHORT_DURATION, else we apply them to set H2_STOR_ALL. I made the edit to H2-storage-module-edits and will push it to the PR

@shakesy94
Copy link
Collaborator Author

Ohh okay, in this case, should we also check if H2_STOR_SHORT_DURATION is not empty in the if statement? If operation wrapping is on and long duration storage is not empty and short duration storage is empty, the statement will execute and return an error.

@dharik13
Copy link
Collaborator

dharik13 commented Sep 14, 2022

@shakesy94 Good point on checking for H2_STOR_SHORT_DURATION. Resolved in this pull request 55: #55

@dharik13
Copy link
Collaborator

Resolved in TDR 55: #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants