Decision Optimization

Decision Optimization

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

 View Only
  • 1.  CPLEX 20.1 and 22.1 running slower than CPLEX 12.8 for multiple MILP instances

    Posted Tue May 16, 2023 09:09 AM

    We have been using CPLEX 12.8. Now we want to upgrade to later versions. Our tests with multiple MILP instances show that CPLEX 12.8 is faster (solution time) than both 20.1 and 22.1 versions. We also tried different parameter settings but did not get any solution.

    One such MILP in .lp format is attached along with the related log files. Need some insights on this. We also reported the issue to IBM ILOG support and they can reproduce the issue but we have not received any resolution yet.



    ------------------------------
    Hamidur Rahman
    ------------------------------


  • 2.  RE: CPLEX 20.1 and 22.1 running slower than CPLEX 12.8 for multiple MILP instances

    Posted Tue May 16, 2023 04:15 PM

    The first thing to note is that when IBM develops a new version of CPLEX, they test it on a wide range of problems. Typically the new release is faster overall (so presumably on the majority of problems), but there is no guarantee that it is faster on every problem.

    The second thing to note is that your sample problem generates thousands (!) of warnings due to the presence of duplicate constraints (same name, same left and right side). While CPLEX winnows those out, it may be a sign of other problems. I would advise that you check the code that generates the model.

    The third thing is that CPLEX by default makes some decisions randomly, and I believe the default random number seed changes with each version. So you might want to try running the old and new versions on the same problem setting the same random seed value and see if the older version is still faster.

    The fourth thing is that if you set the CPLEX data check parameter to 2 before reading and running the model, it reports that some constraints have coefficients that are very close to rational values. A sample message is "Decimal part of coefficients in constraint 'mult1_x_tanque07a_42_33001691!28!2_pct_tanque07a_42_33001691!28!2' are fractions and can be scaled with 29/1." If you rescale those constraints in the code generating the model, it might possibly make a difference.



    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 3.  RE: CPLEX 20.1 and 22.1 running slower than CPLEX 12.8 for multiple MILP instances

    Posted Thu May 18, 2023 01:17 AM
    Edited by Hamidur Rahman Thu May 18, 2023 05:37 AM

    Hi Professor Paul,

    Thank you so very much for your comments and suggestions. Changing the number of random seed to earlier version improves the run time for the latest versions for a couple of instances only.
    For most of the other instances changing the random seed is not helping. One instance I am uploading (oss702.lp).

    Just curious to know why this random seed number makes so much difference in run time.

    Regards
    Hamidur Rahman
    Blue Yonder Inc.



    ------------------------------
    Hamidur Rahman
    ------------------------------



  • 4.  RE: CPLEX 20.1 and 22.1 running slower than CPLEX 12.8 for multiple MILP instances

    Posted Thu May 18, 2023 12:05 PM

    I don't know all the places where CPLEX may use random numbers (and I've forgotten much of what I did know), but I think that they are sometimes used to break ties when selecting the variable on which to pivot or branch and perhaps the constraint in which to pivot. Also, if CPLEX needs to perturb the right hand side to break up some problematic degeneracy, it may use a random number generator to introduce the perturbation. (This is all speculation on my part.)

    As a probably unhelpful side note, the order in which constraints and variables are specified in the model has been known to affect solution time. Since there is no way to determine at the outset what a "good" ordering would be, I think you just have to take your chances.



    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 5.  RE: CPLEX 20.1 and 22.1 running slower than CPLEX 12.8 for multiple MILP instances

    Posted Thu May 18, 2023 05:45 AM

    Uploaded the model (oss702.lp) and the log file. It can be seen that CPLEX 12.8 has random seed = 201709013 with solution time 8.67 seconds. On the other hand, with this random seed value for CPLEX 22.1, the run time is 19.24. We are getting similar results for other MILP instances also. Please suggest what we can do.

    Thanks



    ------------------------------
    Hamidur Rahman
    ------------------------------



  • 6.  RE: CPLEX 20.1 and 22.1 running slower than CPLEX 12.8 for multiple MILP instances

    Posted Thu May 18, 2023 12:40 PM

    What is happening is fairly clear from the log. With the older version of CPLEX, the presolved model has 12,106 rows / 60,147 columns / 1,504,272 nonzeros. With the newer version, it has 14,921 rows / 156,166 columns / 3,281,463 nonzeros. Going by the nonzero entries, the model being solved by the newer version is more than twice the size of the model being solved by the older version.

    I experimented with various presolve parameters, none of which reduced the model size. So I suspect there is nothing you can do about this (other than use the older version).



    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------



  • 7.  RE: CPLEX 20.1 and 22.1 running slower than CPLEX 12.8 for multiple MILP instances

    Posted Wed May 24, 2023 06:33 AM

    Hello, as Professor Rubin pointed out, there is a different presolved model.
    In 12.9 and 12.10, some bug fixes were done on the presolve code (see https://www.ibm.com/support/pages/ilog-cplex-optimization-studio-fix-list), and on your model, the effect seems to be a really slower presolved.
     
    I suggest you try running your model instances with preprocessing boundstrength disabled (see https://www.ibm.com/docs/en/cofz/12.10.0?topic=parameters-bound-strengthening-switch).
    It seems to me that this is what is consuming more time than with 12.8, not the fact that the presolved model is bigger?



    ------------------------------
    Vincent Beraudier
    ------------------------------