[rules-users] How to say that two events have to happen during the same time interval

Wolfgang Laun wolfgang.laun at gmail.com
Thu Jan 13 13:00:59 EST 2011


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:
   s = min( sA, sB )
   e = max( eA, eB ) = max( sA+dA, sB+dB )

Thus, the condition for A and B happening withing an interval of duration D
is:
  e - s <= D

You can put this expression into an eval() CE.

-W


On 13 January 2011 15:45, Tina Vießmann <tviessmann at stud.hs-bremen.de>wrote:

> Hi,
>
> I'm trying to find a easy way to express that two events A and B have to
> happen during the same time interval. The events  have each a duration >
> 0.
>
> A example condition could be: The event A and B have to happen during the
> same 60 seconds.
> For me it includes several possibilites:
>  * A can start before B and
>     ~ end before B starts
>     ~ end during B
>     ~ end after B ends
>  * The same can be possible for B
>  * A and B start/end/both at the same time
> In any case the maximum duration from the first start time to the last end
> time is e.g. 60s.
>
> Is there a easy way to express that. I can only think of specifying the
> several possibilities as conditions.
>
> Thank you! :)
> Tina
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110113/7a720c76/attachment.html 


More information about the rules-users mailing list