ILOG CPLEX 11.0 User's Manual > Continuous Optimization > Solving Problems with a Quadratic Objective (QP) > Examples: Creating a QP, Optimizing, Finding a Solution

This example shows you how to build and solve a QP. The problem being created and solved is:

Maximize 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
x1 
2x2 
3x3 
-  
0.5 
 (33x12 
22x22 
11x32 
12x1x2 
23x2x3) 
subject to 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
-x1 
x2 
x3 
 
20 

 

 

 

 

 

 

 

 

 

 
x1 
3x2 
x3 
 
30 

 

 

 

 

 

 

 

 

 
with these bounds 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
 
x1 
 
40 

 

 

 

 

 

 

 

 

 

 

 

 
 
x2 
 
+ 

 

 

 

 

 

 

 

 

 

 

 

 
 
x3 
 
+ 

 

 

 

 

 

 

 

 

 

 

 

The following sections solve this model in the various APIs available in ILOG CPLEX: