-
Notifications
You must be signed in to change notification settings - Fork 17
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
Allow simulating whole SFA/MF buildings: SchedulesFilePath
for each building
#1478
Allow simulating whole SFA/MF buildings: SchedulesFilePath
for each building
#1478
Conversation
…models_unit_multiplier_schedules
I think we should add the same Building ID argument as the HPXMLtoOS measure: OpenStudio-HPXML/HPXMLtoOpenStudio/measure.rb Lines 64 to 67 in 11f5ffa
If the HPXML has multiple buildings and a single Building ID is specified, only create schedules for that one dwelling unit. If the HPXML has multiple buildings and 'ALL' is specified, create unique schedules for each dwelling unit where the random seed is multiplied by the building index (1..n), which ensures that the results are deterministic. "Do we want to continue to support |
…models_unit_multiplier_schedules
…models_unit_multiplier_schedules
…models_unit_multiplier_schedules
BuildResidentialScheduleFile/tests/build_residential_schedule_file_test.rb
Show resolved
Hide resolved
tasks.rb
Outdated
# Logic that can only be applied based on file name | ||
if ['base-schedules-detailed-occupancy-stochastic-hpxml-header.xml'].include? hpxml_file | ||
hpxml.header.schedules_filepaths << '../../HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic.csv' | ||
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.
Demonstrate backward compatibility.
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.
If you make the change I proposed where the BuildResSchedule measure sometimes writes to the HPXML Header and sometimes to the Building Header, I assume we can remove this new HPXML sample file as we'd end up testing both pathways through our existing sample files.
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, it feels like we're missing a sample file where we actually vary the schedules across the HPXML buildings. How about creating a new base-multiple-buildings-detailed-occupancy-stochastic.xml
based on base-multiple-buildings.xml
?
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.
Hmm, I'm realizing that the problem with your first comment here is that tasks.rb uses BuildResidentialHPXML
to first create the HPXML (with SchedulesFilePath at building header) and then uses BuildResidentialScheduleFile
to re-write the HPXML file (with SchedulesFilePath at the HPXML header)...
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 suppose I can make a similar change to BuildResidentialHPXML
?
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.
Ugh, even then it gets complicated. You'd have to "move" a schedule from HPXML header to building header when going from 1 building to 2 buildings using BuildResidentialHPXML
...
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.
When we create sample files, there's no need to specify a schedule file path to BuildResidentialHPXML if we are going to use BuildResidentialScheduleFile to create the schedules (and add the path), no? Or maybe I'm not following.
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.
But tasks.rb uses the schedules_filepaths
argument to queue up running BuildResidentialScheduleFile
. Even so, (it's not in this PR) but say you had an HPXML file with a single building (and SchedulesFilePath is in the HPXML header). If you went to add a building to the HPXML file, then you're assuming the existing schedule file applies to the second building?
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'd propose we save addressing this in #1457.
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 stuff, @joseph-robertson, this is pretty close. A few comments/suggestions below.
BuildResidentialScheduleFile/tests/build_residential_schedule_file_test.rb
Show resolved
Hide resolved
tasks.rb
Outdated
# Logic that can only be applied based on file name | ||
if ['base-schedules-detailed-occupancy-stochastic-hpxml-header.xml'].include? hpxml_file | ||
hpxml.header.schedules_filepaths << '../../HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic.csv' | ||
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.
If you make the change I proposed where the BuildResSchedule measure sometimes writes to the HPXML Header and sometimes to the Building Header, I assume we can remove this new HPXML sample file as we'd end up testing both pathways through our existing sample files.
tasks.rb
Outdated
# Logic that can only be applied based on file name | ||
if ['base-schedules-detailed-occupancy-stochastic-hpxml-header.xml'].include? hpxml_file | ||
hpxml.header.schedules_filepaths << '../../HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic.csv' | ||
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.
Also, it feels like we're missing a sample file where we actually vary the schedules across the HPXML buildings. How about creating a new base-multiple-buildings-detailed-occupancy-stochastic.xml
based on base-multiple-buildings.xml
?
BuildResidentialScheduleFile/tests/build_residential_schedule_file_test.rb
Show resolved
Hide resolved
…com/NREL/OpenStudio-HPXML into whole_sfa_mf_models_unit_multiplier_schedules # Conflicts: # HPXMLtoOpenStudio/measure.xml
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 looks good. I'll merge when the CI comes back happy.
36c3b08
into
whole_sfa_mf_models_unit_multiplier
Pull Request Description
Instead of storing this on header
SoftwareInfo/extension/SchedulesFilePath
, this PR allows for different sets of schedules across units of a building by storing onBuilding/BuildingDetails/BuildingSummary/extension/SchedulesFilePath
. Therefore,SoftwareInfo/extension/SchedulesFilePath
is deprecated.Checklist
PR Author: Check these when they're done. Not all may apply.
strikethroughand check any that do not apply.PR Reviewer: Verify each has been completed.
EPvalidator.xml
) has been updatedtasks.rb
)HPXMLtoOpenStudio/tests
and/orworkflow/tests/hpxml_translator_test.rb
)Changelog has been updatedopenstudio tasks.rb update_measures
has been run