Op 28-02-13 09:15, Michiel Vermandel schreef:
>Why would you need to know that?

Well, if I understand everything correctly, a "Best-solution clone" is needed just to remember/represent that state of the solution.
It does not have to do anything anymore, therefor some data should not be copied and/or initialized upon cloning.
True, but that applies for the other cloning events too (at least the ones initiated by Planner).
In the 6.0 docs, the term "clone" has been replace by the term "planning clone",
and it's expectations have been explained.
See 4.3.5.6. Cloning a Solution.
  https://hudson.jboss.org/hudson/view/Drools%20jBPM/job/drools-planner/lastSuccessfulBuild/artifact/drools-planner-docs/target/docbook/publish/en-US/html_single/index.html#d0e2680


It might be "not optimal" design that drives me to initializing stuff upon cloning, but anyway I think there might be more scenarios where it is useful to know if the solution object is the working solution or a best solution.
Right?

Regards,

Michiel
 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials

From: Geoffrey De Smet <ge0ffrey.spam@gmail.com>
To: Rules Users List <rules-users@lists.jboss.org>
Sent: Thursday, February 28, 2013 8:28 AM
Subject: Re: [rules-users] planner: when gets a solution cloned?


Op 27-02-13 19:50, Michiel Vermandel schreef:
Hi,

I think a planning solution gets cloned in two different scenarios:
1) a better solution is found
2) the solver propagates from one solving phase to another.

Is this right?
Currently this is right IIRC. But mix in multi-threading for 6.1 or 6.2 and there will be more cases of cloning.

If so, how do I know (inside the cloneSolution() method) if the clone is intended for a best-solution or a new working-solution?
Why would you need to know that? Would it alter your cloning behavior somehow?

It's probably hackable through BestSolutionRecaller, but it will give you a hard time when upgrading to 6.0 if you do hack it there.

Thanks

Michiel

 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials


_______________________________________________
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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users