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

More ruby documentation, HPXMLtoOpenStudio/measure.rb refactor #1817

Merged
merged 25 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
07e436e
Start relocating translator methods to resource files.
joseph-robertson Aug 29, 2024
f640608
Merge branch 'master' into ruby-docs
joseph-robertson Aug 30, 2024
74264da
Progress.
joseph-robertson Aug 30, 2024
08f8c95
Clean up and refactor methods called from create_unit_model.
joseph-robertson Sep 3, 2024
e50348f
Must have add_setpoints before enclosure.
joseph-robertson Sep 3, 2024
38763d5
Continue to relocate constructions and geometry related methods.
joseph-robertson Sep 3, 2024
f785857
Relocate airflow related create_ducts method.
joseph-robertson Sep 3, 2024
7c4729b
Merge branch 'master' into ruby-docs
joseph-robertson Sep 3, 2024
30dc01a
Move translator methods to new internal_gains and model resource files.
joseph-robertson Sep 3, 2024
6fb35e5
Merge branch 'master' into ruby-docs
joseph-robertson Sep 4, 2024
6f24420
More method name updates.
joseph-robertson Sep 4, 2024
1b01ddb
Merge branch 'master' into ruby-docs
joseph-robertson Sep 11, 2024
232ddcd
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Sep 16, 2024
f1c9f1d
Merge branch 'master' into ruby-docs
joseph-robertson Sep 16, 2024
cb20947
Huge pass on moving code out of measure.rb, cleanup.
shorowit Sep 16, 2024
579ff80
Merge branch 'ruby-docs' of https://github.com/NREL/OpenStudio-HPXML …
shorowit Sep 16, 2024
5a5a1ca
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Sep 16, 2024
0741681
Final pass for now (hot water and airflow).
shorowit Sep 16, 2024
07813e6
Bugfix.
shorowit Sep 16, 2024
d4e0b79
Latest results.
Sep 17, 2024
6db81ef
Final pass. Reorganized measure.rb into additional methods and some m…
shorowit Sep 17, 2024
cf8138c
Merge branch 'ruby-docs' of https://github.com/NREL/OpenStudio-HPXML …
shorowit Sep 17, 2024
7f02231
Bugfix for CI regression.
shorowit Sep 17, 2024
c837fdf
Move setpoints code back to the beginning.
shorowit Sep 17, 2024
9896e0e
Latest results.
Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3500,7 +3500,7 @@ def run(model, runner, user_arguments)
return false
end

Geometry.tear_down_model(model: model, runner: runner)
Model.tear_down(model: model, runner: runner)

Version.check_openstudio_version()

Expand Down Expand Up @@ -3915,8 +3915,7 @@ def self.create(runner, model, args, epw_path, hpxml_path, existing_hpxml_path)
return false
end

eri_version = Constants::ERIVersions[-1]
HPXMLDefaults.apply(runner, hpxml, hpxml_bldg, eri_version, weather)
HPXMLDefaults.apply(runner, hpxml, hpxml_bldg, weather)
hpxml_doc = hpxml.to_doc()
hpxml.set_unique_hpxml_ids(hpxml_doc, true) if hpxml.buildings.size > 1
XMLHelper.write_file(hpxml_doc, hpxml_path)
Expand Down Expand Up @@ -6070,7 +6069,7 @@ def self.set_duct_leakages(args, hvac_distribution)

# Get the specific HPXML foundation or attic location based on general HPXML location and specific HPXML foundation or attic type.
#
# @param location [String] the general HPXML location (crawlspace or attic)
# @param location [String] the location of interest (HPXML::LocationCrawlspace or HPXML::LocationAttic)
# @param foundation_type [String] the specific HPXML foundation type (unvented crawlspace, vented crawlspace, conditioned crawlspace)
# @param attic_type [String] the specific HPXML attic type (unvented attic, vented attic, conditioned attic)
# @return [nil]
Expand Down
50 changes: 46 additions & 4 deletions BuildResidentialHPXML/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>build_residential_hpxml</name>
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
<version_id>75f26ae9-db88-4eb8-90c5-10ba2b9e7cd8</version_id>
<version_modified>2024-09-14T01:35:49Z</version_modified>
<version_id>9bf8fac2-4f2e-4adf-9cda-80bc44e44283</version_id>
<version_modified>2024-09-17T00:18:31Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -7441,7 +7441,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>310113A2</checksum>
<checksum>58283E8D</checksum>
</file>
<file>
<filename>constants.rb</filename>
Expand All @@ -7453,7 +7453,49 @@
<filename>geometry.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>C62D3E76</checksum>
<checksum>F80359E3</checksum>
</file>
<file>
<filename>extra_files/base-mf.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>06C3D0DD</checksum>
</file>
<file>
<filename>extra_files/base-mf2.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>04582640</checksum>
</file>
<file>
<filename>extra_files/base-sfa.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>16ED9F15</checksum>
</file>
<file>
<filename>extra_files/base-sfa2.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>1B60C132</checksum>
</file>
<file>
<filename>extra_files/base-sfa3.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>DD9CD517</checksum>
</file>
<file>
<filename>extra_files/base-sfd.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>79463062</checksum>
</file>
<file>
<filename>extra_files/base-sfd2.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>9FC7FBA9</checksum>
</file>
<file>
<filename>test_build_residential_hpxml.rb</filename>
Expand Down
2 changes: 1 addition & 1 deletion BuildResidentialHPXML/resources/geometry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2151,7 +2151,7 @@ def self.get_wall_area_for_windows(surface:,
end

# Gable too short?
# TODO: super crude safety factor of 1.5
# super crude safety factor of 1.5
if is_gable_wall(surface: surface) && (min_wall_height > get_surface_height(surface: surface) / 1.5)
return 0.0
end
Expand Down
Loading