| 138 | } |
| 139 | |
| 140 | std::string WindowGroup::shadingControlSetpoint() const { |
| 141 | std::string result = "n/a"; |
| 142 | if (m_shadingControl) { |
| 143 | std::string shadingControlType = this->shadingControlType(); |
| 144 | |
| 145 | if (istringEqual("AlwaysOff", shadingControlType)) { |
| 146 | result = "n/a"; |
| 147 | } else if (istringEqual("AlwaysOn", shadingControlType)) { |
| 148 | result = "n/a"; |
| 149 | } else if (istringEqual("OnIfHighSolarOnWindow", shadingControlType)) { |
| 150 | boost::optional<double> d = m_shadingControl->setpoint(); |
| 151 | if (d) { |
| 152 | std::stringstream ss; |
| 153 | ss << *d; |
| 154 | result = ss.str(); |
| 155 | } else { |
| 156 | // setting default in lux |
| 157 | result = "5000"; |
| 158 | } |
| 159 | } else if (istringEqual("OnIfScheduleAllows", shadingControlType)) { |
| 160 | boost::optional<openstudio::model::Schedule> schedule = m_shadingControl->schedule(); |
| 161 | if (schedule) { |
| 162 | result = schedule->name().get(); |
| 163 | } else { |
| 164 | result = ""; |
| 165 | } |
| 166 | } else { |
| 167 | result = "n/a"; |
| 168 | LOG(Warn, "Unknown shadingControlType '" << shadingControlType << "' for ShadingControl '" << m_shadingControl->name().get() << "'."); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | return result; |
| 173 | } |
| 174 | |
| 175 | void WindowGroup::addWindowPolygon(const openstudio::Point3dVector& windowPolygon) { |
| 176 | m_windowPolygons.push_back(windowPolygon); |
no test coverage detected