Hi Geoffrey,
Thanks for your answer. It is quite clear now :-)
You might look into all this and feel like it's black magic,
lowering your thrust in it.
My thrust in it is not lowering, to the contrary.
Bit by bit I start to understand the magic and it is getting less black ;-)
Thanks for all your advice.
Regards,
Michiel
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at
http://twitter.com/#!/Codessentials
________________________________
From: Geoffrey De Smet <ge0ffrey.spam(a)gmail.com
To: Rules
Users List <rules-users(a)lists.jboss.org>
Sent: Wednesday, January 30, 2013 11:10 AM
Subject: Re: [rules-users] Question about caching of MoveListFactory
Op 30-01-13 10:41, Michiel Vermandel schreef:
Hi,
Is it possible to use caching on a custom created MoveListFactory?
yes, use PHASE
caching.
I mean, I created a custom MoveListFactory and configured it like this:
<moveListFactory
<cacheType>PHASE</
<moveListFactoryClass>my.planner.solver.ProjectShiftFactory</moveListFactoryClass
</moveListFactory
I noticed that the createMoveList method is called upon every step.
Though, if I get things right, in the case that the step did not result in a better score,
the solution will not be cloned and thus (in my case) the
calling of the createMoveList in the next step will result in exactly the same list
containing the same object instances.
Cloning doesn't impact it either. The
working solution instance doesn't change: it's the best solution instance that
gets replaced by a clone, but the MoveListFactory is based on the working solution.
I think it would be OK if the createMoveListis only called when a better score is reached
and a cloneSolution will be executed (and thus my object instances get obsolete).
1) I hope my theory makes sense end if so my question is: can I cache the list on the
level as described?
yes, see above
2) One more question about steps: if a step does not result in a better score, what
happens then?
it's still taken, as it might lead out of a local optima.
See why hill climbing is bad and tabu search isn't.
http://docs.jboss.org/drools/release/5.5.0.Final/drools-planner-docs/html_single/index.html#d0e6264
- A new number of moves is launched up to the limit defined by minimalAcceptedSelection?
Looking though all possible moves doesn't scale with more than 100 entities * 100
values, so we look through a random subset of all moves (minimalAcceptedSelection)
But what is the difference with the previous step?
It always starts from a different solution: the step is always taken (even if it's
worse - in fact Sim Ann, Late acceptance and to lesser degree Tabu Search heavily need
this).
And it's uses a different random subset to evaluate
(minimalAcceptedSelection).
Is it the fact that a "different" solution with the same score will be used as
starting point of the new step (given that one uses tabu)?
You might look into all this and feel like it's black
magic,
lowering your thrust in it.
In that case, take a look at how many possible solutions your
problem has, to put things in perspective.
Usually it is: valueSize to the power entitySize. (docs on master
have numbers on this in the "use cases" section)
These planning problems are NP complete, which means that there's no
software on this planet which solves them optimally and scales.
Research competitions with real-world cases (roadef, ITC2007, ...)
clearly show that metaheuristics work best and most reliable,
heavily outperforming all other techniques (including human
planners).
>Thanks,
>Michiel
>
>-----------------
>http://www.codessentials.com - Your essential software, for
free!
>Follow us at
http://twitter.com/#!/Codessentials
>
>
>
>_______________________________________________
rules-users mailing list rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users