• 1 reply
  • Latest Post - ‏2013-02-11T11:23:13Z by SystemAdmin
554 Posts

Pinned topic SearchPhases and Restart search

‏2013-02-08T17:58:36Z |
I am newly learning CP and CP Optimizer. I have a question about my understanding of the default Restart search in regards to the use of SearchPhases.

What I understand of the default search, the restart search, is that can restart the search (at some kind of time limit or number of failures) and try the variable assignments in a different order to perhaps eventually overcome conflict.

Looking at the SearchPhases, it says "This search phase forces the search to fix (instantiate) the decision variables from the array x before instantiating any other variable in the model."

During a Restart, does the SearchPhase again get executed as the first phase of the search before the other variables?

Given the scenario in which a variable assignment during the search phase is the cause of a later search failure, is it the case that Restarts will randomly assign variables before the given SearchPhase, or will the bad SearchPhase keep getting replayed?

I am thinking that SearchPhases can be both powerful but also dangerous. No? How does one truly know that the variables specified in a SearchPhase are indeed the best initial choices?

Thank you for any clarification and insight on this.
Updated on 2013-02-11T11:23:13Z at 2013-02-11T11:23:13Z by SystemAdmin
  • SystemAdmin
    554 Posts

    Re: SearchPhases and Restart search

    Yes, the search phases will be followed even in the restarts. The interest of search phases is precisely to constrain the decisions in the search because you know some structural properties of your model making that it is better to fix all variables in a subset X before fixing the ones in subset Y. So indeed, search phases can hurt if those underlying properties are not met.
    Note that if you are only interested in giving to the search some guidelines for finding a first feasible solution you can consider using the concept of "starting point" (See this section of the reference manual: CP Optimizer > CP Optimizer C++ API Reference Manual > Concepts > Starting point in CP Optimizer).