Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue2180 boiler plant main controller oct 2021 #3325

Open
wants to merge 22 commits into
base: issue2180_BoilerPlant_MainController_oct_2021
Choose a base branch
from

Conversation

karthikeyad-pnnl
Copy link
Contributor

@JayHuLBL I am submitting this pull request to address the latest comments on PR #2700. Please review it when you get a chance.

Thanks,
Karthik

@JayHuLBL
Copy link
Contributor

JayHuLBL commented Apr 7, 2023

@karthikeyad-pnnl I see following errors when run the validateHTML.py as below:

jianjunhu@ubuntu:~/GitFolder/karthikeyad-pnnl/modelica-buildings/Buildings$ ../bin/validateHTML.py 
The following malformed html syntax has been found:
[-- ./Controls/OBC/ASHRAE/PrimarySystem/BoilerPlant/Pumps/PrimaryPumps/Controller.mo ]
line 53 column 1 - Info: missing optional end tag </li>

[-- ./Controls/OBC/ASHRAE/PrimarySystem/BoilerPlant/Pumps/SecondaryPumps/Controller.mo ]
line 33 column 1 - Info: missing optional end tag </li>

[-- ./Controls/OBC/ASHRAE/PrimarySystem/BoilerPlant/Generic/ZeroIndexCorrection.mo ]
line 65 column 7 - Warning: inserting implicit <p>
line 65 column 7 - Warning: trimming empty <p>

[-- ./Controls/OBC/ASHRAE/PrimarySystem/BoilerPlant/Generic/Validation/ZeroIndexCorrection.mo ]
line 47 column 5 - Warning: inserting implicit <p>
line 47 column 5 - Warning: trimming empty <p>

Also when run unit test, I see some results difference as below. My Dymola version is 2023x, same as the one in CI test.

jianjunhu@ubuntu:~/GitFolder/karthikeyad-pnnl/modelica-buildings/Buildings$ ../bin/runUnitTests.py -s Buildings.Controls.OBC.ASHRAE.PrimarySystem.BoilerPlant
Regression tests are only run for the following package:
  Buildings.Controls.OBC.ASHRAE.PrimarySystem.BoilerPlant
Number of models   : 2331
          blocks   : 669
          functions: 209
Using 4 of 4 processors to run unit tests for dymola.
Generated 50 regression tests.

*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Staging_Processes_Subsequences_Validation_DisableBoiler.txt: Errors during result verification.
           Absolute error = 9.990e-01 at t = 1080.0 for truFalHol.y
             For Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Staging_Processes_Subsequences_Validation_DisableBoiler.txt,
             update reference files with new trajectories?
             Enter: y(yes), n(no), Y(yes for all), N(no for all): N
*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Staging_Processes_Validation_Up.txt: Errors during result verification.
           Absolute error = 9.990e-01 at t = 0.0 for upProCon.uBoi[1]
           Absolute error = 9.990e-01 at t = 108.0 for upProCon.uBoi[2]
           Absolute error = 9.990e-01 at t = 657.0 for upProCon.uBoiSet[1]
           Absolute error = 9.970e-01 at t = 657.0 for upProCon.uStaSet
           Absolute error = 9.990e-01 at t = 0.0 for upProCon.uHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon.uHotWatIsoVal[2]
           Absolute error = 9.990e-01 at t = 0.0 for upProCon.yHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon.yHotWatIsoVal[2]
           Absolute error = 9.989e-01 at t = 9.0 for yPumChaPro.y
           Absolute error = 9.989e-01 at t = 639.0 for yStaChaPro.y
           Absolute error = 9.990e-01 at t = 0.0 for upProCon1.uBoi[1]
           Absolute error = 9.990e-01 at t = 108.0 for upProCon1.uBoi[2]
           Absolute error = 9.990e-01 at t = 639.0 for upProCon1.uHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon1.uHotWatIsoVal[2]
           Absolute error = 9.990e-01 at t = 639.0 for upProCon1.yHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon1.yHotWatIsoVal[2]
           Absolute error = 9.990e-01 at t = 0.0 for upProCon2.uBoi[1]
           Absolute error = 9.990e-01 at t = 54.0 for upProCon2.uBoi[2]
           Absolute error = 9.990e-01 at t = 558.0 for upProCon2.uBoiSet[1]
           Absolute error = 9.970e-01 at t = 558.0 for upProCon2.uStaSet
           Absolute error = 9.989e-01 at t = 9.0 for yPumChaPro2.y
           Absolute error = 9.989e-01 at t = 540.0 for yStaChaPro2.y
           Absolute error = 9.990e-01 at t = 0.0 for upProCon3.uBoi[1]
           Absolute error = 9.990e-01 at t = 54.0 for upProCon3.uBoi[2]
           Absolute error = 9.990e-01 at t = 0.0 for upProCon4.uBoi[1]
           Absolute error = 9.990e-01 at t = 108.0 for upProCon4.uBoi[2]
           Absolute error = 9.990e-01 at t = 648.0 for upProCon4.uHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon4.uHotWatIsoVal[2]
           Absolute error = 9.990e-01 at t = 648.0 for upProCon4.yHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon4.yHotWatIsoVal[2]
*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Staging_SetPoints_Subsequences_Validation_Change.txt: Errors during result verification.
           Absolute error = 9.988e+00 at t = 9240.0 for cha.uAvaUp
           Absolute error = 8.990e+00 at t = 9240.0 for cha.uAvaDow
           Absolute error = 9.989e+00 at t = 9240.0 for cha.ySta
           Absolute error = 2.995e+00 at t = 8680.0 for cha2.uAvaUp
           Absolute error = 1.997e+00 at t = 8680.0 for cha2.uAvaDow
           Absolute error = 2.996e+00 at t = 8680.0 for cha2.ySta
*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Pumps_SecondaryPumps_Subsequences_Validation_EnableLag_pumpSpeed.txt: Errors during result verification.
           Absolute error = 9.990e-01 at t = 3456.0 for yUp.y
*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_SetPoints_Validation_MinimumFlowSetPoint.txt: Errors during result verification.
           Absolute error = 4.590e-01 at t = 4.8 for minBoiFloSet1.VHotWatMinSet_flow
Comparison files output by funnel are stored in the directory 'funnel_comp' of size 5.8 MB.
Run 'python -c "import buildingspy.development.regressiontest as t; t.Tester(tool=\"dymola\").report()"'
to access a summary of the comparison results.

Script that runs unit tests had 0 warnings and 5 errors.

See 'simulator-dymola.log' for details.
Execution time = 294.958 s
Server will run for 600 (s) or until KeyboardInterrupt.
^Z
[9]+  Stopped                 ../bin/runUnitTests.py -s Buildings.Controls.OBC.ASHRAE.PrimarySystem.BoilerPlant

@karthikeyad-pnnl
Copy link
Contributor Author

@karthikeyad-pnnl I see following errors when run the validateHTML.py as below:

jianjunhu@ubuntu:~/GitFolder/karthikeyad-pnnl/modelica-buildings/Buildings$ ../bin/validateHTML.py 
The following malformed html syntax has been found:
[-- ./Controls/OBC/ASHRAE/PrimarySystem/BoilerPlant/Pumps/PrimaryPumps/Controller.mo ]
line 53 column 1 - Info: missing optional end tag </li>

[-- ./Controls/OBC/ASHRAE/PrimarySystem/BoilerPlant/Pumps/SecondaryPumps/Controller.mo ]
line 33 column 1 - Info: missing optional end tag </li>

[-- ./Controls/OBC/ASHRAE/PrimarySystem/BoilerPlant/Generic/ZeroIndexCorrection.mo ]
line 65 column 7 - Warning: inserting implicit <p>
line 65 column 7 - Warning: trimming empty <p>

[-- ./Controls/OBC/ASHRAE/PrimarySystem/BoilerPlant/Generic/Validation/ZeroIndexCorrection.mo ]
line 47 column 5 - Warning: inserting implicit <p>
line 47 column 5 - Warning: trimming empty <p>

Also when run unit test, I see some results difference as below. My Dymola version is 2023x, same as the one in CI test.

jianjunhu@ubuntu:~/GitFolder/karthikeyad-pnnl/modelica-buildings/Buildings$ ../bin/runUnitTests.py -s Buildings.Controls.OBC.ASHRAE.PrimarySystem.BoilerPlant
Regression tests are only run for the following package:
  Buildings.Controls.OBC.ASHRAE.PrimarySystem.BoilerPlant
Number of models   : 2331
          blocks   : 669
          functions: 209
Using 4 of 4 processors to run unit tests for dymola.
Generated 50 regression tests.

*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Staging_Processes_Subsequences_Validation_DisableBoiler.txt: Errors during result verification.
           Absolute error = 9.990e-01 at t = 1080.0 for truFalHol.y
             For Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Staging_Processes_Subsequences_Validation_DisableBoiler.txt,
             update reference files with new trajectories?
             Enter: y(yes), n(no), Y(yes for all), N(no for all): N
*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Staging_Processes_Validation_Up.txt: Errors during result verification.
           Absolute error = 9.990e-01 at t = 0.0 for upProCon.uBoi[1]
           Absolute error = 9.990e-01 at t = 108.0 for upProCon.uBoi[2]
           Absolute error = 9.990e-01 at t = 657.0 for upProCon.uBoiSet[1]
           Absolute error = 9.970e-01 at t = 657.0 for upProCon.uStaSet
           Absolute error = 9.990e-01 at t = 0.0 for upProCon.uHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon.uHotWatIsoVal[2]
           Absolute error = 9.990e-01 at t = 0.0 for upProCon.yHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon.yHotWatIsoVal[2]
           Absolute error = 9.989e-01 at t = 9.0 for yPumChaPro.y
           Absolute error = 9.989e-01 at t = 639.0 for yStaChaPro.y
           Absolute error = 9.990e-01 at t = 0.0 for upProCon1.uBoi[1]
           Absolute error = 9.990e-01 at t = 108.0 for upProCon1.uBoi[2]
           Absolute error = 9.990e-01 at t = 639.0 for upProCon1.uHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon1.uHotWatIsoVal[2]
           Absolute error = 9.990e-01 at t = 639.0 for upProCon1.yHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon1.yHotWatIsoVal[2]
           Absolute error = 9.990e-01 at t = 0.0 for upProCon2.uBoi[1]
           Absolute error = 9.990e-01 at t = 54.0 for upProCon2.uBoi[2]
           Absolute error = 9.990e-01 at t = 558.0 for upProCon2.uBoiSet[1]
           Absolute error = 9.970e-01 at t = 558.0 for upProCon2.uStaSet
           Absolute error = 9.989e-01 at t = 9.0 for yPumChaPro2.y
           Absolute error = 9.989e-01 at t = 540.0 for yStaChaPro2.y
           Absolute error = 9.990e-01 at t = 0.0 for upProCon3.uBoi[1]
           Absolute error = 9.990e-01 at t = 54.0 for upProCon3.uBoi[2]
           Absolute error = 9.990e-01 at t = 0.0 for upProCon4.uBoi[1]
           Absolute error = 9.990e-01 at t = 108.0 for upProCon4.uBoi[2]
           Absolute error = 9.990e-01 at t = 648.0 for upProCon4.uHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon4.uHotWatIsoVal[2]
           Absolute error = 9.990e-01 at t = 648.0 for upProCon4.yHotWatIsoVal[1]
           Absolute error = 9.990e-01 at t = 72.0 for upProCon4.yHotWatIsoVal[2]
*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Staging_SetPoints_Subsequences_Validation_Change.txt: Errors during result verification.
           Absolute error = 9.988e+00 at t = 9240.0 for cha.uAvaUp
           Absolute error = 8.990e+00 at t = 9240.0 for cha.uAvaDow
           Absolute error = 9.989e+00 at t = 9240.0 for cha.ySta
           Absolute error = 2.995e+00 at t = 8680.0 for cha2.uAvaUp
           Absolute error = 1.997e+00 at t = 8680.0 for cha2.uAvaDow
           Absolute error = 2.996e+00 at t = 8680.0 for cha2.ySta
*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_Pumps_SecondaryPumps_Subsequences_Validation_EnableLag_pumpSpeed.txt: Errors during result verification.
           Absolute error = 9.990e-01 at t = 3456.0 for yUp.y
*** Error: Buildings_Controls_OBC_ASHRAE_PrimarySystem_BoilerPlant_SetPoints_Validation_MinimumFlowSetPoint.txt: Errors during result verification.
           Absolute error = 4.590e-01 at t = 4.8 for minBoiFloSet1.VHotWatMinSet_flow
Comparison files output by funnel are stored in the directory 'funnel_comp' of size 5.8 MB.
Run 'python -c "import buildingspy.development.regressiontest as t; t.Tester(tool=\"dymola\").report()"'
to access a summary of the comparison results.

Script that runs unit tests had 0 warnings and 5 errors.

See 'simulator-dymola.log' for details.
Execution time = 294.958 s
Server will run for 600 (s) or until KeyboardInterrupt.
^Z
[9]+  Stopped                 ../bin/runUnitTests.py -s Buildings.Controls.OBC.ASHRAE.PrimarySystem.BoilerPlant

@JayHuLBL I did see the last two error instances (line 65 and line 47) when I ran runUnitTest.py --validate-html-only. However, I wasn't sure what I needed to do to solve it since there are no <p> tags that are not closed with a </p> tag. I did not see the first two instances. Will fix it now.

@karthikeyad-pnnl
Copy link
Contributor Author

@JayHuLBL Will check the unit test results. Do you have any kind of image available for the CI testing environment? I think it may be beneficial for us to run it on a container with the same image on our end. Regarding the use of Dymola 2023, did you have to update the license server when you switched from previous versions to 2023?

@JayHuLBL
Copy link
Contributor

JayHuLBL commented Apr 7, 2023

@karthikeyad-pnnl I don't have the container for the environment. However, for the license server, I think it should be in the package along with the Dymola installation. Note that it is 2023x, not 2023.

@JayHuLBL
Copy link
Contributor

@karthikeyad-pnnl

  • In BoilerPlant.Pumps.PrimaryPumps.Controller,missing, it is missing</li> after line 1249 to close the <li> in line 1235.
  • In BoilerPlant.Pumps.SecondaryPumps.Controller, it is missing </li> after line 866 to close <li> in line 850.
  • In BoilerPlant.Generic.ZeroIndexCorrection, move </p> in line 120 to be after line 109.
  • In BoilerPlant.Generic.Validation.ZeroIndexCorrection, add </p> after line 51 and add <p> after line 59 .

@karthikeyad-pnnl
Copy link
Contributor Author

@AntoineGautier : I have uploaded changes to this PR to address your comments here. Some general comments:

  • I agree that the enable schedule should be a software input so that the user can configure it as per their requirements. I have changed it from a parameter to an input.
  • I have changed the names of the Boolean plant configuration parameters that were ambiguous with their attached comments. I have in fact changed the top-level controller to accept parameter inputs for hardware available (sensor in primary loop, sensor in decoupler, etc.) and then use those to calculate the parameters for enabling/disabling instances.
  • Regarding the ability of the controller to accommodate hybrid boiler plants: We initially developed and tested the modules with a focus on primary-only, condensing boiler plants. To make it compatible with hybrid systems, I am currently vectorizing the primary and secondary pump controllers so that they can operate each primary and secondary loop. The staging calculations will remain the same since all the boilers in the plant will still be staged by a single module (we could just use multiple controllers if the primary loops were all operating independently). Also, the staging processes will be vectorized for each loop so that the process is as per the actual sequence requirement.
    These two steps should help make the controller usable for hybrid plants with multiple primary and secondary loops. (Note: The changes are still in-process. I hope to be done with them before 06/22/23).

I would like your thoughts on the changes, esp on the changes being made to accommodate hybrid plants. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants