@@ -50,44 +50,40 @@ protected
5050
5151 Buildings.Controls.OBC.CDL.Logical.And and6[nBoi] if reqAct
5252 "Change current index signal to true when change process is triggered"
53- annotation (Placement(transformation(extent={{20 ,-50},{40 ,-30}})));
53+ annotation (Placement(transformation(extent={{-10 ,-50},{10 ,-30}})));
5454
5555 Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booScaRep1(
5656 final nout= nBoi) "Replicate signal for array logic processing"
57- annotation (Placement(transformation(extent={{-40,-180},{-20,-160}})));
58-
59- Buildings.Controls.OBC.CDL.Logical.And and7[nBoi] if not reqAct
60- "Modify only current index signal on input valve status array "
61- annotation (Placement(transformation(extent={{120,30},{140,50}})));
57+ annotation (Placement(transformation(extent={{-60,-180},{-40,-160}})));
6258
6359 Buildings.Controls.OBC.CDL.Logical.Not not1[nBoi] if not reqAct
6460 "Generate true array with false value only for current index"
65- annotation (Placement(transformation(extent={{20 ,30},{40 ,50}})));
61+ annotation (Placement(transformation(extent={{-10 ,30},{10 ,50}})));
6662
6763 Buildings.Controls.OBC.CDL.Logical.Not not2[nBoi] if not reqAct
6864 "Not block "
69- annotation (Placement(transformation(extent={{20,0 },{40,20 }})));
65+ annotation (Placement(transformation(extent={{-10,-10 },{10,10 }})));
7066
7167 Buildings.Controls.OBC.CDL.Logical.Or or3[nBoi] if not reqAct
7268 "Change current index signal to false when change process is triggered"
73- annotation (Placement(transformation(extent={{80 ,30},{100 ,50}})));
69+ annotation (Placement(transformation(extent={{30 ,30},{50 ,50}})));
7470
7571 Buildings.Controls.OBC.CDL.Logical.And and2
7672 "Check if upstream changes have been completed and current process is triggered"
77- annotation (Placement(transformation(extent={{-80 ,-180},{-60 ,-160}})));
73+ annotation (Placement(transformation(extent={{-100 ,-180},{-80 ,-160}})));
7874
7975 Buildings.Controls.OBC.CDL.Logical.Or or1[nBoi] if reqAct
8076 "Modify only current index signal on input valve status array"
8177 annotation (Placement(transformation(extent={{120,-50},{140,-30}})));
8278
8379 Buildings.Controls.OBC.CDL.Integers.Equal intEqu[nBoi]
8480 "Check next enabling isolation valve"
85- annotation (Placement(transformation(extent={{-40 ,0},{-20 ,20}})));
81+ annotation (Placement(transformation(extent={{-60 ,0},{-40 ,20}})));
8682
8783 Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator intRep(
8884 final nout= nBoi)
8985 "Replicate integer input"
90- annotation (Placement(transformation(extent={{-80 ,0},{-60 ,20}})));
86+ annotation (Placement(transformation(extent={{-100 ,0},{-80 ,20}})));
9187
9288 Buildings.Controls.OBC.CDL.Logical.Not not3[nBoi]
9389 "Logical not"
@@ -109,30 +105,36 @@ protected
109105 "Logical or"
110106 annotation (Placement(transformation(extent={{40,210},{60,230}})));
111107
112- Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd1(
113- final nin= nBoi)
108+ Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd1(nin= (nBoi+ 1 ))
114109 "Logical and"
115110 annotation (Placement(transformation(extent={{80,210},{100,230}})));
116111
117- Buildings.Controls.OBC.CDL.Logical.And and5
118- "Check if the isolation valve has been fully open"
119- annotation (Placement(transformation(extent={{140,130},{160,150}})));
120-
121112 Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt[nBoi](
122113 final k= boiInd)
123114 "Boiler index array"
124- annotation (Placement(transformation(extent={{-80,-30},{-60,-10}})));
125-
115+ annotation (Placement(transformation(extent={{-100,-30},{-80,-10}})));
116+
117+ CDL.Logical.Latch lat
118+ annotation (Placement(transformation(extent={{144,130},{164,150}})));
119+ CDL.Logical.Edge edg
120+ annotation (Placement(transformation(extent={{100,124},{120,144}})));
121+ CDL.Logical.Edge edg2 annotation (Placement(transformation(
122+ extent={{-10,-10},{10,10}},
123+ rotation=270,
124+ origin={132,200})));
125+ CDL.Logical.And and1[nBoi] if not reqAct
126+ "Change current index signal to true when change process is triggered"
127+ annotation (Placement(transformation(extent={{72,30},{92,50}})));
126128equation
127129
128130 connect (chaPro, and2.u2)
129- annotation (Line(points={{-180,-178},{-82 ,-178}}, color={255,0,255}));
131+ annotation (Line(points={{-180,-178},{-102 ,-178}},color={255,0,255}));
130132
131133 connect (nexChaBoi, intRep.u)
132- annotation (Line(points={{-180,10},{-82 ,10}}, color={255,127,0}));
134+ annotation (Line(points={{-180,10},{-102 ,10}},color={255,127,0}));
133135
134136 connect (intRep.y, intEqu.u1)
135- annotation (Line(points={{-58 ,10},{-42 ,10}}, color={255,127,0}));
137+ annotation (Line(points={{-78 ,10},{-62 ,10}}, color={255,127,0}));
136138
137139 connect (not4.y, and4.u2)
138140 annotation (Line(points={{-18,160},{-12,160},{-12,182},{-2,182}},
@@ -148,58 +150,66 @@ equation
148150 annotation (Line(points={{22,190},{30,190},{30,212},{38,212}},
149151 color={255,0,255}));
150152
151- connect (and5.y,yEnaHotWatIsoVal)
152- annotation (Line(points={{162,140},{200,140}}, color={255,0,255}));
153-
154- connect (or2.y, mulAnd1.u)
155- annotation (Line(points={{62,220},{78,220}}, color={255,0,255}));
156-
157153 connect (conInt.y, intEqu.u2)
158- annotation (Line(points={{-58 ,-20},{-50 ,-20},{-50,2},{-42 ,2}},
154+ annotation (Line(points={{-78 ,-20},{-62 ,-20},{-62 ,2}},
159155 color={255,127,0}));
160156
161157
162- connect (uUpsDevSta, and2.u1) annotation (Line(points={{-180,-140},{-100,-140},
163- {-100,-170},{-82,-170}},color={255,0,255}));
158+ connect (uUpsDevSta, and2.u1) annotation (Line(points={{-180,-140},{-120,-140},
159+ {-120,-170},{-102,-170}},
160+ color={255,0,255}));
164161
165- connect (yHotWatIsoVal, and3.u1) annotation (Line(points={{200,0},{160 ,0},{160 ,
162+ connect (yHotWatIsoVal, and3.u1) annotation (Line(points={{200,0},{168 ,0},{168 ,
166163 110},{-80,110},{-80,220},{-2,220}}, color={255,0,255}));
167- connect (yHotWatIsoVal, not3.u) annotation (Line(points={{200,0},{160 ,0},{160 ,110},
164+ connect (yHotWatIsoVal, not3.u) annotation (Line(points={{200,0},{168 ,0},{168 ,110},
168165 {-80,110},{-80,190},{-42,190}}, color={255,0,255}));
169- connect (uHotWatIsoVal, and3.u2) annotation (Line(points={{-180,-100},{-134,-100},
170- {-134,212},{-2,212}}, color={255,0,255}));
171- connect (uHotWatIsoVal, not4.u) annotation (Line(points={{-180,-100},{-134,-100},
172- {-134,160},{-42,160}}, color={255,0,255}));
173- connect (mulAnd1.y, and5.u1) annotation (Line(points={{102,220},{128,220},{128,
174- 140},{138,140}}, color={255,0,255}));
175- connect (uUpsDevSta, and5.u2) annotation (Line(points={{-180,-140},{-100,-140},
176- {-100,132},{138,132}}, color={255,0,255}));
177- connect (uHotWatIsoVal, or1.u2) annotation (Line(points={{-180,-100},{110,-100},
178- {110,-48},{118,-48}}, color={255,0,255}));
166+ connect (uHotWatIsoVal, and3.u2) annotation (Line(points={{-180,-100},{-140,-100},
167+ {-140,212},{-2,212}}, color={255,0,255}));
168+ connect (uHotWatIsoVal, not4.u) annotation (Line(points={{-180,-100},{-140,-100},
169+ {-140,160},{-42,160}}, color={255,0,255}));
179170 connect (and6.y, or1.u1)
180- annotation (Line(points={{42 ,-40},{118,-40}}, color={255,0,255}));
171+ annotation (Line(points={{12 ,-40},{118,-40}}, color={255,0,255}));
181172 connect (booScaRep1.u, and2.y)
182- annotation (Line(points={{-42,-170},{-58,-170}}, color={255,0,255}));
183- connect (booScaRep1.y, and6.u2) annotation (Line(points={{-18,-170},{0,-170},{0,
184- -48},{18,-48}}, color={255,0,255}));
185- connect (or1.y, yHotWatIsoVal) annotation (Line(points={{142,-40},{160,-40},{160,
186- 0},{200,0}}, color={255,0,255}));
187- connect (and7.y, yHotWatIsoVal) annotation (Line(points={{142,40},{160,40},{160,
188- 0},{200,0}}, color={255,0,255}));
189- connect (uHotWatIsoVal, and7.u2) annotation (Line(points={{-180,-100},{110,-100},
190- {110,32},{118,32}}, color={255,0,255}));
191- connect (intEqu.y, not1.u) annotation (Line(points={{-18,10},{-10,10},{-10,40},
192- {18,40}}, color={255,0,255}));
193- connect (booScaRep1.y, not2.u) annotation (Line(points={{-18,-170},{0,-170},{0,
194- 10},{18,10}}, color={255,0,255}));
195- connect (not2.y, or3.u2) annotation (Line(points={{42,10},{60,10},{60,32},{78,32}},
173+ annotation (Line(points={{-62,-170},{-78,-170}}, color={255,0,255}));
174+ connect (booScaRep1.y, and6.u2) annotation (Line(points={{-38,-170},{-20,-170},
175+ {-20,-48},{-12,-48}},
176+ color={255,0,255}));
177+ connect (intEqu.y, not1.u) annotation (Line(points={{-38,10},{-30,10},{-30,40},
178+ {-12,40}},color={255,0,255}));
179+ connect (booScaRep1.y, not2.u) annotation (Line(points={{-38,-170},{-20,-170},{
180+ -20,0},{-12,0}},
181+ color={255,0,255}));
182+ connect (not2.y, or3.u2) annotation (Line(points={{12,0},{20,0},{20,32},{28,32}},
196183 color={255,0,255}));
197184 connect (not1.y, or3.u1)
198- annotation (Line(points={{42,40},{78,40}}, color={255,0,255}));
199- connect (intEqu.y, and6.u1) annotation (Line(points={{-18,10},{-10,10},{-10,-40},
200- {18,-40}}, color={255,0,255}));
201- connect (or3.y, and7.u1)
202- annotation (Line(points={{102,40},{118,40}}, color={255,0,255}));
185+ annotation (Line(points={{12,40},{28,40}}, color={255,0,255}));
186+ connect (intEqu.y, and6.u1) annotation (Line(points={{-38,10},{-30,10},{-30,-40},
187+ {-12,-40}},color={255,0,255}));
188+ connect (lat.y, yEnaHotWatIsoVal)
189+ annotation (Line(points={{166,140},{200,140}}, color={255,0,255}));
190+ connect (uUpsDevSta, edg.u) annotation (Line(points={{-180,-140},{-120,-140},{-120,
191+ 134},{98,134}}, color={255,0,255}));
192+ connect (edg.y, lat.clr)
193+ annotation (Line(points={{122,134},{142,134}}, color={255,0,255}));
194+ connect (mulAnd1.y, edg2.u) annotation (Line(points={{102,220},{132,220},{132,212}},
195+ color={255,0,255}));
196+ connect (edg2.y, lat.u) annotation (Line(points={{132,188},{132,140},{142,140}},
197+ color={255,0,255}));
198+ connect (uUpsDevSta, mulAnd1.u[1 ]) annotation (Line(points={{-180,-140},{-120,-140},
199+ {-120,134},{68,134},{68,212},{70,212},{70,220},{78,220}}, color
200+ ={255,0,255}));
201+ connect (or2.y, mulAnd1.u[2 :nBoi+ 1 ]) annotation (Line(points={{62,220},{70,220},{70,
202+ 220},{78,220}}, color={255,0,255}));
203+ connect (uHotWatIsoVal, or1.u2) annotation (Line(points={{-180,-100},{110,-100},
204+ {110,-48},{118,-48}}, color={255,0,255}));
205+ connect (or1.y, yHotWatIsoVal) annotation (Line(points={{142,-40},{170,-40},{170,
206+ 0},{200,0}}, color={255,0,255}));
207+ connect (or3.y, and1.u1)
208+ annotation (Line(points={{52,40},{70,40}}, color={255,0,255}));
209+ connect (uHotWatIsoVal, and1.u2) annotation (Line(points={{-180,-100},{60,-100},
210+ {60,32},{70,32}}, color={255,0,255}));
211+ connect (and1.y, yHotWatIsoVal) annotation (Line(points={{94,40},{168,40},{168,
212+ 0},{200,0}}, color={255,0,255}));
203213annotation (
204214 defaultComponentName="hotWatIsoVal" ,
205215 Diagram(
0 commit comments