-
Notifications
You must be signed in to change notification settings - Fork 20
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
Align heating and cooling load profiles with electric load year #472
Conversation
…red by throwing error if not The get!() function (with "!") add the "year" key/value to the dictionary object, so we can now avoid passing the year kwarg in explicitly.
…if not default 2017
This comment was marked as off-topic.
This comment was marked as off-topic.
Per the dev call, adding a note to check that the different load years do indeed get sent when using the web tool. |
This comment was marked as outdated.
This comment was marked as outdated.
@@ -158,19 +158,13 @@ mutable struct ElectricLoad # mutable to adjust (critical_)loads_kw based off o | |||
end |
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.
Adding a note here to require the year if a custom load profile is uploaded (here and for the heating loads)
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.
Added this requirement. Validation to check if year is not nothing can happen above the check for loads_kw, doe_reference_name, etc, since the default is assigned for CRB without a year input.
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.
@Bill-Becker I think it might be worth adding this to the CHANGELOG too
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.
Added to changelog.
Also made year required for HeatingLoad and CoolingLoad constructors with their equivalent timeseries load profile input, but that will typically get passed in from the ElectricLoad.year, if missing.
I confirmed that the year is being passed with an uploaded electric load. The web developers are also working on adding the year input for uploaded heating and cooling loads. |
CHANGELOG.md
Outdated
### Fixed | ||
- Align heating and cooling load profiles based on electric load year input, if using custom electric load profile with simulated (CRB or schedule-based flatloads) heating/cooling loads | ||
### Changed | ||
- Make `year` input required with `ElectricLoad.loads_kw` input |
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.
Also for the custom heating and cooling load inputs, correct? Could you add 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.
Updated the line to include any load profile input.
src/core/heating_cooling_loads.jl
Outdated
@@ -9,11 +9,13 @@ | |||
industrial_reference_name::String = "", # For ProcessHeatLoad | |||
blended_industrial_reference_names::Array{String, 1} = String[], # For ProcessHeatLoad | |||
blended_industrial_reference_percents::Array{<:Real,1} = Real[], # For ProcessHeatLoad | |||
addressable_load_fraction::Any = 1.0, # Fraction of input fuel load which is addressable by heating technologies. Can be a scalar or vector with length aligned with use of monthly_mmbtu or fuel_loads_mmbtu_per_hour. | |||
city::String = "", | |||
year::Union{Int, Nothing} = doe_reference_name ≠ "" || blended_doe_reference_names ≠ String[] ? 2017 : nothing, # CRB profiles are 2017 by default. If providing load profile, specify year of data. |
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.
Does this year check for defaulting to 2017 also need to account for industrial_reference_name
and blended_industrial_reference_names
? I'm not familiar with exactly how those are used.
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.
Good catch, I'll add that too.
src/core/scenario.jl
Outdated
) | ||
max_heat_demand_kw = maximum(dhw_load.loads_kw) | ||
else | ||
# TODO need to add a dummy year here or else will error |
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.
@Bill-Becker is this still a pending TODO?
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.
Nope, done.
@Bill-Becker do you think it matters that in |
input_data = JSON.parsefile("./scenarios/load_year_align.json") | ||
year = 2024 | ||
# ElectricLoad.loads_kw is 2024, and heating and cooling loads are shifted to align | ||
# Use a FlatLoad_16_5 shifted to 2024 (Monday start) with the web tool's custom load builder |
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 isn't that important, but what does this comment mean? That the flat load has already been shifted after getting the 2017 version from the web tool?
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.
I just built a load with the year=2024, and the web tool aligned the weekday/weekend profiles to the 2024 year.
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.
@Bill-Becker just a few small questions and asks, but I think this is good to merge after addressing those. These are great fixes!
…ad.year which is now required.
…to load-year-align
Removed the year default. |
Current issue/bug: if a custom
ElectricLoad.loads_kw
is input along with its corresponding calendaryear
, and then a heating and/or cooling load is "simulated" by either a commercial reference building (doe_reference_name
, orblended_...
) or schedule-based flat load (e.g.FlatLoad_16_5
) which uses the 2017 year (start day == Sunday), then the load profiles will not be aligned (shifted in the weekdays/weekends). See attached images for current web tool behavior with uploaded electric load for 2024 (starts on Monday) with heating load (starts on Sunday).This PR fixes this by passing the
ElectricLoad.year
to the constructors forHeatingLoad
andCoolingLoad
, and it shifts the simulated CRB or schedule-based flat load profiles to match the starting day of the year input.Also, now that we have a custom load profile builder for heating loads in the REopt web tool, in which you build an 8760 heating load profile and assign a particular
year
to it, custom/uploaded heating loads will be used more often. This PR ensures that the year input for heating load profile matches the year input for the electric load profile input. It throws an error if it doesn't match.Side note: we kind of got away with this for the last year because 2023 (the previous full year) starts on the same day as 2017, but now that 2024 is the most recent full historical year, I suspect this will start to become an issue more.
"Uploaded" 2024 (starts on Monday) Electric Load:
"Simulate Building" 16/5 Schedule Flat Load (2017 is the only option, starts on Sunday):