-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
solveLP() produces infeasible results #12343
Description
System information (version)
- OpenCV => 3.0
- Operating System / Platform => Ubuntu 16.04 64-bit
- Compiler => gcc 4.9.4
Detailed description
I observed that solveLP() might produce infeasible results. When I do A*x Some of the constraints are not satisfied, i.e. A*x > b for some rows of A. Note that in my example solveLP() returns SOLVELP_MULTI, but it shouldn't matter it should still produce a feasible solution.
Steps to reproduce
I have attached the matrices to reproduce the issue. I have renamed them as argument names in the solveLP() signature. Just pass Func and Constr to solveLP() and obtain z. I have also attached z and A*z (Constr_prod_z) for convenience.
You can observe that element at 161 of Constr_prod_z is 4.376743 which is clearly greater than 1 when it shouldn't be according to constraints (you can just print Constr.row(161) and look at the last element to see 1). This is not the only example of constraint violation.