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

Method createInitProgram

src/model/PlantComponentUserDefined.cpp:459–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457 }
458
459 EnergyManagementSystemProgram PlantComponentUserDefined_Impl::createInitProgram(
460 const EnergyManagementSystemActuator& dvfrActuator, const EnergyManagementSystemActuator& mmfrActuator,
461 const EnergyManagementSystemActuator& mxfrActuator, const EnergyManagementSystemActuator& mlcActuator,
462 const EnergyManagementSystemActuator& mxlcActuator, const EnergyManagementSystemActuator& olcActuator, const Model& model) {
463 std::string line;
464 EnergyManagementSystemProgram initProgram(model);
465 initProgram.setName("PCUD_InitProgram");
466 line = " SET LoopExitTemp = 82.22, !- <none> \r\n";
467 initProgram.addLine(line);
468 line = " SET LoopDeltaTemp = 4.0, !- <none> \r\n";
469 initProgram.addLine(line);
470 line = " SET CP = @CPCW LoopExitTemp, !- <none> \r\n";
471 initProgram.addLine(line);
472 line = " SET rho = @RhoH2O LoopExitTemp, !- <none> \r\n";
473 initProgram.addLine(line);
474 line = " SET " + toString(dvfrActuator.handle()) + " = 0.5, !- <none> \r\n";
475 initProgram.addLine(line);
476 line = " SET " + toString(mmfrActuator.handle()) + " = 0.0, !- <none> \r\n";
477 initProgram.addLine(line);
478 line = " SET " + toString(mxfrActuator.handle()) + " = " + toString(dvfrActuator.handle()) + " * rho, !- <none> \r\n";
479 initProgram.addLine(line);
480 line = " SET PCUD_Cap = CP * rho * LoopDeltaTemp * 0.5, !- <none> \r\n";
481 initProgram.addLine(line);
482 line = " SET " + toString(mlcActuator.handle()) + " = 0.0, !- <none> \r\n";
483 initProgram.addLine(line);
484 line = " SET " + toString(mxlcActuator.handle()) + " = PCUD_Cap, !- <none> \r\n";
485 initProgram.addLine(line);
486 line = " SET " + toString(olcActuator.handle()) + " = 0.9 * PCUD_Cap, !- <none> \r\n";
487 initProgram.addLine(line);
488 return initProgram;
489 }
490
491 EnergyManagementSystemProgram PlantComponentUserDefined_Impl::createSimProgram(const EnergyManagementSystemActuator& otActuator,
492 const EnergyManagementSystemActuator& mfrActuator,

Callers 1

cloneMethod · 0.80

Calls 4

toStringFunction · 0.50
setNameMethod · 0.45
addLineMethod · 0.45
handleMethod · 0.45

Tested by

no test coverage detected