NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD_Thermostat.h
1 /* The NANDRAD data model library.
2 
3  Copyright (c) 2012-today, Institut für Bauklimatik, TU Dresden, Germany
4 
5  Primary authors:
6  Andreas Nicolai <andreas.nicolai -[at]- tu-dresden.de>
7  Anne Paepcke <anne.paepcke -[at]- tu-dresden.de>
8 
9  This library is part of SIM-VICUS (https://github.com/ghorwin/SIM-VICUS)
10 
11  This library is free software: you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 */
21 
22 #ifndef NANDRAD_ThermostatH
23 #define NANDRAD_ThermostatH
24 
25 #include <IBK_Parameter.h>
26 
27 #include "NANDRAD_Constants.h"
28 #include "NANDRAD_CodeGenMacros.h"
29 
30 namespace NANDRAD {
31 
32 /*! Contains data for a thermostat model, that compares the air/operative tempeature with
33  a setpoint and generates either an analog or digital control signal. The latter always uses
34  hysteresis.
35 */
36 class Thermostat {
37 public:
38  /*! Different model variants regarding source of setpoint parametrization. */
39  enum modelType_t {
40  /*! Setpoints are constant parameters. */
41  MT_Constant, // Keyword: Constant 'Constant set points'
42  /*! Setpoints are provided as 'HeatingSetPointSchedule' and 'CoolingSetPointSchedule' schedule parameter. */
43  MT_Scheduled, // Keyword: Scheduled 'Scheduled set points'
44  NUM_MT
45  };
46 
47  /*! Model parameters. */
48  enum para_t {
49  P_HeatingSetpoint, // Keyword: HeatingSetpoint [C] 'Heating set point'
50  P_CoolingSetpoint, // Keyword: CoolingSetpoint [C] 'Cooling set point'
51  P_TemperatureTolerance, // Keyword: TemperatureTolerance [K] 'Control tolerance for temperatures'
52  P_TemperatureBand, // Keyword: TemperatureBand [K] 'Offset of lower and upper hysteresis band from set points'
53  NUM_P
54  };
55 
56  /*! Control temperature to use. */
58  TT_AirTemperature, // Keyword: AirTemperature 'Air temperature'
59  TT_OperativeTemperature, // Keyword: OperativeTemperature 'Operative temperature'
60  NUM_TT
61  };
62 
64  /*! Signal is the difference between setpoint temperature and sensor temperature, normalized by
65  the given temperature tolerance. A signal value of 1 means that the temperature tolerance has been
66  reached, a value larger than 1 means the temperature difference is even larger (signal value is not clipped).
67  */
68  CT_Analog, // Keyword: Analog 'Analog'
69  /*! Signal is either 0 or 1, and corresponds with the digital hysteretic control logic. 1 is returned
70  if heating/cooling is required.
71  */
72  CT_Digital, // Keyword: Digital 'Digital'
73  NUM_CT
74  };
75 
76  NANDRAD_READWRITE
77  NANDRAD_COMPARE_WITH_ID
78 
79  /*! Checks parameters for valid values. */
80  void checkParameters() const;
81 
82  /*! Comparies objects by physical parametrization (excluding ID and displayname and object list). */
83  bool equal(const Thermostat & other) const;
84 
85  /*! Unique ID-number for this ventilation rate model. */
86  unsigned int m_id = NANDRAD::INVALID_ID; // XML:A:required
87  /*! Some display/comment name for this model (optional). */
88  std::string m_displayName; // XML:A
89 
90  /*! Model type. */
91  modelType_t m_modelType = NUM_MT; // XML:A:required
92 
93  /*! Object list with zones that this model is to be apply to. */
94  std::string m_zoneObjectList; // XML:E:required
95 
96  /*! Model parameters. */
97  IBK::Parameter m_para[NUM_P]; // XML:E
98 
99  /*! Optional ID of reference zone to use for sensor and setpoint input. */
100  unsigned int m_referenceZoneId = NANDRAD::INVALID_ID; // XML:E
101 
102  /*! Temperature sensor type. */
104 
105  /*! The controller to use for the thermostat. */
106  ControllerType m_controllerType = NUM_CT; // XML:E
107 };
108 
109 } // namespace NANDRAD
110 
111 #endif // NANDRAD_ThermostatH
Signal is either 0 or 1, and corresponds with the digital hysteretic control logic.
NANDRAD_READWRITE NANDRAD_COMPARE_WITH_ID void checkParameters() const
Checks parameters for valid values.
TemperatureType m_temperatureType
Temperature sensor type.
Contains global constants for the Nandrad data model.
bool equal(const Thermostat &other) const
Comparies objects by physical parametrization (excluding ID and displayname and object list)...
Setpoints are constant parameters.
Signal is the difference between setpoint temperature and sensor temperature, normalized by the given...
Contains data for a thermostat model, that compares the air/operative tempeature with a setpoint and ...
Setpoints are provided as &#39;HeatingSetPointSchedule&#39; and &#39;CoolingSetPointSchedule&#39; schedule parameter...
unsigned int INVALID_ID
defines an invalid id
unsigned int m_id
Unique ID-number for this ventilation rate model.
std::string m_zoneObjectList
Object list with zones that this model is to be apply to.
modelType_t m_modelType
Model type.
modelType_t
Different model variants regarding source of setpoint parametrization.
std::string m_displayName
Some display/comment name for this model (optional).
TemperatureType
Control temperature to use.
para_t
Model parameters.
unsigned int m_referenceZoneId
Optional ID of reference zone to use for sensor and setpoint input.
ControllerType m_controllerType
The controller to use for the thermostat.
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...
IBK::Parameter m_para[NUM_P]
Model parameters.