-
Notifications
You must be signed in to change notification settings - Fork 41
ElectricTariff big-M updates for demand and energy tiers #513
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of curiosity questions, and a suggestion to make a function to use for the three similar blocks of code. Then if we want to change the logic, we'd only have to do it in that one function. Feel free to push back if there's a good reason not to.
added_power = !isempty(p.s.storage.types.elec) ? sum(p.s.storage.attr[b].max_kw for b in p.s.storage.types.elec) : 1.0e-3 | ||
|
||
electric_demand_bigM = 2 * maximum(100*p.s.electric_load.loads_kw .+ | ||
p.s.space_heating_load.loads_kw .+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these heating and cooling loads in here because we might be converting them to electric loads with a COP as low as 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a COP as low as 0.5, in part because of low-COP techs like an ASHP under low temperature. I added a few notes here: 5fa0412 (lines 467-468)
#big-M used for monthly demand tiers | ||
added_power = !isempty(p.s.storage.types.elec) ? sum(p.s.storage.attr[b].max_kw for b in p.s.storage.types.elec) : 1.0e-3 | ||
|
||
electric_demand_bigM = 2 * maximum(100*p.s.electric_load.loads_kw .+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 100x the electric load, and then 2x the max of the load aggregation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an assumption from the "legacy" code in reo/
- we adopted it for use as an upper bound when charging seasonal storage systems.
b = m[Symbol(dv)] | ||
|
||
|
||
# Implement Big-M constratint for TOU demand tiers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional request: this code block looks very similar to the one above, so it would be helpful and DRY to make a function which could then be used by either of these functions with the different arguments. If that's more challenging than I'm thinking it would be, feel free to keep as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, great catch! addressed here, and marking the other related comment as resolved since it's related to this thread: 5fa0412
Ready for your re-review @Bill-Becker! |
Fixed
Addresses issue #410
The newly added tests failed with the previous implementation.