How to test if a system of linear inequalities has a solution or not!

2 views (last 30 days)
Good afternoon, Excuse me i need your help, i want to test if a system of linear inequalities of the form A*X<=b (A is a matrix and b a vector and they are known) has a solution or not! i tried linprog but i think i'm not using it in the right way. Any hints or suggestions are appreciated Thanks a lot in advance

Answers (2)

Matt J
Matt J on 10 Mar 2014
Edited: Matt J on 10 Mar 2014
i tried linprog but i think i'm not using it in the right way because i can't find a reasonnable solution.
Not sure why you interpret that as a bad outcome. If the whole point is to test whether a solution exists and linprog is telling you one does not, then what you have may be succeeding!
For bounded problems of small dimension, you could try LCON2VERT. If it returns an empty set of vertices V=[] then it thinks a solution doesn't exist either. But LINPROG would be the better way, if you have it.

John D'Errico
John D'Errico on 10 Mar 2014
You can't find a REASONABLE solution, or you can't find ANY solution?
linprog will offer a solution, but all that matters is it is a solution. I assume you gave it a problem like minimizing the sum of the elements, thus f will be all ones.
So if linprog fails here, then it has no solution, unless the problem is highly ill-conditioned.
So if you are not sure if you did it right, we cannot help you more unless you provide the matrix, as well as what you tried.

Categories

Find more on Problem-Based Optimization Setup in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!