I have coded two solvers (interior-point and active set algorithms) of quadratic problems of the form:
$$ \min_x \quad f(x) = \frac{1}{2} x' H x + g' x $$ $$ s.t. \ \ A' x = b $$ $$ \qquad \quad \ \ d_l \leq C' x \leq d_u $$ $$ \qquad l \leq x \leq u.$$
where $H$ can be assumed to be positive definite. I want to test my algorithms against each other and against the well-established MATLAB algorithm quadprog (in terms of time and error in the solution). However, this requires me to generate some test problems that are well-defined and that have a feasible solution. This is where I get stuck. Could anyone provide some intuition about how to go about this? I would ideally like a method that generates $H,g,A,b,C,d_l,d_u,l,u$, and the solution $x$, such that it is a well-defined program with a feasible solution.
Any help is appreciated.
You could generate some least-squares problems...
(I renamed your $\vec{x}$ to $\vec{w}$) I.e. assume $\vec{y} = X\vec{w}$. Generate X from random numbers. y from some function of $\vec{x}$
Then. $H=X^TX + \Gamma^T\Gamma$, where $\Gamma$ is a regularization matrix. Typically $\Gamma^T\Gamma=\lambda I$, where $\lambda$ is a small scalar or zero..
and $ \vec{g}=-X^T\vec{y}$.
Equality constraints can be implemented by initializing $A$ and $\vec{b}$ with random normal numbers. Maybe try to duplicate some rows, just to see your solver can handle it.
Choose $l < u$, obviously... Not quite sure how to select $C$...
Also there is looking in the tests/ folder of other open-source solvers and see if you find some suitable cases to copy. (Given it has a suitable license)