0

Given this objective function:

Minimize:

f = (Ax + By)' * G * (Ax + By)

subject to some equalities and inequalities.

where x and y are real-valued vectors (decision variables) with p and q elements, respectively. A of size m * p, B of size m * q, G is a symmetric matrix of size m * m.

My question is how to write f in the form v' * G * v, such that it can be easily be used in quadprog. In other words, how to mix A, B and G?

Faroq AL-Tam
  • 495
  • 5
  • 10

1 Answers1

0

This looks incompletely specified!

It seems, for whatever reason, you want to model in terms of two variable components. Now you did not specify how they interact with each other.

As most optimizers work on a single variable-vector, you need to concatenate yours.

As you did not show G, i'm assuming you got one G for x and one for y, let's call it H.

(Remark: not a matlab user; don't take example-syntax for granted!)

  • z = [x y]
  • P = blkdiag(G,H)
    • assuming x and y independent in regards to quadratic-term
    • e.g. no x0*y1 like terms
  • Solve: for z` P z

Example:

x = [x0 x1 x2]
y = [y0 y1]
G = [6 2 1; 2 5 2; 1 2 4]
H = [8 2; 2 10]

# G
6 2 1
2 5 2
1 2 4

# H
8 2
2 8

z = [x0 x1 x2 y0 y1]
P = [6 2 1 0 0; 2 5 2 0 0; 1 2 4 0 0; 0 0 0 8 2; 0 0 0 2 8] 

# P
6 2 1 0 0
2 5 2 0 0
1 2 4 0 0
0 0 0 8 2
0 0 0 2 8
sascha
  • 32,238
  • 6
  • 68
  • 110