OpenStudio:model
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | Related Functions | List of all members
openstudio::model::Model Class Reference

#include <Model.hpp>

+ Inheritance diagram for openstudio::model::Model:

Public Member Functions

void applySizingValues ()
 For each object in the model with autosizable fields, retrieves the autosized values from the sizing run and then sets these values in the object explicitly. More...
 
void autosize ()
 For each object in the model with autosizable fields, sets all autosizable fields to 'autosize'. More...
 
void connect (ModelObject sourceObject, unsigned sourcePort, ModelObject targetObject, unsigned targetPort) const
 Connects the sourcePort on the source ModelObject to the targetPort on the target ModelObject. More...
 
void disconnect (ModelObject object, unsigned port)
 Disconnects the port on the given ModelObject. More...
 
template<>
Building getUniqueModelObject ()
 
template<>
FoundationKivaSettings getUniqueModelObject ()
 
template<>
OutputControlFiles getUniqueModelObject ()
 
template<>
OutputControlReportingTolerances getUniqueModelObject ()
 
template<>
OutputControlTableStyle getUniqueModelObject ()
 
template<>
OutputControlTimestamp getUniqueModelObject ()
 
template<>
OutputDiagnostics getUniqueModelObject ()
 
template<>
OutputDebuggingData getUniqueModelObject ()
 
template<>
OutputJSON getUniqueModelObject ()
 
template<>
OutputSQLite getUniqueModelObject ()
 
template<>
OutputEnergyManagementSystem getUniqueModelObject ()
 
template<>
OutputTableSummaryReports getUniqueModelObject ()
 
template<>
OutputSchedules getUniqueModelObject ()
 
template<>
OutputConstructions getUniqueModelObject ()
 
template<>
PerformancePrecisionTradeoffs getUniqueModelObject ()
 
template<>
LifeCycleCostParameters getUniqueModelObject ()
 
template<>
SizingParameters getUniqueModelObject ()
 
template<>
RadianceParameters getUniqueModelObject ()
 
template<>
RunPeriod getUniqueModelObject ()
 
template<>
RunPeriodControlDaylightSavingTime getUniqueModelObject ()
 
template<>
YearDescription getUniqueModelObject ()
 
template<>
Site getUniqueModelObject ()
 
template<>
SiteGroundReflectance getUniqueModelObject ()
 
template<>
SiteWaterMainsTemperature getUniqueModelObject ()
 
template<>
SiteGroundTemperatureBuildingSurface getUniqueModelObject ()
 
template<>
SiteGroundTemperatureFCfactorMethod getUniqueModelObject ()
 
template<>
SiteGroundTemperatureDeep getUniqueModelObject ()
 
template<>
SiteGroundTemperatureShallow getUniqueModelObject ()
 
template<>
Facility getUniqueModelObject ()
 
template<>
WeatherFile getUniqueModelObject ()
 
template<>
SimulationControl getUniqueModelObject ()
 
template<>
LightingSimulationControl getUniqueModelObject ()
 
template<>
AirflowNetworkSimulationControl getUniqueModelObject ()
 
template<>
InsideSurfaceConvectionAlgorithm getUniqueModelObject ()
 
template<>
OutsideSurfaceConvectionAlgorithm getUniqueModelObject ()
 
template<>
HeatBalanceAlgorithm getUniqueModelObject ()
 
template<>
ZoneAirContaminantBalance getUniqueModelObject ()
 
template<>
ZoneAirHeatBalanceAlgorithm getUniqueModelObject ()
 
template<>
ZoneAirMassFlowConservation getUniqueModelObject ()
 
template<>
ZoneCapacitanceMultiplierResearchSpecial getUniqueModelObject ()
 
template<>
ConvergenceLimits getUniqueModelObject ()
 
template<>
ShadowCalculation getUniqueModelObject ()
 
template<>
Timestep getUniqueModelObject ()
 
template<>
ClimateZones getUniqueModelObject ()
 
template<>
EnvironmentalImpactFactors getUniqueModelObject ()
 
template<>
ExternalInterface getUniqueModelObject ()
 
boost::optional< ComponentDatainsertComponent (const Component &component)
 Inserts Component into Model and returns the primary object, if possible. More...
 
std::vector< ModelObjectmodelObjects (bool sorted=false) const
 Get all model objects. More...
 
bool operator== (const Model &other) const
 Equality test, tests if this Model shares the same implementation object with other. More...
 
std::vector
< openstudio::IdfObject > 
purgeUnusedResourceObjects ()
 Removes all ResourceObjects with nonResourceObjectUseCount() == 0. More...
 
std::vector
< openstudio::IdfObject > 
purgeUnusedResourceObjects (IddObjectType iddObjectType)
 Removes all ResourceObjects of given IddObjectType with directUseCount() == 0. More...
 
Constructors and Destructors
 Model ()
 Creates a new, empty Model. More...
 
 Model (const openstudio::IdfFile &idfFile)
 Creates a new Model with one ModelObject for each IdfObject in the given IdfFile. More...
 
 Model (const openstudio::Workspace &workspace)
 Creates a new Model with one ModelObject for each WorkspaceObjects in the given Workspace. More...
 
virtual ~Model ()=default
 
 Model (const Model &other)=default
 
 Model (Model &&other)=default
 
Modeloperator= (const Model &)=default
 
Modeloperator= (Model &&)=default
 
Getters
WorkflowJSON workflowJSON () const
 Get the WorkflowJSON. More...
 
boost::optional< SqlFile > sqlFile () const
 Returns the EnergyPlus output SqlFile if set. More...
 
boost::optional< Buildingbuilding () const
 Get the Building object if there is one, this implementation uses a cached reference to the Building object which can be significantly faster than calling getOptionalUniqueModelObject<Building>(). More...
 
boost::optional
< FoundationKivaSettings
foundationKivaSettings () const
 Get the FoundationKivaSettings object if there is one, this implementation uses a cached reference to the FoundationKivaSettings object which can be significantly faster than calling getOptionalUniqueModelObject<FoundationKivaSettings>(). More...
 
boost::optional
< OutputControlFiles
outputControlFiles () const
 Get the OutputControlFiles object if there is one, this implementation uses a cached reference to the OutputControlFiles object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlFiles>(). More...
 
boost::optional
< OutputControlReportingTolerances
outputControlReportingTolerances () const
 Get the OutputControlReportingTolerances object if there is one, this implementation uses a cached reference to the OutputControlReportingTolerances object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlReportingTolerances>(). More...
 
boost::optional
< OutputControlTableStyle
outputControlTableStyle () const
 Get the OutputControlTableStyle object if there is one, this implementation uses a cached reference to the OutputControlTableStyle object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlTableStyle>(). More...
 
boost::optional
< OutputControlTimestamp
outputControlTimestamp () const
 Get the OutputControlTimestamp object if there is one, this implementation uses a cached reference to the OutputControlTimestamp object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlTimestamp>(). More...
 
boost::optional
< OutputDiagnostics
outputDiagnostics () const
 Get the OutputDiagnostics object if there is one, this implementation uses a cached reference to the OutputDiagnostics object which can be significantly faster than calling getOptionalUniqueModelObject<OutputDiagnostics>(). More...
 
boost::optional
< OutputDebuggingData
outputDebuggingData () const
 Get the OutputDebuggingData object if there is one, this implementation uses a cached reference to the OutputDebuggingData object which can be significantly faster than calling getOptionalUniqueModelObject<OutputDebuggingData>(). More...
 
boost::optional< OutputJSONoutputJSON () const
 Get the OutputJSON object if there is one, this implementation uses a cached reference to the OutputJSON object which can be significantly faster than calling getOptionalUniqueModelObject<OutputJSON>(). More...
 
boost::optional< OutputSQLiteoutputSQLite () const
 Get the OutputSQLite object if there is one, this implementation uses a cached reference to the OutputSQLite object which can be significantly faster than calling getOptionalUniqueModelObject<OutputSQLite>(). More...
 
boost::optional
< OutputEnergyManagementSystem
outputEnergyManagementSystem () const
 Get the OutputEnergyManagementSystem object if there is one, this implementation uses a cached reference to the OutputEnergyManagementSystem object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlFiles>(). More...
 
boost::optional
< OutputTableSummaryReports
outputTableSummaryReports () const
 Get the OutputTableSummaryReports object if there is one, this implementation uses a cached reference to the OutputTableSummaryReports object which can be significantly faster than calling getOptionalUniqueModelObject<OutputTableSummaryReports>(). More...
 
boost::optional< OutputSchedulesoutputSchedules () const
 Get the OutputSchedules object if there is one, this implementation uses a cached reference to the OutputSchedules object which can be significantly faster than calling getOptionalUniqueModelObject<OutputSchedules>(). More...
 
boost::optional
< OutputConstructions
outputConstructions () const
 Get the OutputConstructions object if there is one, this implementation uses a cached reference to the OutputConstructions object which can be significantly faster than calling getOptionalUniqueModelObject<OutputConstructions>(). More...
 
boost::optional
< PerformancePrecisionTradeoffs
performancePrecisionTradeoffs () const
 Get the PerformancePrecisionTradeoffs object if there is one, this implementation uses a cached reference to the PerformancePrecisionTradeoffs object which can be significantly faster than calling getOptionalUniqueModelObject<PerformancePrecisionTradeoffs>(). More...
 
boost::optional
< LifeCycleCostParameters
lifeCycleCostParameters () const
 Get the LifeCycleCostParameters object if there is one, this implementation uses a cached reference to the LifeCycleCostParameters object which can be significantly faster than calling getOptionalUniqueModelObject<LifeCycleCostParameters>(). More...
 
boost::optional< SizingParameterssizingParameters () const
 Get the SizingParameters object if there is one, this implementation uses a cached reference to the SizingParameters object which can be significantly faster than calling getOptionalUniqueModelObject<SizingParameters>(). More...
 
boost::optional
< RadianceParameters
radianceParameters () const
 Get the RadianceParameters object if there is one, this implementation uses a cached reference to the RadianceParameters object which can be significantly faster than calling getOptionalUniqueModelObject<RadianceParameters>(). More...
 
boost::optional< RunPeriodrunPeriod () const
 Get the RunPeriod object if there is one, this implementation uses a cached reference to the RunPeriod object which can be significantly faster than calling getOptionalUniqueModelObject<RunPeriod>(). More...
 
boost::optional
< RunPeriodControlDaylightSavingTime
runPeriodControlDaylightSavingTime () const
 Get the RunPeriodControlDaylightSavingTime object if there is one, this implementation uses a cached reference to the RunPeriodControlDaylightSavingTime object which can be significantly faster than calling getOptionalUniqueModelObject<RunPeriodControlDaylightSavingTime>(). More...
 
boost::optional< YearDescriptionyearDescription () const
 Get the YearDescription object if there is one, this implementation uses a cached reference to the YearDescription object which can be significantly faster than calling getOptionalUniqueModelObject<YearDescription>(). More...
 
boost::optional< Sitesite () const
 Get the Site object if there is one, this implementation uses a cached reference to the Site object which can be significantly faster than calling getOptionalUniqueModelObject<Site>(). More...
 
boost::optional
< SiteGroundReflectance
siteGroundReflectance () const
 Get the SiteGroundReflectance object if there is one, this implementation uses a cached reference to the SiteGroundReflectance object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundReflectance>(). More...
 
boost::optional
< SiteWaterMainsTemperature
siteWaterMainsTemperature () const
 Get the SiteWaterMainsTemperature object if there is one, this implementation uses a cached reference to the SiteWaterMainsTemperature object which can be significantly faster than calling getOptionalUniqueModelObject<SiteWaterMainsTemperature>(). More...
 
boost::optional
< SiteGroundTemperatureBuildingSurface
siteGroundTemperatureBuildingSurface () const
 Get the SiteGroundTemperatureBuildingSurface object if there is one, this implementation uses a cached reference to the SiteGroundTemperatureBuildingSurface object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundTemperatureBuildingSurface>(). More...
 
boost::optional
< SiteGroundTemperatureFCfactorMethod
siteGroundTemperatureFCfactorMethod () const
 Get the SiteGroundTemperatureFCfactorMethod object if there is one, this implementation uses a cached reference to the SiteGroundTemperatureFCfactorMethod object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundTemperatureFCfactorMethod>(). More...
 
boost::optional
< SiteGroundTemperatureDeep
siteGroundTemperatureDeep () const
 Get the SiteGroundTemperatureDeep object if there is one, this implementation uses a cached reference to the SiteGroundTemperatureDeep object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundTemperatureDeep>(). More...
 
boost::optional
< SiteGroundTemperatureShallow
siteGroundTemperatureShallow () const
 Get the SiteGroundTemperatureShallow object if there is one, this implementation uses a cached reference to the SiteGroundTemperatureShallow object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundTemperatureShallow>(). More...
 
boost::optional< Facilityfacility () const
 Get the Facility object if there is one, this implementation uses a cached reference to the Facility object which can be significantly faster than calling getOptionalUniqueModelObject<Facility>(). More...
 
boost::optional< WeatherFileweatherFile () const
 Get the WeatherFile object if there is one, this implementation uses a cached reference to the WeatherFile object which can be significantly faster than calling getOptionalUniqueModelObject<WeatherFile>(). More...
 
boost::optional
< SimulationControl
simulationControl () const
 Get the SimulationControl object if there is one, this implementation uses a cached reference to the SimulationControl object which can be significantly faster than calling getOptionalUniqueModelObject<SimulationControl>(). More...
 
boost::optional
< LightingSimulationControl
lightingSimulationControl () const
 Get the LightingSimulationControl object if there is one, this implementation uses a cached reference to the LightingSimulationControl object which can be significantly faster than calling getOptionalUniqueModelObject<LightingSimulationControl>(). More...
 
boost::optional
< AirflowNetworkSimulationControl
airflowNetworkSimulationControl () const
 Get the AirflowNetworkSimulationControl object if there is one, this implementation uses a cached reference to the AirflowNetworkSimulationControl object which can be significantly faster than calling getOptionalUniqueModelObject<AirflowNetworkSimulationControl>(). More...
 
boost::optional
< InsideSurfaceConvectionAlgorithm
insideSurfaceConvectionAlgorithm () const
 Get the InsideSurfaceConvectionAlgorithm object if there is one, this implementation uses a cached reference to the InsideSurfaceConvectionAlgorithm object which can be significantly faster than calling getOptionalUniqueModelObject<InsideSurfaceConvectionAlgorithm>(). More...
 
boost::optional
< OutsideSurfaceConvectionAlgorithm
outsideSurfaceConvectionAlgorithm () const
 Get the OutsideSurfaceConvectionAlgorithm object if there is one, this implementation uses a cached reference to the OutsideSurfaceConvectionAlgorithm object which can be significantly faster than calling getOptionalUniqueModelObject<OutsideSurfaceConvectionAlgorithm>(). More...
 
boost::optional
< HeatBalanceAlgorithm
heatBalanceAlgorithm () const
 Get the HeatBalanceAlgorithm object if there is one, this implementation uses a cached reference to the HeatBalanceAlgorithm object which can be significantly faster than calling getOptionalUniqueModelObject<HeatBalanceAlgorithm>(). More...
 
boost::optional
< ZoneAirContaminantBalance
zoneAirContaminantBalance () const
 Get the ZoneAirContaminantBalance object if there is one, this implementation uses a cached reference to the ZoneAirContaminantBalance object which can be significantly faster than calling getOptionalUniqueModelObject<ZoneAirContaminantBalance>(). More...
 
boost::optional
< ZoneAirHeatBalanceAlgorithm
zoneAirHeatBalanceAlgorithm () const
 Get the ZoneAirHeatBalanceAlgorithm object if there is one, this implementation uses a cached reference to the ZoneAirHeatBalanceAlgorithm object which can be significantly faster than calling getOptionalUniqueModelObject<ZoneAirHeatBalanceAlgorithm>(). More...
 
boost::optional
< ZoneAirMassFlowConservation
zoneAirMassFlowConservation () const
 Get the ZoneAirMassFlowConservation object if there is one, this implementation uses a cached reference to the ZoneAirMassFlowConservation object which can be significantly faster than calling getOptionalUniqueModelObject<ZoneAirMassFlowConservation>(). More...
 
boost::optional
< ZoneCapacitanceMultiplierResearchSpecial
zoneCapacitanceMultiplierResearchSpecial () const
 Get the ZoneCapacitanceMultiplierResearchSpecial object if there is one, this implementation uses a cached reference to the ZoneCapacitanceMultiplierResearchSpecial object which can be significantly faster than calling getOptionalUniqueModelObject<ZoneCapacitanceMultiplierResearchSpecial>(). More...
 
boost::optional
< ConvergenceLimits
convergenceLimits () const
 Get the ConvergenceLimits object if there is one, this implementation uses a cached reference to the ConvergenceLimits object which can be significantly faster than calling getOptionalUniqueModelObject<ConvergenceLimits>(). More...
 
boost::optional
< ShadowCalculation
shadowCalculation () const
 Get the ShadowCalculation object if there is one, this implementation uses a cached reference to the ShadowCalculation object which can be significantly faster than calling getOptionalUniqueModelObject<ShadowCalculation>(). More...
 
boost::optional< Timesteptimestep () const
 Get the Timestep object if there is one, this implementation uses a cached reference to the Timestep object which can be significantly faster than calling getOptionalUniqueModelObject<Timestep>(). More...
 
boost::optional< ClimateZonesclimateZones () const
 Get the ClimateZones object if there is one, this implementation uses a cached reference to the ClimateZones object which can be significantly faster than calling getOptionalUniqueModelObject<ClimateZones>(). More...
 
boost::optional
< EnvironmentalImpactFactors
environmentalImpactFactors () const
 Get the EnvironmentalImpactFactors object if there is one, this implementation uses a cached reference to the EnvironmentalImpactFactors object which can be significantly faster than calling getOptionalUniqueModelObject<EnvironmentalImpactFactors>(). More...
 
boost::optional
< ExternalInterface
externalInterface () const
 Get the ExternalInterface object if there is one, this implementation uses a cached reference to the ExternalInterface object which can be significantly faster than calling getOptionalUniqueModelObject<ExternalInterface>(). More...
 
boost::optional< int > calendarYear () const
 Get or create the YearDescription object if there is one, then call method from YearDescription. More...
 
std::string dayofWeekforStartDay () const
 
bool isDayofWeekforStartDayDefaulted () const
 
bool isLeapYear () const
 
bool isIsLeapYearDefaulted () const
 
bool setCalendarYear (int calendarYear)
 
void resetCalendarYear ()
 
bool setDayofWeekforStartDay (const std::string &dayofWeekforStartDay)
 
void resetDayofWeekforStartDay ()
 
bool setIsLeapYear (bool isLeapYear)
 
void resetIsLeapYear ()
 
int assumedYear ()
 
openstudio::Date makeDate (openstudio::MonthOfYear monthOfYear, unsigned dayOfMonth)
 
openstudio::Date makeDate (unsigned monthOfYear, unsigned dayOfMonth)
 
openstudio::Date makeDate (openstudio::NthDayOfWeekInMonth n, openstudio::DayOfWeek dayOfWeek, openstudio::MonthOfYear monthOfYear)
 
openstudio::Date makeDate (unsigned dayOfYear)
 
Schedule alwaysOnDiscreteSchedule () const
 Get an always on schedule with discrete type limits if there is one. More...
 
std::string alwaysOnDiscreteScheduleName () const
 Get the always on schedule with discrete type limits name. More...
 
Schedule alwaysOffDiscreteSchedule () const
 Get an always off schedule with discrete type limits if there is one. More...
 
std::string alwaysOffDiscreteScheduleName () const
 Get the always off schedule with discrete type limits name. More...
 
Schedule alwaysOnContinuousSchedule () const
 Get an always on schedule with continuous type limits if there is one. More...
 
std::string alwaysOnContinuousScheduleName () const
 Get the always on schedule with continuous type limits name. More...
 
Node outdoorAirNode () const
 Get a Node named 'Model Outdoor Air Node' (intended to be forward translated to an OutdoorAir:Node) and not connected to a PlantLoop or AirLoopHVAC. More...
 
SpaceType plenumSpaceType () const
 Get the space type used for plenums if there is one. More...
 
std::string plenumSpaceTypeName () const
 Get the space type name used for plenums. More...
 
Setters
bool setWorkflowJSON (const WorkflowJSON &workflowJSON)
 Set the WorkflowJSON. More...
 
void resetWorkflowJSON ()
 Reset the WorkflowJSON. More...
 
bool setSqlFile (const SqlFile &sqlFile)
 Sets the EnergyPlus output SqlFile. More...
 
bool resetSqlFile ()
 Resets the EnergyPlus output SqlFile. More...
 
Template Methods
template<typename T >
boost::optional< T > getModelObject (const Handle &handle) const
 Returns the ModelObject referenced by handle if it is of type T. More...
 
template<typename T >
getUniqueModelObject ()
 Returns the unique ModelObject of type T, creates a one if none are found. More...
 
template<typename T >
boost::optional< T > getOptionalUniqueModelObject () const
 Returns the unique ModelObject of type T if it is found. More...
 
template<typename T >
std::vector< T > getModelObjects (bool sorted=false) const
 Returns all ModelObjects of type T. More...
 
template<typename T >
std::vector< T > getConcreteModelObjects () const
 Returns all ModelObjects of type T, using T::iddObjectType() to speed up the search. More...
 
template<typename T >
std::vector< T > getModelObjects (const std::vector< openstudio::Handle > &handles) const
 Returns the subset of ModelObjects referenced by handles which are of type T. More...
 
template<typename T >
boost::optional< T > getModelObjectByName (const std::string &name) const
 Returns the ModelObjects of type T with name (exactMatch). More...
 
template<typename T >
std::vector< T > getModelObjectsByName (const std::string &name, bool exactMatch=true) const
 Returns all ModelObjects of type T with given name. More...
 
template<typename T >
boost::optional< T > getConcreteModelObjectByName (const std::string &name) const
 
template<typename T >
std::vector< T > getConcreteModelObjectsByName (const std::string &name) const
 

Static Public Member Functions

static boost::optional< Modelload (const path &osmPath)
 Load Model from file, attempts to load WorkflowJSON from standard path. More...
 
static boost::optional< Modelload (const path &osmPath, const path &workflowJSONPath)
 Load Model and WorkflowJSON from files, fails if either osm or workflowJSON cannot be loaded. More...
 

Related Functions

(Note that these are not member functions.)

bool compareInputAndOutput (const ModelObject &object, const std::string &attributeName, double inputResult, double outputResult, double tol, LogLevel logLevel=LogLevel::Debug)
 Compare inputResult to outputResult. More...
 
using ModelVector = std::vector< Model >
 
using OptionalModel = boost::optional< Model >
 

Detailed Description

Model derives from Workspace and is a container for ModelObjects as defined by the OpenStudio IDD.

The OpenStudio Model is primarily a container for ModelObjects which together define a complete or partial model of a building for energy simulation. A ModelObject cannot exist outside of a Model which ensures that each ModelObject can access the full Model to search for related ModelObjects. Model also accepts a connection to EnergyPlus simulation output through the SqlFile access to the SQLite output of EnergyPlus. Each ModelObject may then access simulation output in its own context. Connection to simulation data from other simulation engines is planned for the future.

The OpenStudio Model input data model is based on the schema defined by the OpenStudio IDD. Each concrete ModelObject wraps a particular data type in the OpenStudio IDD and Model enforces collection level constraints such as preventing multiple definitions of unique objects, updating reference fields that point from one ModelObject to another when the target's name changes, etc. Most of Model's capabilities for managing data according to an IDD schema are implemented in the Workspace base class. See the Workspace documentation in the utilities sub-project for more information about Workspace.

Constructor & Destructor Documentation

openstudio::model::Model::Model ( )

Creates a new, empty Model.

openstudio::model::Model::Model ( const openstudio::IdfFile &  idfFile)
explicit

Creates a new Model with one ModelObject for each IdfObject in the given IdfFile.

Any unwrapped IDD types will be wrapped with GenericModelObject.

openstudio::model::Model::Model ( const openstudio::Workspace &  workspace)
explicit

Creates a new Model with one ModelObject for each WorkspaceObjects in the given Workspace.

Any unwrapped IDD types will be wrapped with GenericModelObject.

virtual openstudio::model::Model::~Model ( )
virtualdefault
openstudio::model::Model::Model ( const Model other)
default
openstudio::model::Model::Model ( Model &&  other)
default

Member Function Documentation

boost::optional<AirflowNetworkSimulationControl> openstudio::model::Model::airflowNetworkSimulationControl ( ) const

Get the AirflowNetworkSimulationControl object if there is one, this implementation uses a cached reference to the AirflowNetworkSimulationControl object which can be significantly faster than calling getOptionalUniqueModelObject<AirflowNetworkSimulationControl>().

Schedule openstudio::model::Model::alwaysOffDiscreteSchedule ( ) const

Get an always off schedule with discrete type limits if there is one.

create a new schedule if necessary and add it to the model

std::string openstudio::model::Model::alwaysOffDiscreteScheduleName ( ) const

Get the always off schedule with discrete type limits name.

Schedule openstudio::model::Model::alwaysOnContinuousSchedule ( ) const

Get an always on schedule with continuous type limits if there is one.

create a new schedule if necessary and add it to the model

std::string openstudio::model::Model::alwaysOnContinuousScheduleName ( ) const

Get the always on schedule with continuous type limits name.

Schedule openstudio::model::Model::alwaysOnDiscreteSchedule ( ) const

Get an always on schedule with discrete type limits if there is one.

create a new schedule if necessary and add it to the model

std::string openstudio::model::Model::alwaysOnDiscreteScheduleName ( ) const

Get the always on schedule with discrete type limits name.

void openstudio::model::Model::applySizingValues ( )

For each object in the model with autosizable fields, retrieves the autosized values from the sizing run and then sets these values in the object explicitly.

Requires a sql file with sizing run results from a previous simulation. For example, if a ChillerElectricEIR's Reference Capacity was previously autosized to 120,000W by the sizing run, this method would find the 120,000W in the sql file and then set the Reference Capacity field to 120,000W explicitly. Next time a simulation is run, the chiller's capacity will be 120,000W, it will not be autosized during the sizing run.

int openstudio::model::Model::assumedYear ( )
void openstudio::model::Model::autosize ( )

For each object in the model with autosizable fields, sets all autosizable fields to 'autosize'.

Fields that previously contained hard-sized values will be overwritten by 'autosize.'

boost::optional<Building> openstudio::model::Model::building ( ) const

Get the Building object if there is one, this implementation uses a cached reference to the Building object which can be significantly faster than calling getOptionalUniqueModelObject<Building>().

boost::optional<int> openstudio::model::Model::calendarYear ( ) const

Get or create the YearDescription object if there is one, then call method from YearDescription.

boost::optional<ClimateZones> openstudio::model::Model::climateZones ( ) const

Get the ClimateZones object if there is one, this implementation uses a cached reference to the ClimateZones object which can be significantly faster than calling getOptionalUniqueModelObject<ClimateZones>().

void openstudio::model::Model::connect ( ModelObject  sourceObject,
unsigned  sourcePort,
ModelObject  targetObject,
unsigned  targetPort 
) const

Connects the sourcePort on the source ModelObject to the targetPort on the target ModelObject.

boost::optional<ConvergenceLimits> openstudio::model::Model::convergenceLimits ( ) const

Get the ConvergenceLimits object if there is one, this implementation uses a cached reference to the ConvergenceLimits object which can be significantly faster than calling getOptionalUniqueModelObject<ConvergenceLimits>().

std::string openstudio::model::Model::dayofWeekforStartDay ( ) const
void openstudio::model::Model::disconnect ( ModelObject  object,
unsigned  port 
)

Disconnects the port on the given ModelObject.

boost::optional<EnvironmentalImpactFactors> openstudio::model::Model::environmentalImpactFactors ( ) const

Get the EnvironmentalImpactFactors object if there is one, this implementation uses a cached reference to the EnvironmentalImpactFactors object which can be significantly faster than calling getOptionalUniqueModelObject<EnvironmentalImpactFactors>().

boost::optional<ExternalInterface> openstudio::model::Model::externalInterface ( ) const

Get the ExternalInterface object if there is one, this implementation uses a cached reference to the ExternalInterface object which can be significantly faster than calling getOptionalUniqueModelObject<ExternalInterface>().

boost::optional<Facility> openstudio::model::Model::facility ( ) const

Get the Facility object if there is one, this implementation uses a cached reference to the Facility object which can be significantly faster than calling getOptionalUniqueModelObject<Facility>().

boost::optional<FoundationKivaSettings> openstudio::model::Model::foundationKivaSettings ( ) const

Get the FoundationKivaSettings object if there is one, this implementation uses a cached reference to the FoundationKivaSettings object which can be significantly faster than calling getOptionalUniqueModelObject<FoundationKivaSettings>().

template<typename T >
boost::optional<T> openstudio::model::Model::getConcreteModelObjectByName ( const std::string &  name) const
inline
template<typename T >
std::vector<T> openstudio::model::Model::getConcreteModelObjects ( ) const
inline

Returns all ModelObjects of type T, using T::iddObjectType() to speed up the search.

This method will only work for concrete model objects (leaves in the ModelObject inheritance tree), hence the name.

template<typename T >
std::vector<T> openstudio::model::Model::getConcreteModelObjectsByName ( const std::string &  name) const
inline
template<typename T >
boost::optional<T> openstudio::model::Model::getModelObject ( const Handle &  handle) const
inline

Returns the ModelObject referenced by handle if it is of type T.

This method can be used with T as a concrete type (e.g. Zone) or as an abstract class (e.g. ParentObject).

Todo:
Use of this template method requires knowledge of the size of the implementation object. Therefore, to use model.getModelObject<Zone>(handle) the user must include both Zone.hpp and Zone_Impl.hpp. It may be better to instantiate each version of this template method to avoid exposing the implementation objects, this is an open question.
template<typename T >
boost::optional<T> openstudio::model::Model::getModelObjectByName ( const std::string &  name) const
inline

Returns the ModelObjects of type T with name (exactMatch).

This method can be used with T as a concrete type (e.g. Zone) or as an abstract class (e.g. ParentObject), but please see getConcreteModelObjectByName if T is concrete.

Todo:
Use of this template method requires knowledge of the size of the implementation object. Therefore, to use model.getModelObjectsByName<Zone>("Zone1") the user must include both Zone.hpp and Zone_Impl.hpp. It may be better to instantiate each version of this template method to avoid exposing the implementation objects, this is an open question.
template<typename T >
std::vector<T> openstudio::model::Model::getModelObjects ( bool  sorted = false) const
inline

Returns all ModelObjects of type T.

This method can be used with T as a concrete type (e.g. Zone) or as an abstract class (e.g. ParentObject).

Todo:
Use of this template method requires knowledge of the size of the implementation object. Therefore, to use model.getModelObjects<Zone>(), the user must include both Zone.hpp and Zone_Impl.hpp. It may be better to instantiate each version of this template method to avoid exposing the implementation objects, this is an open question.
template<typename T >
std::vector<T> openstudio::model::Model::getModelObjects ( const std::vector< openstudio::Handle > &  handles) const
inline

Returns the subset of ModelObjects referenced by handles which are of type T.

This method can be used with T as a concrete type (e.g. Zone) or as an abstract class (e.g. ParentObject).

Todo:
Use of this template method requires knowledge of the size of the implementation object. Therefore, to use model.getModelObjects<Zone>(handles) the user must include both Zone.hpp and Zone_Impl.hpp. It may be better to instantiate each version of this template method to avoid exposing the implementation objects, this is an open question.
template<typename T >
std::vector<T> openstudio::model::Model::getModelObjectsByName ( const std::string &  name,
bool  exactMatch = true 
) const
inline

Returns all ModelObjects of type T with given name.

This method can be used with T as a concrete type (e.g. Zone) or as an abstract class (e.g. ParentObject).

Todo:
Use of this template method requires knowledge of the size of the implementation object. Therefore, to use model.getModelObjectsByName<Zone>("Zone1") the user must include both Zone.hpp and Zone_Impl.hpp. It may be better to instantiate each version of this template method to avoid exposing the implementation objects, this is an open question.
template<typename T >
boost::optional<T> openstudio::model::Model::getOptionalUniqueModelObject ( ) const
inline

Returns the unique ModelObject of type T if it is found.

Todo:
Use of this template method requires knowledge of the size of the implementation object. Therefore, to use model.getOptionalUniqueModelObject<Facility>() the user must include both Facility.hpp and Facility_Impl.hpp. It may be better to instantiate each version of this template method to avoid exposing the implementation objects, this is an open question.
template<typename T >
T openstudio::model::Model::getUniqueModelObject ( )
inline

Returns the unique ModelObject of type T, creates a one if none are found.

Todo:
Use of this template method requires knowledge of the size of the implementation object. Therefore, to use model.getUniqueModelObject<Facility>() the user must include both Facility.hpp and Facility_Impl.hpp. It may be better to instantiate each version of this template method to avoid exposing the implementation objects, this is an open question.

Note that template specilizations are provided below for objects were there is a performance gain to be had by caching the unique model object eg: getUniqueModelObject<YearDescription>()

template<>
Building openstudio::model::Model::getUniqueModelObject ( )
template<>
FoundationKivaSettings openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputControlFiles openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputControlReportingTolerances openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputControlTableStyle openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputControlTimestamp openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputDiagnostics openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputDebuggingData openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputJSON openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputSQLite openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputEnergyManagementSystem openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputTableSummaryReports openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputSchedules openstudio::model::Model::getUniqueModelObject ( )
template<>
OutputConstructions openstudio::model::Model::getUniqueModelObject ( )
template<>
PerformancePrecisionTradeoffs openstudio::model::Model::getUniqueModelObject ( )
template<>
LifeCycleCostParameters openstudio::model::Model::getUniqueModelObject ( )
template<>
SizingParameters openstudio::model::Model::getUniqueModelObject ( )
template<>
RadianceParameters openstudio::model::Model::getUniqueModelObject ( )
template<>
RunPeriod openstudio::model::Model::getUniqueModelObject ( )
template<>
RunPeriodControlDaylightSavingTime openstudio::model::Model::getUniqueModelObject ( )
template<>
YearDescription openstudio::model::Model::getUniqueModelObject ( )
template<>
Site openstudio::model::Model::getUniqueModelObject ( )
template<>
SiteGroundReflectance openstudio::model::Model::getUniqueModelObject ( )
template<>
SiteWaterMainsTemperature openstudio::model::Model::getUniqueModelObject ( )
template<>
SiteGroundTemperatureBuildingSurface openstudio::model::Model::getUniqueModelObject ( )
template<>
SiteGroundTemperatureFCfactorMethod openstudio::model::Model::getUniqueModelObject ( )
template<>
SiteGroundTemperatureDeep openstudio::model::Model::getUniqueModelObject ( )
template<>
SiteGroundTemperatureShallow openstudio::model::Model::getUniqueModelObject ( )
template<>
Facility openstudio::model::Model::getUniqueModelObject ( )
template<>
WeatherFile openstudio::model::Model::getUniqueModelObject ( )
template<>
SimulationControl openstudio::model::Model::getUniqueModelObject ( )
template<>
LightingSimulationControl openstudio::model::Model::getUniqueModelObject ( )
template<>
AirflowNetworkSimulationControl openstudio::model::Model::getUniqueModelObject ( )
template<>
InsideSurfaceConvectionAlgorithm openstudio::model::Model::getUniqueModelObject ( )
template<>
OutsideSurfaceConvectionAlgorithm openstudio::model::Model::getUniqueModelObject ( )
template<>
HeatBalanceAlgorithm openstudio::model::Model::getUniqueModelObject ( )
template<>
ZoneAirContaminantBalance openstudio::model::Model::getUniqueModelObject ( )
template<>
ZoneAirHeatBalanceAlgorithm openstudio::model::Model::getUniqueModelObject ( )
template<>
ZoneAirMassFlowConservation openstudio::model::Model::getUniqueModelObject ( )
template<>
ZoneCapacitanceMultiplierResearchSpecial openstudio::model::Model::getUniqueModelObject ( )
template<>
ConvergenceLimits openstudio::model::Model::getUniqueModelObject ( )
template<>
ShadowCalculation openstudio::model::Model::getUniqueModelObject ( )
template<>
Timestep openstudio::model::Model::getUniqueModelObject ( )
template<>
ClimateZones openstudio::model::Model::getUniqueModelObject ( )
template<>
EnvironmentalImpactFactors openstudio::model::Model::getUniqueModelObject ( )
template<>
ExternalInterface openstudio::model::Model::getUniqueModelObject ( )
boost::optional<HeatBalanceAlgorithm> openstudio::model::Model::heatBalanceAlgorithm ( ) const

Get the HeatBalanceAlgorithm object if there is one, this implementation uses a cached reference to the HeatBalanceAlgorithm object which can be significantly faster than calling getOptionalUniqueModelObject<HeatBalanceAlgorithm>().

boost::optional<ComponentData> openstudio::model::Model::insertComponent ( const Component component)

Inserts Component into Model and returns the primary object, if possible.

boost::optional<InsideSurfaceConvectionAlgorithm> openstudio::model::Model::insideSurfaceConvectionAlgorithm ( ) const

Get the InsideSurfaceConvectionAlgorithm object if there is one, this implementation uses a cached reference to the InsideSurfaceConvectionAlgorithm object which can be significantly faster than calling getOptionalUniqueModelObject<InsideSurfaceConvectionAlgorithm>().

bool openstudio::model::Model::isDayofWeekforStartDayDefaulted ( ) const
bool openstudio::model::Model::isIsLeapYearDefaulted ( ) const
bool openstudio::model::Model::isLeapYear ( ) const
boost::optional<LifeCycleCostParameters> openstudio::model::Model::lifeCycleCostParameters ( ) const

Get the LifeCycleCostParameters object if there is one, this implementation uses a cached reference to the LifeCycleCostParameters object which can be significantly faster than calling getOptionalUniqueModelObject<LifeCycleCostParameters>().

boost::optional<LightingSimulationControl> openstudio::model::Model::lightingSimulationControl ( ) const

Get the LightingSimulationControl object if there is one, this implementation uses a cached reference to the LightingSimulationControl object which can be significantly faster than calling getOptionalUniqueModelObject<LightingSimulationControl>().

static boost::optional<Model> openstudio::model::Model::load ( const path &  osmPath)
static

Load Model from file, attempts to load WorkflowJSON from standard path.

static boost::optional<Model> openstudio::model::Model::load ( const path &  osmPath,
const path &  workflowJSONPath 
)
static

Load Model and WorkflowJSON from files, fails if either osm or workflowJSON cannot be loaded.

openstudio::Date openstudio::model::Model::makeDate ( openstudio::MonthOfYear  monthOfYear,
unsigned  dayOfMonth 
)
openstudio::Date openstudio::model::Model::makeDate ( unsigned  monthOfYear,
unsigned  dayOfMonth 
)
openstudio::Date openstudio::model::Model::makeDate ( openstudio::NthDayOfWeekInMonth  n,
openstudio::DayOfWeek  dayOfWeek,
openstudio::MonthOfYear  monthOfYear 
)
openstudio::Date openstudio::model::Model::makeDate ( unsigned  dayOfYear)
std::vector<ModelObject> openstudio::model::Model::modelObjects ( bool  sorted = false) const

Get all model objects.

If sorted, then the objects are returned in the preferred order.

Model& openstudio::model::Model::operator= ( const Model )
default
Model& openstudio::model::Model::operator= ( Model &&  )
default
bool openstudio::model::Model::operator== ( const Model other) const

Equality test, tests if this Model shares the same implementation object with other.

Node openstudio::model::Model::outdoorAirNode ( ) const

Get a Node named 'Model Outdoor Air Node' (intended to be forward translated to an OutdoorAir:Node) and not connected to a PlantLoop or AirLoopHVAC.

create a new Node if necessary and add it to the model

boost::optional<OutputConstructions> openstudio::model::Model::outputConstructions ( ) const

Get the OutputConstructions object if there is one, this implementation uses a cached reference to the OutputConstructions object which can be significantly faster than calling getOptionalUniqueModelObject<OutputConstructions>().

boost::optional<OutputControlFiles> openstudio::model::Model::outputControlFiles ( ) const

Get the OutputControlFiles object if there is one, this implementation uses a cached reference to the OutputControlFiles object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlFiles>().

boost::optional<OutputControlReportingTolerances> openstudio::model::Model::outputControlReportingTolerances ( ) const

Get the OutputControlReportingTolerances object if there is one, this implementation uses a cached reference to the OutputControlReportingTolerances object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlReportingTolerances>().

boost::optional<OutputControlTableStyle> openstudio::model::Model::outputControlTableStyle ( ) const

Get the OutputControlTableStyle object if there is one, this implementation uses a cached reference to the OutputControlTableStyle object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlTableStyle>().

boost::optional<OutputControlTimestamp> openstudio::model::Model::outputControlTimestamp ( ) const

Get the OutputControlTimestamp object if there is one, this implementation uses a cached reference to the OutputControlTimestamp object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlTimestamp>().

boost::optional<OutputDebuggingData> openstudio::model::Model::outputDebuggingData ( ) const

Get the OutputDebuggingData object if there is one, this implementation uses a cached reference to the OutputDebuggingData object which can be significantly faster than calling getOptionalUniqueModelObject<OutputDebuggingData>().

boost::optional<OutputDiagnostics> openstudio::model::Model::outputDiagnostics ( ) const

Get the OutputDiagnostics object if there is one, this implementation uses a cached reference to the OutputDiagnostics object which can be significantly faster than calling getOptionalUniqueModelObject<OutputDiagnostics>().

boost::optional<OutputEnergyManagementSystem> openstudio::model::Model::outputEnergyManagementSystem ( ) const

Get the OutputEnergyManagementSystem object if there is one, this implementation uses a cached reference to the OutputEnergyManagementSystem object which can be significantly faster than calling getOptionalUniqueModelObject<OutputControlFiles>().

boost::optional<OutputJSON> openstudio::model::Model::outputJSON ( ) const

Get the OutputJSON object if there is one, this implementation uses a cached reference to the OutputJSON object which can be significantly faster than calling getOptionalUniqueModelObject<OutputJSON>().

boost::optional<OutputSchedules> openstudio::model::Model::outputSchedules ( ) const

Get the OutputSchedules object if there is one, this implementation uses a cached reference to the OutputSchedules object which can be significantly faster than calling getOptionalUniqueModelObject<OutputSchedules>().

boost::optional<OutputSQLite> openstudio::model::Model::outputSQLite ( ) const

Get the OutputSQLite object if there is one, this implementation uses a cached reference to the OutputSQLite object which can be significantly faster than calling getOptionalUniqueModelObject<OutputSQLite>().

boost::optional<OutputTableSummaryReports> openstudio::model::Model::outputTableSummaryReports ( ) const

Get the OutputTableSummaryReports object if there is one, this implementation uses a cached reference to the OutputTableSummaryReports object which can be significantly faster than calling getOptionalUniqueModelObject<OutputTableSummaryReports>().

boost::optional<OutsideSurfaceConvectionAlgorithm> openstudio::model::Model::outsideSurfaceConvectionAlgorithm ( ) const

Get the OutsideSurfaceConvectionAlgorithm object if there is one, this implementation uses a cached reference to the OutsideSurfaceConvectionAlgorithm object which can be significantly faster than calling getOptionalUniqueModelObject<OutsideSurfaceConvectionAlgorithm>().

boost::optional<PerformancePrecisionTradeoffs> openstudio::model::Model::performancePrecisionTradeoffs ( ) const

Get the PerformancePrecisionTradeoffs object if there is one, this implementation uses a cached reference to the PerformancePrecisionTradeoffs object which can be significantly faster than calling getOptionalUniqueModelObject<PerformancePrecisionTradeoffs>().

SpaceType openstudio::model::Model::plenumSpaceType ( ) const

Get the space type used for plenums if there is one.

Create a new space type if necessary and add it to the model

std::string openstudio::model::Model::plenumSpaceTypeName ( ) const

Get the space type name used for plenums.

std::vector<openstudio::IdfObject> openstudio::model::Model::purgeUnusedResourceObjects ( )

Removes all ResourceObjects with nonResourceObjectUseCount() == 0.

All objects removed in the course of the purge are returned to support undos. Note that ResourceObjects may have children that are not ResourceObjects, and these may be removed as well.

std::vector<openstudio::IdfObject> openstudio::model::Model::purgeUnusedResourceObjects ( IddObjectType  iddObjectType)

Removes all ResourceObjects of given IddObjectType with directUseCount() == 0.

All objects removed in the course of the purge are returned to support undos. Note that ResourceObjects may have children that are not ResourceObjects, and these may be removed as well.

boost::optional<RadianceParameters> openstudio::model::Model::radianceParameters ( ) const

Get the RadianceParameters object if there is one, this implementation uses a cached reference to the RadianceParameters object which can be significantly faster than calling getOptionalUniqueModelObject<RadianceParameters>().

void openstudio::model::Model::resetCalendarYear ( )
void openstudio::model::Model::resetDayofWeekforStartDay ( )
void openstudio::model::Model::resetIsLeapYear ( )
bool openstudio::model::Model::resetSqlFile ( )

Resets the EnergyPlus output SqlFile.

void openstudio::model::Model::resetWorkflowJSON ( )

Reset the WorkflowJSON.

boost::optional<RunPeriod> openstudio::model::Model::runPeriod ( ) const

Get the RunPeriod object if there is one, this implementation uses a cached reference to the RunPeriod object which can be significantly faster than calling getOptionalUniqueModelObject<RunPeriod>().

boost::optional<RunPeriodControlDaylightSavingTime> openstudio::model::Model::runPeriodControlDaylightSavingTime ( ) const

Get the RunPeriodControlDaylightSavingTime object if there is one, this implementation uses a cached reference to the RunPeriodControlDaylightSavingTime object which can be significantly faster than calling getOptionalUniqueModelObject<RunPeriodControlDaylightSavingTime>().

bool openstudio::model::Model::setCalendarYear ( int  calendarYear)
bool openstudio::model::Model::setDayofWeekforStartDay ( const std::string &  dayofWeekforStartDay)
bool openstudio::model::Model::setIsLeapYear ( bool  isLeapYear)
bool openstudio::model::Model::setSqlFile ( const SqlFile &  sqlFile)

Sets the EnergyPlus output SqlFile.

SqlFile must correspond to EnergyPlus simulation of this Model.

bool openstudio::model::Model::setWorkflowJSON ( const WorkflowJSON &  workflowJSON)

Set the WorkflowJSON.

boost::optional<ShadowCalculation> openstudio::model::Model::shadowCalculation ( ) const

Get the ShadowCalculation object if there is one, this implementation uses a cached reference to the ShadowCalculation object which can be significantly faster than calling getOptionalUniqueModelObject<ShadowCalculation>().

boost::optional<SimulationControl> openstudio::model::Model::simulationControl ( ) const

Get the SimulationControl object if there is one, this implementation uses a cached reference to the SimulationControl object which can be significantly faster than calling getOptionalUniqueModelObject<SimulationControl>().

boost::optional<Site> openstudio::model::Model::site ( ) const

Get the Site object if there is one, this implementation uses a cached reference to the Site object which can be significantly faster than calling getOptionalUniqueModelObject<Site>().

boost::optional<SiteGroundReflectance> openstudio::model::Model::siteGroundReflectance ( ) const

Get the SiteGroundReflectance object if there is one, this implementation uses a cached reference to the SiteGroundReflectance object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundReflectance>().

boost::optional<SiteGroundTemperatureBuildingSurface> openstudio::model::Model::siteGroundTemperatureBuildingSurface ( ) const

Get the SiteGroundTemperatureBuildingSurface object if there is one, this implementation uses a cached reference to the SiteGroundTemperatureBuildingSurface object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundTemperatureBuildingSurface>().

boost::optional<SiteGroundTemperatureDeep> openstudio::model::Model::siteGroundTemperatureDeep ( ) const

Get the SiteGroundTemperatureDeep object if there is one, this implementation uses a cached reference to the SiteGroundTemperatureDeep object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundTemperatureDeep>().

boost::optional<SiteGroundTemperatureFCfactorMethod> openstudio::model::Model::siteGroundTemperatureFCfactorMethod ( ) const

Get the SiteGroundTemperatureFCfactorMethod object if there is one, this implementation uses a cached reference to the SiteGroundTemperatureFCfactorMethod object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundTemperatureFCfactorMethod>().

boost::optional<SiteGroundTemperatureShallow> openstudio::model::Model::siteGroundTemperatureShallow ( ) const

Get the SiteGroundTemperatureShallow object if there is one, this implementation uses a cached reference to the SiteGroundTemperatureShallow object which can be significantly faster than calling getOptionalUniqueModelObject<SiteGroundTemperatureShallow>().

boost::optional<SiteWaterMainsTemperature> openstudio::model::Model::siteWaterMainsTemperature ( ) const

Get the SiteWaterMainsTemperature object if there is one, this implementation uses a cached reference to the SiteWaterMainsTemperature object which can be significantly faster than calling getOptionalUniqueModelObject<SiteWaterMainsTemperature>().

boost::optional<SizingParameters> openstudio::model::Model::sizingParameters ( ) const

Get the SizingParameters object if there is one, this implementation uses a cached reference to the SizingParameters object which can be significantly faster than calling getOptionalUniqueModelObject<SizingParameters>().

boost::optional<SqlFile> openstudio::model::Model::sqlFile ( ) const

Returns the EnergyPlus output SqlFile if set.

boost::optional<Timestep> openstudio::model::Model::timestep ( ) const

Get the Timestep object if there is one, this implementation uses a cached reference to the Timestep object which can be significantly faster than calling getOptionalUniqueModelObject<Timestep>().

boost::optional<WeatherFile> openstudio::model::Model::weatherFile ( ) const

Get the WeatherFile object if there is one, this implementation uses a cached reference to the WeatherFile object which can be significantly faster than calling getOptionalUniqueModelObject<WeatherFile>().

WorkflowJSON openstudio::model::Model::workflowJSON ( ) const

Get the WorkflowJSON.

boost::optional<YearDescription> openstudio::model::Model::yearDescription ( ) const

Get the YearDescription object if there is one, this implementation uses a cached reference to the YearDescription object which can be significantly faster than calling getOptionalUniqueModelObject<YearDescription>().

boost::optional<ZoneAirContaminantBalance> openstudio::model::Model::zoneAirContaminantBalance ( ) const

Get the ZoneAirContaminantBalance object if there is one, this implementation uses a cached reference to the ZoneAirContaminantBalance object which can be significantly faster than calling getOptionalUniqueModelObject<ZoneAirContaminantBalance>().

boost::optional<ZoneAirHeatBalanceAlgorithm> openstudio::model::Model::zoneAirHeatBalanceAlgorithm ( ) const

Get the ZoneAirHeatBalanceAlgorithm object if there is one, this implementation uses a cached reference to the ZoneAirHeatBalanceAlgorithm object which can be significantly faster than calling getOptionalUniqueModelObject<ZoneAirHeatBalanceAlgorithm>().

boost::optional<ZoneAirMassFlowConservation> openstudio::model::Model::zoneAirMassFlowConservation ( ) const

Get the ZoneAirMassFlowConservation object if there is one, this implementation uses a cached reference to the ZoneAirMassFlowConservation object which can be significantly faster than calling getOptionalUniqueModelObject<ZoneAirMassFlowConservation>().

boost::optional<ZoneCapacitanceMultiplierResearchSpecial> openstudio::model::Model::zoneCapacitanceMultiplierResearchSpecial ( ) const

Get the ZoneCapacitanceMultiplierResearchSpecial object if there is one, this implementation uses a cached reference to the ZoneCapacitanceMultiplierResearchSpecial object which can be significantly faster than calling getOptionalUniqueModelObject<ZoneCapacitanceMultiplierResearchSpecial>().

Friends And Related Function Documentation

bool compareInputAndOutput ( const ModelObject object,
const std::string &  attributeName,
double  inputResult,
double  outputResult,
double  tol,
LogLevel  logLevel = LogLevel::Debug 
)
related

Compare inputResult to outputResult.

The intention is for inputResult to be the value of attributeName calculated using input data, and for outputResult to be the value of attributeName extracted from the Model::sqlFile(). Returns false and logs a message on the Model log channel at logLevel if the (relative) error is greater than tol.

using ModelVector = std::vector<Model>
related
using OptionalModel = boost::optional<Model>
related