Registered Member
|
So I ran the code http://www.labri.fr/perso/guenneba/code/QuadProg/ (changing internal:: by std::) and it all works as expected: I get
Now, I try to be a bit bolder and run the example here http://www.inside-r.org/packages/cran/quadprog/docs/solve.QP, which is:
(a better edited formulation of the toy problem is at the link above) (removing the copyrights to save space), I think, this gives the following code:
But when I run this I get
where the correct solution should be:
I tried transposing the CI matrix in the eigen-example code but could still not get the same solutions as those from the quadprog example. Probably I'm setting the problem wrongly and I was wondering whether someone has encountered a similar problem setting up a quadprog code in eigquadprog and could point to what I am doing wrong. |
Moderator
|
CE and ce0 should be null:
CE.resize(3,0); ce0.resize(0); then set the other entries as follows:
btw, I've updated the eiquadprog.hpp file to work with eigen 3.2. |
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]