Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Different solution from C++ and interactive optimizer

    Posted 05/07/15 10:31 AM

    Originally posted by: Chenxi


    In my first step, the solution from C++ and interactive optimizer are totally the same, but in the second one(KKT with big M method), the result is quite different, they use the same lp file generated by C++ and all parameters are set to default.  I have no idea why it is, it seems the presolving step is somewhat different, but I changed the related parameters, still the different answer. The result from the C++ is better than that from interactive optimizer. Here are the log files 

    Interactive optimizer:

    Read time =    0.03 sec.
    Tried aggregator 2 times.
    MIP Presolve eliminated 1677 rows and 1035 columns.
    MIP Presolve modified 1170 coefficients.
    Aggregator did 240 substitutions.
    Reduced MIP has 1626 rows, 1402 columns, and 6832 nonzeros.
    Reduced MIP has 882 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Probing time =    0.00 sec.
    Tried aggregator 1 time.
    Presolve time =    0.06 sec.
    Probing fixed 41 vars, tightened 263 bounds.
    Probing time =    0.00 sec.
    Clique table members: 1486.
    MIP emphasis: balance optimality and feasibility.
    MIP search method: dynamic search.
    Parallel mode: deterministic, using up to 8 threads.
    Root relaxation solution time =    0.00 sec.
     
            Nodes                                         Cuts/
       Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap
     
          0     0     -573.1804    23                   -573.1804      104         
    *     0+    0                            0.0000     -573.1804      104     --- 
     
    Repeating presolve.
    Tried aggregator 4 times.
    MIP Presolve eliminated 1174 rows and 714 columns.
    MIP Presolve modified 223 coefficients.
    Aggregator did 137 substitutions.
    Reduced MIP has 315 rows, 551 columns, and 1723 nonzeros.
    Reduced MIP has 397 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Probing fixed 0 vars, tightened 13 bounds.
    Probing time =    0.00 sec.
    Tried aggregator 1 time.
    MIP Presolve modified 13 coefficients.
    Reduced MIP has 315 rows, 551 columns, and 1723 nonzeros.
    Reduced MIP has 397 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Represolve time =    0.02 sec.
    Probing time =    0.00 sec.
    Clique table members: 160.
    MIP emphasis: balance optimality and feasibility.
    MIP search method: dynamic search.
    Parallel mode: deterministic, using up to 8 threads.
    Root relaxation solution time =    0.00 sec.
     
            Nodes                                         Cuts/
       Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap
     
    *     0+    0                            0.0000     -573.1804      319     --- 
          0     0      -48.0412    32        0.0000      -48.0412      319     --- 
    *     0+    0                          -10.0650      -48.0412      319  377.31%
    *     0+    0                          -14.8985      -48.0412      319  222.46%
          0     2      -48.0412    32      -14.8985      -48.0412      319  222.46%
    Elapsed real time =   0.17 sec. (tree size =  0.01 MB, solutions = 3)
    *   102+   98                          -15.6513      -38.9218     1104  148.68%
    *   219+  156                          -16.8328      -38.9218     1719  131.23%
    *   677+  388                          -17.2210      -30.9319     5240   79.62%
     
    Implied bound cuts applied:  18
     
    Root node processing (before b&c):
      Real time             =    0.09
    Parallel b&c, 8 threads:
      Real time             =    0.33
      Sync time (average)   =    0.00
      Wait time (average)   =    0.00
                              -------
    Total (root+branch&cut) =    0.42 sec.
     
    Solution pool: 7 solutions saved.
     
    MIP - Integer optimal solution:  Objective = -1.7221000001e+001
    Solution time =    0.50 sec.  Iterations = 16013  Nodes = 2993
    Deterministic time = 139.26 ticks  (279.07 ticks/sec)

    C++:

    Tried aggregator 2 times.
    MIP Presolve eliminated 1677 rows and 1035 columns.
    MIP Presolve modified 1170 coefficients.
    Aggregator did 253 substitutions.
    Reduced MIP has 1613 rows, 1533 columns, and 7167 nonzeros.
    Reduced MIP has 882 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Probing time =    0.00 sec.
    Tried aggregator 1 time.
    Reduced MIP has 1613 rows, 1533 columns, and 7167 nonzeros.
    Reduced MIP has 882 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Presolve time =    0.42 sec.
    Probing time =    0.00 sec.
    Clique table members: 333.
    MIP emphasis: balance optimality and feasibility.
    MIP search method: dynamic search.
    Parallel mode: deterministic, using up to 8 threads.
    Root relaxation solution time =    0.00 sec.
     
            Nodes                                         Cuts/
       Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap
     
          0     0   -10000.0000   245                 -10000.0000      480         
     
    Repeating presolve.
    Tried aggregator 4 times.
    MIP Presolve eliminated 997 rows and 690 columns.
    MIP Presolve modified 317 coefficients.
    Aggregator did 62 substitutions.
    Reduced MIP has 554 rows, 781 columns, and 2406 nonzeros.
    Reduced MIP has 507 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Probing fixed 11 vars, tightened 23 bounds.
    Probing time =    0.00 sec.
    Tried aggregator 2 times.
    MIP Presolve eliminated 22 rows and 22 columns.
    MIP Presolve modified 33 coefficients.
    Aggregator did 1 substitutions.
    Reduced MIP has 531 rows, 758 columns, and 2339 nonzeros.
    Reduced MIP has 496 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Probing time =    0.00 sec.
    Tried aggregator 1 time.
    Represolve time =    0.94 sec.
    Probing time =    0.02 sec.
    Clique table members: 153.
    MIP emphasis: balance optimality and feasibility.
    MIP search method: dynamic search.
    Parallel mode: deterministic, using up to 8 threads.
    Root relaxation solution time =    0.00 sec.
     
            Nodes                                         Cuts/
       Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap
     
          0     0     -253.7794    66                   -253.7794     1381         
    *     0+    0                          -26.4332     -253.7794     1381  860.08%
    *     0+    0                          -39.0917     -253.7794     1381  549.19%
          0     2     -253.7794    66      -39.0917     -253.7794     1381  549.19%
    Elapsed real time =   2.17 sec. (tree size =  0.01 MB, solutions = 2)
    *    15+   15                          -41.9503     -224.1494     1512  434.32%
    *   499+  426                          -43.7915     -201.2120     6026  359.48%
    *   558   479      integral     0      -43.8143     -201.2120     6486  359.24%
    *  1321+ 1104                          -45.5916     -167.6154    14442  267.65%
    *  1321+ 1104                          -47.0728     -167.6154    14442  256.08%
    *  1368+ 1145                          -47.0728     -167.6154    14865  256.08%
    *  1371+ 1148                          -47.0728     -167.6154    14900  256.08%
    *  1414+ 1178                          -47.0728     -167.6154    15368  256.08%
    *  3289+ 1813                          -47.9888      -70.0611    36230   45.99%
       3289  1814      -70.0611   124      -47.9888      -70.0611    36230   45.99%
    *  3337+ 1233                          -49.9964      -67.9762    37292   35.96%
    *  3421+  688                          -51.1143      -67.9762    38256   32.99%
    *  3468   454      integral     0      -51.4236      -67.9762    38938   32.19%
    *  3519   290      integral     0      -51.4891      -62.6857    39565   21.75%
     
    GUB cover cuts applied:  26
    Clique cuts applied:  38
    Cover cuts applied:  6
    Implied bound cuts applied:  22
    Flow cuts applied:  4
    Mixed integer rounding cuts applied:  109
    Zero-half cuts applied:  2
    Gomory fractional cuts applied:  48
     
    Root node processing (before b&c):
      Real time             =    1.67
    Parallel b&c, 8 threads:
      Real time             =    2.90
      Sync time (average)   =    0.01
      Wait time (average)   =    0.00
                              -------
    Total (root+branch&cut) =    4.57 sec.
     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Different solution from C++ and interactive optimizer

    Posted 05/07/15 11:35 AM

    Have you tried using a model file in SAV format (for greater numerical precision)?  This may make a difference (see this thread for example).


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Different solution from C++ and interactive optimizer

    Posted 05/07/15 03:13 PM

    Originally posted by: Chenxi


    Thanks a lot! The problem is solved.


    #CPLEXOptimizers
    #DecisionOptimization