I have a quadratic problem question with the objective function
f=arg min(A*f-b)^T*S*(A*f-b)+alpha*f^T*W*f
s.t. d_low < C*f < d_up
where f
is the optimization variable, S
and W
are positive-define weight matrices.
A*f-b
is a matrix function
A*f=b
my question is how to reform the quadratic objective function to fit the matlab solver quadprog
, with the general form
min 0.5*x^T*H*x+f^T*x
could you please give me a tip or example, thanks.
/==========================================/
I asked a classmate, he told me the item (A*f-b)^T*S*(A*f-b)
could be expanded as
(A*f-b)^T*S*(A*f-b)=(f^T*A^T-b^T)(S*A*f-S*b)=f^T*A^T*S*A*f-f^T*A^T*S*b-b^T*S*A*f+b^T*S*b=f^T*A^T*S*A*f-2*b^T*S*A*f+b^T*S*b
is it right?
Here is one way to deal with this.
Let me rewrite your problem slightly
This can be rewritten further as:
I added a variable
y
and a linear equality constraint.So