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

Method addWalkin

src/model/RefrigerationSystem.cpp:421–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419 }
420
421 bool RefrigerationSystem_Impl::addWalkin(const RefrigerationWalkIn& refrigerationWalkin) {
422 // From 9.2 IO ref:
423 // > This list may contain a combination of case and walk-in names OR a list of air chiller names.
424 // > Air chillers may not be included in any list that also includes cases or walk-ins.
425 if (!this->airChillers().empty()) {
426 LOG(Warn, "You cannot mix RefigerationCase/RefrigerationWalkins with RefrigerationAirChillers, occurred for " << briefDescription());
427 return false;
428 }
429
430 // Enforce unicity
431 if (boost::optional<RefrigerationSystem> currentSystem = refrigerationWalkin.system()) {
432 LOG(Warn, refrigerationWalkin.briefDescription()
433 << " was removed from its existing RefrigerationSystem named '" << currentSystem->nameString() << "'.");
434 currentSystem->removeWalkin(refrigerationWalkin);
435 }
436
437 boost::optional<ModelObjectList> modelObjectList = refrigeratedCaseAndWalkInList();
438 return addTemplate<RefrigerationWalkIn>(refrigerationWalkin, modelObjectList);
439 }
440
441 void RefrigerationSystem_Impl::removeWalkin(const RefrigerationWalkIn& refrigerationWalkin) {
442 boost::optional<ModelObjectList> modelObjectList = refrigeratedCaseAndWalkInList();

Callers 6

addToSystemMethod · 0.45
addToSecondarySystemMethod · 0.45
addToCompressorRackMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 6

airChillersMethod · 0.95
briefDescriptionMethod · 0.80
nameStringMethod · 0.80
emptyMethod · 0.45
systemMethod · 0.45
removeWalkinMethod · 0.45

Tested by 3

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36