Skip to content

Commit

Permalink
Maint 8.1.x issue3016 text and graphic errors (#3019)
Browse files Browse the repository at this point in the history
* checked out files under OBC from issue3016

* release notes
  • Loading branch information
hcasperfu authored May 18, 2022
1 parent ea4944f commit f99748a
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 20 deletions.
10 changes: 8 additions & 2 deletions Buildings/Controls/OBC/CDL/Conversions/BooleanToInteger.mo
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ equation
Documentation(
info="<html>
<p>
Block that outputs the <code>Boolean</code>
equivalent of the <code>Integer</code> input.
Block that outputs the <code>Integer</code>
equivalent of the <code>Boolean</code> input.
</p>
<pre>
y = if u then integerTrue else integerFalse;
Expand All @@ -38,6 +38,12 @@ and <code>integerTrue</code> and <code>integerFalse</code> are parameters.
revisions="<html>
<ul>
<li>
May 17, 2022, by Hongxiang Fu:<br/>
Corrected documentation texts where the variables were described with wrong types.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3016\">#3016</a>.
</li>
<li>
January 3, 2017, by Michael Wetter:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down
18 changes: 12 additions & 6 deletions Buildings/Controls/OBC/CDL/Conversions/BooleanToReal.mo
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ block BooleanToReal
"Connector of Boolean input signal"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Interfaces.RealOutput y
"Connector of Integer output signal"
"Connector of Real output signal"
annotation (Placement(transformation(extent={{100,-20},{140,20}})));

equation
Expand All @@ -23,21 +23,27 @@ equation
Documentation(
info="<html>
<p>
Block that outputs the <code>Boolean</code>
equivalent of the <code>Integer</code> input.
Block that outputs the <code>Real</code>
equivalent of the <code>Boolean</code> input.
</p>
<pre>
y = if u then integerTrue else integerFalse;
y = if u then realTrue else realFalse;
</pre>
<p>
where <code>u</code> is of <code>Boolean</code> and <code>y</code>
of <code>Integer</code> type,
and <code>integerTrue</code> and <code>integerFalse</code> are parameters.
of <code>Real</code> type,
and <code>realTrue</code> and <code>realFalse</code> are parameters.
</p>
</html>",
revisions="<html>
<ul>
<li>
May 17, 2022, by Hongxiang Fu:<br/>
Corrected documentation texts where the variables were described with wrong types.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3016\">#3016</a>.
</li>
<li>
April 10, 2017, by Jianjun Hu:<br/>
First implementation, based on the implementation of the
Modelica Standard Library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ within Buildings.Controls.OBC.CDL.Conversions.Validation;
model BooleanToInteger
"Validation model for the BooleanToInteger block"
Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt
"Block that convert Boolean to Integer signal"
"Block that converts Boolean to Integer signal"
annotation (Placement(transformation(extent={{30,-10},{50,10}})));
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul(
period=1)
"Generate output cyclic on and off"
"Generate cyclic on-and-off output"
annotation (Placement(transformation(extent={{-20,-10},{0,10}})));

equation
connect(booPul.y,booToInt.u)
annotation (Line(points={{1,0},{28,0},{28,0}},color={255,0,255}));
annotation (Line(points={{2,0},{28,0},{28,0}},color={255,0,255}));
annotation (
experiment(
StopTime=4.0,
Expand All @@ -30,7 +30,7 @@ Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger</a>.
<ul>
<li>
March 31, 2017, by Jianjun Hu:<br/>
First implementation..
First implementation.
</li>
</ul>
</html>"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ within Buildings.Controls.OBC.CDL.Conversions.Validation;
model BooleanToReal
"Validation model for the BooleanToReal block"
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea
"Block that convert Boolean to Real signal"
"Block that converts Boolean to Real signal"
annotation (Placement(transformation(extent={{30,-10},{50,10}})));
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul(
period=1)
"Generate output cyclic on and off"
"Generate cyclic on-and-off output"
annotation (Placement(transformation(extent={{-20,-10},{0,10}})));

equation
connect(booPul.y,booToRea.u)
annotation (Line(points={{1,0},{28,0},{28,0}},color={255,0,255}));
annotation (Line(points={{2,0},{28,0},{28,0}},color={255,0,255}));
annotation (
experiment(
StopTime=4.0,
Expand All @@ -30,7 +30,7 @@ Buildings.Controls.OBC.CDL.Conversions.BooleanToReal</a>.
<ul>
<li>
April 10, 2017, by Jianjun Hu:<br/>
First implementation..
First implementation.
</li>
</ul>
</html>"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ within Buildings.Controls.OBC.CDL.Conversions.Validation;
model IntegerToReal
"Validation model for the IntegerToReal block"
Buildings.Controls.OBC.CDL.Conversions.IntegerToReal intToRea
"Block that convert Integer to Real signal"
"Block that converts Integer to Real signal"
annotation (Placement(transformation(extent={{40,-10},{60,10}})));
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1(
duration=1,
Expand All @@ -20,11 +20,11 @@ model IntegerToReal

equation
connect(ramp1.y,round2.u)
annotation (Line(points={{-59,0},{-42,0}},color={0,0,127}));
annotation (Line(points={{-58,0},{-42,0}},color={0,0,127}));
connect(round2.y,reaToInt1.u)
annotation (Line(points={{-19,0},{-2,0}},color={0,0,127}));
annotation (Line(points={{-18,0},{-2,0}},color={0,0,127}));
connect(reaToInt1.y,intToRea.u)
annotation (Line(points={{21,0},{28,0},{28,0},{38,0}},color={255,127,0}));
annotation (Line(points={{22,0},{28,0},{28,0},{38,0}},color={255,127,0}));
annotation (
experiment(
StopTime=1.0,
Expand Down
11 changes: 11 additions & 0 deletions Buildings/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,17 @@ have been <b style=\"color:blue\">improved</b> in a
<b style=\"color:blue\">backward compatible</b> way:
</p>
<table class=\"releaseTable\" summary=\"summary\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
<tr><td colspan=\"2\"><b>Buildings.Controls</b>
</td>
</tr>
<tr><td valign=\"top\">Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger<br/>
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal<br/>
</td>
<td valign=\"top\">Corrected documentation texts where the variables were described with wrong types.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3016\">#3016</a>.
</td>
</tr>
<tr><td colspan=\"2\"><b>Buildings.Fluid</b>
</td>
</tr>
Expand Down

0 comments on commit f99748a

Please sign in to comment.