Topic
2 replies Latest Post - ‏2013-05-31T14:24:09Z by wyk
wyk
wyk
2 Posts
ACCEPTED ANSWER

Pinned topic Range consistency on the allDifferent constraint

‏2013-05-16T20:22:58Z |

Hi everyone,

I am trying to use CP Optimizer to achieve range (bound) consistency on the allDifferent constraint. I know that in Solver we can create the allDifferent constraint with the "whenRange" flag, but I can't figure out how this can be done in CP Optimizer. Thanks very much for your help!

Best,

Vincent

  • Philippe_Refalo
    Philippe_Refalo
    33 Posts
    ACCEPTED ANSWER

    Re: Range consistency on the allDifferent constraint

    ‏2013-05-21T07:20:39Z  in response to wyk

    Hi Vincent,

    In CP Optimizer the way to change the propagation level of every allDifferent constraint is to use  

    IloCP cp(env);

    cp.setParameter(IloCP::AllDiffInferenceLevel, IloCP::Medium)

    IloCP::Medium correspond to the whenRange propagation of Solver. IloCP::Extended correspond to the whenDomain propagation and IloCP::Basic or IloCP::Low to whenValue. Note that we no longer provide the possibility to change the inference level of a type of constraint one by one.

    Regards

    Philippe

     
    • wyk
      wyk
      2 Posts
      ACCEPTED ANSWER

      Re: Range consistency on the allDifferent constraint

      ‏2013-05-31T14:24:09Z  in response to Philippe_Refalo

      Hi Philippe,

      Thank you very much for the answer.

      Best,

      Vincent