The rule starts by pairing each Employee with each Requirement and
so you have 1000*1000 = 1000000 nodes in the network. This is an
anti-pattern for counting pairs from a subset (1%) of all pairs.
To count Assignments with identical pairs of Employee and Requirements
you just look at Assignments. Ideally, Assignments has an attribute
that enumerates them (or some other unique comparable id - a simple
object counter will do). Then you start the rule with
Assignment( $e: employee, $r: requirement, $id: id)
not Assignment( employee == $e, requirement == $r, id < $id )
...accumulate...
Best
-W
On 20/11/2013, newbie <dspecialist18(a)yahoo.com> wrote:
My example was I have 1000 employees and 1000 requirement. Each
requirement
has duration of 10 months. The number of assignment therefore would be
number of months of requirment * number of requirement all in all 10000
assignments.
--
View this message in context:
http://drools.46999.n3.nabble.com/Java-Heap-Space-Out-of-Memory-tp4026825...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users