NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD_ShadingControlModel.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_ShadingControlModelH
23 #define NANDRAD_ShadingControlModelH
24 
25 #include <IBK_Parameter.h>
26 
27 #include "NANDRAD_Constants.h"
28 #include "NANDRAD_CodeGenMacros.h"
29 
30 namespace NANDRAD {
31 
32 class ConstructionInstance;
33 class EmbeddedObject;
34 class Sensor;
35 
36 /*! Parameters for a intensity controlled shading model with hysteresis. */
38  NANDRAD_READWRITE_PRIVATE
39 public:
40  /*! Model parameters. */
41  enum para_t {
42  P_MaxIntensity, // Keyword: MaxIntensity [W/m2] 'Maximum intensity allowed before shading is closed.'
43  P_MinIntensity, // Keyword: MinIntensity [W/m2] 'Intensity level below which shading is opened.'
44  NUM_P
45  };
46 
47  NANDRAD_READWRITE_IFNOT_INVALID_ID
48  NANDRAD_COMPARE_WITH_ID
49 
50  /*! Checks for valid and required parameters (value ranges).
51  Also check if referenced sensors/constructions/embedded objects exists.
52  */
53  void checkParameters(const std::vector<Sensor> &sensors,
54  const std::vector<ConstructionInstance> &conInstances);
55 
56  /*! Unique ID-number for this shading controller model. */
57  unsigned int m_id = NANDRAD::INVALID_ID; // XML:A:required
58  /*! Some display/comment name for this model (optional). */
59  std::string m_displayName; // XML:A
60 
61  /*! Sensor ID of global radiation sensor, or window/construction surface.
62  This sensor corresponds to any surface in the model (sensor, embedded object, construction).
63  */
64  unsigned int m_sensorId = NANDRAD::INVALID_ID; // XML:A:required
65 
66  /*! Model parameters. */
67  IBK::Parameter m_para[NUM_P]; // XML:E
68 
69  /*! Quick-access pointer to the requested sensor. */
70  const NANDRAD::Sensor *m_sensor = nullptr;
71  /*! Quick-access pointer to the referenced construction. */
73  /*! Quick-access pointer to the referenced embedded object. */
75 };
76 
77 } // namespace NANDRAD
78 
79 #endif // NANDRAD_ShadingControlModelH
Contains global constants for the Nandrad data model.
unsigned int m_sensorId
Sensor ID of global radiation sensor, or window/construction surface.
IBK::Parameter m_para[NUM_P]
Model parameters.
const NANDRAD::Sensor * m_sensor
Quick-access pointer to the requested sensor.
const NANDRAD::ConstructionInstance * m_constructionInstance
Quick-access pointer to the referenced construction.
unsigned int INVALID_ID
defines an invalid id
const NANDRAD::EmbeddedObject * m_embeddedObject
Quick-access pointer to the referenced embedded object.
NANDRAD_READWRITE_IFNOT_INVALID_ID NANDRAD_COMPARE_WITH_ID void checkParameters(const std::vector< Sensor > &sensors, const std::vector< ConstructionInstance > &conInstances)
Checks for valid and required parameters (value ranges).
std::string m_displayName
Some display/comment name for this model (optional).
An embedded object generally defines a wall opening (a window or a door).
Defines a wall/floor/ceiling construction instance.
Parameters for a intensity controlled shading model with hysteresis.
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...
unsigned int m_id
Unique ID-number for this shading controller model.
A sensor yields a measured component for use by other models/for output purposes. ...