[rules-users] Fusion and open-ended intervals?

Greg Barton greg_barton at yahoo.com
Thu Apr 15 15:50:40 EDT 2010


The system I work on (sadly not drools based) at Southwest airlines is structured similarly to this. (The interval events are mutable, however.)  In my case the intervals describe the activity of aircraft at airports.  Events describing aircraft activity (leave gate, take off, land, enter gate) populate the interval start and end times, and an interval is considered active if the start time is populated but the end is still null.  Duration of the interval is managed by a heartbeat while it's active. (In drools maybe this could be handled by the session clock, but I'm not sure.  We do it by asserting a control object based on a timer and having rules fire off that.)

This allows for a decent amount of flexibility: individual tracking of aircraft activity, tracking of aggregate behavior, simple trend analysis of aggregate behavior, etc.  We're currently extending the system to use customer booking data to alert dispatchers of flight connection problems and their severity, which leverages the existing aircraft tracking.  

--- On Wed, 4/14/10, Barry Kaplan <groups1 at memelet.com> wrote:

> From: Barry Kaplan <groups1 at memelet.com>
> Subject: [rules-users] Fusion and open-ended intervals?
> To: rules-users at lists.jboss.org
> Date: Wednesday, April 14, 2010, 12:23 PM
> 
> A fusion design question:
> 
> I have events that represent intervals. Initially the
> intervals are
> open-ended (kind a like the current state of an entity).
> Other events are
> matched "during" the interval and correlated. At some point
> the interval
> will be closed (eg, a specific downtime interval is closed
> because the
> device is no online again). 
> 
> All the events in this system are immutable -- so if some
> property of an
> event changes, it is cloned and modified in working-memory.
> For the case of
> the interval events, initially the interval is inserted
> open-ended, and at
> some point later closed and then modified. 
> 
> This does not work with fusion however, since an event's
> duration is
> maintained by the fact-handle not the event itself. Hence a
> modify with a
> now closed interval (ie, a finite @duration) has no effect.
> I'm guessing the
> temporal values are maintained the handle to ensure stable
> values for the
> behaviors that trigger based on temporal values, which is
> reasonable.
> 
> So I'm looking for alternative designs. Some are:
>   1) Modeled the intervals as begin/end events, but
> that gets messy real
> fast (have to correlate 
>       the begin/end events somehow, can't
> use evaluators like 'includes' or
> 'during', etc). 
>   2) Retract the interval event when it is closed
> (this way closed intervals
> no longer correlate 
>       with other incoming events). But then
> we really have a manually
> maintained state machine
>       using only facts, and there can be no
> reasoning over a series these
> interval events.
>      (eg, 3 downtimes longer than 2
> minutes in the last hour).
> 
> Opinions?
> 
> -barry
> 
> -- 
> View this message in context: http://n3.nabble.com/Fusion-and-open-ended-intervals-tp719076p719076.html
> Sent from the Drools - User mailing list archive at
> Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 


      




More information about the rules-users mailing list