OpenStudio:measure
Loading...
Searching...
No Matches
openstudio::measure::ReportingMeasure Class Reference

#include <ReportingMeasure.hpp>

+ Inheritance diagram for openstudio::measure::ReportingMeasure:

Public Member Functions

Constructors and Destructors
virtual ~ReportingMeasure ()=default
 
Getters
virtual std::vector< OSArgumentarguments (const openstudio::model::Model &model) const
 Returns the arguments for this script.
 
virtual std::vector< OSOutputoutputs () const
 Returns the outputs for this script.
 
- Public Member Functions inherited from openstudio::measure::OSMeasure
virtual ~OSMeasure ()=default
 
virtual std::string name () const
 user facing name of this measure, defaults to empty
 
virtual std::string description () const
 user facing description of this measure, defaults to empty
 
virtual std::string taxonomy () const
 user facing BCL taxonomy of this measure, defaults to empty
 
virtual std::string modeler_description () const
 user facing technical description of this measure, defaults to empty
 
MeasureType measureType () const
 
virtual OS_DEPRECATED bool registerWithSketchUp () const
 Register this script with SketchUp.
 
virtual OS_DEPRECATED bool registerWithApplication () const
 Register this script with an Application.
 

Actions

virtual bool run (OSRunner &runner, const std::map< std::string, OSArgument > &user_arguments) const
 Run the script with the given runner and user_arguments.
 
virtual bool modelOutputRequests (openstudio::model::Model &model, OSRunner &runner, const std::map< std::string, OSArgument > &user_arguments) const
 This method is called on all reporting measures immediately before the translation to E+ IDF.
 
virtual std::vector< IdfObject > energyPlusOutputRequests (OSRunner &runner, const std::map< std::string, OSArgument > &user_arguments) const
 This method is called on all reporting measures immediately before the E+ simulation.
 
 ReportingMeasure ()
 

Additional Inherited Members

- Protected Member Functions inherited from openstudio::measure::OSMeasure
 OSMeasure (MeasureType measureType)
 

Detailed Description

ReportingMeasure is an abstract base class for UserScripts that generate reports.

Constructor & Destructor Documentation

◆ ~ReportingMeasure()

virtual openstudio::measure::ReportingMeasure::~ReportingMeasure ( )
virtualdefault

◆ ReportingMeasure()

openstudio::measure::ReportingMeasure::ReportingMeasure ( )
protected

Member Function Documentation

◆ arguments()

virtual std::vector< OSArgument > openstudio::measure::ReportingMeasure::arguments ( const openstudio::model::Model & model) const
virtual

Returns the arguments for this script.

In interactive applications, an OSRunner presents these arguments to the user to produce an OSArgumentMap of user_arguments that it then passes to this script's run method. The same basic steps should happen in applications with non- interactive scripts, but in that case an entity other than an OSRunner may be in charge of collecting user arguments. The base class implementation returns an empty vector.

◆ energyPlusOutputRequests()

virtual std::vector< IdfObject > openstudio::measure::ReportingMeasure::energyPlusOutputRequests ( OSRunner & runner,
const std::map< std::string, OSArgument > & user_arguments ) const
virtual

This method is called on all reporting measures immediately before the E+ simulation.

The code that injects these objects into the IDF checks that only objects of allowed types are added to prevent changes that impact energy use. The injector code also prevents duplicate report requests. The default implementation of this method returns an empty vector. The runner allows the user to load the last osm/idf and to log messages. The argument map is available with the arguments for the reporting measure.

◆ modelOutputRequests()

virtual bool openstudio::measure::ReportingMeasure::modelOutputRequests ( openstudio::model::Model & model,
OSRunner & runner,
const std::map< std::string, OSArgument > & user_arguments ) const
virtual

This method is called on all reporting measures immediately before the translation to E+ IDF.

There is an implicit contract that this method should NOT be modifying your model in a way that would produce different results, meaning it should only add or modify reporting-related elements (eg: OutputTableSummaryReports, OutputControlFiles, etc) but that is not going to be enforced. If you mean to modify the model in a significant way, use a ModelMeasure.

◆ outputs()

virtual std::vector< OSOutput > openstudio::measure::ReportingMeasure::outputs ( ) const
virtual

Returns the outputs for this script.

The base class implementation returns an empty vector.

◆ run()

virtual bool openstudio::measure::ReportingMeasure::run ( OSRunner & runner,
const std::map< std::string, OSArgument > & user_arguments ) const
virtual

Run the script with the given runner and user_arguments.

The base class implementation calls runner.prepareForMeasureRun(*this) and should be called at the beginning of derived class implementations of this method. (In C++, that call looks like ReportingMeasure::run(runner, user_arguments). In Ruby that call looks like super(runner, user_arguments).