[rules-users] planner: when gets a solution cloned?

Michiel Vermandel mvermand at yahoo.com
Thu Feb 28 03:15:30 EST 2013


>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.
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 at gmail.com>
To: Rules Users List <rules-users at 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 at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130228/642d9a75/attachment-0001.html 


More information about the rules-users mailing list