Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Wrong optimal solution: QP

    Posted Fri March 04, 2016 05:28 AM

    Originally posted by: mmsc


    Hi everyone

    I am solving the following quadratic problem:

    Minimize
     obj: 2 z_0 + z_1 + z_2 + z_3 + [ - 2 x_1 * z_1 - 2 x_2 * z_2 - 2 x_3 * z_3
          ] / 2
    Subject To
     c1: z_0 + z_1 >= 100
     c2: z_0 + z_2 >= 60
     c3: z_0 + z_3 >= 50
     c4: 2 x_1 + x_2 + x_3 <= 2
    Bounds
     0 <= x_1 <= 1
     0 <= x_2 <= 1
     0 <= x_3 <= 1
    End

     

    Since the problem is non-convex, I set the solution target to 3 (global optimum). Then, I executed CPLEX 12.6.0.0 which returns the value 200 with z_0 = 100 and the remaining variables 0.

    It is easy to see that the solution returned is not optimal since, e.g., x_1=0, x_2=1, x_3=1, z_0=0, z_1=100, z_2=60 and z_3 =50 is feasible and has objective value equal to 100.

    Am I doing something wrong? Is this a bug?
     

    Thanks in advance.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Wrong optimal solution: QP

    Posted Sat March 05, 2016 10:34 PM

    Originally posted by: EdKlotz


    I ran both CPLEX 12.6.3 (the latest available) and 12.6.0.   In both cases CPLEX returns a solution with in objective 200, but in

    neither case does it claim that the solution is an optimal one.   Here's the output I get with interactive CPLEX (either version):

     


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

          0     0  -1.00000e+37     0      200.0000                      0     ---

    Root node processing (before b&c):
      Real time             =    0.00 sec. (0.03 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.03 ticks)

    Solution pool: 1 solution saved.

    MIP - Constructed relaxation is unbounded:  Objective =  2.0000000000e+02
    Current MIP best bound is infinite.

     

     

    How does this compare with your runs?   If you got the same thing, then that explains it.   If CPLEX claimed that solution

    was optimal, the some additional investigation is need.   Otherwise, if you can put some finite upper bounds on the z variables

    in your model, CPLEX then will find the optimal solution with objective 100 that you mention (at least it did for me when I used

    upper bounds of 1000 on the z variables).

    So you didn't do anything wrong, but you need to always check the solution status, whether it be manually when using

    interactive CPLEX, or in your code when calling CPLEX from one of its numerous APIs.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Wrong optimal solution: QP

    Posted Wed March 16, 2016 07:18 AM

    Originally posted by: mmsc


    Thank you very much! I forgot to check the solution status.

    Assigning upper bounds is easy and can be done systematically to my instances; this enables CPLEX to return the optimal solution.


    #CPLEXOptimizers
    #DecisionOptimization