Skip to content

Commit 5b28c43

Browse files
committed
Brings the skip_simulation arg back; forgot that BEopt uses it.
1 parent 73460f9 commit 5b28c43

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

HPXMLtoOpenStudio/measure.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>hpxm_lto_openstudio</name>
55
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
6-
<version_id>16835647-9a13-44b7-b907-a57abf30a8d4</version_id>
7-
<version_modified>2024-10-11T14:51:15Z</version_modified>
6+
<version_id>c80e402f-4c82-4eae-9336-698bde0e09c3</version_id>
7+
<version_modified>2024-10-11T18:59:49Z</version_modified>
88
<xml_checksum>D8922A73</xml_checksum>
99
<class_name>HPXMLtoOpenStudio</class_name>
1010
<display_name>HPXML to OpenStudio Translator</display_name>
@@ -429,7 +429,7 @@
429429
<filename>meta_measure.rb</filename>
430430
<filetype>rb</filetype>
431431
<usage_type>resource</usage_type>
432-
<checksum>979E2224</checksum>
432+
<checksum>F335EDC8</checksum>
433433
</file>
434434
<file>
435435
<filename>minitest_helper.rb</filename>

HPXMLtoOpenStudio/resources/meta_measure.rb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Initialize OpenStudio objects (log, model, runner, etc.).
66
# Call run methods of OpenStudio Model measures.
77
# Report infos/warnings/errors to run.log file.
8-
# Forward translate the model and call energyPlusOutputRequests methods.
8+
# Forward translate the model, write IDF, and call energyPlusOutputRequests methods.
99
# Again, report any log messages to file.
1010
# Simulate the IDF using the EnergyPlus CLI.
1111
# Call run methods of OpenStudio ReportingMeasures.
@@ -15,12 +15,13 @@
1515
# @param measures [Hash] Map of OpenStudio-HPXML measure directory name => List of measure argument hashes
1616
# @param measures_dir [String] Parent directory path of all OpenStudio-HPXML measures
1717
# @param debug [Boolean] If true, reports info statements from the runner results
18-
# @param run_measures_only [Boolean] True applies only OpenStudio Model measures, skipping forward translation and the simulation
18+
# @param run_measures_only [Boolean] True applies only OpenStudio Model measures, skipping IDF generation and the simulation
19+
# @param skip_simulation [Boolean] True applies the OpenStudio Model measures and generates the IDF, but skips the simulation
1920
# @param ep_input_format [String] EnergyPlus input file format (idf, epjson)
2021
# @param suppress_print [Boolean] True reduces printed workflow output
2122
# @return [Hash] Map of 'success' and 'runner' results
22-
def run_hpxml_workflow(rundir, measures, measures_dir, debug: false,
23-
run_measures_only: false, ep_input_format: 'idf', suppress_print: false)
23+
def run_hpxml_workflow(rundir, measures, measures_dir, debug: false, run_measures_only: false,
24+
skip_simulation: false, ep_input_format: 'idf', suppress_print: false)
2425
rm_path(rundir)
2526
FileUtils.mkdir_p(rundir)
2627

@@ -99,6 +100,10 @@ def run_hpxml_workflow(rundir, measures, measures_dir, debug: false,
99100
fail "Unexpected ep_input_format: #{ep_input_format}."
100101
end
101102

103+
if skip_simulation
104+
return { success: success, runner: runner }
105+
end
106+
102107
if not model.getWeatherFile.path.is_initialized
103108
print "Creating input unsuccessful.\n"
104109
print "See #{File.join(rundir, 'run.log')} for details.\n"

0 commit comments

Comments
 (0)