|
5 | 5 | # Initialize OpenStudio objects (log, model, runner, etc.).
|
6 | 6 | # Call run methods of OpenStudio Model measures.
|
7 | 7 | # 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. |
9 | 9 | # Again, report any log messages to file.
|
10 | 10 | # Simulate the IDF using the EnergyPlus CLI.
|
11 | 11 | # Call run methods of OpenStudio ReportingMeasures.
|
|
15 | 15 | # @param measures [Hash] Map of OpenStudio-HPXML measure directory name => List of measure argument hashes
|
16 | 16 | # @param measures_dir [String] Parent directory path of all OpenStudio-HPXML measures
|
17 | 17 | # @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 |
19 | 20 | # @param ep_input_format [String] EnergyPlus input file format (idf, epjson)
|
20 | 21 | # @param suppress_print [Boolean] True reduces printed workflow output
|
21 | 22 | # @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) |
24 | 25 | rm_path(rundir)
|
25 | 26 | FileUtils.mkdir_p(rundir)
|
26 | 27 |
|
@@ -99,6 +100,10 @@ def run_hpxml_workflow(rundir, measures, measures_dir, debug: false,
|
99 | 100 | fail "Unexpected ep_input_format: #{ep_input_format}."
|
100 | 101 | end
|
101 | 102 |
|
| 103 | + if skip_simulation |
| 104 | + return { success: success, runner: runner } |
| 105 | + end |
| 106 | + |
102 | 107 | if not model.getWeatherFile.path.is_initialized
|
103 | 108 | print "Creating input unsuccessful.\n"
|
104 | 109 | print "See #{File.join(rundir, 'run.log')} for details.\n"
|
|
0 commit comments