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

Fix fuel cost calculation for non-hourly load data #453

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

Bill-Becker
Copy link
Collaborator

fuel_cost_per_kwh was erroneously being divided by time_steps_per_hour which is 2 for 30-minute interval and 4 for 15-minute interval loads. The fuel used/consumed calculation already accounts for time_steps_per_hour to get the correct energy used in each timestep, so we need the actual (input) fuel_cost_per_kwh to be preserved to multiply that with fuel used.

This PR avoids dividing fuel cost value by time_steps_per_hour.

@Bill-Becker Bill-Becker requested a review from bpulluta October 24, 2024 14:37
@bpulluta
Copy link
Collaborator

@Bill-Becker, you want me to add the tests we talked about to check that the hourly and subhourly results are the same? Or is that not neccessary?

@Bill-Becker
Copy link
Collaborator Author

@Bill-Becker, you want me to add the tests we talked about to check that the hourly and subhourly results are the same? Or is that not neccessary?

I think that's a good idea in case we don't have that test coverage already. Just do a simple (short solve time) scenario with Generator that runs and check that that the annual fuel cost is the same for both 15 or 30 minute and hourly.

@bpulluta
Copy link
Collaborator

@Bill-Becker, you want me to add the tests we talked about to check that the hourly and subhourly results are the same? Or is that not neccessary?

I think that's a good idea in case we don't have that test coverage already. Just do a simple (short solve time) scenario with Generator that runs and check that that the annual fuel cost is the same for both 15 or 30 minute and hourly.

@Bill-Becker Okay, added to the tests. Let me know if you'd like me to put it into a separate test section called Subhourly or something. Seems like you fixed the discrepancy with your solution

@Bill-Becker Bill-Becker deleted the fix-nonhourly-fuel-cost branch November 18, 2024 17:06
@bpulluta
Copy link
Collaborator

@Bill-Becker did this get integrated separately? Wondering if this was fixed elsewhere

@Bill-Becker
Copy link
Collaborator Author

@Bill-Becker did this get integrated separately? Wondering if this was fixed elsewhere

Hmmm. I vaguely remember you opened up a second PR and that one took precedence over the first one, but I don't know how it would have gotten fixed if neither were merged?!

@bpulluta
Copy link
Collaborator

@Bill-Becker this pr replaced the previous one that was deleted. We might need to open this and review. I approved this and is ready for merging after your review.

@Bill-Becker Bill-Becker restored the fix-nonhourly-fuel-cost branch December 19, 2024 20:09
@Bill-Becker Bill-Becker reopened this Dec 19, 2024
@Bill-Becker
Copy link
Collaborator Author

@bpulluta Can you take a stab at making the Offgrid test that you added a little "easier". It's passing for me locally, but failing on GitHub Actions. It takes a long time to solve, and I'm wondering if that's causing some inconsistency in the results on GitHub Actions with the limited computational resources it has to solve.

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