Open adamheins opened 1 year ago
Hi, I think you may be mixing problem formulation and solution from different instances. The solution you propose can't be correct, simply because using the general constraint you constraint x[0]=-0.5 (starting the indexing from 0), but your proposed solution has x[0]=0.4.
Double checking with the qp
solver in octave I get the same primal solution as the one returned by HPIPM.
In any case, clearly HPIPM seems to have some numerical issue in the dual solution computation with this instance, likely due to the fact that the equality constraint and the lower bound on x[0] are the same. I will look into this.
Apologies, you are quite right: I mixed up the problem I was looking at. The primal solution should indeed be [-0.5, -1.45714286, -0.8]
, which is the solution that HPIPM does achieve. It just has some numerical difficulties with the dual, as you say. Thanks for taking a look!
The dense QP solver (used here via the Python interface) fails on the following example. Notice that the QP is box-constrained with a single equality constraint that requires the first decision variable to be exactly at the lower bound of the box constraints.
The expected result is that the QP is solved with primal solution
[0.4, -0.4, 1.0]
(this problem is taken from here). However, the actual result I get isInterestingly, and perhaps related to this comment, converting the single equality constraint
Av = b
to the double-sided inequalityb <= Av <= b
does claim success (though the primal optimal point is the same), with result below:Let me know if you have any insights on this.