Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Partial Fixing with Search Phases in CP Optimizer 2.3

  • 1.  Partial Fixing with Search Phases in CP Optimizer 2.3

    Posted Mon August 09, 2010 04:47 PM

    Originally posted by: SystemAdmin


    Dear forum,

    I have a particular model in which only a subset of variables must be fixed; for the remaining ones, I just desired to check the resulting propagated domains. I have also noticed that using the CP Optimizer automatic search (by means of SearchPhaseArray) is very effective to perform this desired labeling. However, the Search Phase mechanism always fixes all the model variables (as if a implicit Search Phase is added to the end of the array so that all variables are covered).

    Is it possible to use Search Phases and somehow declare that a number of variables should not be fixed?

    Thank you very much,
    Andre
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Partial Fixing with Search Phases in CP Optimizer 2.3

    Posted Tue August 10, 2010 11:40 AM

    Originally posted by: SystemAdmin


    Hello Andre.

    You're right, CP Optimizer automatically adds implicit search phase to fix all variables which are not fixed by the user specified search phase(s). In general, there is no way around this - automatic search always fixes all variables.

    If it is possible to remove these "secondary" variables from the model (without removing any important constraint) then you can do the solve in two phases: first you solve the problem with only "primary" variables. Then you create a second model with secondary variables and you use known solution to constraint primary variables. Then (in C++, I don't know about OPL) you can call IloCP::propagate(NULL) to reduce domains of the secondary variables without fixing them.

    You can also write your own search (again in C++) which doesn't fix all variables.

    Does it help?

    Petr
    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Partial Fixing with Search Phases in CP Optimizer 2.3

    Posted Fri August 13, 2010 09:57 AM

    Originally posted by: SystemAdmin


    Hello Petr,

    thanks a lot for the reply. Actually there are several important linking constraints between these two set of variables, so the best alternative was to implement my own search. Anyway, thanks again for the suggestions!

    Best,
    Andre
    #CPOptimizer
    #DecisionOptimization