Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The constraints are not met, but the cost is not infinity #4

Open
brunaond opened this issue Oct 7, 2016 · 2 comments
Open

The constraints are not met, but the cost is not infinity #4

brunaond opened this issue Oct 7, 2016 · 2 comments

Comments

@brunaond
Copy link

brunaond commented Oct 7, 2016

Hello,

I am using uQuadProg to solve problem with several inequalities and no equalities. It happens, that for some solutions "x" the citeria "CI^T*x+ci0 >= 0" is not met, but the cost function is not equal to infinity. I am passing empty matrices CE and ce0. If I try to pass something like CE=0 ce0 = 0, the program crashes reporting, that the CE and ce0 is linearly dependent.

My understanding is that if the criteria CI^T*x+ci0 >= 0 is not met, then the problem is infeasible and therefore the cost function should be infinity. Am I wrong here? How should I interpret the result x then?

Thanks.

@rcharron
Copy link

From the file EigenQP.h
"The function will return the cost of the solution written in the x vector or
std::numeric_limits::infinity() if the problem is infeasible."
So yes it should be infinity.
It would be great if you could give an example where this case happends

@AlanSixth
Copy link

AlanSixth commented Apr 10, 2019

@brunaond I think I have run into the same problem here where the solver returns an incorrect solution that disregards inequality constraints after adding the trivial equality constraints. To work around that, I manually set the number of equality constraints to zero.

int p=CE.cols(); p=0;

Also I think this problem may have come all the way since the beginning. See liuq/QuadProgpp#11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants