Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1348 multiple fails in controls package in openmodelica #1370

41 changes: 17 additions & 24 deletions AixLib/Controls/HVACAgentBasedControl/Agents/ColdProducerAgent.mo
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public
rotation=0,
origin={-82,-154})));
Modelica.StateGraph.Step shutDown(
nOut=2, nIn=1)
nOut=1, nIn=1)
annotation (Placement(transformation(extent={{-56,-164},{-36,-144}})));
Modelica.StateGraph.Transition transition7( waitTime=0.1,
enableTimer=true)
Expand Down Expand Up @@ -196,7 +196,7 @@ equation
end if;

connect(newMessage.inPort, waiting.outPort[1]) annotation (Line(
points={{-96,-108},{-108,-108},{-108,-107.75},{-119.5,-107.75}},
points={{-96,-108},{-108,-108},{-108,-108.125},{-119.5,-108.125}},
color={0,0,0},
smooth=Smooth.None));
connect(newMessage.outPort, message.inPort[1]) annotation (Line(
Expand Down Expand Up @@ -249,7 +249,7 @@ equation
smooth=Smooth.None));
connect(sendProposal.outPort[1], transitionWithSignal1.inPort) annotation (
Line(
points={{96.5,96.3333},{104,96.3333},{104,68},{-114,68},{-114,30},{-80,30}},
points={{96.5,95.8333},{104,95.8333},{104,68},{-114,68},{-114,30},{-80,30}},
color={0,0,0},
smooth=Smooth.None));
connect(transitionWithSignal2.condition, booleanExpression2.y) annotation (
Expand All @@ -264,7 +264,7 @@ equation
color={0,0,0},
smooth=Smooth.None));
connect(message.outPort[1], transitionWithSignal.inPort) annotation (Line(
points={{-51.5,-107.75},{-48,-107.75},{-48,-86},{-132,-86},{-132,96},{-94,
points={{-51.5,-108.125},{-48,-108.125},{-48,-86},{-132,-86},{-132,96},{-94,
96}},
color={0,0,0},
smooth=Smooth.None));
Expand All @@ -278,7 +278,7 @@ equation
color={255,0,255},
smooth=Smooth.None));
connect(transitionWithSignal3.inPort, message.outPort[2]) annotation (Line(
points={{-80,-46},{-132,-46},{-132,-86},{-48,-86},{-48,-108.25},{-51.5,-108.25}},
points={{-80,-46},{-132,-46},{-132,-86},{-48,-86},{-48,-107.875},{-51.5,-107.875}},
color={0,0,0},
smooth=Smooth.None));

Expand Down Expand Up @@ -446,16 +446,15 @@ algorithm

equation
connect(transition2.outPort, sendConfirmation.inPort[1]) annotation (Line(
points={{3.5,30},{14,30},{14,30.5},{25,30.5}},
points={{3.5,30},{14,30},{14,29.75},{25,29.75}},
color={0,0,0},
smooth=Smooth.None));
connect(sendConfirmation.outPort[1], transition5.inPort) annotation (Line(
points={{46.5,30},{78,30}},
color={0,0,0},
smooth=Smooth.None));
connect(transition5.outPort, waiting.inPort[2]) annotation (Line(
points={{83.5,30},{104,30},{104,-172},{-148,-172},{-148,-107.75},{
-141,-107.75}},
points={{83.5,30},{104,30},{104,-172},{-148,-172},{-148,-108.125},{-141,-108.125}},
color={0,0,0},
smooth=Smooth.None));

Expand Down Expand Up @@ -490,32 +489,26 @@ equation
color={0,0,0},
smooth=Smooth.None));
connect(transition6.outPort, sendConfirmation.inPort[2]) annotation (Line(
points={{3.5,-16},{18,-16},{18,29.5},{25,29.5}},
points={{3.5,-16},{18,-16},{18,30.25},{25,30.25}},
color={0,0,0},
smooth=Smooth.None));
connect(transition4.outPort, waiting.inPort[1]) annotation (Line(
points={{93.5,-46},{104,-46},{104,-172},{-148,-172},{-148,-107.25},{
-141,-107.25}},
points={{93.5,-46},{104,-46},{104,-172},{-148,-172},{-148,-108.375},{-141,
-108.375}},
color={0,0,0},
smooth=Smooth.None));

connect(calcCapacity, calcCapacity) annotation (Line(
points={{-90,198},{-90,198},{-90,198}},
color={0,0,127},
smooth=Smooth.None));
connect(not2.u, OnOff_external) annotation (Line(points={{-185,-189},{
-188,-189},{-188,-190},{-192,-190},{-192,-110},{-200,-110}},
color={255,0,255}));
connect(Off.inPort, waiting.outPort[2]) annotation (Line(points={{-86,
-154},{-112,-154},{-112,-154},{-112,-108.25},{-119.5,-108.25}},
connect(Off.inPort, waiting.outPort[2]) annotation (Line(points={{-86,-154},{-112,
-154},{-112,-154},{-112,-107.875},{-119.5,-107.875}},
color={0,0,0}));
connect(Off.outPort, shutDown.inPort[1]) annotation (Line(points={{-80.5,-154},
{-57,-154}}, color={0,0,0}));
connect(shutDown.outPort[1], transition7.inPort) annotation (Line(points={{-35.5,
-153.75},{-28.75,-153.75},{-28.75,-154},{-20,-154}}, color={0,0,0}));
-154},{-28.75,-154},{-28.75,-154},{-20,-154}}, color={0,0,0}));
connect(transition7.outPort, waiting.inPort[3]) annotation (Line(points={{-14.5,
-154},{18,-154},{18,-172},{-148,-172},{-148,-108.25},{-141,
-108.25}},
-154},{18,-154},{18,-172},{-148,-172},{-148,-107.875},{-141,-107.875}},
color={0,0,0}));
connect(not2.y, and1.u1) annotation (Line(points={{-173.5,-189},{-124,
-189},{-124,-186},{-120,-186},{-120,-188},{-116,-188}},
Expand All @@ -527,12 +520,12 @@ equation
-196},{-124,-196},{-116,-196}},
color={255,0,255}));
connect(reset.inPort, sendProposal.outPort[3]) annotation (Line(
points={{14,-106},{120,-106},{120,95.6667},{96.5,95.6667}},
points={{14,-106},{120,-106},{120,96.1667},{96.5,96.1667}},
color={255,0,0},
pattern=LinePattern.Dot));
connect(reset.outPort, waiting.inPort[4]) annotation (Line(
points={{8.5,-106},{-14,-106},{-14,-126},{-142,-126},{-142,-114},{
-142,-108.75},{-141,-108.75}},
points={{8.5,-106},{-14,-106},{-14,-126},{-142,-126},{-142,-114},{-142,-107.625},
{-141,-107.625}},
color={255,0,0},
pattern=LinePattern.Dot));
connect(minCapacityInput, zeroOrderHold.u)
Expand Down
37 changes: 18 additions & 19 deletions AixLib/Controls/HVACAgentBasedControl/Agents/HeatProducerAgent.mo
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public
annotation (Placement(transformation(extent={{-100,-54},{-60,-14}}),
iconTransformation(extent={{-100,-54},{-60,-14}})));
Modelica.StateGraph.Step shutDown(
nOut=2, nIn=1)
nOut=1, nIn=1)
annotation (Placement(transformation(extent={{-42,-160},{-22,-140}})));
Modelica.StateGraph.TransitionWithSignal Off annotation (Placement(
transformation(
Expand Down Expand Up @@ -183,7 +183,7 @@ equation
end if;

connect(newMessage.inPort, waiting.outPort[1]) annotation (Line(
points={{-96,-108},{-108,-108},{-108,-107.75},{-119.5,-107.75}},
points={{-96,-108},{-108,-108},{-108,-108.125},{-119.5,-108.125}},
color={0,0,0},
smooth=Smooth.None));
connect(newMessage.outPort, message.inPort[1]) annotation (Line(
Expand Down Expand Up @@ -232,7 +232,7 @@ equation
smooth=Smooth.None));
connect(sendProposal.outPort[1], transitionWithSignal1.inPort) annotation (
Line(
points={{96.5,96.3333},{104,96.3333},{104,68},{-114,68},{-114,30},{-80,30}},
points={{96.5,95.8333},{104,95.8333},{104,68},{-114,68},{-114,30},{-80,30}},
color={0,0,0},
smooth=Smooth.None));
connect(transitionWithSignal2.condition, booleanExpression2.y) annotation (
Expand All @@ -247,7 +247,7 @@ equation
color={0,0,0},
smooth=Smooth.None));
connect(message.outPort[1], transitionWithSignal.inPort) annotation (Line(
points={{-51.5,-107.75},{-48,-107.75},{-48,-86},{-132,-86},{-132,96},{-94,
points={{-51.5,-108.125},{-48,-108.125},{-48,-86},{-132,-86},{-132,96},{-94,
96}},
color={0,0,0},
smooth=Smooth.None));
Expand All @@ -261,7 +261,7 @@ equation
color={255,0,255},
smooth=Smooth.None));
connect(transitionWithSignal3.inPort, message.outPort[2]) annotation (Line(
points={{-80,-46},{-132,-46},{-132,-86},{-48,-86},{-48,-108.25},{-51.5,-108.25}},
points={{-80,-46},{-132,-46},{-132,-86},{-48,-86},{-48,-107.875},{-51.5,-107.875}},
color={0,0,0},
smooth=Smooth.None));

Expand Down Expand Up @@ -424,16 +424,15 @@ algorithm
equation

connect(transition2.outPort, sendConfirmation.inPort[1]) annotation (Line(
points={{3.5,30},{14,30},{14,30.5},{25,30.5}},
points={{3.5,30},{14,30},{14,29.75},{25,29.75}},
color={0,0,0},
smooth=Smooth.None));
connect(sendConfirmation.outPort[1], transition5.inPort) annotation (Line(
points={{46.5,30},{62,30},{62,30},{78,30}},
color={0,0,0},
smooth=Smooth.None));
connect(transition5.outPort, waiting.inPort[2]) annotation (Line(
points={{83.5,30},{104,30},{104,-170},{-150,-170},{-150,-107.75},{
-141,-107.75}},
points={{83.5,30},{104,30},{104,-170},{-150,-170},{-150,-108.125},{-141,-108.125}},
color={0,0,0},
smooth=Smooth.None));

Expand All @@ -460,12 +459,12 @@ equation
color={0,0,0},
smooth=Smooth.None));
connect(transition6.outPort, sendConfirmation.inPort[2]) annotation (Line(
points={{3.5,-16},{18,-16},{18,29.5},{25,29.5}},
points={{3.5,-16},{18,-16},{18,30.25},{25,30.25}},
color={0,0,0},
smooth=Smooth.None));
connect(transition4.outPort, waiting.inPort[1]) annotation (Line(
points={{93.5,-46},{104,-46},{104,-170},{-150,-170},{-150,-107.25},{
-141,-107.25}},
points={{93.5,-46},{104,-46},{104,-170},{-150,-170},{-150,-108.375},{-141,
-108.375}},
color={0,0,0},
smooth=Smooth.None));

Expand All @@ -477,14 +476,14 @@ equation
-34},{-172,-177},{-169,-177}},
color={255,0,255}));
connect(Off.inPort, waiting.outPort[2]) annotation (Line(points={{-72,-150},{-82,
-150},{-110,-150},{-110,-108.25},{-119.5,-108.25}}, color={0,0,0}));
-150},{-110,-150},{-110,-107.875},{-119.5,-107.875}},
color={0,0,0}));
connect(shutDown.inPort[1], Off.outPort) annotation (Line(points={{-43,
-150},{-66.5,-150}}, color={0,0,0}));
connect(transition7.inPort, shutDown.outPort[1]) annotation (Line(points={{-6,
-150},{-21.5,-150},{-21.5,-149.75}}, color={0,0,0}));
connect(transition7.inPort, shutDown.outPort[1]) annotation (Line(points={{-6,-150},
{-21.5,-150},{-21.5,-150}}, color={0,0,0}));
connect(transition7.outPort, waiting.inPort[3]) annotation (Line(points={{-0.5,
-150},{24,-150},{24,-170},{-150,-170},{-150,-108.25},{-141,
-108.25}},
-150},{24,-150},{24,-170},{-150,-170},{-150,-107.875},{-141,-107.875}},
color={0,0,0}));
connect(and1.u2, booleanExpression4.y) annotation (Line(points={{-136,
-196},{-142,-196},{-142,-194},{-149,-194}},
Expand All @@ -496,13 +495,13 @@ equation
-190},{-104,-190},{-104,-174},{-104,-162},{-68,-162}},
color={255,0,255}));
connect(reset.inPort, sendProposal.outPort[3]) annotation (Line(
points={{54,-100},{90,-100},{120,-100},{120,95.6667},{96.5,95.6667}},
points={{54,-100},{90,-100},{120,-100},{120,96.1667},{96.5,96.1667}},
color={255,0,0},
pattern=LinePattern.Dot));

connect(reset.outPort, waiting.inPort[4]) annotation (Line(
points={{48.5,-100},{38,-100},{38,-100},{20,-100},{20,-130},{-146,
-130},{-146,-108.75},{-141,-108.75}},
points={{48.5,-100},{38,-100},{38,-100},{20,-100},{20,-130},{-146,-130},{-146,
-107.625},{-141,-107.625}},
color={255,0,0},
pattern=LinePattern.Dot));
connect(or1.y, or2.u2) annotation (Line(points={{125,-184},{125,-192},{132,-192}},
Expand Down
45 changes: 21 additions & 24 deletions AixLib/Controls/HVACAgentBasedControl/Agents/IntermediateAgent.mo
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ model IntermediateAgent
Modelica.Blocks.Logical.And and1
annotation (Placement(transformation(extent={{-150,-300},{-130,-280}})));
Modelica.StateGraph.Step shutDown(
nOut=2, nIn=1)
nOut=1, nIn=1)
annotation (Placement(transformation(extent={{-80,-274},{-60,-254}})));
Modelica.StateGraph.Transition transition9( waitTime=0.1,
enableTimer=true)
Expand All @@ -191,7 +191,7 @@ model IntermediateAgent
equation

connect(newMessage.inPort, waiting.outPort[1]) annotation (Line(
points={{-156,-136},{-140,-136},{-140,-243.75},{-167.5,-243.75}},
points={{-156,-136},{-140,-136},{-140,-244.125},{-167.5,-244.125}},
color={0,0,0},
smooth=Smooth.None));
connect(newMessage.outPort, message.inPort[1]) annotation (Line(
Expand Down Expand Up @@ -225,8 +225,8 @@ equation
smooth=Smooth.None));

connect(message.outPort[1], transitionWithSignal.inPort) annotation (Line(
points={{-157.5,-87.75},{-152,-87.75},{-152,-86},{-144,-86},{-144,-86},
{-132,-86},{-132,96},{-82,96}},
points={{-157.5,-88.125},{-152,-88.125},{-152,-86},{-144,-86},{-144,-86},{
-132,-86},{-132,96},{-82,96}},
color={0,0,0},
smooth=Smooth.None));

Expand All @@ -239,8 +239,8 @@ equation
color={255,0,255},
smooth=Smooth.None));
connect(transitionWithSignal3.inPort, message.outPort[2]) annotation (Line(
points={{-78,-228},{-132,-228},{-132,-86},{-152,-86},{-152,-88.25},{-157.5,
-88.25}},
points={{-78,-228},{-132,-228},{-132,-86},{-152,-86},{-152,-87.875},{-157.5,
-87.875}},
color={0,0,0},
smooth=Smooth.None));

Expand Down Expand Up @@ -358,14 +358,13 @@ algorithm
equation

connect(transition4.outPort, waiting.inPort[1]) annotation (Line(
points={{95.5,-228},{130,-228},{130,-280},{-192,-280},{-192,-243.2},{
-189,-243.2}},
points={{95.5,-228},{130,-228},{130,-280},{-192,-280},{-192,-244.4},{-189,
-244.4}},
color={0,0,0},
smooth=Smooth.None));

connect(sendCall.outPort[1], newMessage1.inPort) annotation (Line(
points={{94.5,96.25},{110,96.25},{110,60},{-122,60},{-122,40},{-112,
40}},
points={{94.5,95.875},{110,95.875},{110,60},{-122,60},{-122,40},{-112,40}},
color={0,0,0},
smooth=Smooth.None));
connect(newMessage1.outPort, check.inPort[1]) annotation (Line(
Expand All @@ -389,8 +388,8 @@ equation
color={0,0,0},
smooth=Smooth.None));
connect(sendInformation.outPort[1], newMessage2.inPort) annotation (Line(
points={{104.5,40.25},{110,40.25},{110,-16},{-124,-16},{-124,-40},{
-114,-40}},
points={{104.5,39.875},{110,39.875},{110,-16},{-124,-16},{-124,-40},{-114,
-40}},
color={0,0,0},
smooth=Smooth.None));
connect(newMessage2.outPort, check1.inPort[1]) annotation (Line(
Expand Down Expand Up @@ -445,8 +444,8 @@ equation
color={0,0,0},
smooth=Smooth.None));
connect(transition6.outPort, waiting.inPort[2]) annotation (Line(
points={{93.5,-108},{130,-108},{130,-280},{-192,-280},{-192,-243.6},{
-189,-243.6}},
points={{93.5,-108},{130,-108},{130,-280},{-192,-280},{-192,-244.2},{-189,
-244.2}},
color={0,0,0},
smooth=Smooth.None));
connect(newMessage1.condition, integerChange.y) annotation (Line(
Expand Down Expand Up @@ -498,39 +497,37 @@ equation
color={255,0,255},
smooth=Smooth.None));
connect(reset.inPort, sendCall.outPort[2]) annotation (Line(
points={{-32,-160},{36,-160},{124,-160},{124,94},{124,95.75},{94.5,
95.75}},
points={{-32,-160},{36,-160},{124,-160},{124,94},{124,96.125},{94.5,96.125}},
color={255,0,0},
pattern=LinePattern.Dot));
connect(sendInformation.outPort[2], reset1.inPort) annotation (Line(
points={{104.5,39.75},{124,39.75},{124,-180},{8,-180}},
points={{104.5,40.125},{124,40.125},{124,-180},{8,-180}},
color={255,0,0},
pattern=LinePattern.Dot));
connect(reset.outPort, waiting.inPort[3]) annotation (Line(
points={{-37.5,-160},{-106,-160},{-192,-160},{-192,-244},{-189,-244}},
color={255,0,0},
pattern=LinePattern.Dot));
connect(reset1.outPort, waiting.inPort[4]) annotation (Line(
points={{2.5,-180},{-80,-180},{-192,-180},{-192,-244.4},{-189,-244.4}},
points={{2.5,-180},{-80,-180},{-192,-180},{-192,-243.8},{-189,-243.8}},
color={255,0,0},
pattern=LinePattern.Dot));
connect(and1.u2, booleanExpression2.y) annotation (Line(points={{-152,
-298},{-158,-298},{-158,-296},{-179,-296}},
color={255,0,255}));
connect(Off.inPort, waiting.outPort[2]) annotation (Line(points={{-120,
-264},{-164,-264},{-164,-244.25},{-167.5,-244.25}},
connect(Off.inPort, waiting.outPort[2]) annotation (Line(points={{-120,-264},{
-164,-264},{-164,-243.875},{-167.5,-243.875}},
color={0,0,0}));
connect(Off.outPort, shutDown.inPort[1]) annotation (Line(points={{-114.5,
-264},{-128,-264},{-81,-264}}, color={0,0,0}));
connect(shutDown.outPort[1], transition9.inPort) annotation (Line(points={{-59.5,
-263.75},{-52,-263.75},{-52,-264},{-46,-264}}, color={0,0,0}));
-264},{-52,-264},{-52,-264},{-46,-264}}, color={0,0,0}));
connect(and1.y, Off.condition) annotation (Line(points={{-129,-290},{-118,
-290},{-118,-276},{-116,-276}},
color={255,0,255}));
connect(transition9.outPort, waiting.inPort[5]) annotation (Line(points={{-40.5,
-264},{-26,-264},{-26,-280},{-192,-280},{-192,-244},{-190,-244},{
-190,-244.8},{-189,-244.8}},
color={0,0,0}));
-264},{-26,-264},{-26,-280},{-192,-280},{-192,-244},{-190,-244},{-190,
-243.6},{-189,-243.6}}, color={0,0,0}));
connect(OnOff_external, not2.u) annotation (Line(points={{-132,-144},{
-132,-190},{-196,-190},{-196,-287},{-173,-287}}, color={255,0,255}));
connect(not2.y, and1.u1) annotation (Line(points={{-161.5,-287},{-160,
Expand Down
Loading