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

#include <VICUS_ScheduleInterval.h>

Public Member Functions

VICUS_READWRITE bool isValid () const
 
bool usedAllDayTypes (bool withHolyday=true) const
 
std::set< int > freeDayTypes ()
 
ScheduleInterval multiply (const ScheduleInterval &other, unsigned int startDay) const
 
ScheduleInterval multiply (double val) const
 
ScheduleInterval add (const ScheduleInterval &other, unsigned int startDay) const
 
ScheduleInterval add (double val) const
 
void createConstScheduleInterval (double val=0)
 
void createWeekDataVector (std::vector< double > &timepoints, std::vector< double > &data) const
 
bool operator!= (const ScheduleInterval &other) const
 
bool operator== (const ScheduleInterval &other) const
 

Public Attributes

IBK::MultiLanguageString m_displayName
 
unsigned int m_intervalStartDay =0
 
std::vector< DailyCyclem_dailyCycles
 

Detailed Description

Describes a period within a schedule where course of scheduled quantities is defined through sets of daily cycles.

Member Function Documentation

◆ add() [1/2]

ScheduleInterval VICUS::ScheduleInterval::add ( const ScheduleInterval other,
unsigned int  startDay 
) const

Add schedule intervals and create a new one.

◆ add() [2/2]

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

Add a value to a schedule interval and returns the result.

◆ createConstScheduleInterval()

void VICUS::ScheduleInterval::createConstScheduleInterval ( double  val = 0)

Create a schedule interval with a constant value for all days.

◆ createWeekDataVector()

void VICUS::ScheduleInterval::createWeekDataVector ( std::vector< double > &  timepoints,
std::vector< double > &  data 
) const

Create a set of time points and corresponding values for an entire week. The week starts at monday and ends at sunday. The spacing between time points is arbitrary. The generated vectors are guaranteed to have at least one point each.

◆ freeDayTypes()

std::set< int > VICUS::ScheduleInterval::freeDayTypes ( )

Returns a set of all unused day types.

◆ isValid()

bool VICUS::ScheduleInterval::isValid ( ) const

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

◆ multiply() [1/2]

ScheduleInterval VICUS::ScheduleInterval::multiply ( const ScheduleInterval other,
unsigned int  startDay 
) const

Multiply to schedule intervals and create a new one.

◆ multiply() [2/2]

ScheduleInterval VICUS::ScheduleInterval::multiply ( double  val) const

Multiply a value to schedule intervals and create a new one.

◆ operator!=()

bool VICUS::ScheduleInterval::operator!= ( const ScheduleInterval other) const

Comparsion operator.

◆ operator==()

bool VICUS::ScheduleInterval::operator== ( const ScheduleInterval other) const
inline

Comparsion operator.

◆ usedAllDayTypes()

bool VICUS::ScheduleInterval::usedAllDayTypes ( bool  withHolyday = true) const

Check if all day type are used in a Schedule interval. Option with or without holyday.

Member Data Documentation

◆ m_dailyCycles

std::vector<DailyCycle> VICUS::ScheduleInterval::m_dailyCycles

Vector with daily cycles.

◆ m_displayName

IBK::MultiLanguageString VICUS::ScheduleInterval::m_displayName

Display name of period.

◆ m_intervalStartDay

unsigned int VICUS::ScheduleInterval::m_intervalStartDay =0

Day index (0) where schedule period starts (max. 364). First period always starts with 0. Each period lasts until begin of next interval, or until end of year (if it is the last period).


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