VICUS Library
Documentation of Vicus library
|
#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 |
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.
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.
DailyCycle VICUS::DailyCycle::add | ( | double | val | ) | const |
Adds a value to the daily cycle.
bool VICUS::DailyCycle::containsDaytype | ( | int | dt | ) |
Check if a day type contains the m_dayTypes vector.
bool VICUS::DailyCycle::isValid | ( | ) | const |
Checks if all referenced materials exist and if their parameters are valid.
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.
DailyCycle VICUS::DailyCycle::multiply | ( | double | factor | ) | const |
Scale all values of the daily cycle with a constant factor.
|
inline |
Multiply operator.
|
inline |
Multiply operator.
|
inline |
Add operator.
|
inline |
Add operator.
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.
|
mutable |
Holds error string in order to give users a tooltip in db dialog.
std::vector<double> VICUS::DailyCycle::m_timePoints |
Vector with time points. First value must always be 0 h.
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.