-
Notifications
You must be signed in to change notification settings - Fork 21
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
base: develop
Are you sure you want to change the base?
Conversation
@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. |
…turn_down_fraction
@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 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?! |
@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. |
@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. |
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.