Skip to content

Commit

Permalink
Merge pull request #1167 from NREL/latest-os-hpxml
Browse files Browse the repository at this point in the history
Latest OS-HPXML, v1.7.0
  • Loading branch information
joseph-robertson committed Dec 18, 2023
2 parents 45da9e3 + bc3c73b commit 436ee7e
Show file tree
Hide file tree
Showing 73 changed files with 78,729 additions and 73,774 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
needs: [format-files]
container:
image: docker://nrel/openstudio:3.7.0-rc1
image: docker://nrel/openstudio:3.7.0
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest
needs: [unit-tests]
container:
image: docker://nrel/openstudio:3.7.0-rc1
image: docker://nrel/openstudio:3.7.0
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -137,8 +137,8 @@ jobs:

- name: Download and Install OpenStudio
run: |
wget -q https://github.com/NREL/OpenStudio/releases/download/v3.7.0-rc1/OpenStudio-3.7.0-rc1+211bb633b0-Ubuntu-20.04-x86_64.deb
sudo apt install -y ./OpenStudio-3.7.0-rc1+211bb633b0-Ubuntu-20.04-x86_64.deb
wget -q https://github.com/NREL/OpenStudio/releases/download/v3.7.0/OpenStudio-3.7.0+d5269793f1-Ubuntu-20.04-x86_64.deb
sudo apt install -y ./OpenStudio-3.7.0+d5269793f1-Ubuntu-20.04-x86_64.deb
openstudio openstudio_version
which openstudio
Expand Down
18 changes: 9 additions & 9 deletions measures/ApplyUpgrade/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def cost_multiplier_choices

# define the arguments that the user will input
def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
args = OpenStudio::Ruleset::OSArgumentVector.new
args = OpenStudio::Measure::OSArgumentVector.new

# Make string arg for upgrade name
upgrade_name = OpenStudio::Ruleset::OSArgument::makeStringArgument('upgrade_name', true)
upgrade_name = OpenStudio::Measure::OSArgument::makeStringArgument('upgrade_name', true)
upgrade_name.setDisplayName('Upgrade Name')
upgrade_name.setDescription('User-specificed name that describes the upgrade.')
upgrade_name.setDefaultValue('My Upgrade')
Expand All @@ -53,28 +53,28 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
for option_num in 1..num_options

# Option name argument
option = OpenStudio::Ruleset::OSArgument.makeStringArgument("option_#{option_num}", (option_num == 1))
option = OpenStudio::Measure::OSArgument.makeStringArgument("option_#{option_num}", (option_num == 1))
option.setDisplayName("Option #{option_num}")
option.setDescription('Specify the parameter|option as found in resources\\options_lookup.tsv.')
args << option

# Option Apply Logic argument
option_apply_logic = OpenStudio::Ruleset::OSArgument.makeStringArgument("option_#{option_num}_apply_logic", false)
option_apply_logic = OpenStudio::Measure::OSArgument.makeStringArgument("option_#{option_num}_apply_logic", false)
option_apply_logic.setDisplayName("Option #{option_num} Apply Logic")
option_apply_logic.setDescription("Logic that specifies if the Option #{option_num} upgrade will apply based on the existing building's options. Specify one or more parameter|option as found in resources\\options_lookup.tsv. When multiple are included, they must be separated by '||' for OR and '&&' for AND, and using parentheses as appropriate. Prefix an option with '!' for not.")
args << option_apply_logic

for cost_num in 1..num_costs_per_option

# Option Cost Value argument
cost_value = OpenStudio::Ruleset::OSArgument.makeDoubleArgument("option_#{option_num}_cost_#{cost_num}_value", false)
cost_value = OpenStudio::Measure::OSArgument.makeDoubleArgument("option_#{option_num}_cost_#{cost_num}_value", false)
cost_value.setDisplayName("Option #{option_num} Cost #{cost_num} Value")
cost_value.setDescription("Total option #{option_num} cost is the sum of all: (Cost N Value) x (Cost N Multiplier).")
cost_value.setUnits('$')
args << cost_value

# Option Cost Multiplier argument
cost_multiplier = OpenStudio::Ruleset::OSArgument.makeChoiceArgument("option_#{option_num}_cost_#{cost_num}_multiplier", cost_multiplier_choices, false)
cost_multiplier = OpenStudio::Measure::OSArgument.makeChoiceArgument("option_#{option_num}_cost_#{cost_num}_multiplier", cost_multiplier_choices, false)
cost_multiplier.setDisplayName("Option #{option_num} Cost #{cost_num} Multiplier")
cost_multiplier.setDescription("Total option #{option_num} cost is the sum of all: (Cost N Value) x (Cost N Multiplier).")
cost_multiplier.setDefaultValue(cost_multiplier_choices[0])
Expand All @@ -83,7 +83,7 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
end

# Option Lifetime argument
option_lifetime = OpenStudio::Ruleset::OSArgument.makeDoubleArgument("option_#{option_num}_lifetime", false)
option_lifetime = OpenStudio::Measure::OSArgument.makeDoubleArgument("option_#{option_num}_lifetime", false)
option_lifetime.setDisplayName("Option #{option_num} Lifetime")
option_lifetime.setDescription('The option lifetime.')
option_lifetime.setUnits('years')
Expand All @@ -92,13 +92,13 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
end

# Package Apply Logic argument
package_apply_logic = OpenStudio::Ruleset::OSArgument.makeStringArgument('package_apply_logic', false)
package_apply_logic = OpenStudio::Measure::OSArgument.makeStringArgument('package_apply_logic', false)
package_apply_logic.setDisplayName('Package Apply Logic')
package_apply_logic.setDescription("Logic that specifies if the entire package upgrade (all options) will apply based on the existing building's options. Specify one or more parameter|option as found in resources\\options_lookup.tsv. When multiple are included, they must be separated by '||' for OR and '&&' for AND, and using parentheses as appropriate. Prefix an option with '!' for not.")
args << package_apply_logic

# Make integer arg to run measure [1 is run, 0 is no run]
run_measure = OpenStudio::Ruleset::OSArgument::makeIntegerArgument('run_measure', true)
run_measure = OpenStudio::Measure::OSArgument::makeIntegerArgument('run_measure', true)
run_measure.setDisplayName('Run Measure')
run_measure.setDescription('integer argument to run measure [1 is run, 0 is no run]')
run_measure.setDefaultValue(1)
Expand Down
6 changes: 3 additions & 3 deletions measures/ApplyUpgrade/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>apply_upgrade</name>
<uid>33f1654c-f734-43d1-b35d-9d2856e41b5a</uid>
<version_id>e5275162-7201-4b63-b6ce-1fd75290153d</version_id>
<version_modified>2023-11-28T17:40:40Z</version_modified>
<version_id>21302f9b-57a8-45d7-b393-c1a1eee78aa5</version_id>
<version_modified>2023-11-28T23:34:10Z</version_modified>
<xml_checksum>9339BE01</xml_checksum>
<class_name>ApplyUpgrade</class_name>
<display_name>Apply Upgrade</display_name>
Expand Down Expand Up @@ -6342,7 +6342,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>3055E9F4</checksum>
<checksum>F9EF34DC</checksum>
</file>
<file>
<filename>constants.rb</filename>
Expand Down
10 changes: 5 additions & 5 deletions measures/BuildExistingModel/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ def modeler_description

# define the arguments that the user will input
def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
args = OpenStudio::Ruleset::OSArgumentVector.new
args = OpenStudio::Measure::OSArgumentVector.new

arg = OpenStudio::Ruleset::OSArgument.makeIntegerArgument('building_id', true)
arg = OpenStudio::Measure::OSArgument.makeIntegerArgument('building_id', true)
arg.setDisplayName('Building Unit ID')
arg.setDescription('The building unit number (between 1 and the number of samples).')
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('sample_weight', false)
arg = OpenStudio::Measure::OSArgument.makeDoubleArgument('sample_weight', false)
arg.setDisplayName('Sample Weight of Simulation')
arg.setDescription('Number of buildings this simulation represents.')
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeStringArgument('downselect_logic', false)
arg = OpenStudio::Measure::OSArgument.makeStringArgument('downselect_logic', false)
arg.setDisplayName('Downselect Logic')
arg.setDescription("Logic that specifies the subset of the building stock to be considered in the analysis. Specify one or more parameter|option as found in resources\\options_lookup.tsv. When multiple are included, they must be separated by '||' for OR and '&&' for AND, and using parentheses as appropriate. Prefix an option with '!' for not.")
args << arg
Expand Down Expand Up @@ -81,7 +81,7 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
arg.setDescription('This numeric field should contain the calendar year that determines the start day of week. If you are running simulations using AMY weather files, the value entered for calendar year will not be used; it will be overridden by the actual year found in the AMY weather file.')
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeStringArgument('os_hescore_directory', false)
arg = OpenStudio::Measure::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.')
args << arg
Expand Down
6 changes: 3 additions & 3 deletions measures/BuildExistingModel/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_existing_model</name>
<uid>dedf59bb-3b88-4f16-8755-2c1ff5519cbf</uid>
<version_id>aec44802-e296-4edb-a0f6-4801f8dbab3c</version_id>
<version_modified>2023-11-03T23:11:43Z</version_modified>
<version_id>a678a2cf-fbd1-4cd7-be1d-4507e1de3607</version_id>
<version_modified>2023-11-27T22:10:35Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildExistingModel</class_name>
<display_name>Build Existing Model</display_name>
Expand Down Expand Up @@ -340,7 +340,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>6231E134</checksum>
<checksum>C65EFF1B</checksum>
</file>
</files>
</measure>
3 changes: 2 additions & 1 deletion measures/QOIReport/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def run(runner, user_arguments)
return false
end

output_dir = File.dirname(runner.lastEpwFilePath.get.to_s)
hpxml_defaults_path = model.getBuilding.additionalProperties.getFeatureAsString('hpxml_defaults_path').get
output_dir = File.dirname(hpxml_defaults_path)

# Initialize timeseries hash
timeseries = { 'Temperature' => [],
Expand Down
6 changes: 3 additions & 3 deletions measures/QOIReport/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>qoi_report</name>
<uid>be0bfc7f-25c6-435a-9acd-2f5fa8ac817d</uid>
<version_id>47a2859c-5621-49f1-a98e-62866d1cfbe9</version_id>
<version_modified>2023-11-28T17:40:40Z</version_modified>
<version_id>7f664618-267c-40c9-9245-03246f5e633c</version_id>
<version_modified>2023-11-28T23:34:12Z</version_modified>
<xml_checksum>15BF4E57</xml_checksum>
<class_name>QOIReport</class_name>
<display_name>QOI Report</display_name>
Expand Down Expand Up @@ -45,7 +45,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>895E5871</checksum>
<checksum>7CE1484F</checksum>
</file>
<file>
<filename>constants.rb</filename>
Expand Down
8 changes: 1 addition & 7 deletions measures/ReportHPXMLOutput/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,9 @@ def run(runner, user_arguments)
end

output_format = runner.getStringArgumentValue('output_format', user_arguments)
output_dir = File.dirname(runner.lastEpwFilePath.get.to_s)

if not File.exist? File.join(output_dir, 'eplusout.msgpack')
runner.registerError('Cannot find eplusout.msgpack.')
return false
end
@msgpackData = MessagePack.unpack(File.read(File.join(output_dir, 'eplusout.msgpack'), mode: 'rb'))

hpxml_defaults_path = model.getBuilding.additionalProperties.getFeatureAsString('hpxml_defaults_path').get
output_dir = File.dirname(hpxml_defaults_path)
hpxml = HPXML.new(hpxml_path: hpxml_defaults_path)

# Set paths
Expand Down
6 changes: 3 additions & 3 deletions measures/ReportHPXMLOutput/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>report_hpxml_output</name>
<uid>9561a0d7-60ad-48c5-8337-2461df044d80</uid>
<version_id>0d8138a7-1eb6-4879-8ef2-20a981b549c1</version_id>
<version_modified>2023-11-03T23:11:43Z</version_modified>
<version_id>08189c5b-a91a-442b-9765-a50977d2b0c1</version_id>
<version_modified>2023-11-27T22:10:37Z</version_modified>
<xml_checksum>9BF1E6AC</xml_checksum>
<class_name>ReportHPXMLOutput</class_name>
<display_name>HPXML Output Report</display_name>
Expand Down Expand Up @@ -79,7 +79,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>7ADB09BC</checksum>
<checksum>268B735E</checksum>
</file>
<file>
<filename>constants.rb</filename>
Expand Down
38 changes: 19 additions & 19 deletions measures/ServerDirectoryCleanup/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,94 +23,94 @@ def modeler_description

# define the arguments that the user will input
def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
args = OpenStudio::Ruleset::OSArgumentVector.new
args = OpenStudio::Measure::OSArgumentVector.new

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_in_osm', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_in_osm', true)
arg.setDisplayName('Retain in.osm')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_in_idf', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_in_idf', true)
arg.setDisplayName('Retain in.idf')
arg.setDefaultValue(true)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_pre_process_idf', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_pre_process_idf', true)
arg.setDisplayName('Retain pre_process.idf')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_audit', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_audit', true)
arg.setDisplayName('Retain eplusout.audit')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_bnd', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_bnd', true)
arg.setDisplayName('Retain eplusout.bnd')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_eio', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_eio', true)
arg.setDisplayName('Retain eplusout.eio')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_end', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_end', true)
arg.setDisplayName('Retain eplusout.end')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_err', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_err', true)
arg.setDisplayName('Retain eplusout.err')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_eso', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_eso', true)
arg.setDisplayName('Retain eplusout.eso')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_mdd', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_mdd', true)
arg.setDisplayName('Retain eplusout.mdd')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_mtd', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_mtd', true)
arg.setDisplayName('Retain eplusout.mtd')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_rdd', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_rdd', true)
arg.setDisplayName('Retain eplusout.rdd')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_shd', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_shd', true)
arg.setDisplayName('Retain eplusout.shd')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplusout_msgpack', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplusout_msgpack', true)
arg.setDisplayName('Retain eplusout.msgpack')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_eplustbl_htm', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_eplustbl_htm', true)
arg.setDisplayName('Retain eplustbl.htm')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_stdout_energyplus', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_stdout_energyplus', true)
arg.setDisplayName('Retain stdout-energyplus')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_stdout_expandobject', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_stdout_expandobject', true)
arg.setDisplayName('Retain stdout-expandobject.')
arg.setDefaultValue(false)
args << arg

arg = OpenStudio::Ruleset::OSArgument.makeBoolArgument('retain_schedules_csv', true)
arg = OpenStudio::Measure::OSArgument.makeBoolArgument('retain_schedules_csv', true)
arg.setDisplayName('Retain schedules.csv.')
arg.setDefaultValue(true)
args << arg
Expand Down
6 changes: 3 additions & 3 deletions measures/ServerDirectoryCleanup/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>server_directory_cleanup</name>
<uid>ec7d04ad-0b7b-495b-825a-e1b6d28d1d3f</uid>
<version_id>7af48967-453d-4190-b95c-91c6bcc46740</version_id>
<version_modified>2023-11-03T23:11:43Z</version_modified>
<version_id>0187da15-5c10-4a11-86d0-40696236d4ac</version_id>
<version_modified>2023-11-27T22:10:39Z</version_modified>
<xml_checksum>5F1EDF75</xml_checksum>
<class_name>ServerDirectoryCleanup</class_name>
<display_name>Server Directory Cleanup</display_name>
Expand Down Expand Up @@ -394,7 +394,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>3B2978B0</checksum>
<checksum>D28657CE</checksum>
</file>
</files>
</measure>
6 changes: 3 additions & 3 deletions measures/UpgradeCosts/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>upgrade_costs</name>
<uid>ef51212c-acc4-48d7-9b29-cf2a5c6c4449</uid>
<version_id>a3c3248f-c3a4-4a5d-88be-60fb99ef9d69</version_id>
<version_modified>2023-11-28T17:40:40Z</version_modified>
<version_id>1940bfd7-86f5-4a10-9270-1613f201a6ee</version_id>
<version_modified>2023-11-28T23:34:15Z</version_modified>
<xml_checksum>9BF1E6AC</xml_checksum>
<class_name>UpgradeCosts</class_name>
<display_name>Upgrade Costs</display_name>
Expand Down Expand Up @@ -129,7 +129,7 @@
<filename>SFD_1story_FB_UA_GRG_MSHP_FuelTanklessWH.osw</filename>
<filetype>osw</filetype>
<usage_type>test</usage_type>
<checksum>B0949BD7</checksum>
<checksum>5D7AA5D2</checksum>
</file>
<file>
<filename>SFD_1story_FB_UA_GRG_RoomAC_ElecBoiler_FuelTanklessWH.osw</filename>
Expand Down

0 comments on commit 436ee7e

Please sign in to comment.