NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD::Schedules Class Reference

Detailed Description

Schedules define purely time-dependent properties.

Scheduled quantities are associated with models via object lists. The object list names are the keys to the maps m_scheduleGroups and m_annualSchedules.

Definition at line 40 of file NANDRAD_Schedules.h.

#include <NANDRAD_Schedules.h>

Public Types

enum  day_t {
  SD_MONDAY, SD_TUESDAY, SD_WEDNESDAY, SD_THURSDAY,
  SD_FRIDAY, SD_SATURDAY, SD_SUNDAY, NUM_SD
}
 Day ids, also used to define "a weekend definition". More...
 
enum  flag_t { F_EnableCyclicSchedules, NUM_F }
 Flags controlling schedule evaluation. More...
 

Public Member Functions

void initDefaults ()
 Init default values (called before readXML()). More...
 
NANDRAD_READWRITE void checkParameters (const std::map< std::string, IBK::Path > &placeholders)
 Checks given parameters and initializes all linear splines given as tsv-files. More...
 
void generateLinearSpline (const std::string &objectListName, const std::string &parameterName, IBK::LinearSpline &spline, DailyCycle::interpolation_t &interpolationType) const
 This function does all the work in the actual schedule-by-daily-cycle implementation. More...
 

Static Public Member Functions

static bool equalSchedules (const std::vector< Schedule > &first, const std::vector< Schedule > &second)
 Compares two schedule groups by schedule content, hereby ignoring the name of the schedule group. More...
 

Public Attributes

std::set< unsigned int > m_holidays
 List of holiday days, stored in "day of the year", not including leap days. More...
 
std::set< day_tm_weekEndDays
 Weekend days. More...
 
day_t m_firstDayOfYear = SD_MONDAY
 The daytype of January 1st (offset of day of the week (0-Mon, ...6-Sun)) of the start year, defaults to Monday.
 
IBK::Flag m_flags [NUM_F]
 List of flags. More...
 
std::map< std::string, std::vector< Schedule > > m_scheduleGroups
 Key is object list name, value is vector of schedules. More...
 
std::map< std::string, std::vector< NANDRAD::LinearSplineParameter > > m_annualSchedules
 Key is object list name, value is vector of LinearSplineParameter. More...
 

Member Enumeration Documentation

◆ day_t

Day ids, also used to define "a weekend definition".

Definition at line 44 of file NANDRAD_Schedules.h.

◆ flag_t

Flags controlling schedule evaluation.

Enumerator
F_EnableCyclicSchedules 

If enabled, schedules are treated as annually repeating schedules.

Definition at line 56 of file NANDRAD_Schedules.h.

Member Function Documentation

◆ initDefaults()

void NANDRAD::Schedules::initDefaults ( )

Init default values (called before readXML()).

Note
These values will be overwritten in readXML() when the respective property is set in the project file.

◆ checkParameters()

NANDRAD_READWRITE void NANDRAD::Schedules::checkParameters ( const std::map< std::string, IBK::Path > &  placeholders)

Checks given parameters and initializes all linear splines given as tsv-files.

◆ generateLinearSpline()

void NANDRAD::Schedules::generateLinearSpline ( const std::string &  objectListName,
const std::string &  parameterName,
IBK::LinearSpline &  spline,
DailyCycle::interpolation_t interpolationType 
) const

This function does all the work in the actual schedule-by-daily-cycle implementation.

It constructs a linear spline for cyclic annual use by processing all days of the year, looking up the respective parameter and combining day cycle values.

Parameters
objectListNameName of schedule group (i.e. name of corresponding object list)
parameterNameName of scheduled parameter
splineHere the spline data will be stored, values are already converted to the base SI unit.
interpolationTypeHere the interpolation type set for the daily cycle will be set.

◆ equalSchedules()

static bool NANDRAD::Schedules::equalSchedules ( const std::vector< Schedule > &  first,
const std::vector< Schedule > &  second 
)
static

Compares two schedule groups by schedule content, hereby ignoring the name of the schedule group.

Member Data Documentation

◆ m_holidays

std::set< unsigned int> NANDRAD::Schedules::m_holidays

List of holiday days, stored in "day of the year", not including leap days.

Definition at line 99 of file NANDRAD_Schedules.h.

◆ m_weekEndDays

std::set< day_t > NANDRAD::Schedules::m_weekEndDays

Weekend days.

Definition at line 102 of file NANDRAD_Schedules.h.

◆ m_flags

IBK::Flag NANDRAD::Schedules::m_flags[NUM_F]

List of flags.

Definition at line 110 of file NANDRAD_Schedules.h.

◆ m_scheduleGroups

std::map<std::string, std::vector<Schedule> > NANDRAD::Schedules::m_scheduleGroups

Key is object list name, value is vector of schedules.

Definition at line 113 of file NANDRAD_Schedules.h.

◆ m_annualSchedules

std::map<std::string, std::vector<NANDRAD::LinearSplineParameter> > NANDRAD::Schedules::m_annualSchedules

Key is object list name, value is vector of LinearSplineParameter.

The LinearSplineParameter has a name, which corresponds to the quantity that this scheduled parameter is for.

Definition at line 118 of file NANDRAD_Schedules.h.


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