OpenStudioCore:analysis
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Related Functions | List of all members
openstudio::analysis::MeasureGroup Class Reference

#include <MeasureGroup.hpp>

+ Inheritance diagram for openstudio::analysis::MeasureGroup:

Public Member Functions

Constructors and Destructors
 MeasureGroup (const std::string &name, const std::vector< Measure > &measures)
 Construct from a vector of measures (concrete values of the variable). More...
 
 MeasureGroup (const UUID &uuid, const UUID &versionUUID, const std::string &name, const std::string &displayName, const std::string &description, const boost::optional< UncertaintyDescription > &udesc, const std::vector< Measure > &measures)
 Constructor provided for deserialization; not for general use. More...
 
virtual ~MeasureGroup ()
 
Getters and Queries
std::vector< Measuremeasures (bool selectedMeasuresOnly) const
 
std::vector< Measureperturbations (bool selectedMeasuresOnly) const
 
Measure getMeasure (int index) const
 
Measure getPerturbation (int index) const
 
boost::optional< MeasuregetMeasureByUUID (const UUID &uuid) const
 
boost::optional< MeasuregetPerturbationByUUID (const UUID &uuid) const
 
unsigned numMeasures (bool selectedMeasuresOnly) const
 
unsigned numPerturbations (bool selectedPerturbationsOnly) const
 
boost::optional< int > getIndexByUUID (const Measure &measure) const
 
Measure getMeasure (const DataPoint &dataPoint) const
 
Measure getPerturbation (const DataPoint &dataPoint) const
 
Setters
bool push (const Measure &measure)
 
bool insert (int index, const Measure &measure)
 
bool erase (const Measure &measure)
 
bool swap (const Measure &measure1, const Measure &measure2)
 
bool setMeasures (const std::vector< Measure > &measures)
 
bool setPerturbations (const std::vector< Measure > &measures)
 
void clearMeasures ()
 
void clearPerturbations ()
 
- Public Member Functions inherited from openstudio::analysis::DiscreteVariable
virtual ~DiscreteVariable ()
 
std::vector< int > validValues (bool selectedOnly) const
 Returns the valid integer values for this variable. More...
 
int numValidValues (bool selectedOnly) const
 
- Public Member Functions inherited from openstudio::analysis::InputVariable
virtual ~InputVariable ()
 
boost::optional
< FileReferenceType > 
inputFileType () const
 
boost::optional
< FileReferenceType > 
outputFileType () const
 
boost::optional
< UncertaintyDescription
uncertaintyDescription () const
 
bool isValid (const QVariant &value) const
 Returns true if value is valid for this Variable. More...
 
bool isValid (const UncertaintyDescription &udesc) const
 Returns true if udesc is valid for this Variable. More...
 
WorkflowStep asWorkflowStep () const
 
bool setUncertaintyDescription (const UncertaintyDescription &udesc)
 
void resetUncertaintyDescription ()
 
runmanager::WorkItem createWorkItem (const QVariant &value, const openstudio::path &rubyIncludeDirectory) const
 Create a runmanager::WorkItem for instantiating this Variable at value. More...
 
- Public Member Functions inherited from openstudio::analysis::Variable
virtual ~Variable ()
 
double getValue (const DataPoint &dataPoint) const
 Get the variable value from a dataPoint. More...
 
- Public Member Functions inherited from openstudio::analysis::AnalysisObject
virtual ~AnalysisObject ()
 
AnalysisObject clone () const
 Deep copy. More...
 
std::string name () const
 
std::string displayName () const
 
std::string description () const
 
openstudio::UUID uuid () const
 
openstudio::UUID versionUUID () const
 
bool isDirty () const
 Returns true if this object has been changed since its dirty flag was last cleared. More...
 
bool operator== (const AnalysisObject &other) const
 Compare impls. More...
 
bool operator!= (const AnalysisObject &other) const
 
bool uuidEqual (const AnalysisObject &other) const
 
bool uuidAndVersionEqual (const AnalysisObject &other) const
 
boost::optional< AnalysisObjectparent () const
 
void setName (const std::string &newName)
 
void setDisplayName (const std::string &newDisplayName)
 
void setDescription (const std::string &newDescription)
 
bool clearDirtyFlag ()
 Call this method to reset the dirty flag of this object and all its children. More...
 
bool connect (const char *signal, const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection) const
 Connect signal from this AnalysisObject to slot on receiver. More...
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *slot=nullptr) const
 
template<typename T >
cast () const
 Cast to type T. More...
 
template<typename T >
boost::optional< T > optionalCast () const
 Cast to boost::optional<T>. More...
 

Related Functions

(Note that these are not member functions.)

typedef std::vector< MeasureGroupMeasureGroupVector
 
typedef boost::optional
< MeasureGroup
OptionalMeasureGroup
 

Detailed Description

MeasureGroup is an DiscreteVariable that takes on discrete values, each of which is described by a Measure.

Essentially, MeasureGroup is a mapping from 0, 1, ... , (numMeasures(false) - 1) to a Measure that defines what setting the variable value to the given integer means. MeasureGroup forwards any createWorkItem requests along to the appropriate DiscretePertubation using this mapping.

Constructor & Destructor Documentation

openstudio::analysis::MeasureGroup::MeasureGroup ( const std::string &  name,
const std::vector< Measure > &  measures 
)

Construct from a vector of measures (concrete values of the variable).

Performs the following error checking and clean-up operations:

  • Allows at most one NullMeasure (keeping the first and deleting all others).
  • Ensures that the variable always acts on the same type of model, for instance, idf or osm.

createJob is implemented assuming QVariant value is an integer index into the measure vector.

openstudio::analysis::MeasureGroup::MeasureGroup ( const UUID &  uuid,
const UUID &  versionUUID,
const std::string &  name,
const std::string &  displayName,
const std::string &  description,
const boost::optional< UncertaintyDescription > &  udesc,
const std::vector< Measure > &  measures 
)

Constructor provided for deserialization; not for general use.

virtual openstudio::analysis::MeasureGroup::~MeasureGroup ( )
inlinevirtual

Member Function Documentation

void openstudio::analysis::MeasureGroup::clearMeasures ( )
void openstudio::analysis::MeasureGroup::clearPerturbations ( )
bool openstudio::analysis::MeasureGroup::erase ( const Measure measure)
boost::optional<int> openstudio::analysis::MeasureGroup::getIndexByUUID ( const Measure measure) const
Measure openstudio::analysis::MeasureGroup::getMeasure ( int  index) const
Measure openstudio::analysis::MeasureGroup::getMeasure ( const DataPoint dataPoint) const
boost::optional<Measure> openstudio::analysis::MeasureGroup::getMeasureByUUID ( const UUID &  uuid) const
Measure openstudio::analysis::MeasureGroup::getPerturbation ( int  index) const
Measure openstudio::analysis::MeasureGroup::getPerturbation ( const DataPoint dataPoint) const
boost::optional<Measure> openstudio::analysis::MeasureGroup::getPerturbationByUUID ( const UUID &  uuid) const
bool openstudio::analysis::MeasureGroup::insert ( int  index,
const Measure measure 
)
std::vector<Measure> openstudio::analysis::MeasureGroup::measures ( bool  selectedMeasuresOnly) const
unsigned openstudio::analysis::MeasureGroup::numMeasures ( bool  selectedMeasuresOnly) const
unsigned openstudio::analysis::MeasureGroup::numPerturbations ( bool  selectedPerturbationsOnly) const
std::vector<Measure> openstudio::analysis::MeasureGroup::perturbations ( bool  selectedMeasuresOnly) const
bool openstudio::analysis::MeasureGroup::push ( const Measure measure)
bool openstudio::analysis::MeasureGroup::setMeasures ( const std::vector< Measure > &  measures)
bool openstudio::analysis::MeasureGroup::setPerturbations ( const std::vector< Measure > &  measures)
bool openstudio::analysis::MeasureGroup::swap ( const Measure measure1,
const Measure measure2 
)

Friends And Related Function Documentation

typedef std::vector<MeasureGroup> MeasureGroupVector
related
typedef boost::optional<MeasureGroup> OptionalMeasureGroup
related