Topic
  • 2 replies
  • Latest Post - ‏2013-06-12T14:12:00Z by HWFN_Hossein_Hojabri
HWFN_Hossein_Hojabri
25 Posts

Pinned topic Variable Selection

‏2013-06-11T22:13:44Z |

Hi,

 

Is there any function to make CP branch on some variables first? Some of my variables are much more constrained than the rest, so I think this will be much faster if they are considered in CP first. Please correct me if I'm wrong. However, I don't have a value selection algorithm yet. So, what I want CP to do is not assign a value to a more constrained variable first. I just want it to branch on these variables first.

 

Thanks!

  • Philippe_Refalo
    Philippe_Refalo
    50 Posts

    Re: Variable Selection

    ‏2013-06-12T09:38:58Z  

    This is rather easy to do in CP Optimizer. If you are in C++, you need to specify a search phase when solving the problem. For instance

    cp.solve(IloSearchPhase(env, xArray)) 

    tells CP Optimizer to start instantiating variables in array xArray, the other variables will be instantiated afterwards if necessary. 

    This is the most basic use of search phases. You can specify several and define the way variables and values will be instantiated. Look at the chapter "Ordering variables and values" in the reference manual to see the possibilities.

    Philippe

  • HWFN_Hossein_Hojabri
    25 Posts

    Re: Variable Selection

    ‏2013-06-12T14:12:00Z  

    This is rather easy to do in CP Optimizer. If you are in C++, you need to specify a search phase when solving the problem. For instance

    cp.solve(IloSearchPhase(env, xArray)) 

    tells CP Optimizer to start instantiating variables in array xArray, the other variables will be instantiated afterwards if necessary. 

    This is the most basic use of search phases. You can specify several and define the way variables and values will be instantiated. Look at the chapter "Ordering variables and values" in the reference manual to see the possibilities.

    Philippe

    Thanks, I'll try it out!

     

    Hossein