Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Cplex gets stuck

    Posted Fri June 27, 2014 05:12 AM

    Originally posted by: XavierMora


    I'm rather new to Cplex. I'm trying to use it to solve certain MIP problems that tend to have many optimal solutions (hundreds or even thousands).

     

    Ideally I would like to get all optimal solutions. With this purpose, every time that an optimal solution is found I add a constraint that to stay away from it and I run again the solve procedure.

     

    The problem is that quite often Cplex gets stuck. After having found some solutions, say a hundred, there seems to be no activity. I implemented a MIPCallback that gives me some feedback, but it becomes silent after a number of solutions.

     

    Is there anything that I could do? Anybody having the same problem?

     

    I'm using version 12.5 for Java on MacOSX 10.9


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Cplex gets stuck

    Posted Fri June 27, 2014 06:55 AM

    First of all, if you really need to enumerate all solutions, then there are better ways to do that, see here.

    If you only want to get a large number of solutions then you may want to look at solution pools and the populate feature.

    An alternative to what you are doing would also be to use a lazy constraint callback. In such a callback you can record the solution and add a constraint cutting off that solution on the fly. That may or may not work better than resolving the problem always from scratch.

    Now for your actual problem: what do you mean "CPLEX is stuck"? No CPU activity? No more feasible solutions found? Do you still get log output? What happens if you increase the logging frequency by setting the MIPInterval parameter to 1? Does CPLEX still seem stuck with that?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Cplex gets stuck

    Posted Fri June 27, 2014 07:40 PM

    Originally posted by: XavierMora


    Thank you very much for your answer.

     

    The procedure that you refer to for getting all solutions doesn't seem to be suitable in my case, because the problem that I'm dealing with is a bit special: Properly speaking, it has a continuum of optimal solutions. However, the outcome that I'm interested in consists only of integer variables. In terms of the latter, optimality allows only for a finite number of possibilities. Another way to put it is that I have a problem where the variables are continuous but certain combinations of them are constrained to be integer, and I'm interested in these integer values. So, when I get an optimal solution I add a constraint to stay away from that particular integer combination and I look for a new optimal solution. I also impose the objective value to be the same that I already found…

     

    What do I mean by Cplex getting stuck?: There seems to be CPU activity, since the computer fan keeps running. I don' know how to check whether new feasible solutions are found. However, the  MIPCallback  that I implemented ceases to produce any feedback, and the log output becomes completely silent. The same happens when I set the MIPInterval parameter to 1 (by the way, it gets stuck after exactly the same number of solutions).

     

    A parameter that makes sometimes a difference is  NodeSelect.  For some particular data, setting this parameter to  2  or to  3  does the job. However, for other data it doesn't. This is very bad for me, because I prevents me from my aim of testing certain issues on a big set of  randomly generated data.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: Cplex gets stuck

    Posted Sat June 28, 2014 04:38 PM

    Originally posted by: XavierMora


    Now that I come to think of it, maybe it is this degeneracy, i.e. having a continuum of optima, what causes the problem. Could it be so?

    Here is a very simple example of the kind of problems that I'm dealing with:

    Minimize  (x1 + x2 - x3 - x4)^2

    under the constraints

    - x1,x2,x3,x4 >= 0

    - x1 + x3 = n1, an integer

    - x2 + x4 = n2, an integer

    - n1 + n2 = 2.

    The optimal solutions are:

    (x1, x2, x3, x4, n1, n2)  =  (1, 0, 1, 0, 2, 0)

    (x1, x2, x3, x4, n1, n2)  =  (0, 1, 0, 1, 0, 2)

    (x1, x2, x3, x4, n1, n2)  =  (a, 1-a, 1-a, a, 1, 1)  for any  a  satisfying  0 <= a <= 1.

    However, in this case there is no problem with Cplex getting stuck...

    #DecisionOptimization
    #MathematicalProgramming-General


  • 5.  Re: Cplex gets stuck

    Posted Tue August 05, 2014 02:33 AM

    Hm, it might be that CPLEX has hit a node with a very hard LP. Could you try to crank up the MIPDisplay parameter to its maximum value 5 and see if the log still gets stuck? Maybe also restrict the thread count to 1 (parameter Threads) and see if the problem persists.


    #DecisionOptimization
    #MathematicalProgramming-General