MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / shadingControlSetpoint

Method shadingControlSetpoint

src/radiance/WindowGroup.cpp:140–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers 1

buildingSpacesMethod · 0.80

Calls 7

shadingControlTypeMethod · 0.95
istringEqualFunction · 0.85
setpointMethod · 0.80
strMethod · 0.45
scheduleMethod · 0.45
getMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected