Skip to content

solveLP() produces infeasible results #12343

@barisdemiroz

Description

@barisdemiroz
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.

mats.zip

Metadata

Metadata

Assignees

Labels

Hackathonhttps://opencv.org/opencv-hackathon-starts-next-week/bugcategory: coreconfirmedThere is stable reproducer / investigation completeeffort: few daysExtra design work may required (think about tests too). Or prepare a great tutorial.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions