Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  CPLEX 12.7 Global Optimal Solution?

    Posted 12/01/16 01:43 PM

    Originally posted by: Dr. K.


    I am relatively new to CPLEX. Does anybody know how to set the optimality target in 12.7 to "Global optimal solution" so that it solves a linearly constrained problem with non-convex quadratic constraints?

    The GUI shows this setting as "Deprecated in CPLEX 12.6.2" and it does not seem to recognize it.

    Thank you in advance.

     

    dvar float+ x1;

    dvar float x2;

     minimize
         x2;     
     subject to {
     nonconvex:    
        x1^2+4*x2^2>=4; 
     convex:    
        (x1-2)^2+x2^2<=5;    
     } 
     
    // Optimality Target (CPX_PARAM_SOLUTIONTARGET) was set to 3 (Global Optimal Solution) 
    // Error: Setting "solutiontarget" to value "3" for cplex failed: unknown


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX 12.7 Global Optimal Solution?

    Posted 12/01/16 02:36 PM

    The parameter has a new name:

    execute
     {
     cplex.optimalityTarget=3;
     }

    regards

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX 12.7 Global Optimal Solution?

    Posted 12/01/16 04:06 PM

    Originally posted by: Dr. K.


    Thank you for your prompt reply, Alex, but now it is showing the "CPLEX Error  5002: 'nonconvex' is not convex."

    Here is what I have now (BTW, the check shows that the setting was successful):

    execute 
     { 
     cplex.optimalityTarget=3; 
     writeln("Check if set: ",cplex.optimalityTarget)
     }
     
     dvar float+ x1;
     dvar float x2;

     minimize
         x2;     
     subject to {
     nonconvex:    
        x1^2+4*x2^2>=4; 
     convex:    
        (x1-2)^2+x2^2<=5;    
     } 

     

    What am I missing?


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPLEX 12.7 Global Optimal Solution?

    Posted 12/01/16 04:34 PM

    Hi,

    the constraints are not convex.

    So what you could try is use CP:

    using CP;
     
     int scale=100000;
     
     dvar int scalex1;
     dvar int scalex2;
     
     
     dexpr float x1=scalex1/scale;

    dexpr float x2=scalex2/scale;;

     minimize
         x2  + x1^2+4*x2^2-4;;     
     subject to {
     nonconvex:    
        x1^2+4*x2^2>=4;
     convex:    
        (x1-2)^2+x2^2<=5;    
     }

    which gives

     

    x1=0 x2=-1

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: CPLEX 12.7 Global Optimal Solution?

    Posted 12/01/16 05:17 PM

    Originally posted by: Dr. K.


    Thank you, Alex.

    There is a lot of confusion out there about what CPLEX can and can't do and I was told (at a conference) that CPLEX 12.6 can solve QCLP with non-convex constraints when you set the solution target to 3.

    It appears to me that people are confusing QP with QCLP and - while CPLEX is capable of solving MIQP with non-convex objective, it will not solve the QCLP with non-convex constraints.

    BTW, the solution to the original problem is x1=2, x2=-sqrt(5).


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: CPLEX 12.7 Global Optimal Solution?

    Posted 12/02/16 02:07 AM


  • 7.  Re: CPLEX 12.7 Global Optimal Solution?

    Posted 12/02/16 04:17 AM

    Originally posted by: Mark L. Stone


    This https://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.0/ilog.odms.cplex.help/CPLEX/UsrMan/topics/cont_optim/qcp/03_QCP_defn.html  is the key link which indicates that all constraints in a quadratically constrained problem must be convex.   However, it 's kind of hidden away, and could easily be missed,  As evident in this thread and many others on this forum, many users do not know about the requirement that  all quadratic constraints must be be convex, and indeed falsely think that non-convex constraints are permissible, as is non-convex quadratic objective, presuming that Optimality Target (CPX_PARAM_SOLUTIONTARGET) is set to 2 (local optimization) or 3 (global optimization).


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: CPLEX 12.7 Global Optimal Solution?

    Posted 12/02/16 08:59 AM

    Originally posted by: Dr. K.


    Thank you, Mark. This hidden link is exactly what I was looking for, a statement that CPLEX cannot solve QCLP with non-convex constraints.


    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: CPLEX 12.7 Global Optimal Solution?

    Posted 12/02/16 08:58 AM

    Originally posted by: Dr. K.


    Hi Alex. Since we are minimizing x2, the objective is -sqrt(5).


    #CPLEXOptimizers
    #DecisionOptimization