Decision Optimization

Decision Optimization

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

 View Only
  • 1.  absmipgap

    Posted Fri December 22, 2017 08:46 AM

    Originally posted by: cenxiaoli


     Hello all;

    To instruct the cplex to stop when the absmipgap falls to 1e-8 in solving a nonconvex MIQP, I set the following parameters:

    mip.tolerances.mipgap=0;        opt.mip.tolerances.absmipgap=1e-8;   but  why the cplex stops when the mipgap reached 0.12%?  It seems the absmipgap did not work though I set  specific absmipgap value.  If I  only need absmipgap or only need mipgap, than how I should set the two parameter values.

    thanks.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: absmipgap

    Posted Wed December 27, 2017 01:10 AM

    What is the absolute MIP gap when CPLEX stops? It is below 1e-8?

    Note that CPLEX will stop as soon as any stopping criterion is satisfied (it does not require all criteria to be satisfied). If you only want to stop on one of the gap criteria then you have to set the other gap criterion to 0 (so that this criterion is basically never met or only met with a fully enumerated tree).


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: absmipgap

    Posted Wed December 27, 2017 08:17 PM

    Originally posted by: cenxiaoli


    Thank you for the anwer.  
      I solve the nonconvex MIQP (dimension is 500) by CPLEX 12.61 with MATLAB R2016a interface.  The output log on the screen is just the mipgap, no absolute MIP gap.  
    the parameters I set as follows: 
    opt =cplexoptimset('cplex'); 
    opt.display = 'on'; 
    opt.solutiontarget=3;                 
    opt.mip.tolerances.mipgap=0;       
    opt.mip.tolerances.absmipgap=1e-8;   
    opt.mip.interval=1;
    I don't know how to set paramer to display the absolute MIP gap, could you tell me?  But I think,if I set absmipgap=1e-8 and mipgap=0,
    the mipgap falls to 0.79% when cplex stops, then the absmipgap should not falls below 1e-8.   Could it be realtive to my problem? 
    In addition, the output log
            Nodes                                         Cuts/
       Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

    *     0+    0                            0.0000     -130.7781              --- 
    *     0     0      integral     0     -123.0721     -128.3486        0    4.29%
          0     2     -128.3486     0     -123.0721     -128.3486        0    4.29%
    Elapsed time = 0.17 sec. (107.09 ticks, tree = 0.00 MB, solutions = 2)
          3     5     -126.9953     0     -123.0721     -127.1995       16    3.35%
         13     7    infeasible           -123.0721     -124.4067      187    1.08%
         17     7     -123.7802     0     -123.0721     -124.4067      195    1.08%
         18     6    infeasible           -123.0721     -124.4067      195    1.08%
         19     7     -123.1531     0     -123.0721     -124.0954      199    0.83%
         20     8     -124.0423     0     -123.0721     -124.0954      201    0.83%
    Elapsed time = 0.22 sec. (119.98 ticks, tree = 0.00 MB, solutions = 11)
         21     7    infeasible           -123.0721     -124.0954      201    0.83%
         23     5    infeasible           -123.0721     -124.0423      201    0.79%

    Root node processing (before b&c):
      Real time             =    0.17 sec. (106.79 ticks)
    Parallel b&c, 4 threads:
      Real time             =    0.52 sec. (184.88 ticks)
      Sync time (average)   =    0.36 sec.
      Wait time (average)   =    0.37 sec.
                              ------------
    Total (root+branch&cut) =    0.69 sec. (291.66 ticks)

    output = 

              cplexstatus: 101
        cplexstatusstring: 'integer optimal solution'
               iterations: 259
                algorithm: 12
                     time: 0.6870
                  message: 'Function converged to a solution x.'

    thank you again.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: absmipgap

    Posted Thu December 28, 2017 05:31 AM

    And where do you see that CPLEX stopped with a non-zero MIP gap? The CPLEX status is 101, that should indicate an optimal solution with absolute and relative MIP gap 0.

    Note that the last log line

         23     5    infeasible           -123.0721     -124.0423      201    0.79%

    does not display the MIP gap with which CPLEX stopped.

    As you noticed, the final MIP gap is not returned if you use toolbox functions. If you want to have this information you have to use the class API and look at the Solution property after solve() returned.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: absmipgap

    Posted Sat February 03, 2018 09:26 AM

    Originally posted by: cenxiaoli


     

    Thank you, i know.  

          If  I solve an nonconvex quadratic problem using the cplex 12.7  cplexqp function  by setting  solutiontarget=3,  then the 

    relaxation problem  the algorithm  solves  in the processing  is  MIP or  continous problem?    Whether there is a problem of continuous relaxation?

         Besides ,  i  wonder  if   cplex 12.7  is  more  faster than  cplex 12.6 when sloving  the same  nonconvex  quadratic problem ?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: absmipgap

    Posted Mon February 05, 2018 12:44 AM


  • 7.  Re: absmipgap

    Posted Wed January 17, 2018 07:22 PM

    Originally posted by: cenxiaoli


    Thank you very much, I get it. 

        Besides, I want to set  the absolute constraint feasibility tolerance when solving a  problem, which parameter I should set ? 

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: absmipgap

    Posted Thu January 18, 2018 12:29 AM

    The feasibility tolerance is CPX_PARAM_EPRHS.


    #CPLEXOptimizers
    #DecisionOptimization