Skip to content

Commit

Permalink
Merge branch 'lbl-srg:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikeyad-pnnl authored Apr 13, 2024
2 parents a9d8574 + fdcca08 commit 363d64c
Show file tree
Hide file tree
Showing 1,886 changed files with 80,384 additions and 48,339 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 : |
Expand All @@ -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"
Expand Down
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}\""
Expand Down Expand Up @@ -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;
Expand Down
14 changes: 11 additions & 3 deletions Buildings/.copiedFiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}})));
Expand All @@ -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)
Expand Down Expand Up @@ -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,
Expand All @@ -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=
Expand All @@ -316,6 +316,11 @@ heating coil and a cooling coil.
</html>", revisions="<html>
<ul>
<li>
March 28, 2024, by David Blum:<br/>
Adjust heating hysteresis to avoid chattering.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3735\">issue 3735</a>.
</li>
<li>
November 20, 2020, by David Blum:<br/>
Turn fan on when setup cooling required.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2265\">issue 2265</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ model ChillerDXHeatingEconomizer
"Heating efficiency"
annotation (Placement(transformation(extent={{120,100},{140,120}})));
Buildings.Fluid.Sources.Outside out(
final C=fill(0.0004, 1),
final C=fill(0.0004, MediumA.nC),
final nPorts=3,
redeclare package Medium = MediumA)
"Boundary conditions for outside air"
Expand Down Expand Up @@ -357,7 +357,6 @@ protected
fillPattern=FillPattern.Solid),
Line(points={{62,0},{-98,0}}, color={0,0,0}),
Rectangle(
visible=use_inputFilter,
extent={{28,-10},{46,10}},
lineColor={0,0,0},
fillColor={135,135,135},
Expand Down Expand Up @@ -635,6 +634,10 @@ feedback control of damper positions. The cooling coil is a dry coil model.
</html>", revisions="<html>
<ul>
<li>
March 27, 2024, by Michael Wetter:<br/>
Corrected wrong assignment of <code>out.C</code>.
</li>
<li>
November 1, 2021, by Hongxiang Fu:<br/>
Refactored the model by replacing <code>not use_powerCharacteristic</code>
with the enumeration
Expand All @@ -661,4 +664,4 @@ First implementation.
</li>
</ul>
</html>"));
end ChillerDXHeatingEconomizer;
end ChillerDXHeatingEconomizer;
59 changes: 0 additions & 59 deletions Buildings/Airflow/Multizone/BaseClasses/Examples/Interpolate.mo

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Interpolate
PowerLaw
PowerLawFixedM
WindPressureLowRise
Expand Down
Loading

0 comments on commit 363d64c

Please sign in to comment.