Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

Good question. The report you see out of the OpenStudio application after a simulation is just a reporting measure that we put in the workflow even if the user doesn't request it. That does not happen with the RunAllOSMs example.

If you want to see that report then you can add code for that measure to be run. If you look at the ruby script in the "tests" folder of the measure you an see what that code looks like. Here is a link to the reporting measures on BCL. The default one is named "Standard Reports".

Here is part of the code, it should result in an HTML file. For reference below is the code from the test.

def test_StandardReports

  assert(File.exist?(modelPath()))
  assert(File.exist?(sqlPath()))

  # create an instance of the measure
  measure = StandardReports.new

  # create an instance of a runner
  runner = OpenStudio::Ruleset::OSRunner.new

  # get arguments and test that they are what we are expecting
  arguments = measure.arguments()
  assert_equal(0, arguments.size)

  # set up runner, this will happen automatically when measure is run in PAT
  runner.setLastOpenStudioModelPath(OpenStudio::Path.new(modelPath))
  runner.setLastEnergyPlusSqlFilePath(OpenStudio::Path.new(sqlPath))

  # set argument values to good values and run the measure
  argument_map = OpenStudio::Ruleset::OSArgumentMap.new
  measure.run(runner, argument_map)
  result = runner.result
  show_output(result)
  assert(result.value.valueName == "Success")
  assert(result.warnings.size == 0)
  #assert(result.info.size == 1)

  assert(File.exist?(reportPath()))

end