Skip to content

Commit

Permalink
merged master
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed Aug 30, 2023
2 parents fc32973 + c34386a commit 3849805
Show file tree
Hide file tree
Showing 1,259 changed files with 38,035 additions and 6,509 deletions.
25 changes: 20 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:

env:
global:
- BUILDINGSPY_VERSION=BuildingsPy@50ac74d8e4fd067179bb38bc23140c2c9254c94c
- BUILDINGSPY_VERSION=BuildingsPy@7de32eb4b1bd77738dccd0cf9f7fa44b25fd51a2
- OMC_VERSION=ubuntu-2204-omc:1.22.0_dev-41-g8a5b18f-1
- OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.43.4
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2023x-x86_64_rev-1
Expand Down Expand Up @@ -64,9 +64,18 @@ env:
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.ThermalZones.{ISO13790,ReducedOrder}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.ThermalZones.{ISO13790,ReducedOrder}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.ThermalZones.{ISO13790,ReducedOrder}\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.{Applications,Experimental}\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.{Applications,Experimental}\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.{Applications,Experimental}\""
- 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.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 @@ -98,6 +107,7 @@ env:
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Utilities\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Utilities\""
- TEST_ARG="make test-dymola PACKAGE=\"Buildings.Templates\""
- TEST_ARG="make test-openmodelica PACKAGE=\"Buildings.Templates\""
- TEST_ARG="make test-optimica PACKAGE=\"Buildings.Templates\""

before_install:
Expand Down Expand Up @@ -152,10 +162,15 @@ 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.{Applications,Experimental}* ]] || [[ "$TEST_ARG" == *spawn* ]]; then
- if [[ "$TEST_ARG" == *EnergyPlus_9_6_0* ]] || [[ "$TEST_ARG" == *Buildings.Experimental.DHC.{EnergyTransferStations,Loads,Networks,Plants}* ]] || [[ "$TEST_ARG" == *spawn* ]]; then
echo "Installing Spawn binaries";
Buildings/Resources/src/ThermalZones/install.py --binaries-for-os-only;
fi;
- if [[ "$TEST_ARG" == *SINGLEPROC* ]]; then
export NPROC=1;
else
export NPROC=10;
fi;

# Execute tests
script:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,19 @@ model ControllerChillerDXHeatingEconomizer
final reverseActing=false)
"Cooling coil valve controller"
annotation (Placement(transformation(extent={{0,-30},{20,-10}})));
Buildings.Controls.OBC.CDL.Continuous.Switch swi
Buildings.Controls.OBC.CDL.Reals.Switch swi
"Switch the outdoor air fraction to 0 when in unoccupied mode"
annotation (Placement(transformation(extent={{0,20},{20,40}})));
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uOcc
"Current occupancy period, true if it is in occupant period"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}}),
iconTransformation(extent={{-140,-20},{-100,20}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con(k=0)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant con(k=0)
"Zero outside air fraction"
annotation (Placement(transformation(extent={{-60,-30},{-40,-10}})));
Buildings.Controls.OBC.CDL.Continuous.Switch swiFan "Switch fan on"
Buildings.Controls.OBC.CDL.Reals.Switch swiFan "Switch fan on"
annotation (Placement(transformation(extent={{70,120},{90,140}})));
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysHea(
Buildings.Controls.OBC.CDL.Reals.Hysteresis hysHea(
final uLow=0.01,
final uHigh=0.05)
"Hysteresis for heating"
Expand All @@ -222,7 +222,7 @@ model ControllerChillerDXHeatingEconomizer
annotation (Placement(transformation(extent={{40,94},{60,114}})));
Modelica.Blocks.Logical.And and1 "Logical and"
annotation (Placement(transformation(extent={{70,-40},{90,-20}})));
Buildings.Controls.OBC.CDL.Continuous.Greater chiOnTRoo(h=1)
Buildings.Controls.OBC.CDL.Reals.Greater chiOnTRoo(h=1)
"Chiller on signal based on room temperature"
annotation (Placement(transformation(extent={{20,-80},{40,-60}})));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ model ControllerEconomizer "Controller for economizer"
annotation (Placement(transformation(extent={{-80,-40},{-60,-20}})));
Modelica.Blocks.Math.Feedback feedback1
annotation (Placement(transformation(extent={{-80,20},{-60,40}})));
Controls.OBC.CDL.Continuous.Hysteresis hysChiPla(
Controls.OBC.CDL.Reals.Hysteresis hysChiPla(
final uLow=0.95,
final uHigh=0.98)
"Hysteresis with delay to switch on cooling"
Expand All @@ -101,7 +101,7 @@ model ControllerEconomizer "Controller for economizer"
Modelica.Blocks.Logical.Not not1 "No economizer"
annotation (Placement(transformation(extent={{40,-100},{60,-80}})));

Controls.OBC.CDL.Continuous.Hysteresis hysCooPot(
Controls.OBC.CDL.Reals.Hysteresis hysCooPot(
final uLow=0,
final uHigh=0.5)
"Hysteresis with delay to check for cooling potential of outside air"
Expand All @@ -114,7 +114,7 @@ model ControllerEconomizer "Controller for economizer"
final trueHoldDuration=60*15)
"True/false hold for mixing temperature"
annotation (Placement(transformation(extent={{-24,-40},{-4,-20}})));
Controls.OBC.CDL.Continuous.Hysteresis hysTMix(
Controls.OBC.CDL.Reals.Hysteresis hysTMix(
final uLow=-0.5,
final uHigh=0.5)
"Hysteresis with delay for mixed air temperature"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ model ControllerChillerDXHeatingEconomizer
minOAFra=0.4,
TSetSupAir=286.15) "Controller"
annotation (Placement(transformation(extent={{40,-10},{60,10}})));
Controls.OBC.CDL.Continuous.Sources.TimeTable TSetRooHea(
Controls.OBC.CDL.Reals.Sources.TimeTable TSetRooHea(
table=[
0, 15 + 273.15;
8*3600, 20 + 273.15;
Expand All @@ -36,7 +36,7 @@ model ControllerChillerDXHeatingEconomizer
extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.Periodic)
"Heating setpoint for room temperature"
annotation (Placement(transformation(extent={{-100,50},{-80,70}})));
Controls.OBC.CDL.Continuous.Sources.TimeTable TSetRooCoo(
Controls.OBC.CDL.Reals.Sources.TimeTable TSetRooCoo(
table=[
0, 30 + 273.15;
8*3600, 25 + 273.15;
Expand Down
20 changes: 10 additions & 10 deletions Buildings/Air/Systems/SingleZone/VAV/ChillerDXHeatingEconomizer.mo
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ model ChillerDXHeatingEconomizer
final use_inputFilter=false,
redeclare package Medium = MediumA)
"Supply fan"
annotation (Placement(transformation(extent={{-30,32},{-10,52}})));
annotation (Placement(transformation(extent={{-30,30},{-10,50}})));
Buildings.Fluid.FixedResistances.PressureDrop totalRes(
final m_flow_nominal=mAir_flow_nominal,
final dp_nominal=dp_nominal,
Expand Down Expand Up @@ -370,9 +370,9 @@ protected
end IdealValve;

equation
connect(fanSup.port_b, totalRes.port_a) annotation (Line(points={{-10,42},
{0,42},{0,40},{10,40}}, color={0,127,255}));
connect(fanSup.P, PFan) annotation (Line(points={{-9,51},{-6,51},{-6,150},{
connect(fanSup.port_b, totalRes.port_a) annotation (Line(points={{-10,40},
{10,40}}, color={0,127,255}));
connect(fanSup.P, PFan) annotation (Line(points={{-9,49},{-6,49},{-6,150},{
210,150}}, color={0,0,127}));
connect(eff.y, QHea_flow) annotation (Line(points={{141,110},{166,110},{166,
130},{210,130}},
Expand All @@ -385,7 +385,7 @@ equation
index=-1,
extent={{-6,3},{-6,3}}));
connect(senTMixAir.port_b, fanSup.port_a) annotation (Line(points={{-40,40},
{-36,40},{-36,42},{-30,42}}, color={0,127,255}));
{-30,40}}, color={0,127,255}));
connect(heaCoi.Q_flow, eff.u) annotation (Line(points={{73,46},{80,46},{80,
110},{118,110}}, color={0,0,127}));
connect(heaCoi.port_b, cooCoi.port_a2) annotation (Line(points={{72,40},{90,40}}, color={0,127,255}));
Expand All @@ -410,7 +410,7 @@ equation
extent={{-6,3},{-6,3}}));
connect(pumChiWat.P, PPum) annotation (Line(points={{111,-79},{111,-52},{180,
-52},{180,90},{210,90}}, color={0,0,127}));
connect(chi.P, PCoo) annotation (Line(points={{89,-177},{84,-177},{84,-128},{
connect(chi.P, PCoo) annotation (Line(points={{89,-177},{80,-177},{80,-128},{
98,-128},{98,-50},{178,-50},{178,110},{210,110}},
color={0,0,127}));
connect(ideVal.port_2, chi.port_a2) annotation (Line(points={{86,0.2},{86,-162},{90,-162}},
Expand All @@ -425,7 +425,7 @@ equation
connect(senTSup.port_b, supplyAir) annotation (Line(points={{148,40},{174,40},
{174,60},{202,60}}, color={0,127,255}));
connect(gaiFan.y, fanSup.m_flow_in) annotation (Line(points={{-59,140},{
-20,140},{-20,54}}, color={0,0,127}));
-20,140},{-20,52}}, color={0,0,127}));
connect(booToInt.y, pumChiWat.m_flow_in) annotation (Line(points={{81,-90},{108,-90}}, color={0,0,127}));
connect(booToInt.u, chiOn) annotation (Line(points={{58,-90},{40,-90},{40,-120},
{-220,-120}}, color={255,0,255}));
Expand Down Expand Up @@ -455,10 +455,10 @@ equation
connect(TRet, senTRetAir.T) annotation (Line(points={{210,-80},{174,-80},{174,
-20},{-30,-20},{-30,-29}}, color={0,0,127}));
connect(senTRetAir.port_a, senTraSub.port_b) annotation (Line(points={{-20,-40},{20,-40}}, color={0,127,255}));
connect(senTraSub.port_a, returnAir) annotation (Line(points={{40,-40},{120,-40},{120,-20},{202,-20}},
color={0,127,255}));
connect(senTraSub.port_a, returnAir) annotation (Line(points={{40,-40},{192,
-40},{192,-20},{202,-20}}, color={0,127,255}));

connect(fanSup.y_actual, y_actual) annotation (Line(points={{-9,49},{0,49},{0,
connect(fanSup.y_actual, y_actual) annotation (Line(points={{-9,47},{0,47},{0,
172},{210,172}}, color={0,0,127}));
annotation (defaultComponentName="chiDXHeaEco",
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-200,-220},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ model Room
nPorts=1)
"Source model for air infiltration"
annotation (Placement(transformation(extent={{-40,-60},{-20,-40}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable intLoad(table=[0,
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable intLoad(table=[0,
0.1; 8*3600,0.1; 8*3600,1.0; 18*3600,1.0; 18*3600,0.1; 24*3600,0.1])
"Internal loads"
annotation (Placement(transformation(extent={{-120,150},{-100,170}})));
Expand Down Expand Up @@ -370,8 +370,8 @@ This is for
<li>
July 21, 2020, by Kun Zhang:<br/>
Replaced the internal gain block from BaseClasses by directly using the block
<a href=\"modelica://Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable\">
Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable</a>.
<a href=\"modelica://Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable\">
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable</a>.
</li>
<li>
June 21, 2017, by Michael Wetter:<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ model ChillerDXHeatingEconomizer
TSupChi_nominal=TSupChi_nominal,
TSetSupAir=286.15) "Controller for single zone VAV system"
annotation (Placement(transformation(extent={{-100,-10},{-80,10}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable TSetRooHea(
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable TSetRooHea(
table=[
0, 15 + 273.15;
8*3600, 20 + 273.15;
Expand All @@ -33,7 +33,7 @@ model ChillerDXHeatingEconomizer
extrapolation=Buildings.Controls.OBC.CDL.Types.Extrapolation.Periodic)
"Heating setpoint for room temperature"
annotation (Placement(transformation(extent={{-152,40},{-132,60}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable TSetRooCoo(
Buildings.Controls.OBC.CDL.Reals.Sources.TimeTable TSetRooCoo(
table=[
0, 30 + 273.15;
8*3600, 25 + 273.15;
Expand Down
12 changes: 6 additions & 6 deletions Buildings/Air/Systems/SingleZone/VAV/Examples/Guideline36.mo
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ model Guideline36
"VAV controller"
annotation (Placement(transformation(extent={{-120,-20},{-80,60}})));

Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysChiPla(
Buildings.Controls.OBC.CDL.Reals.Hysteresis hysChiPla(
uLow=-1,
uHigh=0)
"Hysteresis with delay to switch on cooling"
Expand All @@ -59,19 +59,19 @@ model Guideline36
Buildings.Controls.OBC.CDL.Integers.Sources.Constant demLim(final k=0)
"Cooling and heating demand imit level"
annotation (Placement(transformation(extent={{-200,-30},{-180,-10}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant cooWarTim(final k=0)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant cooWarTim(final k=0)
"Cooldown and warm-up time"
annotation (Placement(transformation(extent={{-200,40},{-180,60}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TOccHeaSet(final k=293.15)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TOccHeaSet(final k=293.15)
"Occupied heating setpoint"
annotation (Placement(transformation(extent={{-210,170},{-190,190}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TOccCooSet(final k=298.15)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TOccCooSet(final k=298.15)
"Occupied cooling setpoint"
annotation (Placement(transformation(extent={{-180,150},{-160,170}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TUnoHeaSet(final k=288.15)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TUnoHeaSet(final k=288.15)
"Unoccupied heating setpoint"
annotation (Placement(transformation(extent={{-210,120},{-190,140}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TUnoCooSet(final k=303.15)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TUnoCooSet(final k=303.15)
"Unoccupied cooling setpoint"
annotation (Placement(transformation(extent={{-180,100},{-160,120}})));
Modelica.Blocks.Sources.BooleanConstant freRes(k=true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ block ZoneWithAHUG36
QCoo_flow_nominal=QCoo_flow_nominal,
TSupChi_nominal=TSupChi_nominal) "HVAC system"
annotation (Placement(transformation(extent={{40,-78},{80,-38}})));
Buildings.Controls.OBC.CDL.Continuous.Hysteresis hysChiPla1(uLow=-1, uHigh=0)
Buildings.Controls.OBC.CDL.Reals.Hysteresis hysChiPla1(uLow=-1, uHigh=0)
"Hysteresis with delay to switch on cooling"
annotation (Placement(transformation(extent={{-50,-130},{-30,-110}})));
Modelica.Blocks.Math.Feedback errTRooCoo1
Expand All @@ -101,23 +101,23 @@ block ZoneWithAHUG36
final k=0)
"Cooling and heating demand imit level"
annotation (Placement(transformation(extent={{-140,-120},{-120,-100}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TOccHeaSet(final k=293.15)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TOccHeaSet(final k=293.15)
"Occupied heating setpoint"
annotation (Placement(transformation(extent={{-140,130},{-120,150}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TOccCooSet(final k=297.15)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TOccCooSet(final k=297.15)
"Occupied cooling setpoint"
annotation (Placement(transformation(extent={{-140,100},{-120,120}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TUnoHeaSet(final k=288.15)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TUnoHeaSet(final k=288.15)
"Unoccupied heating setpoint"
annotation (Placement(transformation(extent={{-140,60},{-120,80}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TUnoCooSet(final k=303.15)
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TUnoCooSet(final k=303.15)
"Unoccupied cooling setpoint"
annotation (Placement(transformation(extent={{-140,30},{-120,50}})));
Modelica.Blocks.Sources.BooleanConstant freRes(k=true)
"Freeze protection reset"
annotation (Placement(transformation(extent={{-140,-154},{-120,-134}})));
protected
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetSupChiConst(
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetSupChiConst(
final k=TSupChi_nominal)
"Set point for chiller temperature"
annotation (Placement(transformation(extent={{-20,10},{0,30}})));
Expand Down
Loading

0 comments on commit 3849805

Please sign in to comment.