Incorrect solution
Status: Beta
Brought to you by:
digaspero
The attached program uses QuadProg++ to solve a quadratic program given to stdin. However with the attached input, it returns an incorrect value for the value of the objective function. Specifically, it outputs -2.057085691903112e+32, which is much lower than the unbounded solution of this problem.
It looks to me that the issue is in the part of the code which check s whether 'z' is 0. It can be numeraically non-zero even though it's mathematically zero, and this can result in a huge negative value for the 't2' step size.
I attached a patch to QuadProg++.cc that seems to fix the problem. However this patch hasn't been tested throughly and I'm not 100% sure this is the right way to fix the problem.
Input file.
Patch.