title: How can I generate complex events in modelica for when statement?
body: <p>I tryed to use this code:</p>
  
  <pre><code>Real x,y;
  Boolean trigger(start = true) 
  when x &lt; y and trigger then
     trigger = false;
  end when;
  </code></pre>
  
  <p>I want to generate event for "when" only once. But my code doesn't work.
  How can I generate complex events in modelica for when statement?</p>