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

MC ignoring first input variable? #192

Open
softwareengineerprogrammer opened this issue Apr 30, 2024 · 2 comments
Open

MC ignoring first input variable? #192

softwareengineerprogrammer opened this issue Apr 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@softwareengineerprogrammer
Copy link
Collaborator

Per user:

I found a bug though (it took me a while to figure this out b/c it looks like it’s working fine with multiple INPUT lines). The program does not use the first row with an INPUT in the MC_GEOPHIRES_Settings_file.txt.

For example (below): it will read the INPUT row, it will sample the Gradient 1 distribution properly, but it will not use this Gradient 1 distribution for the 10 iterations. Because it thinks they are no inputs, it will use the same value included in the GEOPHIRES-x input file for the 10 iterations (so min=mean=max etc.).

INPUT, Gradient 1, triangular, 36, 41, 44

OUTPUT, Average Net Electricity Production

OUTPUT, Electricity breakeven price

ITERATIONS, 10

If I copy the input line twice (below): it will read both INPUT rows, it will sample the Gradient 1 distribution twice (distinct distributions), but it will only use the second Gradient 1 distribution for the 10 iterations.

INPUT, Gradient 1, triangular, 36, 41, 44

INPUT, Gradient 1, triangular, 36, 41, 44

OUTPUT, Average Net Electricity Production

OUTPUT, Electricity breakeven price

ITERATIONS, 10

It looks to me like an indexation issue in the MC INPUT[ ] variable.

@softwareengineerprogrammer softwareengineerprogrammer added the bug Something isn't working label Apr 30, 2024
@softwareengineerprogrammer softwareengineerprogrammer changed the title MC ignoring first input? MC ignoring first input variable? Apr 30, 2024
softwareengineerprogrammer added a commit to softwareengineerprogrammer/GEOPHIRES-X that referenced this issue Apr 30, 2024
@softwareengineerprogrammer
Copy link
Collaborator Author

I wasn't able to repro this, but added a unit test to ensure there's not a regression: a8dfbff

@softwareengineerprogrammer
Copy link
Collaborator Author

Seeing intermittent failure in unit test, possible repro depends on race condition or specific random values: https://github.com/NREL/GEOPHIRES-X/actions/runs/8898562672/job/24435967890?pr=193

softwareengineerprogrammer referenced this issue in softwareengineerprogrammer/GEOPHIRES-X Apr 30, 2024
…#issuecomment-2086009787 for now - appears to experience intermittent failures in GH Actions
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

1 participant