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

[Bug]: Example systems with electrolyzers not properly configured #759

Closed
joe-rodden1 opened this issue Aug 23, 2024 · 13 comments
Closed

[Bug]: Example systems with electrolyzers not properly configured #759

joe-rodden1 opened this issue Aug 23, 2024 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@joe-rodden1
Copy link

Bug description

The inputs for the example systems (2 and 8) with electrolyzers do not appear properly configured for the latest code. The input files will not run at all as configured due to a missing Electrolyzer_Min_kt column in the Electrolyzer.csv files. Even after fixing these, the cases do not appear to be running properly. I'm either getting no electrolysis built (even when testing very low annual cost assumptions and high selling prices) or the cases are not solving at all (I unfortunately do not have CPLEX or Gurobi to check conflicts).

I wish I could provide more useful info but am pretty new to using this. I wonder if a set of new input files can be uploaded which are confirmed to work with the latest code.

Environment and Version

MacOS, Julia 1.10, main branch v0.4.1

Relevant error messages

No response

Additional context

No response

@joe-rodden1 joe-rodden1 added the bug Something isn't working label Aug 23, 2024
@lbonaldo
Copy link
Collaborator

Hi @joe-rodden1, thank you for opening this issue. I’m happy to help you troubleshoot this. Could you please double-check the GenX version you're running? Here are some steps you can follow:

$ julia --project=<path/to/env/with/GenX>
julia> Type `]` to bring up the package system
pkg> st

@lbonaldo lbonaldo self-assigned this Aug 23, 2024
@joe-rodden1
Copy link
Author

joe-rodden1 commented Aug 23, 2024 via email

@lbonaldo
Copy link
Collaborator

Could you please also share the error message together with the stacktrace?

@joe-rodden1
Copy link
Author

joe-rodden1 commented Aug 23, 2024 via email

@lbonaldo
Copy link
Collaborator

@joe-rodden1, unfortunately, I haven't received the files yet.
However, I checked the examples, and they seem to be working correctly. I think I was able to reproduce the error by running GenX <= v0.4.0 with the new examples. The Electrolyzer_Min_kt column in the Electrolyzer.csv file has been removed because GenX now retrieves that value from the Hydrogen_demand.csv policy file (you can see an example here).
Could you please let me know how you're running GenX?

@joe-rodden1
Copy link
Author

joe-rodden1 commented Aug 23, 2024 via email

@lbonaldo
Copy link
Collaborator

The command julia Run.jl runs the Run.jl script (and therefore GenX) using the base Julia environment. You can verify this by running:

$ julia
pkg> status

Therefore, an easy fix would be to check (and if necessary, update) GenX in this environment by running:

$ julia
pkg> add/update GenX

However, my recommendation is to create a new Julia environment inside a folder you’re using to run the cases:

$ julia --project=.     # <---- This runs Julia within the environment defined in the current folder "."
pkg> add GenX   # Or use `pkg> update GenX` if needed

To run GenX installed in that environment, simply use the --project flag with the Julia command:

$ julia --project=. </path/to/Run.jl>

f you’re running multiple tests, I also suggest executing the cases within the same Julia REPL session using the include function:

$ julia --project=.
julia> include("/path/to/Run.jl")
julia> include("/path/to/Run2.jl")

In this way, the packages will be compiled within the same REPL, leading to improved performance.

https://genxproject.github.io/GenX.jl/dev/Getting_Started/examples_casestudies/#Example-cases

@joe-rodden1
Copy link
Author

joe-rodden1 commented Aug 24, 2024 via email

@qluo0320github
Copy link
Collaborator

Hi @joe-rodden1, did you see those weird results from GenX example cases? If so, can you share the modified inputs you are using? I do not think changing costs assumptions would result in "no solution". Did you find your model infeasible? If so, can you add "ComputeConflicts: 1" to genx_settings.yml get the conflicts? Also, making the hydrogen price in Electrolyzer.csv higher and the investment cost lower does not necessarily lead to more electrolyzer capacity built because electrolyzers are built to meet hydrogen demand. Only when hydrogen prices are high enough that it has net revenue, the system may choose to build more electrolyzer capacity than what is needed to meet hydrogen demand.

@joe-rodden1
Copy link
Author

joe-rodden1 commented Aug 26, 2024 via email

@joe-rodden1
Copy link
Author

joe-rodden1 commented Aug 27, 2024 via email

@qluo0320github
Copy link
Collaborator

qluo0320github commented Aug 27, 2024 via email

@lbonaldo
Copy link
Collaborator

Thank you, @joe-rodden1, for opening this issue! I'm glad to hear the examples are running fine. I'll go ahead and close this issue as resolved for now.

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

No branches or pull requests

3 participants