@@ -10,10 +10,11 @@ block Latch
1010 IBPSA.Controls.OBC.CDL.Interfaces.BooleanOutput y
1111 "Output with latched signal"
1212 annotation (Placement(transformation(extent={{100,-20},{140,20}})));
13+
14+ initial equation
15+ y = not clr and u;
1316equation
14- when initial () then
15- y= not clr and u;
16- elsewhen {clr, u} then
17+ when {clr, u} then
1718 y= not clr and u;
1819 end when ;
1920 annotation (
@@ -118,6 +119,11 @@ At initial time, if <code>clr = false</code>, then the output will be
118119 revisions="<html>
119120<ul>
120121<li>
122+ November 3, 2025, by Michael Wetter:<br/>
123+ Reformulated initialization to enable translation of system model with this block in OpenModelica.<br/>
124+ This is for <a href=\" https://github.com/ibpsa/modelica-ibpsa/issues/2064\">IBPSA, issue 2064</a>.
125+ </li>
126+ <li>
121127April 15, 2024, by Antoine Gautier:<br/>
122128Simplified the implementation.<br/>
123129This is for <a href=\" https://github.com/lbl-srg/modelica-buildings/issues/3796\">Buildings, issue 3796</a>.
@@ -135,7 +141,7 @@ Simplified implementation, and made model work with OpenModelica.
135141<li>
136142April 4, 2019, by Jianjun Hu:<br/>
137143Corrected implementation that causes wrong output at initial stage.
138- This is for <a href=\" https://github.com/ibpsa /modelica-ibpsa /issues/1402\">Buildings, issue 1402</a>.
144+ This is for <a href=\" https://github.com/lbl-srg /modelica-buildings /issues/1402\">Buildings, issue 1402</a>.
139145</li>
140146<li>
141147December 1, 2017, by Michael Wetter:<br/>
0 commit comments