NANDRAD Data Model Library
Version 2.0
NANDRAD
|
Class Schedule defines scheduled parameters in sets of daily cycles.
Schedules are defined for a specific day type: week day, week end, holiday or all days. They contain one or more daily cycles that specify the distribution for different scheduled quantities over a period of one day. Holidays and week end days are defined in Schedules.
Definition at line 44 of file NANDRAD_Schedule.h.
#include <NANDRAD_Schedule.h>
Public Types | |
enum | ScheduledDayType { ST_ALLDAYS, ST_WEEKDAY, ST_WEEKEND, ST_MONDAY, ST_TUESDAY, ST_WEDNESDAY, ST_THURSDAY, ST_FRIDAY, ST_SATURDAY, ST_SUNDAY, ST_HOLIDAY, NUM_ST } |
Different day types a schedule can be defined for. More... | |
Public Member Functions | |
NANDRAD_READWRITE void | prepareCalculation () |
Prepares calculation by initializing daily cycles and by collecting names of all scheduled parameters. More... | |
bool | containsDay (unsigned int dayOfYear) const |
Returns true, if given day is inside the start and end date of the schedule. More... | |
bool | isWholeYearSchedule () const |
Returns true if schedule is a whole year schedule (startDay = 0 and endDay = 364). More... | |
Public Attributes | |
ScheduledDayType | m_type = NUM_ST |
Type of day this schedule is defined for. More... | |
unsigned int | m_startDayOfTheYear = 0 |
Start day of the year for the schedule, if not given, defaults to 0 = 1.1. More... | |
unsigned int | m_endDayOfTheYear = 364 |
End day for the schedule (includes the entire day), if not given, defaults 364 = 31.12. More... | |
std::vector< DailyCycle > | m_dailyCycles |
List of daily cycles that are used on day type specified above. More... | |
std::map< std::string, DailyCycle * > | m_parameters |
All value names provided by all of the daily cycles. More... | |
Different day types a schedule can be defined for.
Definition at line 52 of file NANDRAD_Schedule.h.
NANDRAD_READWRITE void NANDRAD::Schedule::prepareCalculation | ( | ) |
Prepares calculation by initializing daily cycles and by collecting names of all scheduled parameters.
|
inline |
Returns true, if given day is inside the start and end date of the schedule.
Definition at line 79 of file NANDRAD_Schedule.h.
|
inline |
Returns true if schedule is a whole year schedule (startDay = 0 and endDay = 364).
Definition at line 82 of file NANDRAD_Schedule.h.
ScheduledDayType NANDRAD::Schedule::m_type = NUM_ST |
Type of day this schedule is defined for.
Definition at line 87 of file NANDRAD_Schedule.h.
unsigned int NANDRAD::Schedule::m_startDayOfTheYear = 0 |
Start day of the year for the schedule, if not given, defaults to 0 = 1.1.
Definition at line 90 of file NANDRAD_Schedule.h.
unsigned int NANDRAD::Schedule::m_endDayOfTheYear = 364 |
End day for the schedule (includes the entire day), if not given, defaults 364 = 31.12.
Definition at line 93 of file NANDRAD_Schedule.h.
std::vector<DailyCycle> NANDRAD::Schedule::m_dailyCycles |
List of daily cycles that are used on day type specified above.
These cycles define different quantities/control parameters etc.
Definition at line 98 of file NANDRAD_Schedule.h.
std::map<std::string, DailyCycle *> NANDRAD::Schedule::m_parameters |
All value names provided by all of the daily cycles.
This map is composed during prepareCalculation() and primarily used to quickly check if this schedule provides a required parameter at all. Also, it identifies the actual schedule that defines this parameter.
Definition at line 110 of file NANDRAD_Schedule.h.