OpenStudioCore:model
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

#include "LifeCycleCost.hpp"

Inheritance diagram for openstudio::model::LifeCycleCost:

Public Member Functions

bool convertToCostPerEach ()
boost::optional< double > costedArea () const
boost::optional< intcostedQuantity () const
boost::optional< intcostedThermalZones () const
double totalCost () const
 LifeCycleCost (const ModelObject &modelObject)
virtual ~LifeCycleCost ()
std::string category () const
std::string itemType () const
ModelObject item () const
double cost () const
std::vector< std::string > validCostUnitsValues () const
std::string costUnits () const
int yearsFromStart () const
bool isYearsFromStartDefaulted () const
int monthsFromStart () const
bool isMonthsFromStartDefaulted () const
int repeatPeriodYears () const
bool isRepeatPeriodYearsDefaulted () const
int repeatPeriodMonths () const
bool isRepeatPeriodMonthsDefaulted () const
bool setCategory (const std::string &category)
bool setCost (double cost)
bool setCostUnits (const std::string &costUnits)
bool setYearsFromStart (int yearsFromStart)
void resetYearsFromStart ()
bool setMonthsFromStart (int monthsFromStart)
void resetMonthsFromStart ()
bool setRepeatPeriodYears (int repeatPeriodYears)
void resetRepeatPeriodYears ()
bool setRepeatPeriodMonths (int repeatPeriodMonths)
void resetRepeatPeriodMonths ()

Static Public Member Functions

static IddObjectType iddObjectType ()
static std::vector< std::string > validCategoryValues ()
static std::vector< std::string > validItemTypeValues ()
static boost::optional
< LifeCycleCost
createLifeCycleCost (const std::string &name, const ModelObject &modelObject, double cost, const std::string &costUnits, const std::string &category, int repeatPeriodYears=0, int yearsFromStart=0)

Related Functions

typedef std::vector
< LifeCycleCost
LifeCycleCostVector
typedef boost::optional
< LifeCycleCost
OptionalLifeCycleCost

Detailed Description

LifeCycleCost derives from ModelObject and is an interface to the OpenStudio IDD object named "OS:LifeCycleCost".

LifeCycleCost objects are used to add costs related to building construction and operation. The LifeCycleCost's lineItemType will be set based on the type of ModelObject.

Constructor & Destructor Documentation

openstudio::model::LifeCycleCost::LifeCycleCost ( const ModelObject modelObject)
explicit

Constructs a new LifeCycleCost object in the model.

This will throw if the object type is not known

virtual openstudio::model::LifeCycleCost::~LifeCycleCost ( )
inlinevirtual

Member Function Documentation

std::string openstudio::model::LifeCycleCost::category ( ) const

Returns the category.

bool openstudio::model::LifeCycleCost::convertToCostPerEach ( )

Attemps to convert cost units to "CostPerEach" and set cost to totalCost.

double openstudio::model::LifeCycleCost::cost ( ) const

Returns the cost.

boost::optional<double> openstudio::model::LifeCycleCost::costedArea ( ) const

Compute the area that would be used for CostPerArea.

Includes space and instance multipliers.

boost::optional<int> openstudio::model::LifeCycleCost::costedQuantity ( ) const

Compute the number of objects that would be used for CostPerEach.

Includes space and instance multipliers.

boost::optional<int> openstudio::model::LifeCycleCost::costedThermalZones ( ) const

Compute the number of ThermalZone objects that would be used for CostPerThermalZone.

Includes space and instance multipliers.

std::string openstudio::model::LifeCycleCost::costUnits ( ) const

Returns the cost units.

static boost::optional<LifeCycleCost> openstudio::model::LifeCycleCost::createLifeCycleCost ( const std::string &  name,
const ModelObject modelObject,
double  cost,
const std::string &  costUnits,
const std::string &  category,
int  repeatPeriodYears = 0,
int  yearsFromStart = 0 
)
static

Create a LifeCycleCost for the given ModelObject with cost, costUnits, category, and optional repeatPeriodYear.

Will return an empty result if ModelObject type is unknown or if costUnits or category are not valid

static IddObjectType openstudio::model::LifeCycleCost::iddObjectType ( )
static
bool openstudio::model::LifeCycleCost::isMonthsFromStartDefaulted ( ) const
bool openstudio::model::LifeCycleCost::isRepeatPeriodMonthsDefaulted ( ) const
bool openstudio::model::LifeCycleCost::isRepeatPeriodYearsDefaulted ( ) const
bool openstudio::model::LifeCycleCost::isYearsFromStartDefaulted ( ) const
ModelObject openstudio::model::LifeCycleCost::item ( ) const

Returns the ModelObject this LifeCycleCost applies to.

std::string openstudio::model::LifeCycleCost::itemType ( ) const

Returns the type of ModelObject this LifeCycleCost applies to.

int openstudio::model::LifeCycleCost::monthsFromStart ( ) const
int openstudio::model::LifeCycleCost::repeatPeriodMonths ( ) const
int openstudio::model::LifeCycleCost::repeatPeriodYears ( ) const

Repeat period years is added to repeat period months to give the interval at which this cost reccurs.

If both repeat period years and repeat period months are zero (default), this cost does not recurr.

void openstudio::model::LifeCycleCost::resetMonthsFromStart ( )
void openstudio::model::LifeCycleCost::resetRepeatPeriodMonths ( )
void openstudio::model::LifeCycleCost::resetRepeatPeriodYears ( )
void openstudio::model::LifeCycleCost::resetYearsFromStart ( )
bool openstudio::model::LifeCycleCost::setCategory ( const std::string &  category)
bool openstudio::model::LifeCycleCost::setCost ( double  cost)
bool openstudio::model::LifeCycleCost::setCostUnits ( const std::string &  costUnits)
bool openstudio::model::LifeCycleCost::setMonthsFromStart ( int  monthsFromStart)
bool openstudio::model::LifeCycleCost::setRepeatPeriodMonths ( int  repeatPeriodMonths)
bool openstudio::model::LifeCycleCost::setRepeatPeriodYears ( int  repeatPeriodYears)
bool openstudio::model::LifeCycleCost::setYearsFromStart ( int  yearsFromStart)
double openstudio::model::LifeCycleCost::totalCost ( ) const

Returns the total cost based on number of units.

static std::vector<std::string> openstudio::model::LifeCycleCost::validCategoryValues ( )
static
std::vector<std::string> openstudio::model::LifeCycleCost::validCostUnitsValues ( ) const

Returns a list of valid cost units based on lineItemType.

static std::vector<std::string> openstudio::model::LifeCycleCost::validItemTypeValues ( )
static
int openstudio::model::LifeCycleCost::yearsFromStart ( ) const

Years from start is added to months from start to give the time at which the costs start to occur.

Friends And Related Function Documentation

typedef std::vector<LifeCycleCost> LifeCycleCostVector
related
typedef boost::optional<LifeCycleCost> OptionalLifeCycleCost
related