I need to put the following optimization problem in QP form: $$ \min_{x,y} \, c^Tx + b^T y +\lambda^T x + \frac{\rho}{2} \|x - \hat{x}\|^2 $$ where $\hat{x}$ is a const vec. The standard template for a QP problem appears to be $$ \min_z \frac{1}{2}z^THz + f^T z $$ for some vec $f$, which doesn't appear to have room for a const vec.
I can't get this done unless I add $ \rho/2\|y - \hat{y}\|^2$ to the cost function of my problem but that doesn't feel right. Any help? Thanks bunches.
Your expression expands to $\frac{1}{2}\begin{pmatrix}x\\y\end{pmatrix}^T\begin{pmatrix}\rho I & 0\\0 &0\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} + \begin{pmatrix}c + \lambda-\rho\hat{x}\\b\end{pmatrix}^T\begin{pmatrix}x\\y\end{pmatrix} + (\frac{\rho}{2} \hat{x}^T\hat{x})$
where the last term is constant and thus can be omitted without changing the optimal solution (only shifts the optimal objective)