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 | ![]() | + ![]() |