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

Method removeGenerator

src/model/ElectricLoadCenterDistribution.cpp:294–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292 }
293
294 bool ElectricLoadCenterDistribution_Impl::removeGenerator(const Generator& generator) {
295 ModelObjectList list = generatorModelObjectList();
296 if (!list.hasModelObject(generator)) {
297 return false;
298 }
299
300 generatorModelObjectList().removeModelObject(generator);
301
302 if (list.size() == 0) {
303 resetElectricalBussType();
304 }
305
306 return true;
307 }
308
309 void ElectricLoadCenterDistribution_Impl::resetGenerators() {
310 generatorModelObjectList().removeAllModelObjects();

Callers 5

addGeneratorMethod · 0.80
removeMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80

Calls 3

hasModelObjectMethod · 0.80
removeModelObjectMethod · 0.80
sizeMethod · 0.45

Tested by 3

TEST_FFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64