Open dlcfort opened 1 year ago
Hi, it seems that the issue is caused by the fact that H is rank deficient (two eigenvalues are zero) so the problem is not strictly convex, if you put H to something strictly positive definite then it works fine.
In case of putting ng>0, this creates an inequality constraint with value 0 that is always satisfied, but it triggers the IPM machinery that using some regularization overcomes the non-strictly-convex issue. If there are only equality constraints without inequality, the IPM machinery is not used but only a linear system solve, that apparently fails if H is not strictly positive definite (and thus not invertible too).
The optimization that I set up does not work when I set the number of general inequality constraints "ng" to zero. However when I set "ng" to a value of 1 it works fine. Is there something wrong with my formulation or is there a bug in the code? You can see from the printed vector (Av) at the end that it does not match up with the vector (b)
A @ v[:,None]: [[-6.32751741] [-9.52767775] [40.07520835] [40.07520835] [ 1.5 ] [ 3. ] [68.85408864] [72.90432914]]