Given that sA, eA, dB are start time, end time and duration of event A, we have, for any two events, the interval [s,e] containing both defined by:<br>   s = min( sA, sB )<br>   e = max( eA, eB ) = max( sA+dA, sB+dB )<br><br>
Thus, the condition for A and B happening withing an interval of duration D is:<br>  e - s &lt;= D<br><br>You can put this expression into an eval() CE.<br><br>-W<br><br><br><div class="gmail_quote">On 13 January 2011 15:45, Tina Vießmann <span dir="ltr">&lt;<a href="mailto:tviessmann@stud.hs-bremen.de">tviessmann@stud.hs-bremen.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
I&#39;m trying to find a easy way to express that two events A and B have to<br>
happen during the same time interval. The events  have each a duration &gt;<br>
0.<br>
<br>
A example condition could be: The event A and B have to happen during the<br>
same 60 seconds.<br>
For me it includes several possibilites:<br>
 * A can start before B and<br>
     ~ end before B starts<br>
     ~ end during B<br>
     ~ end after B ends<br>
 * The same can be possible for B<br>
 * A and B start/end/both at the same time<br>
In any case the maximum duration from the first start time to the last end<br>
time is e.g. 60s.<br>
<br>
Is there a easy way to express that. I can only think of specifying the<br>
several possibilities as conditions.<br>
<br>
Thank you! :)<br>
Tina<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>