OpenStudio:model
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Related Functions | List of all members
openstudio::model::BillingPeriod Class Reference

#include <UtilityBill.hpp>

+ Inheritance diagram for openstudio::model::BillingPeriod:

Public Member Functions

Getters
Date startDate () const
 The date that the billing period starts. More...
 
Date endDate () const
 The date that the billing period ends. More...
 
unsigned numberOfDays () const
 The duration of the billing period in days. More...
 
boost::optional< double > consumption () const
 Returns the consumption in billing units. More...
 
boost::optional< double > peakDemand () const
 Returns the peak demand in billing units. More...
 
boost::optional< double > totalCost () const
 Returns the total cost of the bill in dollars. More...
 
Setters
bool setStartDate (const Date &startDate)
 Sets the start date. More...
 
bool setEndDate (const Date &endDate)
 Sets the end date. More...
 
bool setNumberOfDays (unsigned numberOfDays)
 Sets the number of days in billing period, startDate is always retained. More...
 
bool setConsumption (double consumption)
 Sets the consumption in billing units. More...
 
void resetConsumption ()
 
bool setPeakDemand (double peakDemand)
 Sets the peak demand in billing units. More...
 
void resetPeakDemand ()
 
bool setTotalCost (double totalCost)
 Sets the total cost of the bill in dollars. More...
 
void resetTotalCost ()
 
Other
bool withinRunPeriod () const
 Returns true if this billing period is strictly within the model's run period. More...
 
bool withinPeriodicRunPeriod () const
 Returns true if this billing period is within the model's run period assuming periodic boundary conditions. More...
 
bool overlapsRunPeriod () const
 Returns true if this billing period is partially within the model's run period. More...
 
Vector modelConsumptionValues () const
 Returns the consumption for each day in billing period from simulation in model units. More...
 
boost::optional< double > modelConsumption () const
 Returns the sum of modelConsumptionValues if it is not empty. More...
 
boost::optional< double > modelPeakDemand () const
 Returns the maximum peak over the billing period if available. More...
 
boost::optional< double > modelTotalCost () const
 Returns total energy cost over the billing period if available. More...
 
- Public Member Functions inherited from openstudio::model::ModelExtensibleGroup
 ModelExtensibleGroup (const ModelExtensibleGroup &other)=default
 
 ModelExtensibleGroup (ModelExtensibleGroup &&other)=default
 
ModelExtensibleGroupoperator= (const ModelExtensibleGroup &)=default
 
ModelExtensibleGroupoperator= (ModelExtensibleGroup &&)=default
 
virtual ~ModelExtensibleGroup () override=default
 
template<typename T >
boost::optional< T > getModelObjectTarget (unsigned fieldIndex) const
 Get the ModelObject of type T pointed to from fieldIndex of this extensible group, if possible. More...
 
template<typename T >
std::vector< T > getModelObjectTargets () const
 Get all the ModelObjects of type T pointed to from this extensible group. More...
 
bool setSchedule (unsigned index, const std::string &className, const std::string &scheduleDisplayName, Schedule &schedule)
 Sets index to point to schedule if schedule's ScheduleTypeLimits are compatible with the ScheduleType in the ScheduleTypeRegistry for (className,scheduleDisplayName), or if schedule's ScheduleTypeLimits have not yet been set (in which case the ScheduleTypeRegistry is used to retrieve or create an appropriate one). More...
 
- Public Member Functions inherited from openstudio::WorkspaceExtensibleGroup
bool canBeSource () const
 
std::vector< unsigned > getSourceFieldIndices (const Handle &targetHandle) const
 
boost::optional< WorkspaceObjectgetTarget (unsigned fieldIndex) const
 
std::vector< WorkspaceObjectgetTargets () const
 
bool isSource () const
 
bool setPointer (unsigned fieldIndex, const Handle &targetHandle)
 
bool setPointer (unsigned fieldIndex, const Handle &targetHandle, bool checkValidity)
 
virtual ~WorkspaceExtensibleGroup () override=default
 
- Public Member Functions inherited from openstudio::IdfExtensibleGroup
cast () const
 
std::vector< unsigned > dataFields () const
 
bool empty () const
 
boost::optional< std::string > fieldComment (unsigned fieldIndex, bool returnDefault=false) const
 
std::vector< std::string > fieldComments (bool returnDefault=false) const
 
std::vector< std::string > fields (bool returnDefault=false) const
 
std::vector< std::string > fieldsWithHandles (bool returnDefault=false) const
 
boost::optional< double > getDouble (unsigned fieldIndex, bool returnDefault=false) const
 
boost::optional< std::string > getField (unsigned index, bool returnDefault=false) const
 
boost::optional< intgetInt (unsigned fieldIndex, bool returnDefault=false) const
 
getObject () const
 
boost::optional< T > getOptionalObject () const
 
boost::optional< std::string > getString (unsigned fieldIndex, bool returnDefault=false) const
 
boost::optional< unsigned > getUnsigned (unsigned fieldIndex, bool returnDefault=false) const
 
unsigned groupIndex () const
 
IdfExtensibleGroup insertClone (unsigned groupIndex) const
 
bool isEmpty (unsigned fieldIndex) const
 
bool isValid (unsigned fieldIndex) const
 
unsigned numFields () const
 
std::vector< unsigned > objectListFields () const
 
bool operator!= (const IdfExtensibleGroup &other) const
 
bool operator== (const IdfExtensibleGroup &other) const
 
boost::optional< T > optionalCast () const
 
IdfExtensibleGroup pushClone () const
 
std::vector< unsigned > requiredFields () const
 
bool setDouble (unsigned fieldIndex, double value)
 
bool setFieldComment (unsigned fieldIndex, const std::string &cmnt)
 
bool setFields (const std::vector< std::string > &values)
 
bool setInt (unsigned fieldIndex, int value)
 
bool setString (unsigned fieldIndex, const std::string &value)
 
bool setString (unsigned fieldIndex, const std::string &value, bool checkValidity)
 
bool setUnsigned (unsigned fieldIndex, unsigned value)
 
virtual ~IdfExtensibleGroup ()=default
 

Related Functions

(Note that these are not member functions.)

using BillingPeriodVector = std::vector< BillingPeriod >
 

Additional Inherited Members

- Public Types inherited from openstudio::IdfExtensibleGroup
typedef std::vector
< IdfExtensibleGroup
IdfExtensibleGroupVector
 
- Protected Types inherited from openstudio::WorkspaceExtensibleGroup
typedef
detail::WorkspaceObject_Impl 
ImplType
 
- Protected Member Functions inherited from openstudio::WorkspaceExtensibleGroup
 WorkspaceExtensibleGroup (std::shared_ptr< detail::WorkspaceObject_Impl > impl, unsigned index)
 

Detailed Description

BillingPeriod is a ModelExtensibleGroup that represents a single billing period in the UtilityBill ModelObject.

Member Function Documentation

boost::optional<double> openstudio::model::BillingPeriod::consumption ( ) const

Returns the consumption in billing units.

Date openstudio::model::BillingPeriod::endDate ( ) const

The date that the billing period ends.

boost::optional<double> openstudio::model::BillingPeriod::modelConsumption ( ) const

Returns the sum of modelConsumptionValues if it is not empty.

Vector openstudio::model::BillingPeriod::modelConsumptionValues ( ) const

Returns the consumption for each day in billing period from simulation in model units.

boost::optional<double> openstudio::model::BillingPeriod::modelPeakDemand ( ) const

Returns the maximum peak over the billing period if available.

boost::optional<double> openstudio::model::BillingPeriod::modelTotalCost ( ) const

Returns total energy cost over the billing period if available.

unsigned openstudio::model::BillingPeriod::numberOfDays ( ) const

The duration of the billing period in days.

bool openstudio::model::BillingPeriod::overlapsRunPeriod ( ) const

Returns true if this billing period is partially within the model's run period.

boost::optional<double> openstudio::model::BillingPeriod::peakDemand ( ) const

Returns the peak demand in billing units.

void openstudio::model::BillingPeriod::resetConsumption ( )
void openstudio::model::BillingPeriod::resetPeakDemand ( )
void openstudio::model::BillingPeriod::resetTotalCost ( )
bool openstudio::model::BillingPeriod::setConsumption ( double  consumption)

Sets the consumption in billing units.

bool openstudio::model::BillingPeriod::setEndDate ( const Date endDate)

Sets the end date.

If endDate is after startDate then startDate is retained. If endDate is before startDate then numberOfDays is retained.

bool openstudio::model::BillingPeriod::setNumberOfDays ( unsigned  numberOfDays)

Sets the number of days in billing period, startDate is always retained.

bool openstudio::model::BillingPeriod::setPeakDemand ( double  peakDemand)

Sets the peak demand in billing units.

bool openstudio::model::BillingPeriod::setStartDate ( const Date startDate)

Sets the start date.

If startDate is before endDate then endDate is retained. If startDate is after endDate then numberOfDays is retained.

bool openstudio::model::BillingPeriod::setTotalCost ( double  totalCost)

Sets the total cost of the bill in dollars.

Date openstudio::model::BillingPeriod::startDate ( ) const

The date that the billing period starts.

boost::optional<double> openstudio::model::BillingPeriod::totalCost ( ) const

Returns the total cost of the bill in dollars.

bool openstudio::model::BillingPeriod::withinPeriodicRunPeriod ( ) const

Returns true if this billing period is within the model's run period assuming periodic boundary conditions.

bool openstudio::model::BillingPeriod::withinRunPeriod ( ) const

Returns true if this billing period is strictly within the model's run period.

Friends And Related Function Documentation

using BillingPeriodVector = std::vector<BillingPeriod>
related