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

getting wrong result #11

Open
MichealYu567 opened this issue Oct 9, 2018 · 2 comments
Open

getting wrong result #11

MichealYu567 opened this issue Oct 9, 2018 · 2 comments

Comments

@MichealYu567
Copy link

some times i get the wrong result with quadprog++.
to be specific, the result doesn't satisfy the inequality constraints.

through debug, i found that the reason may be as bellows:
the checking code(line 246-250):

if (fabs(psi) <= m * std::numeric_limits::epsilon() * c1 * c2* 100.0)
{
/* numerically there are not infeasibilities anymore */
return f_value;
}

when I got a matrix G whose c1c2 is very large, after add equality constraints, first run to the checking code, psi = -70, as c1c2 is very large, it directly returns the f_value. but the result doesn't satisfy the inequality constraints.

My question is why use "m * std::numeric_limits::epsilon() * c1 * c2* 100.0" as the threshold, instead of "m * std::numeric_limits::epsilon()".
In fact, we just want to check whether CI[i]*X < 0 or not.

i add my data here, in case you want to debug it.
input data.zip

@AlanSixth
Copy link

I think I have run into the same problem here where the solver returns an incorrect solution that disregards inequality constraints when there are equality constraints. Not sure what caused it.

@alp66alp66
Copy link

I am having the same problem, the solution doesn't respect the inequality constraints. Anyone solved this bug?

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