Re: [rules-users] Java Heap Space Out of Memory in Drools

2013-11-20 Thread Wolfgang Laun
The rule starts by pairing each Employee with each Requirement and
so you have 1000*1000 = 100 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 dspecialis...@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 1
 assignments.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Java-Heap-Space-Out-of-Memory-tp4026825p4026839.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Java Heap Space Out of Memory

2013-11-19 Thread Geoffrey De Smet

On 19-11-13 07:23, newbie wrote:
 I am currently using optaplanner 6.0.0.CR5, I have about 11000 planning
 entity objects and about 1000 planning variable objects. Would that be the
 cause of this problem?
By default, OptaPlanner uses selectors with cacheType=JIT, which can 
handle 50K entities with 5k values.
If you specifically specify cacheType=STEP|PHASE or use a custom 
MoveListFactory, look into using JIT or MoveIteratorFactory instead.

If that's not the case, what score calculation are you using?
What's the stacktrace?

Use a tool like VisualVM to find out what is causing the problem. See 
this comment:
   https://plus.google.com/+GeoffreyDeSmet/posts/fVAXfXXKB7n




 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Java-Heap-Space-Out-of-Memory-tp4026825.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Java Heap Space Out of Memory

2013-11-18 Thread newbie
I am currently using optaplanner 6.0.0.CR5, I have about 11000 planning
entity objects and about 1000 planning variable objects. Would that be the
cause of this problem?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Java-Heap-Space-Out-of-Memory-tp4026825.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users