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

Method addHighStageCompressor

src/model/RefrigerationSystem.cpp:506–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504 }
505
506 bool RefrigerationSystem_Impl::addHighStageCompressor(const RefrigerationCompressor& refrigerationHighStageCompressor) {
507 // Enforce unicity
508 if (boost::optional<RefrigerationSystem> currentSystem = refrigerationHighStageCompressor.system()) {
509 LOG(Warn, refrigerationHighStageCompressor.briefDescription()
510 << " was removed from its existing RefrigerationSystem (High Stage) named '" << currentSystem->nameString() << "'.");
511 currentSystem->removeCompressor(refrigerationHighStageCompressor);
512 }
513 boost::optional<ModelObjectList> modelObjectList = highStageCompressorList();
514 return addTemplate<RefrigerationCompressor>(refrigerationHighStageCompressor, modelObjectList);
515 }
516
517 void RefrigerationSystem_Impl::removeHighStageCompressor(const RefrigerationCompressor& refrigerationHighStageCompressor) {
518 boost::optional<ModelObjectList> modelObjectList = highStageCompressorList();

Callers 1

TEST_FFunction · 0.80

Calls 4

briefDescriptionMethod · 0.80
nameStringMethod · 0.80
removeCompressorMethod · 0.80
systemMethod · 0.45

Tested by 1

TEST_FFunction · 0.64