QP Solver: Solution to non convex problems
A sample test case where the solver returns solution though the problem is non-convex. The Oxford OSQP solver checks for the KKT matrix diagonal to see if the problem is convex.
template <typename _Scalar=double>
class _SimpleQP : public QP<1, 1, _Scalar>
{
public:
_SimpleQP()
{
this->P << -1;
this->q << 0;
this->A << 1;
this->l << -1;
this->u << 2;
}
};