src/model/People.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "People.hpp" | ||
| 7 | #include "People_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Model.hpp" | ||
| 10 | #include "PeopleDefinition.hpp" | ||
| 11 | #include "PeopleDefinition_Impl.hpp" | ||
| 12 | #include "ComfortViewFactorAngles.hpp" | ||
| 13 | #include "ComfortViewFactorAngles_Impl.hpp" | ||
| 14 | #include "Surface.hpp" | ||
| 15 | #include "Surface_Impl.hpp" | ||
| 16 | #include "SubSurface.hpp" | ||
| 17 | #include "SubSurface_Impl.hpp" | ||
| 18 | #include "InternalMass.hpp" | ||
| 19 | #include "InternalMass_Impl.hpp" | ||
| 20 | #include "Schedule.hpp" | ||
| 21 | #include "Schedule_Impl.hpp" | ||
| 22 | #include "ScheduleTypeLimits.hpp" | ||
| 23 | #include "ScheduleTypeRegistry.hpp" | ||
| 24 | #include "Space.hpp" | ||
| 25 | #include "Space_Impl.hpp" | ||
| 26 | #include "SpaceType.hpp" | ||
| 27 | #include "SpaceType_Impl.hpp" | ||
| 28 | #include "ThermalZone.hpp" | ||
| 29 | #include "ThermalZone_Impl.hpp" | ||
| 30 | #include "ZoneMRTCalculation.hpp" | ||
| 31 | #include "ZoneMRTCalculation_Impl.hpp" | ||
| 32 | #include "DefaultScheduleSet.hpp" | ||
| 33 | #include "DefaultScheduleSet_Impl.hpp" | ||
| 34 | #include "LifeCycleCost.hpp" | ||
| 35 | |||
| 36 | #include <utilities/idd/OS_People_FieldEnums.hxx> | ||
| 37 | #include <utilities/idd/IddEnums.hxx> | ||
| 38 | #include <utilities/idd/IddFactory.hxx> | ||
| 39 | |||
| 40 | #include "../utilities/core/Assert.hpp" | ||
| 41 | |||
| 42 | namespace openstudio { | ||
| 43 | namespace model { | ||
| 44 | |||
| 45 | namespace detail { | ||
| 46 | |||
| 47 | 916 | People_Impl::People_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) : SpaceLoadInstance_Impl(idfObject, model, keepHandle) { | |
| 48 |
4/6✓ Branch 1 taken 916 times.
✓ Branch 4 taken 916 times.
✓ Branch 7 taken 916 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 916 times.
✗ Branch 13 not taken.
|
916 | OS_ASSERT(idfObject.iddObject().type() == People::iddObjectType()); |
| 49 | 916 | } | |
| 50 | |||
| 51 | 634 | People_Impl::People_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle) | |
| 52 | 634 | : SpaceLoadInstance_Impl(other, model, keepHandle) { | |
| 53 |
4/6✓ Branch 1 taken 634 times.
✓ Branch 4 taken 634 times.
✓ Branch 7 taken 634 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 634 times.
✗ Branch 13 not taken.
|
634 | OS_ASSERT(other.iddObject().type() == People::iddObjectType()); |
| 54 | 634 | } | |
| 55 | |||
| 56 | 352 | People_Impl::People_Impl(const People_Impl& other, Model_Impl* model, bool keepHandle) : SpaceLoadInstance_Impl(other, model, keepHandle) {} | |
| 57 | |||
| 58 | 1 | const std::vector<std::string>& People_Impl::outputVariableNames() const { | |
| 59 | static const std::vector<std::string> result{ | ||
| 60 | |||
| 61 | "People Occupant Count", "People Radiant Heating Energy", "People Radiant Heating Rate", "People Convective Heating Energy", | ||
| 62 | "People Convective Heating Rate", "People Sensible Heating Energy", "People Sensible Heating Rate", "People Latent Gain Energy", | ||
| 63 | "People Latent Gain Rate", "People Total Heating Energy", "People Total Heating Rate", "People Air Temperature", | ||
| 64 | "People Air Relative Humidity" | ||
| 65 | |||
| 66 | // Reported in ThermalZone | ||
| 67 | //"Zone People Occupant Count", | ||
| 68 | //"Zone People Radiant Heating Energy", | ||
| 69 | //"Zone People Radiant Heating Rate", | ||
| 70 | //"Zone People Convective Heating Energy", | ||
| 71 | //"Zone People Convective Heating Rate", | ||
| 72 | //"Zone People Sensible Heating Energy", | ||
| 73 | //"Zone People Sensible Heating Rate", | ||
| 74 | //"Zone People Latent Gain Energy", | ||
| 75 | //"Zone People Latent Gain Rate", | ||
| 76 | //"Zone People Total Heating Energy", | ||
| 77 | //"Zone People Total Heating Rate", | ||
| 78 | //"Zone Thermal Comfort Mean Radiant Temperature", | ||
| 79 | //"Zone Thermal Comfort Operative Temperature", | ||
| 80 | //"Zone Thermal Comfort Fanger Model PMV", | ||
| 81 | //"Zone Thermal Comfort Fanger Model PPD", | ||
| 82 | //"Zone Thermal Comfort Clothing Surface Temperature", | ||
| 83 | //"Zone Thermal Comfort Pierce Model Effective Temperature PMV", | ||
| 84 | //"Zone Thermal Comfort Pierce Model Standard Effective Temperature PMV", | ||
| 85 | //"Zone Thermal Comfort Pierce Model Discomfort Index", | ||
| 86 | //"Zone Thermal Comfort Pierce Model Thermal Sensation Index", | ||
| 87 | //"Zone Thermal Comfort KSU Model Thermal Sensation Index", | ||
| 88 | //"Zone Thermal Comfort ASHRAE 55 Adaptive Model 80% Acceptability Status", | ||
| 89 | //"Zone Thermal Comfort ASHRAE 55 Adaptive Model 90% Acceptability Status", | ||
| 90 | //"Zone Thermal Comfort ASHRAE 55 Adaptive Model Running Average Outdoor Air Temperature", | ||
| 91 | //"Zone Thermal Comfort ASHRAE 55 Adaptive Model Temperature", | ||
| 92 | //"Zone Thermal Comfort CEN 15251 Adaptive Model Category I Status", | ||
| 93 | //"Zone Thermal Comfort CEN 15251 Adaptive Model Category II Status", | ||
| 94 | //"Zone Thermal Comfort CEN 15251 Adaptive Model Category III Status", | ||
| 95 | //"Zone Thermal Comfort CEN 15251 Adaptive Model Running Average Outdoor Air Temperature", | ||
| 96 | //"Zone Thermal Comfort CEN 15251 Adaptive Model Temperature" | ||
| 97 |
5/11✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 6 taken 1 time.
✓ Branch 10 taken 13 times.
✓ Branch 11 taken 1 time.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
|
16 | }; |
| 98 | 1 | return result; | |
| 99 | 3 | } | |
| 100 | |||
| 101 | 1 | IddObjectType People_Impl::iddObjectType() const { | |
| 102 | 1 | return People::iddObjectType(); | |
| 103 | } | ||
| 104 | |||
| 105 | 6 | std::vector<openstudio::IdfObject> People_Impl::remove() { | |
| 106 | 6 | removeZoneMRTCalculationReferences(); | |
| 107 | 6 | return SpaceLoadInstance_Impl::remove(); | |
| 108 | } | ||
| 109 | |||
| 110 | 6 | void People_Impl::removeZoneMRTCalculationReferences() { | |
| 111 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
6 | People people = getObject<ModelObject>().cast<People>(); |
| 112 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
6 | std::vector<ZoneMRTCalculation> zoneMRTCalculations = people.getModelObjectSources<ZoneMRTCalculation>(ZoneMRTCalculation::iddObjectType()); |
| 113 | |||
| 114 |
2/2✓ Branch 5 taken 1 time.
✓ Branch 6 taken 6 times.
|
7 | for (ZoneMRTCalculation& zoneMRTCalculation : zoneMRTCalculations) { |
| 115 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
|
4 | while (boost::optional<unsigned> index = zoneMRTCalculation.mRTWeightingFactorIndex(people)) { |
| 116 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | zoneMRTCalculation.removeMRTWeightingFactor(index.get()); |
| 117 | 1 | } | |
| 118 | } | ||
| 119 | 6 | } | |
| 120 | |||
| 121 | ✗ | std::vector<ScheduleTypeKey> People_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 122 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 123 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 124 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 125 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 126 | ✗ | if (std::find(b, e, OS_PeopleFields::NumberofPeopleScheduleName) != e) { | |
| 127 | ✗ | result.emplace_back("People", "Number of People"); | |
| 128 | } | ||
| 129 | ✗ | if (std::find(b, e, OS_PeopleFields::ActivityLevelScheduleName) != e) { | |
| 130 | ✗ | result.emplace_back("People", "Activity Level"); | |
| 131 | } | ||
| 132 | ✗ | if (std::find(b, e, OS_PeopleFields::WorkEfficiencyScheduleName) != e) { | |
| 133 | ✗ | result.emplace_back("People", "Work Efficiency"); | |
| 134 | } | ||
| 135 | ✗ | if (std::find(b, e, OS_PeopleFields::ClothingInsulationCalculationMethodScheduleName) != e) { | |
| 136 | ✗ | result.emplace_back("People", "Clothing Insulation Calculation Method"); | |
| 137 | } | ||
| 138 | ✗ | if (std::find(b, e, OS_PeopleFields::ClothingInsulationScheduleName) != e) { | |
| 139 | ✗ | result.emplace_back("People", "Clothing Insulation"); | |
| 140 | } | ||
| 141 | ✗ | if (std::find(b, e, OS_PeopleFields::AirVelocityScheduleName) != e) { | |
| 142 | ✗ | result.emplace_back("People", "Air Velocity"); | |
| 143 | } | ||
| 144 | ✗ | if (std::find(b, e, OS_PeopleFields::AnkleLevelAirVelocityScheduleName) != e) { | |
| 145 | ✗ | result.emplace_back("People", "Ankle Level Air Velocity"); | |
| 146 | } | ||
| 147 | ✗ | return result; | |
| 148 | ✗ | } | |
| 149 | |||
| 150 | 26 | bool People_Impl::hardSize() { | |
| 151 |
1/1✓ Branch 1 taken 26 times.
|
26 | boost::optional<Space> space = this->space(); |
| 152 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 26 times.
|
26 | if (!space) { |
| 153 | ✗ | return false; | |
| 154 | } | ||
| 155 | |||
| 156 |
1/1✓ Branch 1 taken 26 times.
|
26 | this->makeUnique(); |
| 157 | |||
| 158 |
1/1✓ Branch 1 taken 26 times.
|
26 | PeopleDefinition peopleDefinition = this->peopleDefinition(); |
| 159 |
2/3✓ Branch 1 taken 26 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 26 times.
|
26 | for (LifeCycleCost& cost : peopleDefinition.lifeCycleCosts()) { |
| 160 | ✗ | cost.convertToCostPerEach(); | |
| 161 | 26 | } | |
| 162 | |||
| 163 |
1/1✓ Branch 1 taken 26 times.
|
26 | boost::optional<double> numberofPeople = peopleDefinition.numberofPeople(); |
| 164 |
2/2✓ Branch 0 taken 22 times.
✓ Branch 1 taken 4 times.
|
26 | if (numberofPeople) { |
| 165 | 22 | return true; | |
| 166 | } | ||
| 167 | |||
| 168 |
1/1✓ Branch 1 taken 4 times.
|
4 | boost::optional<double> peopleperSpaceFloorArea = peopleDefinition.peopleperSpaceFloorArea(); |
| 169 |
1/2✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
|
4 | if (peopleperSpaceFloorArea) { |
| 170 |
4/4✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
|
4 | return peopleDefinition.setNumberofPeople(*peopleperSpaceFloorArea * space->floorArea()); |
| 171 | } | ||
| 172 | |||
| 173 | ✗ | boost::optional<double> spaceFloorAreaperPerson = peopleDefinition.spaceFloorAreaperPerson(); | |
| 174 | ✗ | if (spaceFloorAreaperPerson) { | |
| 175 | ✗ | if (*spaceFloorAreaperPerson == 0) { | |
| 176 | ✗ | return false; | |
| 177 | } else { | ||
| 178 | ✗ | return peopleDefinition.setNumberofPeople(space->floorArea() / *spaceFloorAreaperPerson); | |
| 179 | } | ||
| 180 | } | ||
| 181 | |||
| 182 | ✗ | return false; | |
| 183 | 26 | } | |
| 184 | |||
| 185 | 36 | bool People_Impl::hardApplySchedules() { | |
| 186 | 36 | bool result = false; | |
| 187 | |||
| 188 | // required by EnergyPlus | ||
| 189 |
1/1✓ Branch 1 taken 36 times.
|
36 | boost::optional<Schedule> schedule = this->numberofPeopleSchedule(); |
| 190 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 36 times.
|
36 | if (schedule) { |
| 191 | ✗ | result = this->setNumberofPeopleSchedule(*schedule); | |
| 192 | } | ||
| 193 | |||
| 194 | // required by EnergyPlus | ||
| 195 |
1/1✓ Branch 1 taken 36 times.
|
36 | schedule = this->activityLevelSchedule(); |
| 196 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 36 times.
|
36 | if (schedule) { |
| 197 | ✗ | result = result && this->setActivityLevelSchedule(*schedule); | |
| 198 | } else { | ||
| 199 | 36 | result = false; | |
| 200 | } | ||
| 201 | |||
| 202 | // None of these are part of the DefaultScheduleSet | ||
| 203 | // // optional in EnergyPlus | ||
| 204 | // schedule = this->workEfficiencySchedule(); | ||
| 205 | // if (schedule) { | ||
| 206 | // this->setWorkEfficiencySchedule(*schedule); | ||
| 207 | // } | ||
| 208 | |||
| 209 | // // optional in EnergyPlus | ||
| 210 | // schedule = this->clothingInsulationSchedule(); | ||
| 211 | // if (schedule) { | ||
| 212 | // this->setClothingInsulationSchedule(*schedule); | ||
| 213 | // } | ||
| 214 | |||
| 215 | // // optional in EnergyPlus | ||
| 216 | // schedule = this->airVelocitySchedule(); | ||
| 217 | // if (schedule) { | ||
| 218 | // this->setAirVelocitySchedule(*schedule); | ||
| 219 | // } | ||
| 220 | |||
| 221 | // // optional in EnergyPlus | ||
| 222 | // schedule = this->ankleLevelAirVelocitySchedule(); | ||
| 223 | // if (schedule) { | ||
| 224 | // this->setAnkleLevelAirVelocitySchedule(*schedule); | ||
| 225 | // } | ||
| 226 | |||
| 227 | 36 | return result; | |
| 228 | 36 | } | |
| 229 | |||
| 230 | 628 | double People_Impl::multiplier() const { | |
| 231 |
1/1✓ Branch 1 taken 628 times.
|
628 | boost::optional<double> value = getDouble(OS_PeopleFields::Multiplier, true); |
| 232 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 628 times.
✗ Branch 4 not taken.
|
628 | OS_ASSERT(value); |
| 233 |
1/1✓ Branch 1 taken 628 times.
|
1256 | return value.get(); |
| 234 | } | ||
| 235 | |||
| 236 | ✗ | bool People_Impl::isMultiplierDefaulted() const { | |
| 237 | ✗ | return isEmpty(OS_PeopleFields::Multiplier); | |
| 238 | } | ||
| 239 | |||
| 240 | 7 | bool People_Impl::isAbsolute() const { | |
| 241 |
1/1✓ Branch 1 taken 7 times.
|
7 | PeopleDefinition definition = peopleDefinition(); |
| 242 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 3 times.
|
14 | if (definition.numberofPeople()) { |
| 243 | 4 | return true; | |
| 244 | } | ||
| 245 | 3 | return false; | |
| 246 | 7 | } | |
| 247 | |||
| 248 | 289 | bool People_Impl::setMultiplier(double multiplier) { | |
| 249 | 289 | bool result = setDouble(OS_PeopleFields::Multiplier, multiplier); | |
| 250 | 289 | return result; | |
| 251 | } | ||
| 252 | |||
| 253 | ✗ | void People_Impl::resetMultiplier() { | |
| 254 | ✗ | bool result = setString(OS_PeopleFields::Multiplier, ""); | |
| 255 | ✗ | OS_ASSERT(result); | |
| 256 | ✗ | } | |
| 257 | |||
| 258 | 1285 | int People_Impl::spaceIndex() const { | |
| 259 | 1285 | return OS_PeopleFields::SpaceorSpaceTypeName; | |
| 260 | } | ||
| 261 | |||
| 262 | 1022 | int People_Impl::definitionIndex() const { | |
| 263 | 1022 | return OS_PeopleFields::PeopleDefinitionName; | |
| 264 | } | ||
| 265 | |||
| 266 | 700 | PeopleDefinition People_Impl::peopleDefinition() const { | |
| 267 |
2/2✓ Branch 1 taken 700 times.
✓ Branch 4 taken 700 times.
|
700 | return this->definition().cast<PeopleDefinition>(); |
| 268 | } | ||
| 269 | |||
| 270 | ✗ | bool People_Impl::setPeopleDefinition(const PeopleDefinition& definition) { | |
| 271 | ✗ | return this->setPointer(this->definitionIndex(), definition.handle()); | |
| 272 | } | ||
| 273 | |||
| 274 | ✗ | bool People_Impl::setDefinition(const SpaceLoadDefinition& definition) { | |
| 275 | ✗ | bool result = false; | |
| 276 | ✗ | boost::optional<PeopleDefinition> peopleDefinition = definition.optionalCast<PeopleDefinition>(); | |
| 277 | ✗ | if (peopleDefinition) { | |
| 278 | ✗ | result = setPeopleDefinition(*peopleDefinition); | |
| 279 | } | ||
| 280 | ✗ | return result; | |
| 281 | ✗ | } | |
| 282 | |||
| 283 | 164 | boost::optional<Schedule> People_Impl::numberofPeopleSchedule() const { | |
| 284 |
2/2✓ Branch 1 taken 164 times.
✓ Branch 4 taken 164 times.
|
164 | boost::optional<Schedule> result = getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_PeopleFields::NumberofPeopleScheduleName); |
| 285 |
2/2✓ Branch 1 taken 134 times.
✓ Branch 2 taken 30 times.
|
164 | if (!result) { |
| 286 | // search upwards | ||
| 287 |
1/1✓ Branch 1 taken 134 times.
|
134 | OptionalSpace space = this->space(); |
| 288 |
1/1✓ Branch 1 taken 134 times.
|
134 | OptionalSpaceType spaceType = this->spaceType(); |
| 289 |
2/2✓ Branch 0 taken 75 times.
✓ Branch 1 taken 59 times.
|
134 | if (space) { |
| 290 |
3/3✓ Branch 1 taken 75 times.
✓ Branch 4 taken 75 times.
✓ Branch 7 taken 75 times.
|
75 | result = space->getDefaultSchedule(DefaultScheduleType::NumberofPeopleSchedule); |
| 291 |
1/2✓ Branch 0 taken 59 times.
✗ Branch 1 not taken.
|
59 | } else if (spaceType) { |
| 292 |
3/3✓ Branch 1 taken 59 times.
✓ Branch 4 taken 59 times.
✓ Branch 7 taken 59 times.
|
59 | result = spaceType->getDefaultSchedule(DefaultScheduleType::NumberofPeopleSchedule); |
| 293 | } | ||
| 294 | 134 | } | |
| 295 | 164 | return result; | |
| 296 | ✗ | } | |
| 297 | |||
| 298 | ✗ | bool People_Impl::isNumberofPeopleScheduleDefaulted() const { | |
| 299 | ✗ | return isEmpty(OS_PeopleFields::NumberofPeopleScheduleName); | |
| 300 | } | ||
| 301 | |||
| 302 | 57 | bool People_Impl::setNumberofPeopleSchedule(Schedule& schedule) { | |
| 303 |
3/3✓ Branch 1 taken 57 times.
✓ Branch 4 taken 57 times.
✓ Branch 7 taken 57 times.
|
285 | return setSchedule(OS_PeopleFields::NumberofPeopleScheduleName, "People", "Number of People", schedule); |
| 304 | } | ||
| 305 | |||
| 306 | ✗ | void People_Impl::resetNumberofPeopleSchedule() { | |
| 307 | ✗ | bool result = setString(OS_PeopleFields::NumberofPeopleScheduleName, ""); | |
| 308 | ✗ | OS_ASSERT(result); | |
| 309 | ✗ | } | |
| 310 | |||
| 311 | 158 | boost::optional<Schedule> People_Impl::activityLevelSchedule() const { | |
| 312 |
2/2✓ Branch 1 taken 158 times.
✓ Branch 4 taken 158 times.
|
158 | boost::optional<Schedule> result = getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_PeopleFields::ActivityLevelScheduleName); |
| 313 |
2/2✓ Branch 1 taken 128 times.
✓ Branch 2 taken 30 times.
|
158 | if (!result) { |
| 314 | // search upwards | ||
| 315 |
1/1✓ Branch 1 taken 128 times.
|
128 | OptionalSpace space = this->space(); |
| 316 |
1/1✓ Branch 1 taken 128 times.
|
128 | OptionalSpaceType spaceType = this->spaceType(); |
| 317 |
2/2✓ Branch 0 taken 51 times.
✓ Branch 1 taken 77 times.
|
128 | if (space) { |
| 318 |
3/3✓ Branch 1 taken 51 times.
✓ Branch 4 taken 51 times.
✓ Branch 7 taken 51 times.
|
51 | result = space->getDefaultSchedule(DefaultScheduleType::PeopleActivityLevelSchedule); |
| 319 |
1/2✓ Branch 0 taken 77 times.
✗ Branch 1 not taken.
|
77 | } else if (spaceType) { |
| 320 |
3/3✓ Branch 1 taken 77 times.
✓ Branch 4 taken 77 times.
✓ Branch 7 taken 77 times.
|
77 | result = spaceType->getDefaultSchedule(DefaultScheduleType::PeopleActivityLevelSchedule); |
| 321 | } | ||
| 322 | 128 | } | |
| 323 | 158 | return result; | |
| 324 | ✗ | } | |
| 325 | |||
| 326 | ✗ | bool People_Impl::isActivityLevelScheduleDefaulted() const { | |
| 327 | ✗ | return isEmpty(OS_PeopleFields::ActivityLevelScheduleName); | |
| 328 | } | ||
| 329 | |||
| 330 | 60 | bool People_Impl::setActivityLevelSchedule(Schedule& schedule) { | |
| 331 |
3/3✓ Branch 1 taken 60 times.
✓ Branch 4 taken 60 times.
✓ Branch 7 taken 60 times.
|
300 | return setSchedule(OS_PeopleFields::ActivityLevelScheduleName, "People", "Activity Level", schedule); |
| 332 | } | ||
| 333 | |||
| 334 | ✗ | void People_Impl::resetActivityLevelSchedule() { | |
| 335 | ✗ | bool result = setString(OS_PeopleFields::ActivityLevelScheduleName, ""); | |
| 336 | ✗ | OS_ASSERT(result); | |
| 337 | ✗ | } | |
| 338 | |||
| 339 | 121 | boost::optional<Schedule> People_Impl::workEfficiencySchedule() const { | |
| 340 |
2/2✓ Branch 1 taken 121 times.
✓ Branch 4 taken 121 times.
|
121 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_PeopleFields::WorkEfficiencyScheduleName); |
| 341 | } | ||
| 342 | |||
| 343 | 29 | bool People_Impl::setWorkEfficiencySchedule(Schedule& schedule) { | |
| 344 |
3/3✓ Branch 1 taken 29 times.
✓ Branch 4 taken 29 times.
✓ Branch 7 taken 29 times.
|
145 | return setSchedule(OS_PeopleFields::WorkEfficiencyScheduleName, "People", "Work Efficiency", schedule); |
| 345 | } | ||
| 346 | |||
| 347 | ✗ | void People_Impl::resetWorkEfficiencySchedule() { | |
| 348 | ✗ | bool result = setString(OS_PeopleFields::WorkEfficiencyScheduleName, ""); | |
| 349 | ✗ | OS_ASSERT(result); | |
| 350 | ✗ | } | |
| 351 | |||
| 352 | 125 | std::string People_Impl::clothingInsulationCalculationMethod() const { | |
| 353 |
1/1✓ Branch 1 taken 125 times.
|
125 | boost::optional<std::string> value = getString(OS_PeopleFields::ClothingInsulationCalculationMethod, true); |
| 354 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 125 times.
✗ Branch 4 not taken.
|
125 | OS_ASSERT(value); |
| 355 |
2/2✓ Branch 1 taken 125 times.
✓ Branch 4 taken 125 times.
|
250 | return value.get(); |
| 356 | 125 | } | |
| 357 | |||
| 358 | 9 | boost::optional<Schedule> People_Impl::clothingInsulationCalculationMethodSchedule() const { | |
| 359 |
2/2✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
|
9 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_PeopleFields::ClothingInsulationCalculationMethodScheduleName); |
| 360 | } | ||
| 361 | |||
| 362 | 129 | boost::optional<Schedule> People_Impl::clothingInsulationSchedule() const { | |
| 363 |
2/2✓ Branch 1 taken 129 times.
✓ Branch 4 taken 129 times.
|
129 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_PeopleFields::ClothingInsulationScheduleName); |
| 364 | } | ||
| 365 | |||
| 366 | 313 | bool People_Impl::setClothingInsulationCalculationMethod(const std::string& clothingInsulationCalculationMethod) { | |
| 367 | 313 | const bool result = setString(OS_PeopleFields::ClothingInsulationCalculationMethod, clothingInsulationCalculationMethod); | |
| 368 | 313 | return result; | |
| 369 | } | ||
| 370 | |||
| 371 | 3 | bool People_Impl::setClothingInsulationCalculationMethodSchedule(Schedule& schedule) { | |
| 372 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
18 | return setSchedule(OS_PeopleFields::ClothingInsulationCalculationMethodScheduleName, "People", "Clothing Insulation Calculation Method", |
| 373 | 6 | schedule); | |
| 374 | } | ||
| 375 | |||
| 376 | 1 | void People_Impl::resetClothingInsulationCalculationMethodSchedule() { | |
| 377 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_PeopleFields::ClothingInsulationCalculationMethodScheduleName, ""); |
| 378 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 379 | 1 | } | |
| 380 | |||
| 381 | 30 | bool People_Impl::setClothingInsulationSchedule(Schedule& schedule) { | |
| 382 |
3/3✓ Branch 1 taken 30 times.
✓ Branch 4 taken 30 times.
✓ Branch 7 taken 30 times.
|
150 | return setSchedule(OS_PeopleFields::ClothingInsulationScheduleName, "People", "Clothing Insulation", schedule); |
| 383 | } | ||
| 384 | |||
| 385 | 1 | void People_Impl::resetClothingInsulationSchedule() { | |
| 386 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_PeopleFields::ClothingInsulationScheduleName, ""); |
| 387 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 388 | 1 | } | |
| 389 | |||
| 390 | 121 | boost::optional<Schedule> People_Impl::airVelocitySchedule() const { | |
| 391 |
2/2✓ Branch 1 taken 121 times.
✓ Branch 4 taken 121 times.
|
121 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_PeopleFields::AirVelocityScheduleName); |
| 392 | } | ||
| 393 | |||
| 394 | 29 | bool People_Impl::setAirVelocitySchedule(Schedule& schedule) { | |
| 395 |
3/3✓ Branch 1 taken 29 times.
✓ Branch 4 taken 29 times.
✓ Branch 7 taken 29 times.
|
145 | return setSchedule(OS_PeopleFields::AirVelocityScheduleName, "People", "Air Velocity", schedule); |
| 396 | } | ||
| 397 | |||
| 398 | ✗ | void People_Impl::resetAirVelocitySchedule() { | |
| 399 | ✗ | bool result = setString(OS_PeopleFields::AirVelocityScheduleName, ""); | |
| 400 | ✗ | OS_ASSERT(result); | |
| 401 | ✗ | } | |
| 402 | |||
| 403 | 125 | boost::optional<ModelObject> People_Impl::surfaceNameAngleFactorListName() const { | |
| 404 |
2/2✓ Branch 1 taken 125 times.
✓ Branch 4 taken 125 times.
|
125 | return getObject<ModelObject>().getModelObjectTarget<ModelObject>(OS_PeopleFields::SurfaceName_AngleFactorListName); |
| 405 | } | ||
| 406 | |||
| 407 | 19 | bool People_Impl::setSurfaceNameAngleFactorListName(const ModelObject& modelObject) { | |
| 408 |
5/5✓ Branch 1 taken 19 times.
✓ Branch 4 taken 19 times.
✓ Branch 7 taken 19 times.
✓ Branch 11 taken 1 time.
✓ Branch 12 taken 18 times.
|
19 | if (modelObject.model() != model()) { |
| 409 |
5/5✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
|
1 | LOG(Error, "Surface Name/Angle Factor List Name must reference an object in the same Model."); |
| 410 | 1 | return false; | |
| 411 | } | ||
| 412 | |||
| 413 | 18 | std::string mrtType; | |
| 414 |
16/23✓ Branch 1 taken 18 times.
✓ Branch 4 taken 12 times.
✓ Branch 5 taken 6 times.
✓ Branch 7 taken 12 times.
✓ Branch 10 taken 10 times.
✓ Branch 11 taken 2 times.
✓ Branch 13 taken 10 times.
✓ Branch 16 taken 2 times.
✓ Branch 17 taken 8 times.
✓ Branch 18 taken 10 times.
✓ Branch 19 taken 8 times.
✓ Branch 21 taken 12 times.
✓ Branch 22 taken 6 times.
✓ Branch 24 taken 18 times.
✗ Branch 25 not taken.
✓ Branch 27 taken 10 times.
✓ Branch 28 taken 8 times.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
✗ Branch 32 not taken.
✗ Branch 33 not taken.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
|
58 | if (modelObject.optionalCast<Surface>() || modelObject.optionalCast<SubSurface>() || modelObject.optionalCast<InternalMass>()) { |
| 415 |
1/1✓ Branch 1 taken 10 times.
|
10 | mrtType = "SurfaceWeighted"; |
| 416 |
2/3✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
|
16 | } else if (modelObject.optionalCast<ComfortViewFactorAngles>()) { |
| 417 |
1/1✓ Branch 1 taken 8 times.
|
8 | mrtType = "AngleFactor"; |
| 418 | } else { | ||
| 419 | ✗ | LOG(Error, "Surface Name/Angle Factor List Name must reference a Surface, SubSurface, InternalMass, or ComfortViewFactorAngles object."); | |
| 420 | ✗ | return false; | |
| 421 | } | ||
| 422 |
3/4✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 18 times.
|
18 | if (!peopleDefinition().setMeanRadiantTemperatureCalculationType(mrtType)) { |
| 423 | ✗ | return false; | |
| 424 | } | ||
| 425 |
2/2✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
|
18 | return setPointer(OS_PeopleFields::SurfaceName_AngleFactorListName, modelObject.handle()); |
| 426 | 18 | } | |
| 427 | |||
| 428 | 1 | void People_Impl::resetSurfaceNameAngleFactorListName() { | |
| 429 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_PeopleFields::SurfaceName_AngleFactorListName, ""); |
| 430 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 431 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | peopleDefinition().resetMeanRadiantTemperatureCalculationType(); |
| 432 | 1 | } | |
| 433 | |||
| 434 | ✗ | boost::optional<double> People_Impl::numberOfPeople() const { | |
| 435 | ✗ | OptionalDouble temp = peopleDefinition().numberofPeople(); | |
| 436 | ✗ | if (temp) { | |
| 437 | ✗ | return temp.get() * multiplier(); | |
| 438 | } | ||
| 439 | ✗ | return temp; | |
| 440 | } | ||
| 441 | |||
| 442 | ✗ | boost::optional<double> People_Impl::peoplePerFloorArea() const { | |
| 443 | ✗ | OptionalDouble temp = peopleDefinition().peopleperSpaceFloorArea(); | |
| 444 | ✗ | if (temp) { | |
| 445 | ✗ | return temp.get() * multiplier(); | |
| 446 | } | ||
| 447 | ✗ | return temp; | |
| 448 | } | ||
| 449 | |||
| 450 | ✗ | boost::optional<double> People_Impl::spaceFloorAreaPerPerson() const { | |
| 451 | ✗ | OptionalDouble temp = peopleDefinition().spaceFloorAreaperPerson(); | |
| 452 | ✗ | if (temp) { | |
| 453 | ✗ | double mult = multiplier(); | |
| 454 | ✗ | if (mult > 0) { | |
| 455 | ✗ | return temp.get() / mult; | |
| 456 | } | ||
| 457 | } | ||
| 458 | ✗ | return temp; | |
| 459 | } | ||
| 460 | |||
| 461 | 457 | double People_Impl::getNumberOfPeople(double floorArea) const { | |
| 462 |
3/3✓ Branch 1 taken 457 times.
✓ Branch 4 taken 457 times.
✓ Branch 7 taken 457 times.
|
457 | return peopleDefinition().getNumberOfPeople(floorArea) * multiplier(); |
| 463 | } | ||
| 464 | |||
| 465 | 50 | double People_Impl::getPeoplePerFloorArea(double floorArea) const { | |
| 466 |
3/3✓ Branch 1 taken 50 times.
✓ Branch 4 taken 50 times.
✓ Branch 7 taken 50 times.
|
50 | return peopleDefinition().getPeoplePerFloorArea(floorArea) * multiplier(); |
| 467 | } | ||
| 468 | |||
| 469 | ✗ | double People_Impl::getFloorAreaPerPerson(double floorArea) const { | |
| 470 | ✗ | return peopleDefinition().getFloorAreaPerPerson(floorArea) * multiplier(); | |
| 471 | } | ||
| 472 | |||
| 473 | ✗ | boost::optional<ModelObject> People_Impl::peopleDefinitionAsModelObject() const { | |
| 474 | ✗ | OptionalModelObject result = peopleDefinition(); | |
| 475 | ✗ | return result; | |
| 476 | } | ||
| 477 | |||
| 478 | ✗ | boost::optional<ModelObject> People_Impl::numberofPeopleScheduleAsModelObject() const { | |
| 479 | ✗ | OptionalModelObject result; | |
| 480 | ✗ | OptionalSchedule intermediate = numberofPeopleSchedule(); | |
| 481 | ✗ | if (intermediate) { | |
| 482 | ✗ | result = *intermediate; | |
| 483 | } | ||
| 484 | ✗ | return result; | |
| 485 | ✗ | } | |
| 486 | |||
| 487 | ✗ | boost::optional<ModelObject> People_Impl::activityLevelScheduleAsModelObject() const { | |
| 488 | ✗ | OptionalModelObject result; | |
| 489 | ✗ | OptionalSchedule intermediate = activityLevelSchedule(); | |
| 490 | ✗ | if (intermediate) { | |
| 491 | ✗ | result = *intermediate; | |
| 492 | } | ||
| 493 | ✗ | return result; | |
| 494 | ✗ | } | |
| 495 | |||
| 496 | ✗ | boost::optional<ModelObject> People_Impl::workEfficiencyScheduleAsModelObject() const { | |
| 497 | ✗ | OptionalModelObject result; | |
| 498 | ✗ | OptionalSchedule intermediate = workEfficiencySchedule(); | |
| 499 | ✗ | if (intermediate) { | |
| 500 | ✗ | result = *intermediate; | |
| 501 | } | ||
| 502 | ✗ | return result; | |
| 503 | ✗ | } | |
| 504 | |||
| 505 | ✗ | boost::optional<ModelObject> People_Impl::clothingInsulationScheduleAsModelObject() const { | |
| 506 | ✗ | OptionalModelObject result; | |
| 507 | ✗ | OptionalSchedule intermediate = clothingInsulationSchedule(); | |
| 508 | ✗ | if (intermediate) { | |
| 509 | ✗ | result = *intermediate; | |
| 510 | } | ||
| 511 | ✗ | return result; | |
| 512 | ✗ | } | |
| 513 | |||
| 514 | ✗ | boost::optional<ModelObject> People_Impl::airVelocityScheduleAsModelObject() const { | |
| 515 | ✗ | OptionalModelObject result; | |
| 516 | ✗ | OptionalSchedule intermediate = airVelocitySchedule(); | |
| 517 | ✗ | if (intermediate) { | |
| 518 | ✗ | result = *intermediate; | |
| 519 | } | ||
| 520 | ✗ | return result; | |
| 521 | ✗ | } | |
| 522 | |||
| 523 | ✗ | bool People_Impl::setPeopleDefinitionAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 524 | ✗ | if (modelObject) { | |
| 525 | ✗ | OptionalPeopleDefinition intermediate = modelObject->optionalCast<PeopleDefinition>(); | |
| 526 | ✗ | if (intermediate) { | |
| 527 | ✗ | return setPeopleDefinition(*intermediate); | |
| 528 | } | ||
| 529 | ✗ | } | |
| 530 | ✗ | return false; | |
| 531 | } | ||
| 532 | |||
| 533 | ✗ | bool People_Impl::setNumberofPeopleScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 534 | ✗ | if (modelObject) { | |
| 535 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 536 | ✗ | if (intermediate) { | |
| 537 | ✗ | Schedule schedule(*intermediate); | |
| 538 | ✗ | return setNumberofPeopleSchedule(schedule); | |
| 539 | ✗ | } else { | |
| 540 | ✗ | return false; | |
| 541 | } | ||
| 542 | ✗ | } else { | |
| 543 | ✗ | resetNumberofPeopleSchedule(); | |
| 544 | } | ||
| 545 | ✗ | return true; | |
| 546 | } | ||
| 547 | |||
| 548 | ✗ | bool People_Impl::setActivityLevelScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 549 | ✗ | if (modelObject) { | |
| 550 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 551 | ✗ | if (intermediate) { | |
| 552 | ✗ | Schedule schedule(*intermediate); | |
| 553 | ✗ | return setActivityLevelSchedule(schedule); | |
| 554 | ✗ | } else { | |
| 555 | ✗ | return false; | |
| 556 | } | ||
| 557 | ✗ | } else { | |
| 558 | ✗ | resetActivityLevelSchedule(); | |
| 559 | } | ||
| 560 | ✗ | return true; | |
| 561 | } | ||
| 562 | |||
| 563 | ✗ | bool People_Impl::setWorkEfficiencyScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 564 | ✗ | if (modelObject) { | |
| 565 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 566 | ✗ | if (intermediate) { | |
| 567 | ✗ | Schedule schedule(*intermediate); | |
| 568 | ✗ | return setWorkEfficiencySchedule(schedule); | |
| 569 | ✗ | } else { | |
| 570 | ✗ | return false; | |
| 571 | } | ||
| 572 | ✗ | } else { | |
| 573 | ✗ | resetWorkEfficiencySchedule(); | |
| 574 | } | ||
| 575 | ✗ | return true; | |
| 576 | } | ||
| 577 | |||
| 578 | ✗ | bool People_Impl::setClothingInsulationScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 579 | ✗ | if (modelObject) { | |
| 580 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 581 | ✗ | if (intermediate) { | |
| 582 | ✗ | Schedule schedule(*intermediate); | |
| 583 | ✗ | return setClothingInsulationSchedule(schedule); | |
| 584 | ✗ | } else { | |
| 585 | ✗ | return false; | |
| 586 | } | ||
| 587 | ✗ | } else { | |
| 588 | ✗ | resetClothingInsulationSchedule(); | |
| 589 | } | ||
| 590 | ✗ | return true; | |
| 591 | } | ||
| 592 | |||
| 593 | ✗ | bool People_Impl::setAirVelocityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 594 | ✗ | if (modelObject) { | |
| 595 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 596 | ✗ | if (intermediate) { | |
| 597 | ✗ | Schedule schedule(*intermediate); | |
| 598 | ✗ | return setAirVelocitySchedule(schedule); | |
| 599 | ✗ | } else { | |
| 600 | ✗ | return false; | |
| 601 | } | ||
| 602 | ✗ | } else { | |
| 603 | ✗ | resetAirVelocitySchedule(); | |
| 604 | } | ||
| 605 | ✗ | return true; | |
| 606 | } | ||
| 607 | |||
| 608 | ✗ | std::vector<EMSActuatorNames> People_Impl::emsActuatorNames() const { | |
| 609 | ✗ | std::vector<EMSActuatorNames> actuators{{"People", "Number of People"}}; | |
| 610 | ✗ | return actuators; | |
| 611 | ✗ | } | |
| 612 | |||
| 613 | ✗ | std::vector<std::string> People_Impl::emsInternalVariableNames() const { | |
| 614 | ✗ | std::vector<std::string> types{"People Count Design Level"}; | |
| 615 | ✗ | return types; | |
| 616 | ✗ | } | |
| 617 | |||
| 618 | 121 | boost::optional<Schedule> People_Impl::ankleLevelAirVelocitySchedule() const { | |
| 619 |
2/2✓ Branch 1 taken 121 times.
✓ Branch 4 taken 121 times.
|
121 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_PeopleFields::AnkleLevelAirVelocityScheduleName); |
| 620 | } | ||
| 621 | |||
| 622 | 3 | bool People_Impl::setAnkleLevelAirVelocitySchedule(Schedule& schedule) { | |
| 623 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
15 | return setSchedule(OS_PeopleFields::AnkleLevelAirVelocityScheduleName, "People", "Air Velocity", schedule); |
| 624 | } | ||
| 625 | |||
| 626 | ✗ | void People_Impl::resetAnkleLevelAirVelocitySchedule() { | |
| 627 | ✗ | bool result = setString(OS_PeopleFields::AnkleLevelAirVelocityScheduleName, ""); | |
| 628 | ✗ | OS_ASSERT(result); | |
| 629 | ✗ | } | |
| 630 | |||
| 631 | ✗ | boost::optional<ModelObject> People_Impl::ankleLevelAirVelocityScheduleAsModelObject() const { | |
| 632 | ✗ | OptionalModelObject result; | |
| 633 | ✗ | OptionalSchedule intermediate = ankleLevelAirVelocitySchedule(); | |
| 634 | ✗ | if (intermediate) { | |
| 635 | ✗ | result = *intermediate; | |
| 636 | } | ||
| 637 | ✗ | return result; | |
| 638 | ✗ | } | |
| 639 | |||
| 640 | ✗ | bool People_Impl::setAnkleLevelAirVelocityScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) { | |
| 641 | ✗ | if (modelObject) { | |
| 642 | ✗ | OptionalSchedule intermediate = modelObject->optionalCast<Schedule>(); | |
| 643 | ✗ | if (intermediate) { | |
| 644 | ✗ | Schedule schedule(*intermediate); | |
| 645 | ✗ | return setAnkleLevelAirVelocitySchedule(schedule); | |
| 646 | ✗ | } else { | |
| 647 | ✗ | return false; | |
| 648 | } | ||
| 649 | ✗ | } else { | |
| 650 | ✗ | resetAnkleLevelAirVelocitySchedule(); | |
| 651 | } | ||
| 652 | ✗ | return true; | |
| 653 | } | ||
| 654 | |||
| 655 | 3 | double People_Impl::coldStressTemperatureThreshold() const { | |
| 656 |
1/1✓ Branch 1 taken 3 times.
|
3 | boost::optional<double> value = getDouble(OS_PeopleFields::ColdStressTemperatureThreshold, true); |
| 657 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
|
3 | OS_ASSERT(value); |
| 658 |
1/1✓ Branch 1 taken 3 times.
|
6 | return value.get(); |
| 659 | } | ||
| 660 | |||
| 661 | 119 | bool People_Impl::isColdStressTemperatureThresholdDefaulted() const { | |
| 662 | 119 | return isEmpty(OS_PeopleFields::ColdStressTemperatureThreshold); | |
| 663 | } | ||
| 664 | |||
| 665 | 3 | bool People_Impl::setColdStressTemperatureThreshold(double coldStressTemperatureThreshold) { | |
| 666 | 3 | bool result = setDouble(OS_PeopleFields::ColdStressTemperatureThreshold, coldStressTemperatureThreshold); | |
| 667 | 3 | return result; | |
| 668 | } | ||
| 669 | |||
| 670 | ✗ | void People_Impl::resetColdStressTemperatureThreshold() { | |
| 671 | ✗ | bool result = setString(OS_PeopleFields::ColdStressTemperatureThreshold, ""); | |
| 672 | ✗ | OS_ASSERT(result); | |
| 673 | ✗ | } | |
| 674 | |||
| 675 | 3 | double People_Impl::heatStressTemperatureThreshold() const { | |
| 676 |
1/1✓ Branch 1 taken 3 times.
|
3 | boost::optional<double> value = getDouble(OS_PeopleFields::HeatStressTemperatureThreshold, true); |
| 677 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
|
3 | OS_ASSERT(value); |
| 678 |
1/1✓ Branch 1 taken 3 times.
|
6 | return value.get(); |
| 679 | } | ||
| 680 | |||
| 681 | 119 | bool People_Impl::isHeatStressTemperatureThresholdDefaulted() const { | |
| 682 | 119 | return isEmpty(OS_PeopleFields::HeatStressTemperatureThreshold); | |
| 683 | } | ||
| 684 | |||
| 685 | 3 | bool People_Impl::setHeatStressTemperatureThreshold(double heatStressTemperatureThreshold) { | |
| 686 | 3 | bool result = setDouble(OS_PeopleFields::HeatStressTemperatureThreshold, heatStressTemperatureThreshold); | |
| 687 | 3 | return result; | |
| 688 | } | ||
| 689 | |||
| 690 | ✗ | void People_Impl::resetHeatStressTemperatureThreshold() { | |
| 691 | ✗ | bool result = setString(OS_PeopleFields::HeatStressTemperatureThreshold, ""); | |
| 692 | ✗ | OS_ASSERT(result); | |
| 693 | ✗ | } | |
| 694 | |||
| 695 | } // namespace detail | ||
| 696 | |||
| 697 | 281 | People::People(const PeopleDefinition& peopleDefinition) : SpaceLoadInstance(People::iddObjectType(), peopleDefinition) { | |
| 698 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 281 times.
✗ Branch 5 not taken.
|
281 | OS_ASSERT(getImpl<detail::People_Impl>()); |
| 699 | |||
| 700 |
1/1✓ Branch 1 taken 281 times.
|
281 | bool test = this->setMultiplier(1.0); |
| 701 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 281 times.
✗ Branch 3 not taken.
|
281 | OS_ASSERT(test); |
| 702 |
2/2✓ Branch 1 taken 281 times.
✓ Branch 4 taken 281 times.
|
281 | test = setClothingInsulationCalculationMethod("ClothingInsulationSchedule"); |
| 703 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 281 times.
✗ Branch 3 not taken.
|
281 | OS_ASSERT(test); |
| 704 | 281 | } | |
| 705 | |||
| 706 | 14388 | IddObjectType People::iddObjectType() { | |
| 707 |
1/1✓ Branch 1 taken 14388 times.
|
14388 | IddObjectType result(IddObjectType::OS_People); |
| 708 | 14388 | return result; | |
| 709 | } | ||
| 710 | |||
| 711 | ✗ | std::vector<std::string> People::clothingInsulationCalculationMethodValues() { | |
| 712 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_PeopleFields::ClothingInsulationCalculationMethod); | |
| 713 | } | ||
| 714 | |||
| 715 | 289 | bool People::setMultiplier(double multiplier) { | |
| 716 |
1/1✓ Branch 3 taken 289 times.
|
289 | return getImpl<detail::People_Impl>()->setMultiplier(multiplier); |
| 717 | } | ||
| 718 | |||
| 719 | ✗ | void People::resetMultiplier() { | |
| 720 | ✗ | getImpl<detail::People_Impl>()->resetMultiplier(); | |
| 721 | ✗ | } | |
| 722 | |||
| 723 | 141 | PeopleDefinition People::peopleDefinition() const { | |
| 724 |
1/1✓ Branch 3 taken 141 times.
|
141 | return getImpl<detail::People_Impl>()->peopleDefinition(); |
| 725 | } | ||
| 726 | |||
| 727 | ✗ | bool People::setPeopleDefinition(const PeopleDefinition& peopleDefinition) { | |
| 728 | ✗ | return getImpl<detail::People_Impl>()->setPeopleDefinition(peopleDefinition); | |
| 729 | } | ||
| 730 | |||
| 731 | 128 | boost::optional<Schedule> People::numberofPeopleSchedule() const { | |
| 732 |
1/1✓ Branch 3 taken 128 times.
|
128 | return getImpl<detail::People_Impl>()->numberofPeopleSchedule(); |
| 733 | } | ||
| 734 | |||
| 735 | ✗ | bool People::isNumberofPeopleScheduleDefaulted() const { | |
| 736 | ✗ | return getImpl<detail::People_Impl>()->isNumberofPeopleScheduleDefaulted(); | |
| 737 | } | ||
| 738 | |||
| 739 | 57 | bool People::setNumberofPeopleSchedule(Schedule& schedule) { | |
| 740 |
1/1✓ Branch 3 taken 57 times.
|
57 | return getImpl<detail::People_Impl>()->setNumberofPeopleSchedule(schedule); |
| 741 | } | ||
| 742 | |||
| 743 | ✗ | void People::resetNumberofPeopleSchedule() { | |
| 744 | ✗ | getImpl<detail::People_Impl>()->resetNumberofPeopleSchedule(); | |
| 745 | ✗ | } | |
| 746 | |||
| 747 | 122 | boost::optional<Schedule> People::activityLevelSchedule() const { | |
| 748 |
1/1✓ Branch 3 taken 122 times.
|
122 | return getImpl<detail::People_Impl>()->activityLevelSchedule(); |
| 749 | } | ||
| 750 | |||
| 751 | ✗ | bool People::isActivityLevelScheduleDefaulted() const { | |
| 752 | ✗ | return getImpl<detail::People_Impl>()->isActivityLevelScheduleDefaulted(); | |
| 753 | } | ||
| 754 | |||
| 755 | 60 | bool People::setActivityLevelSchedule(Schedule& schedule) { | |
| 756 |
1/1✓ Branch 3 taken 60 times.
|
60 | return getImpl<detail::People_Impl>()->setActivityLevelSchedule(schedule); |
| 757 | } | ||
| 758 | |||
| 759 | ✗ | void People::resetActivityLevelSchedule() { | |
| 760 | ✗ | getImpl<detail::People_Impl>()->resetActivityLevelSchedule(); | |
| 761 | ✗ | } | |
| 762 | |||
| 763 | 121 | boost::optional<Schedule> People::workEfficiencySchedule() const { | |
| 764 |
1/1✓ Branch 3 taken 121 times.
|
121 | return getImpl<detail::People_Impl>()->workEfficiencySchedule(); |
| 765 | } | ||
| 766 | |||
| 767 | 29 | bool People::setWorkEfficiencySchedule(Schedule& schedule) { | |
| 768 |
1/1✓ Branch 3 taken 29 times.
|
29 | return getImpl<detail::People_Impl>()->setWorkEfficiencySchedule(schedule); |
| 769 | } | ||
| 770 | |||
| 771 | ✗ | void People::resetWorkEfficiencySchedule() { | |
| 772 | ✗ | getImpl<detail::People_Impl>()->resetWorkEfficiencySchedule(); | |
| 773 | ✗ | } | |
| 774 | |||
| 775 | 125 | std::string People::clothingInsulationCalculationMethod() const { | |
| 776 |
1/1✓ Branch 3 taken 125 times.
|
125 | return getImpl<detail::People_Impl>()->clothingInsulationCalculationMethod(); |
| 777 | } | ||
| 778 | |||
| 779 | 9 | boost::optional<Schedule> People::clothingInsulationCalculationMethodSchedule() const { | |
| 780 |
1/1✓ Branch 3 taken 9 times.
|
9 | return getImpl<detail::People_Impl>()->clothingInsulationCalculationMethodSchedule(); |
| 781 | } | ||
| 782 | |||
| 783 | 129 | boost::optional<Schedule> People::clothingInsulationSchedule() const { | |
| 784 |
1/1✓ Branch 3 taken 129 times.
|
129 | return getImpl<detail::People_Impl>()->clothingInsulationSchedule(); |
| 785 | } | ||
| 786 | |||
| 787 | 313 | bool People::setClothingInsulationCalculationMethod(const std::string& clothingInsulationCalculationMethod) { | |
| 788 |
1/1✓ Branch 3 taken 313 times.
|
313 | return getImpl<detail::People_Impl>()->setClothingInsulationCalculationMethod(clothingInsulationCalculationMethod); |
| 789 | } | ||
| 790 | |||
| 791 | 3 | bool People::setClothingInsulationCalculationMethodSchedule(Schedule& schedule) { | |
| 792 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::People_Impl>()->setClothingInsulationCalculationMethodSchedule(schedule); |
| 793 | } | ||
| 794 | |||
| 795 | 1 | void People::resetClothingInsulationCalculationMethodSchedule() { | |
| 796 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::People_Impl>()->resetClothingInsulationCalculationMethodSchedule(); |
| 797 | 1 | } | |
| 798 | |||
| 799 | 30 | bool People::setClothingInsulationSchedule(Schedule& schedule) { | |
| 800 |
1/1✓ Branch 3 taken 30 times.
|
30 | return getImpl<detail::People_Impl>()->setClothingInsulationSchedule(schedule); |
| 801 | } | ||
| 802 | |||
| 803 | 1 | void People::resetClothingInsulationSchedule() { | |
| 804 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::People_Impl>()->resetClothingInsulationSchedule(); |
| 805 | 1 | } | |
| 806 | |||
| 807 | 121 | boost::optional<Schedule> People::airVelocitySchedule() const { | |
| 808 |
1/1✓ Branch 3 taken 121 times.
|
121 | return getImpl<detail::People_Impl>()->airVelocitySchedule(); |
| 809 | } | ||
| 810 | |||
| 811 | 29 | bool People::setAirVelocitySchedule(Schedule& schedule) { | |
| 812 |
1/1✓ Branch 3 taken 29 times.
|
29 | return getImpl<detail::People_Impl>()->setAirVelocitySchedule(schedule); |
| 813 | } | ||
| 814 | |||
| 815 | ✗ | void People::resetAirVelocitySchedule() { | |
| 816 | ✗ | getImpl<detail::People_Impl>()->resetAirVelocitySchedule(); | |
| 817 | ✗ | } | |
| 818 | |||
| 819 | 125 | boost::optional<ModelObject> People::surfaceNameAngleFactorListName() const { | |
| 820 |
1/1✓ Branch 3 taken 125 times.
|
125 | return getImpl<detail::People_Impl>()->surfaceNameAngleFactorListName(); |
| 821 | } | ||
| 822 | |||
| 823 | 19 | bool People::setSurfaceNameAngleFactorListName(const ModelObject& modelObject) { | |
| 824 |
1/1✓ Branch 3 taken 19 times.
|
19 | return getImpl<detail::People_Impl>()->setSurfaceNameAngleFactorListName(modelObject); |
| 825 | } | ||
| 826 | |||
| 827 | 1 | void People::resetSurfaceNameAngleFactorListName() { | |
| 828 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::People_Impl>()->resetSurfaceNameAngleFactorListName(); |
| 829 | 1 | } | |
| 830 | |||
| 831 | ✗ | boost::optional<double> People::numberOfPeople() const { | |
| 832 | ✗ | return getImpl<detail::People_Impl>()->numberOfPeople(); | |
| 833 | } | ||
| 834 | |||
| 835 | ✗ | boost::optional<double> People::peoplePerFloorArea() const { | |
| 836 | ✗ | return getImpl<detail::People_Impl>()->peoplePerFloorArea(); | |
| 837 | } | ||
| 838 | |||
| 839 | ✗ | boost::optional<double> People::spaceFloorAreaPerPerson() const { | |
| 840 | ✗ | return getImpl<detail::People_Impl>()->spaceFloorAreaPerPerson(); | |
| 841 | } | ||
| 842 | |||
| 843 | 457 | double People::getNumberOfPeople(double floorArea) const { | |
| 844 |
1/1✓ Branch 3 taken 457 times.
|
457 | return getImpl<detail::People_Impl>()->getNumberOfPeople(floorArea); |
| 845 | } | ||
| 846 | |||
| 847 | 50 | double People::getPeoplePerFloorArea(double floorArea) const { | |
| 848 |
1/1✓ Branch 3 taken 50 times.
|
50 | return getImpl<detail::People_Impl>()->getPeoplePerFloorArea(floorArea); |
| 849 | } | ||
| 850 | |||
| 851 | ✗ | double People::getFloorAreaPerPerson(double floorArea) const { | |
| 852 | ✗ | return getImpl<detail::People_Impl>()->getFloorAreaPerPerson(floorArea); | |
| 853 | } | ||
| 854 | |||
| 855 | 121 | boost::optional<Schedule> People::ankleLevelAirVelocitySchedule() const { | |
| 856 |
1/1✓ Branch 3 taken 121 times.
|
121 | return getImpl<detail::People_Impl>()->ankleLevelAirVelocitySchedule(); |
| 857 | } | ||
| 858 | |||
| 859 | 3 | bool People::setAnkleLevelAirVelocitySchedule(Schedule& schedule) { | |
| 860 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::People_Impl>()->setAnkleLevelAirVelocitySchedule(schedule); |
| 861 | } | ||
| 862 | |||
| 863 | ✗ | void People::resetAnkleLevelAirVelocitySchedule() { | |
| 864 | ✗ | getImpl<detail::People_Impl>()->resetAnkleLevelAirVelocitySchedule(); | |
| 865 | ✗ | } | |
| 866 | |||
| 867 | 3 | double People::coldStressTemperatureThreshold() const { | |
| 868 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::People_Impl>()->coldStressTemperatureThreshold(); |
| 869 | } | ||
| 870 | |||
| 871 | 119 | bool People::isColdStressTemperatureThresholdDefaulted() const { | |
| 872 |
1/1✓ Branch 3 taken 119 times.
|
119 | return getImpl<detail::People_Impl>()->isColdStressTemperatureThresholdDefaulted(); |
| 873 | } | ||
| 874 | |||
| 875 | 3 | bool People::setColdStressTemperatureThreshold(double coldStressTemperatureThreshold) { | |
| 876 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::People_Impl>()->setColdStressTemperatureThreshold(coldStressTemperatureThreshold); |
| 877 | } | ||
| 878 | |||
| 879 | ✗ | void People::resetColdStressTemperatureThreshold() { | |
| 880 | ✗ | getImpl<detail::People_Impl>()->resetColdStressTemperatureThreshold(); | |
| 881 | ✗ | } | |
| 882 | |||
| 883 | 3 | double People::heatStressTemperatureThreshold() const { | |
| 884 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::People_Impl>()->heatStressTemperatureThreshold(); |
| 885 | } | ||
| 886 | |||
| 887 | 119 | bool People::isHeatStressTemperatureThresholdDefaulted() const { | |
| 888 |
1/1✓ Branch 3 taken 119 times.
|
119 | return getImpl<detail::People_Impl>()->isHeatStressTemperatureThresholdDefaulted(); |
| 889 | } | ||
| 890 | |||
| 891 | 3 | bool People::setHeatStressTemperatureThreshold(double heatStressTemperatureThreshold) { | |
| 892 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::People_Impl>()->setHeatStressTemperatureThreshold(heatStressTemperatureThreshold); |
| 893 | } | ||
| 894 | |||
| 895 | ✗ | void People::resetHeatStressTemperatureThreshold() { | |
| 896 | ✗ | getImpl<detail::People_Impl>()->resetHeatStressTemperatureThreshold(); | |
| 897 | ✗ | } | |
| 898 | |||
| 899 | /// @cond | ||
| 900 |
1/1✓ Branch 3 taken 1018 times.
|
1018 | People::People(std::shared_ptr<detail::People_Impl> impl) : SpaceLoadInstance(std::move(impl)) {} |
| 901 | /// @endcond | ||
| 902 | |||
| 903 | } // namespace model | ||
| 904 | } // namespace openstudio | ||
| 905 |