VICUS Library
Documentation of Vicus library
Loading...
Searching...
No Matches
VICUS::DailyCycle Class Reference

#include <VICUS_DailyCycle.h>

Public Member Functions

VICUS_READWRITE bool isValid () const
 
bool containsDaytype (int dt)
 
DailyCycle multiply (const DailyCycle &other) const
 
DailyCycle multiply (double factor) const
 
DailyCycle add (const DailyCycle &other) const
 
DailyCycle add (double val) const
 
DailyCycle operator* (const DailyCycle &other) const
 
DailyCycle operator* (double val) const
 
DailyCycle operator+ (const DailyCycle &other) const
 
DailyCycle operator+ (double val) const
 

Public Attributes

std::vector< int > m_dayTypes
 
std::vector< double > m_timePoints
 
std::vector< double > m_values
 
std::string m_errorMsg
 

Detailed Description

Defines time points and values for a single day, and also defines, for which day of the week (day type) this time series shall apply to.

Member Function Documentation

◆ add() [1/2]

DailyCycle VICUS::DailyCycle::add ( const DailyCycle other) const

Adds current daily cycle to other daily cycle and generates a new daily cycle that contains the union of all time points. Only those day types will be in the generated DC that are present in both the current and other daily cycle.

◆ add() [2/2]

DailyCycle VICUS::DailyCycle::add ( double  val) const

Adds a value to the daily cycle.

◆ containsDaytype()

bool VICUS::DailyCycle::containsDaytype ( int  dt)

Check if a day type contains the m_dayTypes vector.

◆ isValid()

bool VICUS::DailyCycle::isValid ( ) const

Checks if all referenced materials exist and if their parameters are valid.

◆ multiply() [1/2]

DailyCycle VICUS::DailyCycle::multiply ( const DailyCycle other) const

Multiplies current daily cycle with other daily cycle and generates a new daily cycle that contains the union of all time points. Only those day types will be in the generated DC that are present in both the current and other daily cycle.

◆ multiply() [2/2]

DailyCycle VICUS::DailyCycle::multiply ( double  factor) const

Scale all values of the daily cycle with a constant factor.

◆ operator*() [1/2]

DailyCycle VICUS::DailyCycle::operator* ( const DailyCycle other) const
inline

Multiply operator.

◆ operator*() [2/2]

DailyCycle VICUS::DailyCycle::operator* ( double  val) const
inline

Multiply operator.

◆ operator+() [1/2]

DailyCycle VICUS::DailyCycle::operator+ ( const DailyCycle other) const
inline

Add operator.

◆ operator+() [2/2]

DailyCycle VICUS::DailyCycle::operator+ ( double  val) const
inline

Add operator.

Member Data Documentation

◆ m_dayTypes

std::vector<int> VICUS::DailyCycle::m_dayTypes

Holds one or more day types from NANDRAD::Schedule::type_t enum. Only the days (Mo, ... , Fr, .. So) and ST_HOLIDAY.

◆ m_errorMsg

std::string VICUS::DailyCycle::m_errorMsg
mutable

Holds error string in order to give users a tooltip in db dialog.

◆ m_timePoints

std::vector<double> VICUS::DailyCycle::m_timePoints

Vector with time points. First value must always be 0 h.

◆ m_values

std::vector<double> VICUS::DailyCycle::m_values

Vector with corresponding values (same size as m_timePoints vector). When data is interpreted as linearly interpolated, the values are taken as given directly at the matching time points. Otherwise, the value is taken constant during the interval starting at the corresponding time point.


The documentation for this class was generated from the following files: