Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Getting infeasible solutions when objective function has been scaled up

    Posted 07/24/17 12:43 PM

    Originally posted by: gt111


    I'm getting an infeasibility result on a problem when I scale up the objective function to minimize the sum of integers instead of minimizing the sum of doubles i.e. minimizing | AB - CD | instead of minimizing | A/D - B/C |. I don't understand why this is happening though?

     

    The reason for the change was because the original objective function minimizing the sum of the absolute deviations which meant that the objective value was very low - in the magnitude of 10^-7 or smaller. I've attached the problem stats for the original objective problem and the new objective function.

     

    Also it looks like there's quite a significant difference of orders of magnitudes in the coefficients which presumably means that there could potentially be numerical problems - but how do numerical problems affect CPLEX's ability to find a solution?

     

    Below is the output I get for the new objective function:

    Tried aggregator 2 times.
    MIP Presolve eliminated 10 rows and 5 columns.
    MIP Presolve modified 1 coefficients.
    Aggregator did 5 substitutions.
    Reduced MIP has 31 rows, 45 columns, and 70 nonzeros.
    Reduced MIP has 25 binaries, 5 generals, 0 SOSs, and 20 indicators.
    Presolve time = 0.00 sec. (0.07 ticks)
    Probing fixed 0 vars, tightened 10 bounds.
    Probing changed sense of 10 constraints.
    Probing time = 0.00 sec. (0.03 ticks)
    Tried aggregator 1 time.
    MIP Presolve eliminated 10 rows and 10 columns.
    MIP Presolve modified 4 coefficients.
    Reduced MIP has 21 rows, 35 columns, and 50 nonzeros.
    Reduced MIP has 15 binaries, 5 generals, 0 SOSs, and 20 indicators.
    Presolve time = 0.00 sec. (0.06 ticks)
    Probing time = 0.00 sec. (0.01 ticks)
    Tried aggregator 1 time.
    Reduced MIP has 21 rows, 35 columns, and 50 nonzeros.
    Reduced MIP has 15 binaries, 5 generals, 0 SOSs, and 20 indicators.
    Presolve time = 0.00 sec. (0.04 ticks)
    Probing time = 0.00 sec. (0.01 ticks)
    Clique table members: 5.
    MIP emphasis: balance optimality and feasibility.
    MIP search method: dynamic search.
    Parallel mode: deterministic, using up to 21 threads.
    Root relaxation solution time = 0.00 sec. (0.04 ticks)

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

          0     0        0.0000    15                      0.0000        2         
          0     0        cutoff                                          2         
    Elapsed time = 0.51 sec. (0.50 ticks, tree = 0.01 MB, solutions = 0)

    Root node processing (before b&c):
      Real time             =    0.52 sec. (0.50 ticks)
    Parallel b&c, 21 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.52 sec. (0.50 ticks)


    MIP - Integer infeasible.
    Current MIP best bound is infinite.
    Solution time =    0.52 sec.  Iterations = 2  Nodes = 0
    Deterministic time = 0.50 ticks  (0.95 ticks/sec)

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 07/24/17 02:24 PM

    Did you try the conflict refiner on your infeasible model:

    CPLEX> conflict
    CPLEX> disp conf all

    If your issues are numerical then since won't help but if your model is indeed infeasible the this sequence of commands will give you a hopefully small set of constraints and you can figure out why this is infeasible.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 07/25/17 04:10 AM

    Originally posted by: gt111


    Thanks, I tried running the conflict refiner but it returns

    Advanced basis not built.
    Problem is feasible; no conflict available

     

    Actually when I run with extreme numerical caution emphasis turned on, I am able to obtain an integer optimal solution. Displaying the solution quality shows this:

    Incumbent solution:
    MILP objective                                 1.3737747817e+16
    MILP solution norm |x| (Total, Max)            4.12132e+16  6.86887e+15
    MILP solution error (Ax=b) (Total, Max)        0.00000e+00  0.00000e+00
    MILP x bound error (Total, Max)                0.00000e+00  0.00000e+00
    MILP x integrality error (Total, Max)          0.00000e+00  0.00000e+00
    MILP slack bound error (Total, Max)            0.00000e+00  0.00000e+00
    MILP indicator slack bound error (Total, Max)  0.00000e+00  0.00000e+00

    Branch-and-cut subproblem optimization:
    Max condition number:                    2.5350e+11
    Percentage (number) of stable bases:       0.00%   (0)
    Percentage (number) of suspicious bases:   0.00%   (0)
    Percentage (number) of unstable bases:   100.00%   (1)
    Percentage (number) of ill-posed bases:    0.00%   (0)
    Attention level:                         0.300000
    CPLEX encountered numerical difficulties while solving this model.

     

    How exactly do numerical difficulties affect CPLEX? 

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 07/25/17 04:48 PM

    You have 15 orders of magnitude difference between the smallest nonzero coefficient on the left side and the largest right-hand side coefficient in both models. While that's not guaranteed to cause problems, it is highly likely to do so. Bear in mind that every pivot, pricing operation, etc. that CPLEX does is subject to rounding error. An individual double-precision operation is good for about 15 digits of accuracy (assuming accurate inputs); with 15 orders of magnitude difference in coefficients, you may be putting too much faith in those last one or two wobbly decimal places.

    There's a bit of coverage of this that you might find useful in the CPLEX user's manual (Continuous optimization > Solving LPs : simplex optimizers > Diagnosing performance problems > Numeric difficulties). Also, Dr. Ed Klotz of IBM has a slide deck that nicely covers this. Unfortunately, I don't know a link to it, but maybe Daniel does.

    If your model has "big-M" constraints, you might want to explore whether a smaller value of M is sufficient to get the job done. Alternatively, maybe scaling a few variables differently can bring the coefficients more in line with each other.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 07/26/17 03:31 PM


  • 6.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 11/18/19 02:30 AM

    Originally posted by: Mathsg


    Hi Daniel,

    I am facing the same problem. My solution is infeasible also and i am not sure weather the solution is infeasible due to numerical value or due to conflict issues. Kindly how i can write the commonds in opl studion

    CPLEX> conflict
    CPLEX> disp conf all

    to check the problem ?

     

    Thank you


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 11/18/19 11:33 AM

    If you label all your constraints and check "compute conflicts" in the settings file then CPLEX will compute a minimal confliict among all the labeled constraints.


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 11/18/19 10:17 PM

    Originally posted by: Mathsg


    Hi Daniel,

    Thank you for your guidance. i have checked for .OPS setting file but i did not get any information from there. I have attached the snapshot of it. Kindly have a look and guide me why i am getting infeasible solution? 


    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 11/19/19 10:29 AM

    You are looking at the wrong option. To enable the conflict refiner for labeled constraints go to Language->Run and check "Display conflicts".


    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 11/19/19 10:33 AM

    Originally posted by: Mathsg


    Hi Daniel, 

    Thank you so much for your time and consideration.  I have done the same formuation in GLPK but it work fine there than why it show me the infeasible solution with CPLEX. Attached are the files of .mode and .data. Kindly have a look guide me. I am looking forward to hearing from you. thank you boss. 


    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: Getting infeasible solutions when objective function has been scaled up

    Posted 11/19/19 10:45 AM

    Unless there is a bug in CPLEX, I highly doubt you did the exact same thing in GLPK. It seems either your model or your data are different because your model is quickly declared infeasible here.

    The minimal conflict found by CPLEX is reasonably small, so I suggest to look at it and figure out why these constraints are in conflict. In the conflict I can see a number of instances for Const7 that look like

    50 * x[...] <= 40

    where x is a binary variable. That forces that particular x to zero. Maybe that is the issue? You will know better since you know what these constraints are supposed to model. So just take a hard look at the conflict.


    #CPLEXOptimizers
    #DecisionOptimization