Skip to content

Commit

Permalink
corrected the duplicate protected statement
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed Dec 15, 2024
1 parent 16413e1 commit 6681f3d
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ protected
"End staging change"
annotation (Placement(transformation(extent={{240,50},{260,70}})));

CDL.Logical.Edge staChaSet1
Buildings.Controls.OBC.CDL.Logical.Edge staChaSet1
"Start changing the setpoint"
annotation (Placement(transformation(extent={{180,-450},{200,-430}})));
equation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,74 +162,74 @@ protected
equation
connect(nexEnaChi, intRep.u)
annotation (Line(points={{-220,200},{-162,200}}, color={255,127,0}));
connect(intRep.y,intEqu. u1)
connect(intRep.y, intEqu.u1)
annotation (Line(points={{-138,200},{-102,200}}, color={255,127,0}));
connect(uEnaChiWatIsoVal,and2. u2)
connect(uEnaChiWatIsoVal, and2.u2)
annotation (Line(points={{-220,110},{-170,110},{-170,132},{-162,132}},
color={255,0,255}));
connect(uStaDow, and2.u1)
annotation (Line(points={{-220,140},{-162,140}}, color={255,0,255}));
connect(and2.y,booRep. u)
connect(and2.y, booRep.u)
annotation (Line(points={{-138,140},{-102,140}}, color={255,0,255}));
connect(intEqu.y,and1. u1)
connect(intEqu.y, and1.u1)
annotation (Line(points={{-78,200},{-42,200}}, color={255,0,255}));
connect(booRep.y,and1. u2)
connect(booRep.y, and1.u2)
annotation (Line(points={{-78,140},{-70,140},{-70,192},{-42,192}},
color={255,0,255}));
connect(and1.y,logSwi. u2)
connect(and1.y, logSwi.u2)
annotation (Line(points={{-18,200},{98,200}}, color={255,0,255}));
connect(con.y,logSwi. u1)
connect(con.y, logSwi.u1)
annotation (Line(points={{-18,230},{0,230},{0,208},{98,208}}, color={255,0,255}));
connect(uChi,booToRea. u)
connect(uChi, booToRea.u)
annotation (Line(points={{-220,80},{-170,80},{-170,100},{-102,100}},
color={255,0,255}));
connect(and2.y,edg. u)
connect(and2.y, edg.u)
annotation (Line(points={{-138,140},{-120,140},{-120,70},{-102,70}},
color={255,0,255}));
connect(booToRea.y,triSam. u)
connect(booToRea.y, triSam.u)
annotation (Line(points={{-78,100},{-22,100}}, color={0,0,127}));
connect(edg.y,booRep1. u)
connect(edg.y, booRep1.u)
annotation (Line(points={{-78,70},{-62,70}}, color={255,0,255}));
connect(booRep1.y,triSam. trigger)
connect(booRep1.y, triSam.trigger)
annotation (Line(points={{-38,70},{-10,70},{-10,88}}, color={255,0,255}));
connect(triSam.y,greEquThr. u)
connect(triSam.y, greEquThr.u)
annotation (Line(points={{2,100},{18,100}}, color={0,0,127}));
connect(greEquThr.y,logSwi. u3)
connect(greEquThr.y, logSwi.u3)
annotation (Line(points={{42,100},{60,100},{60,192},{98,192}},
color={255,0,255}));
connect(and2.y,tim. u)
connect(and2.y, tim.u)
annotation (Line(points={{-138,140},{-120,140},{-120,0},{-102,0}},
color={255,0,255}));
connect(booRep2.y,and3. u1)
connect(booRep2.y, and3.u1)
annotation (Line(points={{2,0},{38,0}}, color={255,0,255}));
connect(and3.y,logSwi1. u2)
connect(and3.y, logSwi1.u2)
annotation (Line(points={{62,0},{80,0},{80,10},{98,10}},
color={255,0,255}));
connect(con1.y,logSwi1. u1)
connect(con1.y, logSwi1.u1)
annotation (Line(points={{62,30},{80,30},{80,18},{98,18}},
color={255,0,255}));
connect(uChi,logSwi1. u3)
connect(uChi, logSwi1.u3)
annotation (Line(points={{-220,80},{-170,80},{-170,-20},{90,-20},{90,2},
{98,2}}, color={255,0,255}));
connect(booRep3.y,logSwi2. u2)
connect(booRep3.y, logSwi2.u2)
annotation (Line(points={{102,50},{158,50}}, color={255,0,255}));
connect(logSwi1.y,logSwi2. u3)
connect(logSwi1.y, logSwi2.u3)
annotation (Line(points={{122,10},{140,10},{140,42},{158,42}},
color={255,0,255}));
connect(logSwi.y,logSwi2. u1)
connect(logSwi.y, logSwi2.u1)
annotation (Line(points={{122,200},{140,200},{140,58},{158,58}},
color={255,0,255}));
connect(conInt.y,intEqu. u2)
connect(conInt.y, intEqu.u2)
annotation (Line(points={{-138,170},{-110,170},{-110,192},{-102,192}},
color={255,127,0}));
connect(nexDisChi, intRep1.u)
annotation (Line(points={{-220,-80},{-162,-80}}, color={255,127,0}));
connect(intRep1.y,intEqu1. u1)
connect(intRep1.y, intEqu1.u1)
annotation (Line(points={{-138,-80},{-102,-80}}, color={255,127,0}));
connect(conInt.y,intEqu1. u2)
connect(conInt.y, intEqu1.u2)
annotation (Line(points={{-138,170},{-110,170},{-110,-88},{-102,-88}},
color={255,127,0}));
connect(intEqu1.y,and3. u2)
connect(intEqu1.y, and3.u2)
annotation (Line(points={{-78,-80},{10,-80},{10,-8},{38,-8}},
color={255,0,255}));
connect(not1.y, booRep3.u)
Expand Down Expand Up @@ -282,7 +282,7 @@ equation
annotation (Line(points={{122,-90},{140,-90},{140,-112},{158,-112}},
color={255,0,255}));
connect(booRep5.y, triSam1.trigger)
annotation (Line(points={{-98,-240},{-70,-240},{-70,-222}}, color={255,0,255}));
annotation (Line(points={{-98,-240},{-70,-240},{-70,-222}}, color={255,0,255}));
connect(booRep4.y, logSwi6.u2)
annotation (Line(points={{-138,-160},{0,-160},{0,-240},{98,-240}}, color={255,0,255}));
connect(logSwi3.y, logSwi6.u1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,67 +131,67 @@ protected
equation
connect(nexEnaChi, intRep.u)
annotation (Line(points={{-220,120},{-162,120}}, color={255,127,0}));
connect(intRep.y,intEqu. u1)
connect(intRep.y, intEqu.u1)
annotation (Line(points={{-138,120},{-102,120}}, color={255,127,0}));
connect(uEnaChiWatIsoVal,and2. u2)
annotation (Line(points={{-220,30},{-180,30},{-180,52},{-162,52}},
color={255,0,255}));
connect(uStaUp, and2.u1)
annotation (Line(points={{-220,60},{-162,60}}, color={255,0,255}));
connect(and2.y,booRep. u)
connect(and2.y, booRep.u)
annotation (Line(points={{-138,60},{-102,60}}, color={255,0,255}));
connect(intEqu.y,and1. u1)
connect(intEqu.y, and1.u1)
annotation (Line(points={{-78,120},{-42,120}}, color={255,0,255}));
connect(booRep.y,and1. u2)
connect(booRep.y, and1.u2)
annotation (Line(points={{-78,60},{-60,60},{-60,112},{-42,112}},
color={255,0,255}));
connect(and1.y,logSwi. u2)
connect(and1.y, logSwi.u2)
annotation (Line(points={{-18,120},{98,120}}, color={255,0,255}));
connect(con.y,logSwi. u1)
connect(con.y, logSwi.u1)
annotation (Line(points={{-18,150},{0,150},{0,128},{98,128}}, color={255,0,255}));
connect(uChi,booToRea. u)
connect(uChi, booToRea.u)
annotation (Line(points={{-220,0},{-162,0}}, color={255,0,255}));
connect(booToRea.y,triSam. u)
connect(booToRea.y, triSam.u)
annotation (Line(points={{-138,0},{-22,0}}, color={0,0,127}));
connect(edg.y,booRep1. u)
connect(edg.y, booRep1.u)
annotation (Line(points={{-78,-20},{-62,-20}}, color={255,0,255}));
connect(booRep1.y,triSam. trigger)
connect(booRep1.y, triSam.trigger)
annotation (Line(points={{-38,-20},{-10,-20},{-10,-12}}, color={255,0,255}));
connect(triSam.y,greEquThr. u)
connect(triSam.y, greEquThr.u)
annotation (Line(points={{2,0},{18,0}}, color={0,0,127}));
connect(and2.y,tim. u)
connect(and2.y, tim.u)
annotation (Line(points={{-138,60},{-120,60},{-120,-110},{-102,-110}},
color={255,0,255}));
connect(booRep2.y,and3. u1)
connect(booRep2.y, and3.u1)
annotation (Line(points={{2,-110},{38,-110}}, color={255,0,255}));
connect(and3.y,logSwi1. u2)
connect(and3.y, logSwi1.u2)
annotation (Line(points={{62,-110},{98,-110}}, color={255,0,255}));
connect(con1.y,logSwi1. u1)
connect(con1.y, logSwi1.u1)
annotation (Line(points={{62,-80},{80,-80},{80,-102},{98,-102}},
color={255,0,255}));
connect(uChi,logSwi1. u3)
connect(uChi, logSwi1.u3)
annotation (Line(points={{-220,0},{-180,0},{-180,-130},{80,-130},{80,-118},
{98,-118}}, color={255,0,255}));
connect(booRep3.y,logSwi2. u2)
connect(booRep3.y, logSwi2.u2)
annotation (Line(points={{102,-50},{158,-50}}, color={255,0,255}));
connect(uOnOff,not2. u)
connect(uOnOff, not2.u)
annotation (Line(points={{-220,-50},{-162,-50}}, color={255,0,255}));
connect(logSwi1.y,logSwi2. u3)
connect(logSwi1.y, logSwi2.u3)
annotation (Line(points={{122,-110},{140,-110},{140,-58},{158,-58}},
color={255,0,255}));
connect(logSwi.y,logSwi2. u1)
connect(logSwi.y, logSwi2.u1)
annotation (Line(points={{122,120},{140,120},{140,-42},{158,-42}},
color={255,0,255}));
connect(logSwi2.y,yChi)
annotation (Line(points={{182,-50},{220,-50}}, color={255,0,255}));
connect(not2.y,or2. u1)
connect(not2.y, or2.u1)
annotation (Line(points={{-138,-50},{38,-50}},color={255,0,255}));
connect(not1.y,or2. u2)
connect(not1.y, or2.u2)
annotation (Line(points={{2,-70},{20,-70},{20,-58},{38,-58}},
color={255,0,255}));
connect(or2.y,booRep3. u)
connect(or2.y, booRep3.u)
annotation (Line(points={{62,-50},{78,-50}},color={255,0,255}));
connect(conInt.y,intEqu. u2)
connect(conInt.y, intEqu.u2)
annotation (Line(points={{-138,90},{-110,90},{-110,112},{-102,112}},
color={255,127,0}));
connect(nexDisChi, intRep1.u)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ protected
Buildings.Controls.OBC.CDL.Integers.Sources.Constant dowSta3(
final k=1) "Stage one"
annotation (Placement(transformation(extent={{40,-90},{60,-70}})));
CDL.Integers.Switch intSwi2
"Logical switch"
Buildings.Controls.OBC.CDL.Integers.Switch intSwi2
"Logical switch"
annotation (Placement(transformation(extent={{120,-110},{140,-90}})));
Buildings.Controls.OBC.CDL.Logical.Sources.Constant staTwoChi3[2](
final k={true,true})
Expand All @@ -177,14 +177,13 @@ protected
Buildings.Controls.OBC.CDL.Logical.Sources.Constant endPro3(final k=true)
"Not in the process"
annotation (Placement(transformation(extent={{80,-310},{100,-290}})));

CDL.Logical.Not not3 "Logical not"
Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not"
annotation (Placement(transformation(extent={{-220,50},{-200,70}})));
CDL.Logical.Not not1 "Logical not"
Buildings.Controls.OBC.CDL.Logical.Not not1 "Logical not"
annotation (Placement(transformation(extent={{80,50},{100,70}})));
CDL.Logical.Not not2 "Logical not"
Buildings.Controls.OBC.CDL.Logical.Not not2 "Logical not"
annotation (Placement(transformation(extent={{-220,-270},{-200,-250}})));
CDL.Logical.Not not4 "Logical not"
Buildings.Controls.OBC.CDL.Logical.Not not4 "Logical not"
annotation (Placement(transformation(extent={{80,-270},{100,-250}})));
equation
connect(booPul.y, staUp.u)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,10 @@ protected
Buildings.Controls.OBC.CDL.Logical.And and3
"Logical and"
annotation (Placement(transformation(extent={{100,110},{120,130}})));

CDL.Logical.And and4
Buildings.Controls.OBC.CDL.Logical.And and4
"Logical and"
annotation (Placement(transformation(extent={{160,150},{180,170}})));

equation
connect(lat.y,chiDemRed.uDemLim)
annotation (Line(points={{-118,150},{-100,150},{-100,129},{-82,129}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ protected
Buildings.Controls.OBC.CDL.Integers.Change cha
"Check if there is stage change"
annotation (Placement(transformation(extent={{300,90},{320,110}})));

protected
Buildings.Controls.OBC.CDL.Logical.And and4
"Consider staging up only if stage down signal is not on"
annotation (Placement(transformation(extent={{-320,60},{-300,80}})));
Expand Down Expand Up @@ -240,7 +238,7 @@ equation
connect(triSam.y,switch2. u3) annotation (Line(points={{132,70},{140,70},{140,
192},{158,192}}, color={0,0,127}));
connect(uIni,intToRea2. u) annotation (Line(points={{-460,240},{-42,240}},
color={255,127,0}));
color={255,127,0}));
connect(intToRea2.y,switch2. u1) annotation (Line(points={{-18,240},{140,240},
{140,208},{158,208}}, color={0,0,127}));
connect(tim.y,lesEquThr. u) annotation (Line(points={{-58,-230},{-42,-230}},
Expand Down Expand Up @@ -270,9 +268,9 @@ equation
connect(and6.y, edg1.u)
annotation (Line(points={{-158,-80},{-82,-80}},color={255,0,255}));
connect(uPla, booToRea.u) annotation (Line(points={{-460,170},{-420,170},{
-420,10},{58,10}}, color={255,0,255}));
-420,10},{58,10}}, color={255,0,255}));
connect(uPla, falEdg.u) annotation (Line(points={{-460,170},{-420,170},{-420,
-20},{-82,-20}}, color={255,0,255}));
-20},{-82,-20}}, color={255,0,255}));
connect(falEdg.y, or3.u1) annotation (Line(points={{-58,-20},{140,-20},{140,-50},
{158,-50}}, color={255,0,255}));
connect(uPla, edg.u)
Expand All @@ -295,9 +293,9 @@ equation
{-322,62}}, color={255,0,255}));
connect(and4.y, switch1.u2) annotation (Line(points={{-298,70},{-242,70}},
color={255,0,255}));
connect(conInt.y,intEqu. u1) annotation (Line(points={{202,-160},{238,-160}},
connect(conInt.y, intEqu.u1) annotation (Line(points={{202,-160},{238,-160}},
color={255,127,0}));
connect(intEqu.y,and5. u2) annotation (Line(points={{262,-160},{270,-160},{
connect(intEqu.y, and5.u2) annotation (Line(points={{262,-160},{270,-160},{
270,-138},{278,-138}}, color={255,0,255}));
connect(and5.y,logSwi1. u3) annotation (Line(points={{302,-130},{378,-130}},
color={255,0,255}));
Expand Down

0 comments on commit 6681f3d

Please sign in to comment.