Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Is it possible for a boolean decision variable to be equal to -2?

    Posted 07/21/14 05:23 AM

    Originally posted by: Calvin Sun Hainan


    Attached is the engine log. 

    I declare the decision variables as follows:

    dvar boolean isSubstitutionTransaction [eligibleSubstitutionPositions];

    When this happens, I do not see anything under "Statistics". It seems that the optimal solution is found by the preprocessing algorithm.

    Attached is the lp file of the model and you should be able to see the same problem in Interactive mode if you are using CPLEX 12.5.0.0.

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Is it possible for a boolean decision variable to be equal to -2?

    Posted 07/21/14 05:43 AM

    hi

    are you having a look at a solution or a relaxed solution ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Is it possible for a boolean decision variable to be equal to -2?

    Posted 07/22/14 02:24 AM

    Originally posted by: Calvin Sun Hainan


    It is confirmed by the technical support that this is a bug in the presolve of CPLEX 12.5.0. The problem does not happen in CPLEX 12.6.0. Unfortunately, this causes a critical constraint broken in our production and I have to turn off the presolve before we upgrade to 12.6.0.

    Once the presolve is turned off (cplex.preind = 0;), the binary decision variable does not equal to -2 anymore.

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Is it possible for a boolean decision variable to be equal to -2?

    Posted 07/21/14 09:14 PM

    Originally posted by: Calvin Sun Hainan


    I have output my problem into an lp file. When I use the interactive optimizer to solve this lp, it returns optimal with binary variable x8 = -2.

    Below is the MIP in lp format. x8 is the variable that is causing problem.

    \ENCODING=ISO-8859-1
    \Problem name: IloCplex
     
    Minimize
     obj: 1.069586 x1 + 0.605189676 x2 - 1.62557741 x3 - 0.311030973 x4 + 50 x5
          + 0.01 x6 + 0.01 x7 + 0.01 x8 + 0.0050382 x9 + x10
    Subject To
     c1:  532 x1 + 300.82 x2 + 805.1 x3 + 155.43 x4 + 1000 x5 - x9  = 0
     c2:  x3 + x6 <= 6000001
     c3:  x4 + x7 <= 77500001
     c4:  x5 + x8 <= 100000001
     c5:  x3 - 65030210 x6 <= 0
     c6:  x4 - 65030210 x7 <= 0
     c7:  x5 - 65030210 x8 <= 0
     c8:  x6 + x7 + x8 <= 1
     c9:  x6 + x7 + x8 <= 5
     c10: 1.069586 x1 + 0.605189676 x2 - 1.62557741 x3 - 0.311030973 x4 + 50 x5
          + x11  = 0
     c11: x11 - 10000000 x12 >= -10000000
     c12: x6 + x7 + x8 - 10000000 x12 <= 0
    Bounds
    -10800000 <= x1 <= 0
    -14500000 <= x2 <= 0
     0 <= x6 <= 1
     0 <= x7 <= 1
     0 <= x8 <= 1
          x10 = 0
          x11 Free
     0 <= x12 <= 1
    Binaries
     x6  x7  x8  x12 
    End
     

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Is it possible for a boolean decision variable to be equal to -2?

    Posted 07/21/14 09:45 PM

    Originally posted by: Calvin Sun Hainan


    It turns out CPLEX 12.6.0.0 and CPLEX 12.5.0.0 return different result.

     

    Results of CPLEX 12.6.0.0

    CPLEX> optimize
    MIP emphasis: balance optimality and feasibility.
    MIP search method: dynamic search.
    Parallel mode: deterministic, using up to 4 threads.

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

          0     0        cutoff       -4.05529e+007 -4.05529e+007        2    0.00%
    Elapsed time = 0.00 sec. (0.01 ticks, tree = 0.00 MB, solutions = 0)

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

    Solution pool: 2 solutions saved.

    MIP - Integer optimal solution:  Objective = -4.0552877331e+007
    Solution time =    0.13 sec.  Iterations = 2  Nodes = 0
    Deterministic time = 0.02 ticks  (0.19 ticks/sec)

    CPLEX> display solution variables *
    Incumbent solution
    Variable Name           Solution Value
    x1                    -10800000.000000
    x2                    -14500000.000000
    x4                     65029209.290356
    x7                            1.000000
    x11                    40552877.341000
    x12                           1.000000
    All other variables matching '*' are 0.
    CPLEX>


    ================================================

    Results of CPLEX 12.5.0.0


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

    *     0+    0                            0.0000 -5.03067e+007        9     ---
    *     0+    0                     -4.06398e+007 -5.03067e+007        9   23.79%
          0     0        cutoff       -4.06398e+007 -4.06398e+007        9    0.00%

    Root node processing (before b&c):
      Real time             =    0.00 sec. (0.04 ticks)
    Parallel b&c, 4 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.00 sec. (0.04 ticks)

    Solution pool: 2 solutions saved.

    MIP - Integer optimal solution:  Objective = -4.0639828141e+007
    Solution time =    0.05 sec.  Iterations = 9  Nodes = 0
    Deterministic time = 0.10 ticks  (2.16 ticks/sec)

    CPLEX> display solution variables *
    Incumbent solution
    Variable Name           Solution Value
    x1                    -10800000.000000
    x2                    -14500000.000000
    x3                      6000000.000000
    x4                     33950267.001222
    x6                            1.000000
    x7                            1.000000
    x8                           -2.000000
    x11                    40639828.141000
    All other variables matching '*' are 0.
    CPLEX>


    #DecisionOptimization
    #OPLusingCPLEXOptimizer