NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD_WindowShading.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_WindowShadingH
23 #define NANDRAD_WindowShadingH
24 
25 #include <algorithm>
26 
27 #include <IBK_Parameter.h>
28 #include <IBK_Exception.h>
29 
30 #include "NANDRAD_CodeGenMacros.h"
31 #include "NANDRAD_Constants.h"
32 #include "NANDRAD_LinearSplineParameter.h"
33 
34 namespace NANDRAD {
35 
36 class ShadingControlModel;
37 
38 
39 /*! WindowShading defines a dynamically adjustable shading. */
41  NANDRAD_READWRITE_PRIVATE
42 public:
43 
44  /*! Model types supported by the shading model. */
45  enum modelType_t {
46  MT_Constant, // Keyword: Constant 'Constant reduction factor.'
47  MT_Precomputed, // Keyword: Precomputed 'Precomputed reduction factor.'
48  MT_Controlled, // Keyword: Controlled 'Reduction factor is computed based on control model'
49  NUM_MT
50  };
51 
52  /*! Model parameters. */
53  enum para_t {
54  P_ReductionFactor, // Keyword: ReductionFactor [---] 'Reduction factor (remaining percentage of solar gains if shading is closed).'
55  NUM_P
56  };
57 
58  // *** PUBLIC MEMBER FUNCTIONS ***
59 
60  NANDRAD_READWRITE_IFNOTEMPTY(WindowShading)
61  NANDRAD_COMP(WindowShading)
62 
63  void checkParameters(const std::vector<ShadingControlModel> &controlModels);
64 
65  // *** PUBLIC MEMBER VARIABLES ***
66 
67  /*! Model type (NUM_MT disables model). */
68  modelType_t m_modelType = NUM_MT; // XML:A:required
69  /*! Control model used for shading, for model type 'Controlled'. */
70  unsigned int m_controlModelId = INVALID_ID; // XML:A
71  /*! List of constant parameters.*/
72  IBK::Parameter m_para[NUM_P]; // XML:E
73 
74  /*! Precomputed shading factor as time series.
75  Interpretation and definition is done exactly like climatic data. Cyclic spline data must not exceed one year.
76  Start time shift is applied when evaluating value for given simulation time.
77  */
79 
80 }; // WindowShading
81 
82 
83 } // namespace NANDRAD
84 
85 #endif // NANDRAD_WindowShadingH
Contains global constants for the Nandrad data model.
modelType_t
Model types supported by the shading model.
unsigned int m_controlModelId
Control model used for shading, for model type &#39;Controlled&#39;.
WindowShading defines a dynamically adjustable shading.
Class LinearSplineParameter stores a linear spline curve, the corresponding parameter name and a unit...
modelType_t m_modelType
Model type (NUM_MT disables model).
unsigned int INVALID_ID
defines an invalid id
LinearSplineParameter m_precomputedReductionFactor
Precomputed shading factor as time series.
IBK::Parameter m_para[NUM_P]
List of constant parameters.
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...