| 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, |