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

Method activityLevelSchedule

src/model/People.cpp:283–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281 }
282
283 boost::optional<Schedule> People_Impl::activityLevelSchedule() const {
284 boost::optional<Schedule> result = getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_PeopleFields::ActivityLevelScheduleName);
285 if (!result) {
286 // search upwards
287 OptionalSpace space = this->space();
288 OptionalSpaceType spaceType = this->spaceType();
289 if (space) {
290 result = space->getDefaultSchedule(DefaultScheduleType::PeopleActivityLevelSchedule);
291 } else if (spaceType) {
292 result = spaceType->getDefaultSchedule(DefaultScheduleType::PeopleActivityLevelSchedule);
293 }
294 }
295 return result;
296 }
297
298 bool People_Impl::isActivityLevelScheduleDefaulted() const {
299 return isEmpty(OS_PeopleFields::ActivityLevelScheduleName);

Callers 7

hardApplySchedulesMethod · 0.95
runMethod · 0.80
osm2iso.rbFile · 0.80
translatePeopleMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
translateModelMethod · 0.80

Calls 3

spaceMethod · 0.45
spaceTypeMethod · 0.45
getDefaultScheduleMethod · 0.45

Tested by 2

TEST_FFunction · 0.64
TEST_FFunction · 0.64