I am new to this topic and am looking at an example I can't figure out. Can someone please help explain how this example creates the matrices used in the solver? Thanks!
Minimize $2x_1^2 + x_2^2 + x_1x_2 + x_1 + x_2,\quad$subject to:
$x_1 \geq 0$
$x_2 \geq 0$
$x_1 + x_2 = 1$
ANSWER:
Matrix Form for solver:
Q =
[4.0, 1.0]
[1.0, 2.0]
p =
[1.0]
[1.0]
G =
[-1.0, 0.0]
[0.0, -1.0]
h =
[0.0]
[0.0]
A = [1.0, 1.0]
b = [1.0]
result = solve.qp(Q, p, G, h, A, b)