Reputation: 53
I am working on a capstone project using Optaplanner 6.2.0.CR4
and Drools
to incrementally score the solution. The problem is pretty similar to Optaplanner's Nurse Rostering example
, with a little added complexity. I was wondering if there were any common pitfalls that can slow down Drools that I could look for in my code. The solver runs the Construction Phase
pretty quickly, but hits a wall when it gets to the local search phase
. Drools is inserting a lot of additional stuff like counting work days per pay period, blocks of specific duration free time per pay period, etc and I'm thinking the way I wrote the rules might be the problem.
Upvotes: 1
Views: 350
Reputation: 27327
See docs "Score performance tricks". Especially keep an eye out on your "average score calculation count per second". It should be above 1000
, preferably above 10000
.
Use the OptaPlanner benchmarker. It will be your best friend in this endevour, thrust me :)
Note: Ask yourself: What do you mean with "faster"? Do you want better results in the same time? Do you want the same results faster? And/Or do you want to scale out more? There might be trade-off choices to make there - use the OptaPlanner Benchmarker to see the pure gains on all 3 fronts, but also to visualize trade-offs between those 3 fronts.
Upvotes: 1