[rules-users] Question on modeling facts

Brett Bergquist brett at thebergquistfamily.com
Tue May 3 15:20:52 EDT 2011


I am trying to write rules to distill down a minimal train schedule from a
set of overlapping train schedules.  A train schedule contains a train
identifier, a schedule that it runs on, and a set of train stops.   A rule
that I would like to write is to combine one or more train schedules if more
than one train runs on the same day (ie has the same schedule) and stops at
the same stops.  This ignores the train identifier and will discard all
other train schedules that have a different train identifier but have the
same schedule and stops.

I am wondering how to model the equality test for the same set of stops. 
Can I have my Train fact contain a collection of stops and then compare the
collections for equality?  Will this be efficient?  Is there a better way to
model this?

Any and all help will be greatly appreciated.

Brett


--
View this message in context: http://drools.46999.n3.nabble.com/Question-on-modeling-facts-tp2895595p2895595.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list