Skip to content

Commit

Permalink
Merge pull request #694 from ibpsa/issue658_UpdateMinMaxLimits
Browse files Browse the repository at this point in the history
Closes #658 and #625
  • Loading branch information
dhblum authored Oct 25, 2024
2 parents 4ee4d11 + 0a6d805 commit b1a417e
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 27 deletions.
3 changes: 3 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Released on xx/xx/xxxx.
- Add a new directory ``/baselines``, containing baseline testing scripts and associated KPI results for the baseline controllers of all the testcases. This is for [#495](https://github.com/ibpsa/project1-boptest/issues/495).
- Add support to ``parsing/parser.py`` for test case compilation using [Modelon's OPTIMICA Compiler Toolkit (OCT)](https://help.modelon.com/latest/reference/oct/). The parser can take arguments ``'JModelica'`` or ``'OCT'``, with ``'JModelica'`` as default. A user still requires access to an OCT license and software on their set up. This is for [#675](https://github.com/ibpsa/project1-boptest/issues/675).
- Changed ``bestest_hydronic`` and ``bestest_hydronic_heat_pump`` Modelica implementations in this repository to utilize the Modelica IDEAS Library as a dependency for component models, instead of serving as extensions from the Modelica IDEAS Library. This is to simplify dependencies for maintaining the models, and is how other test cases are implemented. It required duplication of the model implementations from the Modelica IDEAS Library into this repository. This is for [#680](https://github.com/ibpsa/project1-boptest/issues/680).
- Add ``activate`` control inputs that were missing in ``bestest_hydronic`` and ``bestest_hydronic_heat_pump`` Modelica documentation. This is for [#625](https://github.com/ibpsa/project1-boptest/issues/625).


**The following new test cases have been added:**

Expand All @@ -24,6 +26,7 @@ Released on xx/xx/xxxx.
**The following changes are backwards-compatible, but might change benchmark results:**

- Fix calculation of computational time ratio (``time_rat``) in the case of a test where the test case was initialized after a test or simulation (use of ``/advance``) had already been done using the same test case deployment (i.e. the docker container had not been shutdown first and newly deployed). The wait time between the last ``/advance`` before the new initialization and first ``/advance`` of the new initialization was incorrectly incorporated into the calculation as a control step and has been fixed, resulting in a lower computational time ratio. The extent of impact depends on wait time between tests and control step and number of steps taken in the new test. This is for [#673](https://github.com/ibpsa/project1-boptest/issues/673).
- Update ``min`` and ``max`` parameters for heating (``oveTSetHea_u``) and cooling (``oveTSetCoo_u``) setpoints in ``bestest_air`` and ``bestest_hydronic`` test cases to ``min=278.15`` and ``max=308.15``. This may change benchmark results as it expands the allowable min and max set points for these test cases from previous versions. This is for [#658](https://github.com/ibpsa/project1-boptest/issues/658).

**The following changes are not backwards-compatible and significantly change benchmark results:**

Expand Down
4 changes: 2 additions & 2 deletions testcases/bestest_air/doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ <h4>Inputs</h4>
<code>con_oveTSetCoo_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input con_oveTSetCoo_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>con_oveTSetCoo_u</code> [K] [min=296.15, max=303.15]: Zone temperature setpoint for cooling
<code>con_oveTSetCoo_u</code> [K] [min=278.15, max=308.15]: Zone temperature setpoint for cooling
</li>
<li>
<code>con_oveTSetHea_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input con_oveTSetHea_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>con_oveTSetHea_u</code> [K] [min=288.15, max=296.15]: Zone temperature setpoint for heating
<code>con_oveTSetHea_u</code> [K] [min=278.15, max=308.15]: Zone temperature setpoint for heating
</li>
<li>
<code>fcu_oveFan_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input fcu_oveFan_u where 1 activates, 0 deactivates (default value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ model Thermostat_T

Buildings.Utilities.IO.SignalExchange.Overwrite oveTSetCoo(u(
unit="K",
min=273.15 + 23,
max=273.15 + 30), description="Zone temperature setpoint for cooling")
min=273.15 + 5,
max=273.15 + 35), description="Zone temperature setpoint for cooling")
"Overwrite for zone cooling setpoint"
annotation (Placement(transformation(extent={{-70,70},{-50,90}})));
Modelica.Blocks.Sources.CombiTimeTable TSetCoo(
Expand All @@ -43,9 +43,9 @@ model Thermostat_T
annotation (Placement(transformation(extent={{-100,70},{-80,90}})));
Buildings.Utilities.IO.SignalExchange.Overwrite oveTSetHea(description="Zone temperature setpoint for heating",
u(
max=273.15 + 23,
max=273.15 + 35,
unit="K",
min=273.15 + 15)) "Overwrite for zone heating setpoint"
min=273.15 + 5)) "Overwrite for zone heating setpoint"
annotation (Placement(transformation(extent={{-70,30},{-50,50}})));
Modelica.Blocks.Sources.CombiTimeTable TSetHea(
smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
within BESTESTAir.TestCases;
within BESTESTAir.TestCases;
model TestCase_Ideal "Testcase model with ideal airflow"
extends Modelica.Icons.Example;
BaseClasses.Case900FF zon(mAir_flow_nominal=fcu.mAir_flow_nominal)
Expand Down Expand Up @@ -294,13 +294,13 @@ The model inputs are:
<code>con_oveTSetCoo_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input con_oveTSetCoo_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>con_oveTSetCoo_u</code> [K] [min=296.15, max=303.15]: Zone temperature setpoint for cooling
<code>con_oveTSetCoo_u</code> [K] [min=278.15, max=308.15]: Zone temperature setpoint for cooling
</li>
<li>
<code>con_oveTSetHea_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input con_oveTSetHea_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>con_oveTSetHea_u</code> [K] [min=288.15, max=296.15]: Zone temperature setpoint for heating
<code>con_oveTSetHea_u</code> [K] [min=278.15, max=308.15]: Zone temperature setpoint for heating
</li>
<li>
<code>fcu_oveFan_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input fcu_oveFan_u where 1 activates, 0 deactivates (default value)
Expand Down Expand Up @@ -769,6 +769,12 @@ see https://www.eia.gov/environment/emissions/co2_vol_mass.php.
revisions="<html>
<ul>
<li>
October 18, 2024, by Ettore Zanetti:<br/>
Update <code>min</code> and <code>max</code> for ovewrite blocks <code>oveTSetHea_u</code> and <code>oveTSetCoo_u</code>.
This is for <a href=https://github.com/ibpsa/project1-boptest/issues/658>
BOPTEST issue #658</a>.
</li>
<li>
August 25, 2022, by David Blum:<br/>
Add forecast point documentation.
This is for <a href=https://github.com/ibpsa/project1-boptest/issues/356>
Expand Down
Binary file modified testcases/bestest_air/models/wrapped.fmu
Binary file not shown.
4 changes: 2 additions & 2 deletions testcases/bestest_air/models/wrapped.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
model wrapped "Wrapped model"
// Input overwrite
Modelica.Blocks.Interfaces.RealInput con_oveTSetCoo_u(unit="K", min=296.15, max=303.15) "Zone temperature setpoint for cooling";
Modelica.Blocks.Interfaces.RealInput con_oveTSetCoo_u(unit="K", min=278.15, max=308.15) "Zone temperature setpoint for cooling";
Modelica.Blocks.Interfaces.BooleanInput con_oveTSetCoo_activate "Activation for Zone temperature setpoint for cooling";
Modelica.Blocks.Interfaces.RealInput con_oveTSetHea_u(unit="K", min=288.15, max=296.15) "Zone temperature setpoint for heating";
Modelica.Blocks.Interfaces.RealInput con_oveTSetHea_u(unit="K", min=278.15, max=308.15) "Zone temperature setpoint for heating";
Modelica.Blocks.Interfaces.BooleanInput con_oveTSetHea_activate "Activation for Zone temperature setpoint for heating";
Modelica.Blocks.Interfaces.RealInput fcu_oveTSup_u(unit="K", min=285.15, max=313.15) "Supply air temperature setpoint";
Modelica.Blocks.Interfaces.BooleanInput fcu_oveTSup_activate "Activation for Supply air temperature setpoint";
Expand Down
4 changes: 2 additions & 2 deletions testcases/bestest_hydronic/doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ <h4>Inputs</h4>
<code>oveTSetCoo_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input oveTSetCoo_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>oveTSetCoo_u</code> [K] [min=296.15, max=303.15]: Zone operative temperature setpoint for cooling
<code>oveTSetCoo_u</code> [K] [min=278.15, max=308.15]: Zone operative temperature setpoint for cooling
</li>
<li>
<code>oveTSetHea_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input oveTSetHea_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>oveTSetHea_u</code> [K] [min=288.15, max=296.15]: Zone operative temperature setpoint for heating
<code>oveTSetHea_u</code> [K] [min=278.15, max=308.15]: Zone operative temperature setpoint for heating
</li>
<li>
<code>oveTSetSup_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input oveTSetSup_u where 1 activates, 0 deactivates (default value)
Expand Down
40 changes: 32 additions & 8 deletions testcases/bestest_hydronic/models/BESTESTHydronic/TestCase.mo
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,17 @@ model TestCase "Single zone residential hydronic example model"
annotation (Placement(transformation(extent={{30,50},{50,70}})));
IDEAS.Utilities.IO.SignalExchange.Overwrite oveTSetCoo(u(
unit="K",
min=273.15 + 23,
max=273.15 + 30), description=
min=273.15 + 5,
max=273.15 + 35), description=
"Zone operative temperature setpoint for cooling")
"Overwrite for zone cooling setpoint" annotation (Placement(transformation(
extent={{10,10},{-10,-10}},
rotation=180,
origin={-110,-50})));
IDEAS.Utilities.IO.SignalExchange.Overwrite oveTSetHea(u(
max=273.15 + 23,
max=273.15 + 35,
unit="K",
min=273.15 + 15), description=
min=273.15 + 5), description=
"Zone operative temperature setpoint for heating")
"Overwrite for zone heating setpoint" annotation (Placement(transformation(
extent={{10,10},{-10,-10}},
Expand Down Expand Up @@ -340,16 +340,28 @@ depicted as C2 in Figure 1.
<p>The model inputs are: </p>
<ul>
<li>
<code>oveTSetHea_u</code> [K] [min=288.15, max=296.15]: Zone operative temperature setpoint for heating
<code>ovePum_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input ovePum_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>oveTSetCoo_u</code> [K] [min=296.15, max=303.15]: Zone operative temperature setpoint for cooling
<code>ovePum_u</code> [1] [min=0.0, max=1.0]: Integer signal to control the stage of the pump either on or off
</li>
<li>
<code>oveTSetSup_u</code> [K] [min=293.15, max=353.15]: Supply temperature setpoint of the heater
<code>oveTSetCoo_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input oveTSetCoo_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>ovePum_u</code> [1] [min=0.0, max=1.0]: Integer signal to control the stage of the pump either on or off
<code>oveTSetCoo_u</code> [K] [min=278.15, max=308.15]: Zone operative temperature setpoint for cooling
</li>
<li>
<code>oveTSetHea_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input oveTSetHea_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>oveTSetHea_u</code> [K] [min=278.15, max=308.15]: Zone operative temperature setpoint for heating
</li>
<li>
<code>oveTSetSup_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input oveTSetSup_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>oveTSetSup_u</code> [K] [min=293.15, max=353.15]: Supply temperature setpoint of the heater
</li>
</ul>
<h4>Outputs</h4>
Expand Down Expand Up @@ -577,6 +589,18 @@ https://www.eia.gov/environment/emissions/co2_vol_mass.php</a>
<ul>
<li>
October 18, 2024, by Ettore Zanetti:<br/>
Update <code>min</code> and <code>max</code> for ovewrite blocks <code>oveTSetHea_u</code> and <code>oveTSetCoo_u</code>.
This is for <a href=https://github.com/ibpsa/project1-boptest/issues/658>
BOPTEST issue #658</a>.
</li>
<li>
October 18, 2024, by Ettore Zanetti:<br/>
Add <code>activate</code> inputs to documentation.
This is for
<a href=\"https://github.com/ibpsa/project1-boptest/issues/625\">BOPTEST issue #625</a>.
</li>
<li>
October 18, 2024, by Ettore Zanetti:<br/>
Changed IDEAS dependency from extending <code>IDEAS.Examples.IBPSA.SingleZoneResidentialHydronic</code>
to duplicating the model.
This is for
Expand Down
Binary file modified testcases/bestest_hydronic/models/wrapped.fmu
Binary file not shown.
4 changes: 2 additions & 2 deletions testcases/bestest_hydronic/models/wrapped.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ model wrapped "Wrapped model"
// Input overwrite
Modelica.Blocks.Interfaces.RealInput ovePum_u(unit="1", min=0.0, max=1.0) "Integer signal to control the stage of the pump either on or off";
Modelica.Blocks.Interfaces.BooleanInput ovePum_activate "Activation for Integer signal to control the stage of the pump either on or off";
Modelica.Blocks.Interfaces.RealInput oveTSetHea_u(unit="K", min=288.15, max=296.15) "Zone operative temperature setpoint for heating";
Modelica.Blocks.Interfaces.RealInput oveTSetHea_u(unit="K", min=278.15, max=308.15) "Zone operative temperature setpoint for heating";
Modelica.Blocks.Interfaces.BooleanInput oveTSetHea_activate "Activation for Zone operative temperature setpoint for heating";
Modelica.Blocks.Interfaces.RealInput oveTSetSup_u(unit="K", min=293.15, max=353.15) "Supply temperature setpoint of the heater";
Modelica.Blocks.Interfaces.BooleanInput oveTSetSup_activate "Activation for Supply temperature setpoint of the heater";
Modelica.Blocks.Interfaces.RealInput oveTSetCoo_u(unit="K", min=296.15, max=303.15) "Zone operative temperature setpoint for cooling";
Modelica.Blocks.Interfaces.RealInput oveTSetCoo_u(unit="K", min=278.15, max=308.15) "Zone operative temperature setpoint for cooling";
Modelica.Blocks.Interfaces.BooleanInput oveTSetCoo_activate "Activation for Zone operative temperature setpoint for cooling";
// Out read
Modelica.Blocks.Interfaces.RealOutput weaSta_reaWeaSolHouAng_y(unit="rad") = mod.weaSta.reaWeaSolHouAng.y "Solar hour angle measurement";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,20 +636,30 @@ is depicted as controller C2 in Figure 1.
<h4>Inputs</h4>
<p>The model inputs are: </p>
<ul>
<li>
<code>oveFan_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input oveFan_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>oveFan_u</code> [1] [min=0.0, max=1.0]: Integer signal to control the heat pump evaporator fan either on or off
</li>
<li>
<code>oveHeaPumY_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input oveHeaPumY_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>oveHeaPumY_u</code> [1] [min=0.0, max=1.0]: Heat pump modulating signal for compressor speed between 0 (not working) and 1 (working at maximum capacity)
</li>
<li>
<code>ovePum_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input ovePum_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>ovePum_u</code> [1] [min=0.0, max=1.0]: Integer signal to control the emission circuit pump either on or off
</li>
<li>
<code>oveTSet_activate</code> [1] [min=0, max=1]: Activation signal to overwrite input oveTSet_u where 1 activates, 0 deactivates (default value)
</li>
<li>
<code>oveTSet_u</code> [K] [min=278.15, max=308.15]: Zone operative temperature setpoint
</li>
</ul>
<h4>Outputs</h4>
<p>The model outputs are: </p>
Expand Down Expand Up @@ -879,6 +889,12 @@ https://www.carbonfootprint.com/docs/2019_06_emissions_factors_sources_for_2019_
<ul>
<li>
October 18, 2024, by Ettore Zanetti:<br/>
Add <code>activate</code> inputs to documentation.
This is for
<a href=\"https://github.com/ibpsa/project1-boptest/issues/625\">BOPTEST issue #625</a>.
</li>
<li>
October 18, 2024, by Ettore Zanetti:<br/>
Changed IDEAS dependency from extending <code>IDEAS.Examples.IBPSA.SingleZoneResidentialHydronicHeatPump</code>
to duplicating the model.
This is for
Expand Down
2 changes: 1 addition & 1 deletion testing/references/bestest_air/get_inputs.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"con_oveTSetCoo_activate": {"Description": "Activation for Zone temperature setpoint for cooling", "Maximum": null, "Minimum": null, "Unit": null}, "con_oveTSetCoo_u": {"Description": "Zone temperature setpoint for cooling", "Maximum": 303.15, "Minimum": 296.15, "Unit": "K"}, "con_oveTSetHea_activate": {"Description": "Activation for Zone temperature setpoint for heating", "Maximum": null, "Minimum": null, "Unit": null}, "con_oveTSetHea_u": {"Description": "Zone temperature setpoint for heating", "Maximum": 296.15, "Minimum": 288.15, "Unit": "K"}, "fcu_oveFan_activate": {"Description": "Activation for Fan control signal as air mass flow rate normalized to the design air mass flow rate", "Maximum": null, "Minimum": null, "Unit": null}, "fcu_oveFan_u": {"Description": "Fan control signal as air mass flow rate normalized to the design air mass flow rate", "Maximum": 1.0, "Minimum": 0.0, "Unit": "1"}, "fcu_oveTSup_activate": {"Description": "Activation for Supply air temperature setpoint", "Maximum": null, "Minimum": null, "Unit": null}, "fcu_oveTSup_u": {"Description": "Supply air temperature setpoint", "Maximum": 313.15, "Minimum": 285.15, "Unit": "K"}}
{"con_oveTSetCoo_activate": {"Description": "Activation for Zone temperature setpoint for cooling", "Maximum": null, "Minimum": null, "Unit": null}, "con_oveTSetCoo_u": {"Description": "Zone temperature setpoint for cooling", "Maximum": 308.15, "Minimum": 278.15, "Unit": "K"}, "con_oveTSetHea_activate": {"Description": "Activation for Zone temperature setpoint for heating", "Maximum": null, "Minimum": null, "Unit": null}, "con_oveTSetHea_u": {"Description": "Zone temperature setpoint for heating", "Maximum": 308.15, "Minimum": 278.15, "Unit": "K"}, "fcu_oveFan_activate": {"Description": "Activation for Fan control signal as air mass flow rate normalized to the design air mass flow rate", "Maximum": null, "Minimum": null, "Unit": null}, "fcu_oveFan_u": {"Description": "Fan control signal as air mass flow rate normalized to the design air mass flow rate", "Maximum": 1.0, "Minimum": 0.0, "Unit": "1"}, "fcu_oveTSup_activate": {"Description": "Activation for Supply air temperature setpoint", "Maximum": null, "Minimum": null, "Unit": null}, "fcu_oveTSup_u": {"Description": "Supply air temperature setpoint", "Maximum": 313.15, "Minimum": 285.15, "Unit": "K"}}
2 changes: 1 addition & 1 deletion testing/references/bestest_hydronic/get_inputs.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ovePum_activate": {"Description": "Activation for Integer signal to control the stage of the pump either on or off", "Maximum": null, "Minimum": null, "Unit": null}, "ovePum_u": {"Description": "Integer signal to control the stage of the pump either on or off", "Maximum": 1.0, "Minimum": 0.0, "Unit": "1"}, "oveTSetCoo_activate": {"Description": "Activation for Zone operative temperature setpoint for cooling", "Maximum": null, "Minimum": null, "Unit": null}, "oveTSetCoo_u": {"Description": "Zone operative temperature setpoint for cooling", "Maximum": 303.15, "Minimum": 296.15, "Unit": "K"}, "oveTSetHea_activate": {"Description": "Activation for Zone operative temperature setpoint for heating", "Maximum": null, "Minimum": null, "Unit": null}, "oveTSetHea_u": {"Description": "Zone operative temperature setpoint for heating", "Maximum": 296.15, "Minimum": 288.15, "Unit": "K"}, "oveTSetSup_activate": {"Description": "Activation for Supply temperature setpoint of the heater", "Maximum": null, "Minimum": null, "Unit": null}, "oveTSetSup_u": {"Description": "Supply temperature setpoint of the heater", "Maximum": 353.15, "Minimum": 293.15, "Unit": "K"}}
{"ovePum_activate": {"Description": "Activation for Integer signal to control the stage of the pump either on or off", "Maximum": null, "Minimum": null, "Unit": null}, "ovePum_u": {"Description": "Integer signal to control the stage of the pump either on or off", "Maximum": 1.0, "Minimum": 0.0, "Unit": "1"}, "oveTSetCoo_activate": {"Description": "Activation for Zone operative temperature setpoint for cooling", "Maximum": null, "Minimum": null, "Unit": null}, "oveTSetCoo_u": {"Description": "Zone operative temperature setpoint for cooling", "Maximum": 308.15, "Minimum": 278.15, "Unit": "K"}, "oveTSetHea_activate": {"Description": "Activation for Zone operative temperature setpoint for heating", "Maximum": null, "Minimum": null, "Unit": null}, "oveTSetHea_u": {"Description": "Zone operative temperature setpoint for heating", "Maximum": 308.15, "Minimum": 278.15, "Unit": "K"}, "oveTSetSup_activate": {"Description": "Activation for Supply temperature setpoint of the heater", "Maximum": null, "Minimum": null, "Unit": null}, "oveTSetSup_u": {"Description": "Supply temperature setpoint of the heater", "Maximum": 353.15, "Minimum": 293.15, "Unit": "K"}}

0 comments on commit b1a417e

Please sign in to comment.