With kind regards,
Geoffrey De Smet
dmzpippo-drools(a)yahoo.it schreef:
Hi Geoffrey,
I'm developing the algorithm for Vehicle Routing Problem with Time Windows (written
by Gendreau Herz and Laporte). To do it I need a new type of scoring and I have developed
DOUBLE_SCORE (double hard and double soft).
If you wont I can send you this code.
Nice :) Did you copy from DefaultHardAndSoftScore? I recommend to do
that so the hashcode, equals etc are correct.
I don't know if we want a build-in HardAndSoftScore based doubles in
drools planner:
- doubles are inherently rounding-prone (try adding 0.09 and 0.01)
- BigDecimal is better, but slower
Don't let it stop you from using it yourself though :)
Feel free to make an issue anyway, so other can vote on it.
If there are enough votes I'll add it anyway.
All in all, the performance of the score doesn't matter that much.
Because even though it does impact performance to not use ints (like
3%), premature optimization is the root of all evil.
So use the score implementation which fits you best.
I write you because have a problem with solving time....
1) Do you have a StartingSolutionInitializer?
Take a look at CurriculumCourseStartingSolutionInitializer.
2) Are you using relativeSelection?
Those 2 are the 2 main ingredients for getting feasible solutions.
I'm testing this algorithm on Solomon's data set (100 nodes and 10-20 vehicle)
but the execution time of solver is very hight and often after one day not
end....(termination criteria is steps number).
There are twelve rules and the number of moves is #nodes*#Vehicle^2 but with
relativeSelection may decrease and I'm using Taboo Search.
I wont to ask you if for your experience the drools-solver can solve a problem of this
dimension.
It should definitly be able to get feasible solutions for this problem.
Avoid a "score trap" (see manual).
I prefer to use a time based termination criteria.
Turn the log level on info, you should see a step occur between 1 or 2
seconds. Lower your relativeSelection if a step takes more then 2 seconds.
I 'll implement absoluteSelection soon.
Try the benchmarker.
Soon the benchmarker will support a time VS bestscore graph
as you can see in my devoxx movie:
http://beta.parleys.com/#st=5&id=1714
regards
Marco Caminiti
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users