You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
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
The text was updated successfully, but these errors were encountered: