Menu

#3 Sequence Constraint is very slow

closed-invalid
nobody
None
5
2011-02-10
2011-02-04
Anonymous
No

I need to create a ordered list of variables. I tried to use the "Sequence" constraint, and found that it was much slower than a combined series of XltYs or XgtYs.

Please see the test code in the enlosed file.

Discussion

  • Nobody/Anonymous

     
  • Radoslaw Szymanek

    Hi,

    Please check JaCoP guide ( http://jacopguide.osolpro.com/guideJaCoP.html#x1-320001 ) to make sure that the Sequence constraint you are using is exactly what you want to get. Your post suggests that you may not know what the sequence constraint does.

    You are comparing two different problems. The model with Sequence constraint most likely does not have a solution thus it takes time to prove that no solution exists. The second model when you seem to be just interested in a sequence of sorted numbers is on the other hand very simple thus easy to find a solution.

    In your case you seem to be using Sequence constraint incorrectly.

    best,
    Radek

     
  • kris

    kris - 2011-02-10

    This is not a bug but wrong use of Sequence constraint.

     
  • kris

    kris - 2011-02-10
    • status: open --> closed-invalid