#include <LifeCycleCost.hpp>
Public Member Functions | |
bool | convertToCostPerEach () |
Attemps to convert cost units to "CostPerEach" and set cost to totalCost. More... | |
boost::optional< double > | costedArea () const |
Compute the area that would be used for CostPerArea. More... | |
boost::optional< int > | costedQuantity () const |
Compute the number of objects that would be used for CostPerEach. More... | |
boost::optional< int > | costedThermalZones () const |
Compute the number of ThermalZone objects that would be used for CostPerThermalZone. More... | |
double | totalCost () const |
Returns the total cost based on number of units. More... | |
Constructors and Destructors | |
LifeCycleCost (const ModelObject &modelObject) | |
Constructs a new LifeCycleCost object in the model. More... | |
virtual | ~LifeCycleCost ()=default |
LifeCycleCost (const LifeCycleCost &other)=default | |
LifeCycleCost (LifeCycleCost &&other)=default | |
LifeCycleCost & | operator= (const LifeCycleCost &)=default |
LifeCycleCost & | operator= (LifeCycleCost &&)=default |
Getters | |
std::string | category () const |
Returns the category. More... | |
std::string | itemType () const |
Returns the type of ModelObject this LifeCycleCost applies to. More... | |
ModelObject | item () const |
Returns the ModelObject this LifeCycleCost applies to. More... | |
double | cost () const |
Returns the cost. More... | |
std::vector< std::string > | validCostUnitsValues () const |
Returns a list of valid cost units based on lineItemType. More... | |
std::string | costUnits () const |
Returns the cost units. More... | |
std::string | startOfCosts () const |
The First Year of Cost is based on the number of years past the Start of Costs. For most maintenance costs the Start of Costs should be Service Period. More... | |
bool | isStartOfCostsDefaulted () const |
int | yearsFromStart () const |
Years from start is added to months from start to give the time at which the costs start to occur. More... | |
bool | isYearsFromStartDefaulted () const |
int | monthsFromStart () const |
bool | isMonthsFromStartDefaulted () const |
int | repeatPeriodYears () const |
Repeat period years is added to repeat period months to give the interval at which this cost reccurs. More... | |
bool | isRepeatPeriodYearsDefaulted () const |
int | repeatPeriodMonths () const |
bool | isRepeatPeriodMonthsDefaulted () const |
Setters | |
bool | setCategory (const std::string &category) |
bool | setCost (double cost) |
bool | setCostUnits (const std::string &costUnits) |
bool | setStartOfCosts (const std::string &startOfCosts) |
void | resetStartOfCosts () |
bool | setYearsFromStart (int yearsFromStart) |
void | resetYearsFromStart () |
bool | setMonthsFromStart (int monthsFromStart) |
void | resetMonthsFromStart () |
bool | setRepeatPeriodYears (int repeatPeriodYears) |
void | resetRepeatPeriodYears () |
bool | setRepeatPeriodMonths (int repeatPeriodMonths) |
void | resetRepeatPeriodMonths () |
Public Member Functions inherited from openstudio::model::ModelObject | |
virtual | ~ModelObject ()=default |
ModelObject (const ModelObject &other)=default | |
ModelObject (ModelObject &&other)=default | |
ModelObject & | operator= (const ModelObject &)=default |
ModelObject & | operator= (ModelObject &&)=default |
ModelObject | clone () const |
Creates a deep copy of this object, placing it in this object's model(). More... | |
ModelObject | clone (Model model) const |
Creates a deep copy of this object, placing it in model. More... | |
Component | createComponent () const |
Method for creating sharable Model snippets. More... | |
Model | model () const |
Returns the Model that contains this object. More... | |
boost::optional< ParentObject > | parent () const |
Return this object's parent in the hierarchy, if it has one. More... | |
std::vector< ResourceObject > | resources () const |
Get the resources directly used by this ModelObject. More... | |
template<typename T > | |
std::vector< T > | getModelObjectSources () const |
Get all objects of type T that point to this object. More... | |
template<typename T > | |
std::vector< T > | getModelObjectSources (IddObjectType iddObjectType) const |
Get all objects of type T that point to this object. More... | |
template<typename T > | |
boost::optional< T > | getModelObjectTarget (unsigned index) const |
Get the object of type T pointed to by this object from field index. More... | |
template<typename T > | |
std::vector< T > | getModelObjectTargets () const |
Get all objects of type T to which this object points. More... | |
const std::vector< std::string > & | outputVariableNames () const |
Get all output variables names that could be associated with this object. More... | |
std::vector< OutputVariable > | outputVariables () const |
Get all output variables associated with this object, must run simulation to generate data. More... | |
boost::optional < openstudio::TimeSeries > | getData (const OutputVariable &variable, const std::string &envPeriod) const |
Get data associated with this output variable and this object. More... | |
std::vector< LifeCycleCost > | lifeCycleCosts () const |
Returns the list of all LifeCycleCosts that refer to this object. More... | |
std::vector< IdfObject > | removeLifeCycleCosts () |
Removes all LifeCycleCosts that refer to this object. More... | |
IddObjectType | iddObjectType () const |
This is a virtual function that will tell you the type of iddObject you are dealing with. More... | |
AdditionalProperties | additionalProperties () const |
Returns this object's additional properties, constructing a new object if necessary. More... | |
bool | hasAdditionalProperties () const |
Returns true if this object has additional properties. More... | |
std::vector< IdfObject > | removeAdditionalProperties () |
Removes all additional properties that refer to this object. More... | |
boost::optional< std::string > | cadObjectId () const |
bool | setCADObjectId (const std::string &cadObjectId) |
boost::optional< std::string > | gbXMLId () const |
bool | setGBXMLId (const std::string &gbXMLId) |
boost::optional< std::string > | displayName () const |
bool | setDisplayName (const std::string &displayName) |
bool | setParent (ParentObject &newParent) |
set the parent, child may have to call non-const methods on the parent More... | |
bool | operator< (const ModelObject &right) const |
bool | operator== (const ModelObject &other) const |
equality test More... | |
bool | operator!= (const ModelObject &other) const |
inequality test More... | |
std::vector< ScheduleTypeKey > | getScheduleTypeKeys (const Schedule &schedule) const |
Return the ScheduleTypeKeys indicating how schedule is used in this object. More... | |
boost::optional< double > | getAutosizedValue (const std::string &valueName, const std::string &units) const |
Gets the autosized component value from the sql file. More... | |
virtual std::vector < EMSActuatorNames > | emsActuatorNames () const |
Return the names of the available ems actuators. More... | |
virtual std::vector< std::string > | emsInternalVariableNames () const |
Return the names of the available ems internal variables. More... | |
boost::optional< ModelObject > | connectedObject (unsigned port) const |
boost::optional< unsigned > | connectedObjectPort (unsigned port) const |
Static Public Member Functions | |
Static Methods | |
static IddObjectType | iddObjectType () |
static std::vector< std::string > | validCategoryValues () |
static std::vector< std::string > | validItemTypeValues () |
static std::vector< std::string > | validStartOfCostsValues () |
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) |
Create a LifeCycleCost for the given ModelObject with cost, costUnits, category, and optional repeatPeriodYear. More... | |
Related Functions | |
(Note that these are not member functions.) | |
using | LifeCycleCostVector = std::vector< LifeCycleCost > |
using | OptionalLifeCycleCost = boost::optional< LifeCycleCost > |
Related Functions inherited from openstudio::model::ModelObject | |
std::vector< ResourceObject > | getRecursiveResources (const ModelObject &object) |
Returns all ResourceObjects accessible by recursively calling .resources() starting from object. More... | |
Additional Inherited Members | |
Protected Types inherited from openstudio::model::ModelObject | |
using | ImplType = detail::ModelObject_Impl |
Protected Member Functions inherited from openstudio::model::ModelObject | |
ModelObject (IddObjectType type, const Model &model, bool fastName=false) | |
ModelObject (std::shared_ptr< detail::ModelObject_Impl > impl) | |
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.
|
explicit |
Constructs a new LifeCycleCost object in the model.
This will throw if the object type is not known
|
virtualdefault |
|
default |
|
default |
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 |
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 |
bool openstudio::model::LifeCycleCost::isMonthsFromStartDefaulted | ( | ) | const |
bool openstudio::model::LifeCycleCost::isRepeatPeriodMonthsDefaulted | ( | ) | const |
bool openstudio::model::LifeCycleCost::isRepeatPeriodYearsDefaulted | ( | ) | const |
bool openstudio::model::LifeCycleCost::isStartOfCostsDefaulted | ( | ) | 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 |
|
default |
|
default |
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::resetStartOfCosts | ( | ) |
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::setStartOfCosts | ( | const std::string & | startOfCosts | ) |
bool openstudio::model::LifeCycleCost::setYearsFromStart | ( | int | yearsFromStart | ) |
std::string openstudio::model::LifeCycleCost::startOfCosts | ( | ) | const |
The First Year of Cost is based on the number of years past the Start of Costs. For most maintenance costs the Start of Costs should be Service Period.
double openstudio::model::LifeCycleCost::totalCost | ( | ) | const |
Returns the total cost based on number of units.
|
static |
std::vector<std::string> openstudio::model::LifeCycleCost::validCostUnitsValues | ( | ) | const |
Returns a list of valid cost units based on lineItemType.
|
static |
|
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.
|
related |
|
related |