@@ -1402,23 +1402,9 @@ block Controller "Chiller plant controller"
14021402 "Lead condenser water pump status from previous step"
14031403 annotation (Placement(transformation(extent={{480,-260},{500,-240}})));
14041404
1405- Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.EquipmentRotation.ControllerTwo equRot
1406- if have_heaChiWatPum
1407- "Rotates two pumps or groups of pumps"
1408- annotation (Placement(transformation(extent={{260,570},{280,590}})));
1409-
1410- Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1[nChiWatPum](
1411- final k= {1 ,2 }) if have_heaChiWatPum
1412- "Two pumps or groups of pumps only"
1413- annotation (Placement(transformation(extent={{320,600},{340,620}})));
1414-
1415- Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt2[nChiWatPum](
1416- final k= {2 ,1 }) if have_heaChiWatPum
1417- "Two pumps or groups of pumps only"
1418- annotation (Placement(transformation(extent={{320,550},{340,570}})));
1419-
1420- Buildings.Controls.OBC.CDL.Integers.Switch intSwi[2 ] if have_heaChiWatPum
1421- "Two devices or groups of devices"
1405+ Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1[nChiWatPum](final k=
1406+ chiPumLeaLag)
1407+ if have_heaChiWatPum "Chilled water pump lead and lag index"
14221408 annotation (Placement(transformation(extent={{380,570},{400,590}})));
14231409
14241410 Buildings.Controls.OBC.CDL.Logical.Latch chiStaUp
@@ -1428,20 +1414,6 @@ block Controller "Chiller plant controller"
14281414 Buildings.Controls.OBC.CDL.Logical.Pre pre2 "Stage cooling tower"
14291415 annotation (Placement(transformation(extent={{100,-450},{120,-430}})));
14301416
1431- Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt[nChiWatPum] if have_heaChiWatPum
1432- "Convert boolean to integer"
1433- annotation (Placement(transformation(extent={{580,550},{600,570}})));
1434-
1435- Buildings.Controls.OBC.CDL.Integers.MultiSum totChiPum(
1436- final nin= nChiWatPum) if have_heaChiWatPum
1437- "Total enabled chilled water pump"
1438- annotation (Placement(transformation(extent={{620,550},{640,570}})));
1439-
1440- Buildings.Controls.OBC.CDL.Integers.GreaterThreshold intGreThr(
1441- final t= 1 )
1442- "Check if more than one pump is enabled, if yes, then it means lag pump is enabled"
1443- annotation (Placement(transformation(extent={{580,590},{600,610}})));
1444-
14451417 Buildings.Controls.OBC.CDL.Logical.Switch chiHeaCon[nChi]
14461418 "Chiller head control enabling status"
14471419 annotation (Placement(transformation(extent={{520,270},{540,290}})));
@@ -1480,14 +1452,6 @@ block Controller "Chiller plant controller"
14801452 "Stage changing process status from previous step"
14811453 annotation (Placement(transformation(extent={{440,-90},{460,-70}})));
14821454
1483- Buildings.Controls.OBC.CDL.Logical.Pre leaChiPumPre
1484- "Lead chilled water pump status previous value"
1485- annotation (Placement(transformation(extent={{520,590},{540,610}})));
1486-
1487- Buildings.Controls.OBC.CDL.Logical.Pre leaChiWatPum[nChiWatPum]
1488- "Chilled water pump status previous value"
1489- annotation (Placement(transformation(extent={{540,550},{560,570}})));
1490-
14911455 Buildings.Controls.OBC.CDL.Reals.Sources.Constant con(
14921456 final k= fixConWatPumSpe)
14931457 if have_fixSpeConWatPum "Speed of constant speed condenser water pump"
@@ -1540,9 +1504,6 @@ block Controller "Chiller plant controller"
15401504 "Enable devices when plant is enabled"
15411505 annotation (Placement(transformation(extent={{-540,-440},{-520,-420}})));
15421506
1543- Buildings.Controls.OBC.CDL.Logical.Switch leaChiPum "Lead chilled water pump"
1544- annotation (Placement(transformation(extent={{200,582},{220,602}})));
1545-
15461507 Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Generic.PlantEnable.DisableChillers disChi(
15471508 final have_WSE= have_WSE,
15481509 final nChi= nChi,
@@ -1586,6 +1547,9 @@ block Controller "Chiller plant controller"
15861547
15871548protected
15881549
1550+ final parameter Integer chiPumLeaLag[nChiWatPum]= {i for i in 1 :nChiWatPum}
1551+ "Chiller water pump lead and lag index, {1,2,...,n}, with first one as lead pump" ;
1552+
15891553 final parameter Boolean anyVsdCen = sum ({
15901554 if chiTyp[i]== Buildings.Controls.OBC.ASHRAE.G36.Plants.Chillers.Types.ChillersAndStages.VariableSpeedCentrifugal
15911555 then 1 else 0 for i in 1 :nChi}) > 0
@@ -1782,16 +1746,6 @@ equation
17821746 -172},{620,342},{638,342}}, color={255,0,255}));
17831747 connect (staSetCon.yCapReq, towCon.reqPlaCap) annotation (Line(points={{-172,-64},
17841748 {-160,-64},{-160,-500},{-370,-500},{-370,-612},{-268,-612}}, color={0,0,127}));
1785- connect (equRot.yDevRol, intSwi.u2) annotation (Line(points={{282,574},{310,574},
1786- {310,580},{378,580}}, color={255,0,255}));
1787- connect (conInt1.y, intSwi.u1) annotation (Line(points={{342,610},{360,610},{360,
1788- 588},{378,588}}, color={255,127,0}));
1789- connect (conInt2.y, intSwi.u3) annotation (Line(points={{342,560},{360,560},{360,
1790- 572},{378,572}}, color={255,127,0}));
1791- connect (intSwi.y, chiWatPumCon.uPumLeaLag) annotation (Line(points={{402,580},
1792- {420,580},{420,543},{434,543}}, color={255,127,0}));
1793- connect (uChiWatPum, equRot.uDevSta) annotation (Line(points={{-920,574},{258,574}},
1794- color={255,0,255}));
17951749 connect (chiStaUp.y, chiMinFloSet.u2) annotation (Line(points={{402,320},{420,320},
17961750 {420,120},{478,120}}, color={255,0,255}));
17971751 connect (upProCon.yStaPro, chiStaUp.u) annotation (Line(points={{268,436},{330,
@@ -1806,8 +1760,6 @@ equation
18061760 590,-400},{80,-400},{80,-440},{98,-440}}, color={255,0,255}));
18071761 connect (towCon.ySpeSet, mulMax.u) annotation (Line(points={{-172,-684},{-100,
18081762 -684},{-100,-580},{-62,-580}}, color={0,0,127}));
1809- connect (booToInt.y, totChiPum.u)
1810- annotation (Line(points={{602,560},{618,560}}, color={255,127,0}));
18111763 connect (chiStaUp.y, desConWatPumSpeSwi.u2) annotation (Line(points={{402,320},
18121764 {420,320},{420,200},{478,200}}, color={255,0,255}));
18131765 connect (chiStaUp.y, uChiSwi.u) annotation (Line(points={{402,320},{420,320},{420,
@@ -1895,16 +1847,6 @@ equation
18951847 255}));
18961848 connect (preChaPro.y, staSetCon.chaPro) annotation (Line(points={{462,-80},{470,
18971849 -80},{470,-330},{-320,-330},{-320,88},{-268,88}}, color={255,0,255}));
1898- connect (leaChiWatPum.y, booToInt.u)
1899- annotation (Line(points={{562,560},{578,560}}, color={255,0,255}));
1900- connect (chiWatPumCon.yChiWatPum, leaChiWatPum.u) annotation (Line(points={{506,510},
1901- {530,510},{530,560},{538,560}}, color={255,0,255}));
1902- connect (totChiPum.y, intGreThr.u) annotation (Line(points={{642,560},{650,560},
1903- {650,580},{570,580},{570,600},{578,600}}, color={255,127,0}));
1904- connect (intGreThr.y, equRot.uLagStaSet) annotation (Line(points={{602,600},{610,
1905- 600},{610,640},{240,640},{240,580},{258,580}}, color={255,0,255}));
1906- connect (chiWatPumCon.yLea, leaChiPumPre.u) annotation (Line(points={{506,534},
1907- {510,534},{510,600},{518,600}}, color={255,0,255}));
19081850 connect (uChiHeaCon, dowProCon.uChiHeaCon) annotation (Line(points={{-920,-80},
19091851 {150,-80},{150,-216},{172,-216}}, color={255,0,255}));
19101852 connect (uChiHeaCon, upProCon.uChiHeaCon) annotation (Line(points={{-920,-80},{
@@ -1965,18 +1907,8 @@ equation
19651907 -410},{-590,-438},{-542,-438}}, color={255,0,255}));
19661908 connect (uChiWatPum, enaDev.uChiWatPum) annotation (Line(points={{-920,574},{-790,
19671909 574},{-790,-434},{-542,-434}}, color={255,0,255}));
1968- connect (equRot.yDevStaSet, chiWatPumCon.uChiWatPum) annotation (Line(points={{282,586},
1969- {300,586},{300,531},{434,531}}, color={255,0,255}));
19701910 connect (plaEna.yPla, chiWatPumCon.uPla) annotation (Line(points={{-658,-520},
19711911 {-580,-520},{-580,537},{434,537}},color={255,0,255}));
1972- connect (leaChiPum.y, equRot.uLeaStaSet) annotation (Line(points={{222,592},{234,
1973- 592},{234,586},{258,586}}, color={255,0,255}));
1974- connect (leaChiPumPre.y, leaChiPum.u3) annotation (Line(points={{542,600},{550,
1975- 600},{550,630},{190,630},{190,584},{198,584}}, color={255,0,255}));
1976- connect (enaDev.yEnaPlaPro, leaChiPum.u2) annotation (Line(points={{-518,-421},
1977- {-410,-421},{-410,592},{198,592}}, color={255,0,255}));
1978- connect (enaDev.yLeaPriChiPum, leaChiPum.u1) annotation (Line(points={{-518,-430},
1979- {-390,-430},{-390,600},{198,600}}, color={255,0,255}));
19801912 connect (enaDev.yLeaConPum, upProCon.uEnaPlaConPum) annotation (Line(points={{-518,
19811913 -433},{-110,-433},{-110,364},{172,364}}, color={255,0,255}));
19821914 connect (enaDev.yConWatIsoVal, upProCon.uEnaPlaConIso) annotation (Line(points={{-518,
@@ -2076,6 +2008,10 @@ equation
20762008 {-888,376},{-862,376}}, color={0,0,127}));
20772009 connect (phi, wetBul.phi) annotation (Line(points={{-920,360},{-872,360},{-872,
20782010 364},{-862,364}}, color={0,0,127}));
2011+ connect (conInt1.y, chiWatPumCon.uPumLeaLag) annotation (Line(points={{402,580},
2012+ {420,580},{420,543},{434,543}}, color={255,127,0}));
2013+ connect (uChiWatPum, chiWatPumCon.uChiWatPum) annotation (Line(points={{-920,
2014+ 574},{-790,574},{-790,531},{434,531}}, color={255,0,255}));
20792015annotation (
20802016 defaultComponentName="chiPlaCon" ,
20812017 Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-400},{100,400}}),
0 commit comments