diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index 2957a508416..b01262dd396 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -40,7 +40,7 @@ jobs: run: pip3 install --upgrade pip wheel - name: "Install BuildingsPy" - run: pip3 install git+https://github.com/lbl-srg/BuildingsPy@50ac74d8e4fd067179bb38bc23140c2c9254c94c + run: pip3 install git+https://github.com/lbl-srg/BuildingsPy@v5.1.0 - name: Check for UTF-8 BOM run : | @@ -55,9 +55,11 @@ jobs: - name: "Test experiment setup" run : ../bin/runUnitTests.py --validate-experiment-setup - - name: "Test if package.order are correct" + - name: "Test if package.order are correct, and revert order in UsersGuide" run : | python -c 'import buildingspy.development.refactor as r; r.write_package_order(".", recursive=True)' + git checkout UsersGuide/ReleaseNotes/package.order + git checkout UsersGuide/package.order git diff --exit-code . - name: "Verify files for invalid strings" diff --git a/.travis.yml b/.travis.yml index ffea89089f4..367347e5c99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,9 +31,9 @@ services: env: global: - DOCKER_REPONAME=lbnlblum - - BUILDINGSPY_VERSION=BuildingsPy@v5.0.0 + - BUILDINGSPY_VERSION=BuildingsPy@v5.1.0 - OMC_VERSION=ubuntu-2204-omc:1.22.1-1 - - OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.43.4_rev-1 + - OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.48.2 - DYMOLA_VERSION=travis_ubuntu-2004_dymola:2024x-x86_64 - ENERGYPLUS_9_6_0=EnergyPlus-9.6.0-f420c06a69-Linux-Ubuntu20.04-x86_64 - ENERGYPLUS_23_1_0=EnergyPlus-23.1.0-87ed9199d4-Linux-Ubuntu20.04-x86_64 @@ -68,15 +68,15 @@ env: - TEST_ARG="make test-dymola PACKAGE=\"Buildings.Applications\"" - TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Applications\"" - TEST_ARG="make test-optimica PACKAGE=\"Buildings.Applications\"" - - TEST_ARG="make test-dymola PACKAGE=\"Buildings.Experimental.DHC.{EnergyTransferStations,Loads,Networks,Plants}\"" - - TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Experimental.DHC.{EnergyTransferStations,Loads,Networks,Plants}\"" - - TEST_ARG="make test-optimica PACKAGE=\"Buildings.Experimental.DHC.{EnergyTransferStations,Loads,Networks,Plants}\"" - - TEST_ARG="make test-dymola PACKAGE=\"Buildings.Experimental.DHC.Examples.Combined\"" - - TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Experimental.DHC.Examples.Combined\" SINGLEPROC=\"true\"" - - TEST_ARG="make test-optimica PACKAGE=\"Buildings.Experimental.DHC.Examples.Combined\"" - - TEST_ARG="make test-dymola PACKAGE=\"Buildings.Experimental.DHC.Examples.{Cooling,Steam}\"" - - TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Experimental.DHC.Examples.{Cooling,Steam}\"" - - TEST_ARG="make test-optimica PACKAGE=\"Buildings.Experimental.DHC.Examples.{Cooling,Steam}\"" + - TEST_ARG="make test-dymola PACKAGE=\"Buildings.DHC.{ETS,Loads,Networks,Plants}\"" + - TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.DHC.{ETS,Loads,Networks,Plants}\"" + - TEST_ARG="make test-optimica PACKAGE=\"Buildings.DHC.{ETS,Loads,Networks,Plants}\"" + - TEST_ARG="make test-dymola PACKAGE=\"Buildings.DHC.Examples.Combined\"" + - TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.DHC.Examples.Combined\" SINGLEPROC=\"true\"" + - TEST_ARG="make test-optimica PACKAGE=\"Buildings.DHC.Examples.Combined\"" + - TEST_ARG="make test-dymola PACKAGE=\"Buildings.DHC.Examples.{Cooling,Steam}\"" + - TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.DHC.Examples.{Cooling,Steam}\"" + - TEST_ARG="make test-optimica PACKAGE=\"Buildings.DHC.Examples.{Cooling,Steam}\"" - TEST_ARG="make test-dymola PACKAGE=\"Buildings.Fluid.{Actuators,BaseClasses,Boilers,Chillers,CHPs,Delays}\"" - TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Fluid.{Actuators,BaseClasses,Boilers,Chillers,CHPs,Delays}\"" - TEST_ARG="make test-optimica PACKAGE=\"Buildings.Fluid.{Actuators,BaseClasses,Boilers,Chillers,CHPs,Delays}\"" @@ -165,7 +165,7 @@ install: export ENERGYPLUS_23_1_0=${ENERGYPLUS_23_1_0}; pip3 install pandas==1.3.5; fi; - - if [[ "$TEST_ARG" == *EnergyPlus_9_6_0* ]] || [[ "$TEST_ARG" == *Buildings.Experimental.DHC.{EnergyTransferStations,Loads,Networks,Plants}* ]] || [[ "$TEST_ARG" == *spawn* ]]; then + - if [[ "$TEST_ARG" == *EnergyPlus_9_6_0* ]] || [[ "$TEST_ARG" == *Buildings.DHC.{ETS,Loads,Networks,Plants}* ]] || [[ "$TEST_ARG" == *spawn* ]]; then echo "Installing Spawn binaries"; Buildings/Resources/src/ThermalZones/install.py --binaries-for-os-only; fi; diff --git a/Buildings/.copiedFiles.txt b/Buildings/.copiedFiles.txt index 5cb396fba75..506ec78b27f 100644 --- a/Buildings/.copiedFiles.txt +++ b/Buildings/.copiedFiles.txt @@ -3,7 +3,6 @@ Buildings/Airflow/Multizone/BaseClasses/Door.mo Buildings/Airflow/Multizone/BaseClasses/DoorDiscretized.mo Buildings/Airflow/Multizone/BaseClasses/ErrorControl.mo -Buildings/Airflow/Multizone/BaseClasses/Examples/Interpolate.mo Buildings/Airflow/Multizone/BaseClasses/Examples/PowerLaw.mo Buildings/Airflow/Multizone/BaseClasses/Examples/PowerLawFixedM.mo Buildings/Airflow/Multizone/BaseClasses/Examples/WindPressureLowRise.mo @@ -15,7 +14,6 @@ Buildings/Airflow/Multizone/BaseClasses/PowerLawResistanceParameters.mo Buildings/Airflow/Multizone/BaseClasses/TwoWayFlowElement.mo Buildings/Airflow/Multizone/BaseClasses/TwoWayFlowElementBuoyancy.mo Buildings/Airflow/Multizone/BaseClasses/ZonalFlow.mo -Buildings/Airflow/Multizone/BaseClasses/interpolate.mo Buildings/Airflow/Multizone/BaseClasses/package.mo Buildings/Airflow/Multizone/BaseClasses/package.order Buildings/Airflow/Multizone/BaseClasses/powerLaw.mo @@ -1932,6 +1930,7 @@ Buildings/Resources/Data/Fluid/Geothermal/Borefields/HeatTransfer/Validation/Bei Buildings/Resources/Data/Fluid/Geothermal/Borefields/HeatTransfer/Validation/Cimmino_Bernier_2015_SmallScale.txt Buildings/Resources/Data/Utilities/IO/Files/Examples/CSVReader/Data.txt Buildings/Resources/Data/schedule.txt +Buildings/Resources/Data/scheduleWindows.txt Buildings/Resources/Documentation/userGuide/source/_static/lbl-logo.png Buildings/Resources/Images/Airflow/Multizone/BaseClasses/windPressureLowRise.odp Buildings/Resources/Images/Airflow/Multizone/BaseClasses/windPressureLowRise.png @@ -2185,7 +2184,6 @@ Buildings/Resources/Images/Utilities/Math/Functions/Examples/cubicHermite.png Buildings/Resources/Images/Utilities/Math/Functions/SmoothExponentialXPower.png Buildings/Resources/Images/Utilities/Math/int.pdf Buildings/Resources/Images/Utilities/Math/int.png -Buildings/Resources/Scripts/Dymola/Airflow/Multizone/BaseClasses/Examples/Interpolate.mos Buildings/Resources/Scripts/Dymola/Airflow/Multizone/BaseClasses/Examples/PowerLaw.mos Buildings/Resources/Scripts/Dymola/Airflow/Multizone/BaseClasses/Examples/PowerLawFixedM.mos Buildings/Resources/Scripts/Dymola/Airflow/Multizone/BaseClasses/Examples/WindPressureLowRise.mos @@ -2787,6 +2785,7 @@ Buildings/Resources/Scripts/Dymola/Utilities/IO/Files/Examples/CSVWriter.mos Buildings/Resources/Scripts/Dymola/Utilities/IO/Files/Examples/JSONWriter.mos Buildings/Resources/Scripts/Dymola/Utilities/IO/Files/Examples/WeeklySchedule.mos Buildings/Resources/Scripts/Dymola/Utilities/IO/Files/Examples/WeeklySchedule7to19.mos +Buildings/Resources/Scripts/Dymola/Utilities/IO/Files/Validation/WeeklyScheduleWindowsLineEndings.mos Buildings/Resources/Scripts/Dymola/Utilities/IO/SignalExchange/Examples/FirstOrder.mos Buildings/Resources/Scripts/Dymola/Utilities/IO/SignalExchange/Examples/WeatherStation.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Examples/Average.mos @@ -2803,6 +2802,7 @@ Buildings/Resources/Scripts/Dymola/Utilities/Math/Examples/Factorial.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Examples/FallingFactorial.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Examples/IntegerReplicator.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Examples/IntegratorWithReset.mos +Buildings/Resources/Scripts/Dymola/Utilities/Math/Examples/Interpolate.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Examples/InverseXRegularized.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Examples/Polynomial.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Examples/PowerLinearized.mos @@ -2824,6 +2824,7 @@ Buildings/Resources/Scripts/Dymola/Utilities/Math/Functions/Examples/CubicHermit Buildings/Resources/Scripts/Dymola/Utilities/Math/Functions/Examples/ExponentialIntegralE1.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Functions/Examples/Factorial.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Functions/Examples/FallingFactorial.mos +Buildings/Resources/Scripts/Dymola/Utilities/Math/Functions/Examples/Interpolate.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Functions/Examples/InverseXDerivativeCheck.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Functions/Examples/InverseXDerivative_2_Check.mos Buildings/Resources/Scripts/Dymola/Utilities/Math/Functions/Examples/InverseXRegularized.mos @@ -3035,6 +3036,9 @@ Buildings/Utilities/IO/Files/Examples/WeeklySchedule7to19.mo Buildings/Utilities/IO/Files/Examples/package.mo Buildings/Utilities/IO/Files/Examples/package.order Buildings/Utilities/IO/Files/JSONWriter.mo +Buildings/Utilities/IO/Files/Validation/WeeklyScheduleWindowsLineEndings.mo +Buildings/Utilities/IO/Files/Validation/package.mo +Buildings/Utilities/IO/Files/Validation/package.order Buildings/Utilities/IO/Files/WeeklySchedule.mo Buildings/Utilities/IO/Files/package.mo Buildings/Utilities/IO/Files/package.order @@ -3079,6 +3083,7 @@ Buildings/Utilities/Math/Examples/Factorial.mo Buildings/Utilities/Math/Examples/FallingFactorial.mo Buildings/Utilities/Math/Examples/IntegerReplicator.mo Buildings/Utilities/Math/Examples/IntegratorWithReset.mo +Buildings/Utilities/Math/Examples/Interpolate.mo Buildings/Utilities/Math/Examples/InverseXRegularized.mo Buildings/Utilities/Math/Examples/Polynomial.mo Buildings/Utilities/Math/Examples/PowerLinearized.mo @@ -3114,6 +3119,7 @@ Buildings/Utilities/Math/Functions/Examples/CubicHermite.mo Buildings/Utilities/Math/Functions/Examples/ExponentialIntegralE1.mo Buildings/Utilities/Math/Functions/Examples/Factorial.mo Buildings/Utilities/Math/Functions/Examples/FallingFactorial.mo +Buildings/Utilities/Math/Functions/Examples/Interpolate.mo Buildings/Utilities/Math/Functions/Examples/InverseXDerivativeCheck.mo Buildings/Utilities/Math/Functions/Examples/InverseXDerivative_2_Check.mo Buildings/Utilities/Math/Functions/Examples/InverseXRegularized.mo @@ -3147,6 +3153,7 @@ Buildings/Utilities/Math/Functions/exponentialIntegralE1.mo Buildings/Utilities/Math/Functions/factorial.mo Buildings/Utilities/Math/Functions/fallingFactorial.mo Buildings/Utilities/Math/Functions/integerReplicator.mo +Buildings/Utilities/Math/Functions/interpolate.mo Buildings/Utilities/Math/Functions/inverseXRegularized.mo Buildings/Utilities/Math/Functions/isMonotonic.mo Buildings/Utilities/Math/Functions/package.mo @@ -3168,6 +3175,7 @@ Buildings/Utilities/Math/Functions/splineDerivatives.mo Buildings/Utilities/Math/Functions/trapezoidalIntegration.mo Buildings/Utilities/Math/IntegerReplicator.mo Buildings/Utilities/Math/IntegratorWithReset.mo +Buildings/Utilities/Math/Interpolate.mo Buildings/Utilities/Math/InverseXRegularized.mo Buildings/Utilities/Math/Max.mo Buildings/Utilities/Math/Min.mo diff --git a/Buildings/Air/Systems/SingleZone/VAV/BaseClasses/ControllerChillerDXHeatingEconomizer.mo b/Buildings/Air/Systems/SingleZone/VAV/BaseClasses/ControllerChillerDXHeatingEconomizer.mo index 015dbfbb345..587ba098fe7 100644 --- a/Buildings/Air/Systems/SingleZone/VAV/BaseClasses/ControllerChillerDXHeatingEconomizer.mo +++ b/Buildings/Air/Systems/SingleZone/VAV/BaseClasses/ControllerChillerDXHeatingEconomizer.mo @@ -212,11 +212,6 @@ model ControllerChillerDXHeatingEconomizer annotation (Placement(transformation(extent={{-60,-30},{-40,-10}}))); Buildings.Controls.OBC.CDL.Reals.Switch swiFan "Switch fan on" annotation (Placement(transformation(extent={{70,120},{90,140}}))); - Buildings.Controls.OBC.CDL.Reals.Hysteresis hysHea( - final uLow=0.01, - final uHigh=0.05) - "Hysteresis for heating" - annotation (Placement(transformation(extent={{-30,120},{-10,140}}))); Buildings.Controls.OBC.CDL.Logical.MultiOr orFan(nin=3) "Switch fan on if heating, cooling, or occupied" annotation (Placement(transformation(extent={{40,94},{60,114}}))); @@ -226,6 +221,9 @@ model ControllerChillerDXHeatingEconomizer "Chiller on signal based on room temperature" annotation (Placement(transformation(extent={{20,-80},{40,-60}}))); + Controls.OBC.CDL.Reals.Greater heaOnTRoo(h=0.5) + "Heater on signal based on room temperature" + annotation (Placement(transformation(extent={{-60,120},{-40,140}}))); protected Modelica.Blocks.Sources.Constant TSetSupChiConst( final k=TSupChi_nominal) @@ -271,21 +269,17 @@ equation 138},{68,138}}, color={0,0,127})); connect(swiFan.y, yFan) annotation (Line(points={{92,130},{96,130},{96,90},{ 110,90}}, color={0,0,127})); - connect(conSup.yHea, hysHea.u) annotation (Line(points={{-39,86},{-34,86},{ - -34,130},{-32,130}}, color={0,0,127})); connect(swiFan.u2, orFan.y) annotation (Line(points={{68,130},{64,130},{64,104},{62,104}}, color={255,0,255})); - connect(hysHea.y, orFan.u[1]) annotation (Line(points={{-8,130},{24,130},{24, - 108.667},{38,108.667}}, - color={255,0,255})); connect(conEco.TMixSet, conCooVal.u_s) annotation (Line(points={{39,78},{-10, 78},{-10,-20},{-2,-20}}, color={0,0,127})); connect(and1.y, chiOn) annotation (Line(points={{91,-30},{96,-30},{96,-54},{110, -54}}, color={255,0,255})); connect(conEco.yCoiSta, and1.u1) annotation (Line(points={{61,62},{64,62},{64, -30},{68,-30}}, color={255,0,255})); - connect(uOcc, orFan.u[2]) annotation (Line(points={{-120,0},{-14,0},{-14,104}, - {38,104}}, color={255,0,255})); + connect(uOcc, orFan.u[1]) annotation (Line(points={{-120,0},{-14,0},{-14, + 101.667},{38,101.667}}, + color={255,0,255})); connect(TMix, conEco.TMix) annotation (Line(points={{-120,30},{-26,30},{-26,75}, {39,75}}, color={0,0,127})); connect(TOut, conEco.TOut) annotation (Line(points={{-120,-40},{-66,-40},{-66, @@ -303,8 +297,14 @@ equation connect(chiOnTRoo.y, conEco.cooSta) annotation (Line(points={{42,-70},{50,-70}, {50,40},{34,40},{34,62},{39,62}}, color={255,0,255})); - connect(chiOnTRoo.y, orFan.u[3]) annotation (Line(points={{42,-70},{50,-70},{ - 50,40},{34,40},{34,99.3333},{38,99.3333}}, color={255,0,255})); + connect(chiOnTRoo.y, orFan.u[2]) annotation (Line(points={{42,-70},{50,-70},{ + 50,40},{34,40},{34,104},{38,104}}, color={255,0,255})); + connect(heaOnTRoo.y, orFan.u[3]) annotation (Line(points={{-38,130},{20,130}, + {20,106.333},{38,106.333}}, color={255,0,255})); + connect(heaOnTRoo.u2, TRoo) annotation (Line(points={{-62,122},{-86,122},{-86, + -80},{-120,-80}}, color={0,0,127})); + connect(TSetRooHea, heaOnTRoo.u1) annotation (Line(points={{-120,120},{-80, + 120},{-80,130},{-62,130}}, color={0,0,127})); annotation ( defaultComponentName="conChiDXHeaEco", Icon(graphics={Line(points={{-100,-100},{0,2},{-100,100}}, color= @@ -316,6 +316,11 @@ heating coil and a cooling coil. ", revisions="