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

HEScore Workflow #782

Merged
merged 53 commits into from
Feb 14, 2022
Merged

HEScore Workflow #782

merged 53 commits into from
Feb 14, 2022

Conversation

aspeake
Copy link
Contributor

@aspeake aspeake commented Dec 7, 2021

Pull Request Description

Enables to the HEScore workflow to be run from BuildExistingModel. A new argument os_hescore_directory is added in BuildExistingModel which points to a local checkout of https://github.com/NREL/OpenStudio-HEScore. If this argument is provided, the following measures are run:

  • ResStockArguments
  • BuildResidentialHPXML
  • HPXMLtoHEScore (on OS-HEScore)
  • HEScoreRuleset (on OS-HEScore)
  • HPXMLtoOpenStudio (on OS-HEScore)

PR for new buildstockbatch workflow generator: NREL/buildstockbatch#252

Checklist

Not all may apply:

  • Unit tests have been added or updated
  • All rake tasks have been run, and pass
  • Documentation has been modified appropriately
  • Any new options are added to project_testing
  • No unexpected regression test changes
  • All tests are passing
  • The changelog has been updated appropriately
  • This branch is up-to-date with develop

For more information on how to perform these checklist items, see the documentation's Advanced Tutorial.

GitHub Action and others added 19 commits December 7, 2021 20:55
02b2621cb1 update changelog
f5637a9b16 write default hpxml file from BuildResHPXML
9cbea592a2 Merge pull request #935 from NREL/reorg_resources
8cba3a4827 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into reorg_resources
fff0f7e477 Merge pull request #927 from NREL/schedules-updates
717c6f195d Update documentation [ci skip].
29f6262ab5 Reorganized measure resource files into subdirs, now that OpenStudio supports it.
061e2434e7 And another one.
b61d6350b2 Oops. Bugfix.
e4fec617a5 Rename Constants class to ScheduleColumns for clarity.
6b216eb932 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into schedules-updates
200dd4e2f9 Merge pull request #931 from NREL/infiltration_height
ca360b674c Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into infiltration_height
c888ba2ad8 Merge pull request #922 from NREL/report_sim_output_custom_name
96a922a47b Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into report_sim_output_custom_name
fb94da3f40 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into infiltration_height
52ad31a1fb First pass on allowing optional InfiltrationHeight input.
5e814cdb10 Update README.md
f84cf25161 More cleanup and test fixes.
fd68899fcb Typo.
d148ff765c Pass schedules_file.
024e000bac Typo.
5ef7d7c11d Update hpxml defaults file.
e49e873f48 Fix variable name changes.
5f2a1871a9 Merge branch 'master' into schedules-updates
355f26074d Merge branch 'master' into schedules-updates
6e1804eb57 Another nil init assignment.
ec989e6e46 Add init nil assignments back in.
f398e8ac6a Missed a runner in fuel loads method.
a865fd89df Fix new validation test.
715fd32bcd Clean up measure and resources.
e854a86820 Few fixes.
f122655787 Remaining schedule columns.
596d2a2846 Convert column names to constants.
a84b5c6415 First response to review.
c6ad3a5a20 Minor fix in schedules resource.
55cfe44d2c Fix schedule file measure tests.
95dfc5b05e Update defaulting and setting for occupants.
d859b59231 Remove schedules file path check from validation test.
d08083cc90 Pass schedules file into default class.
5ce0d3dcb6 Separate import and validate from schedules file class.
7f6dda19d1 Remove schedule checks from epvalidator.
b470e38556 Move expected errors to expected warnings.
54041d5dbb Issue warnings instead of errors if both schedules provided.
efb013fc62 Allows user-specified file names for the annual/timeseries output files. If not provided, behaves the same as before.

git-subtree-dir: resources/hpxml-measures
git-subtree-split: 02b2621cb16ed6d5d2e1ce200f687e42717d1f12
…def40

e29e37def40 apply defaults directly to hpxml object instead of writing to in.xml

git-subtree-dir: resources/hpxml-measures
git-subtree-split: e29e37def4070f7b95f70340af83dd722d8dc848
…58614

11426558614 Merge pull request #934 from NREL/os-eri-duct-lto-exemptions
8b9eaf56e9d tasks.rb update_measures
8361766f6b9 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os-eri-duct-lto-exemptions
38646e06cca Bugfix.
d8b7a3e4407 Merge pull request #938 from NREL/write_default_xml
4c1ea0979b4 Move ScheduleColumns class from BuildResidentialScheduleFile/resources/constants.rb into SchedulesFile class in HPXMLtoOpenStudio/resources/schedules.rb.
ca55556df8b update measures
83cf5a477db update apply_defaults description
99356cb1440 simplify apply defaults block
5a51a587e33 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os-eri-duct-lto-exemptions
3b41338cd4a Removes references to 301-2014 Addenda D & L and DuctLeakageToOutsideTestingExemption.

git-subtree-dir: resources/hpxml-measures
git-subtree-split: 114265586140d98992a5f055f84a0a4888116ff7
@aspeake aspeake requested a review from shorowit January 5, 2022 02:56
Comment on lines 322 to 323
measures_hash = { 'HEScoreHPXML' => measures['HEScoreHPXML'] }
if not apply_measures(measures_dir, measures_hash, new_runner, model, true, 'OpenStudio::Measure::ModelMeasure')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not store HEScoreHPXML on the OS-HEScore repo so that you could combine apply_measures calls for HEScoreHPXML and HEScoreRuleset?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmerket Thoughts on moving HEScoreHPXML to OS-HEScore? Would package the HES measures together a little better

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any drawbacks to moving the measure? I agree that it does seem more logical to have the measure in the OS-HEScore repo, great comment @joseph-robertson. For example, in the future there could be another application (other than ResStock) that wants to use this measure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And who knows, maybe someday HEScore itself would want to use this measure as part of our OS-HEScore workflow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a great idea.


# Run HEScore Measures
if run_hescore_workflow
measures['HPXMLtoHEScore'] = [{ 'hpxml_path' => hpxml_path, 'output_path' => File.expand_path('../hes.json') }]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd store File.expand_path('../hes.json') in a variable in case it gets changed in the future...

# Run HEScore Measures
if run_hescore_workflow
measures['HPXMLtoHEScore'] = [{ 'hpxml_path' => hpxml_path, 'output_path' => File.expand_path('../hes.json') }]
measures['HEScoreRuleset'] = [{ 'json_path' => File.expand_path('../hes.json'), 'hpxml_output_path' => File.expand_path('../hes.xml') }]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And use it here, too.

@@ -109,6 +109,11 @@ def arguments(model)
arg.setDescription('If true, output the annual component loads.')
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeStringArgument('os_hescore_directory', false)
arg.setDisplayName('HEScore Workflow: OpenStudio-HEScore directory path')
arg.setDescription('Path to the OpenStudio-HEScore directory. If specified, the HEScore workflow will run')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Period at the end.

Base automatically changed from restructure-v3 to develop February 10, 2022 16:54
@aspeake aspeake changed the title ResStock-HPXML: HES Translator Measure HEScore Workflow Feb 11, 2022
County "CT, New London County" ResStockArguments simulation_control_daylight_saving_enabled=true weather_station_epw_filepath=../../../weather/G0900110.epw site_zip_code=6360 site_time_zone_utc_offset=-5
County "CT, Tolland County" ResStockArguments simulation_control_daylight_saving_enabled=true weather_station_epw_filepath=../../../weather/G0900130.epw site_zip_code=6066 site_time_zone_utc_offset=-5
County "CT, Windham County" ResStockArguments simulation_control_daylight_saving_enabled=true weather_station_epw_filepath=../../../weather/G0900150.epw site_zip_code=6226 site_time_zone_utc_offset=-5
County "CT, Fairfield County" ResStockArguments simulation_control_daylight_saving_enabled=true weather_station_epw_filepath=../../../weather/G0900010.epw site_zip_code=06902 site_time_zone_utc_offset=-5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@aspeake aspeake merged commit c908413 into develop Feb 14, 2022
@aspeake aspeake deleted the restructure-v3-hes-measure branch February 14, 2022 18:45
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.

4 participants