Problem description of a quadratic program
Describes the model used in the examples of a quadratic program.
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 | ||||||||||||||||
| 0 | ≤ |
x1 | ≤ |
40 | ||||||||||||
| 0 | ≤ |
x2 | ≤ |
+∞ |
||||||||||||
| 0 | ≤ |
x3 | ≤ |
+∞ |
||||||||||||
The following sections solve this model in the various APIs available in CPLEX: