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

Tina Vießmann tviessmann at stud.hs-bremen.de
Thu Jan 13 14:27:15 EST 2011


Ok, I thought about using temporal operators. But I think using your 
eval()-condition would be more performance-friendly than several 
temporal operators.
I will think about your calculation. Thank you! :)

~Tina

> 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 
> <mailto: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 <mailto:rules-users at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> 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/c47bce44/attachment.html 


More information about the rules-users mailing list