Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

CPLEX returns infeasible solution

  • 1.  CPLEX returns infeasible solution

    Posted Tue October 22, 2013 08:13 AM

    Originally posted by: paddl


    Hello everybody,

    I have to solve a MIP with CPLEX. But the result is a solution, which is not feasible.

    I start CPLEX in a terminal and load an *.lp file. CPLEX can read the lp-file and optimize the problem.

    Note that I use the CPLEX default settings.

    *****

    CPLEX> read text.lp
    Problem 'text.lp' read.
    Read time = 0.03 sec. (0.65 ticks)
    CPLEX> opt
    Tried aggregator 14 times.
    MIP Presolve eliminated 5386 rows and 2082 columns.
    MIP Presolve modified 2034 coefficients.
    Aggregator did 530 substitutions.
    Reduced MIP has 796 rows, 660 columns, and 2584 nonzeros.
    Reduced MIP has 172 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Presolve time = 0.05 sec. (28.12 ticks)
    Found incumbent of value 166.800000 after 0.06 sec. (29.92 ticks)
    Probing fixed 10 vars, tightened 14 bounds.
    Probing time = 0.00 sec. (0.17 ticks)
    Tried aggregator 5 times.
    MIP Presolve eliminated 40 rows and 24 columns.
    MIP Presolve modified 36 coefficients.
    Aggregator did 24 substitutions.
    Reduced MIP has 732 rows, 612 columns, and 2364 nonzeros.
    Reduced MIP has 156 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Presolve time = 0.00 sec. (2.07 ticks)
    Probing time = 0.00 sec. (0.16 ticks)
    Clique table members: 128.
    MIP emphasis: balance optimality and feasibility.
    MIP search method: dynamic search.
    Parallel mode: deterministic, using up to 2 threads.
    Root relaxation solution time = 0.03 sec. (7.03 ticks)

            Nodes                                         Cuts/
       Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

    *     0+    0                          166.8000       68.8000      451   58.75%
    *     0+    0                          164.0000       68.8000      451   58.05%
          0     0        cutoff            164.0000      164.0000      451    0.00%

    Root node processing (before b&c):
      Real time             =    0.04 sec. (8.11 ticks)
    Parallel b&c, 2 threads:
      Real time             =    0.00 sec. (0.00 ticks)
      Sync time (average)   =    0.00 sec.
      Wait time (average)   =    0.00 sec.
                              ------------
    Total (root+branch&cut) =    0.04 sec. (8.11 ticks)

    Solution pool: 2 solutions saved.

    MIP - Integer optimal solution:  Objective =  1.6400000000e+02
    Solution time =    0.12 sec.  Iterations = 451  Nodes = 0
    Deterministic time = 40.50 ticks  (336.97 ticks/sec)
    ********************************************************************

    After optimization, I display some variables and a constraints. But the variables do not fulfil the constraint.

    **********************

    Display which constraint(s): c5141
     c5141: - q_2_12_12 + F_2_12_12 <= 0
    CPLEX> dis sol var
    Display values of which variable(s): q_2_12_12
    Incumbent solution
    Variable Name           Solution Value
    q_2_12_12                     0.400000
    CPLEX> dis sol var
    Display values of which variable(s): F_2_12_12
    Incumbent solution
    Variable Name           Solution Value
    F_2_12_12                     0.600000

    ******************************************

    Obviously. - q_2_12_12 + F_2_12_12 >= 0 and not - q_2_12_12 + F_2_12_12 <= 0.

    Can somebody give me a hint to fix the problem, please?

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX returns infeasible solution

    Posted Tue October 22, 2013 06:05 PM

    One possibility is that your problem is numerically unstable. In the interactive optimizer, before solving it, turn on collection of kappa statistics ('set m s k 2'). After solving the MIP, display the kappa statistics ('d so k') and see if you have any/many bases with poor condition numbers.

    Paul


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX returns infeasible solution

    Posted Wed October 23, 2013 05:49 AM

    Originally posted by: paddl


    Hi Paul,

    thank you very much for your answer ;-)

    I try to display the quality of the basis and this are the results

    ****************************************

    CPLEX> dis sol k

    Branch-and-cut subproblem optimization:
    Max condition number:                    2.0816e+02
    Percentage (number) of stable bases:     100.00%   (2)
    Percentage (number) of suspicious bases:   0.00%   (0)
    Percentage (number) of unstable bases:     0.00%   (0)
    Percentage (number) of ill-posed bases:    0.00%   (0)
     

    The problem seems to be numerical stable or not?


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPLEX returns infeasible solution

    Posted Wed October 23, 2013 07:32 AM

    Originally posted by: T_O


    Which version of CPLEX are you using? Can you post your model? Can you try disabling repeated presolve (set pre rep 0)?

    Best regards,
    Thomas


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: CPLEX returns infeasible solution

    Posted Thu October 24, 2013 08:45 AM

    Originally posted by: paddl


    set pre rep 0 does not fix the problem :-(

    I use the the following CPLEX version:

    IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 12.5.0.0
     

    I have attached the problem test.lp

    Thank you very much

    Patrick

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: CPLEX returns infeasible solution

    Posted Thu October 24, 2013 09:02 AM

    Originally posted by: T_O


    Hmm, disabling presolving (set pre pre n) seems to solve the problem.

    I think, the cplex people will have to investigate this.

    Best regards,
    Thomas


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: CPLEX returns infeasible solution

    Posted Thu October 24, 2013 09:17 AM

    Originally posted by: paddl


    Thank you very much.

    Now I works :-)


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: CPLEX returns infeasible solution

    Posted Thu October 31, 2013 05:21 AM

    We have identified the issue. Disabling presolve will indeed work around the problem but may also increase solving times. There is a slightly better workaround. If you are interested in this please send me a message to daniel(dot)junglas(at)de(dot)ibm(dot)com.


    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: CPLEX returns infeasible solution

    Posted Thu September 04, 2014 06:47 PM

    Originally posted by: volneids (UniSoma)


    Hi Daniel,

    I'm also interested in the alternate "slightly better" workaround to this problem. I've faced similar situation with CPLEX retrieving negative values for non-negative variables.

    In my case, the problem appears when I run from DOC/OPL, in a FeasOpt-active situation. I mean: there are some violated contraints (requirements), but the final result should never have these negative variables since "relaxationlevel" is set to "labeledconstraints".

    Thanks in advance.


    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: CPLEX returns infeasible solution

    Posted Mon September 15, 2014 10:07 AM

    What version of CPLEX are you using? It might be a better idea to upgrade to the latest version (12.6.0.1) since the bug identified above should be fixed in that version.


    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: CPLEX returns infeasible solution

    Posted Mon September 15, 2014 02:28 PM

    Originally posted by: volneids (UniSoma)


    Hi Daniel,

    Indeed, the situation happens with CPLEX in ODME 3.7, but with FixPack 2 it seems to be solved. I've migrated to that version already.

    Thank you for your response.


    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: CPLEX returns infeasible solution

    Posted Thu October 24, 2013 03:13 PM

    CPLEX 12.5.1.0 gets an incorrect answer with default settings but an apparently correct answer if presolve bound strengthening is suppressed (set pre bo 0). I'm not sure, but I think there might have been a previously identified bug in bound strengthening. In any case, I agree that this is for the CPLEX gurus to fix.

    Paul


    #CPLEXOptimizers
    #DecisionOptimization


  • 13.  Re: CPLEX returns infeasible solution

    Posted Tue October 29, 2013 10:11 AM

    I have reproduced the problem here and at first glance it looks like a problem in CPLEX.

    We are investigating and will come back once we know what is going on.


    #CPLEXOptimizers
    #DecisionOptimization


  • 14.  Re: CPLEX returns infeasible solution

    Posted Wed October 23, 2013 10:13 PM

    The output indicates that there should be no numerical problems. What do you get when you display solution quality (di so qu)?


    #CPLEXOptimizers
    #DecisionOptimization


  • 15.  Re: CPLEX returns infeasible solution

    Posted Thu October 24, 2013 08:40 AM

    Originally posted by: paddl


    This are the results for the solution quality.

    CPLEX> dis sol qu
    Incumbent solution:
    MILP objective                                 1.6400000000e+02
    MILP solution norm |x| (Total, Max)            3.49800e+02  1.00000e+00
    MILP solution error (Ax=b) (Total, Max)        2.84772e-14  2.22045e-16
    MILP x bound error (Total, Max)                1.54321e-14  9.99201e-16
    MILP x integrality error (Total, Max)          0.00000e+00  0.00000e+00
    MILP slack bound error (Total, Max)            4.00000e-01  2.00000e-01
     


    #CPLEXOptimizers
    #DecisionOptimization