Incorrect qp result

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Incorrect qp result

Jonathan Warner
I was using the octave qp solver to solve a small quadratic program (as a test case for larger variants) and it gave me an incorrect result. It claimed (correctly) that the problem was convex, but failed to find the correct global minimum. It gives a value of 12, when the actual minimum value is 0. I have attached the code file for reference, and a valid value of x that attains the true minimum is given by x = [0; 2; 1; 3; 2; 1; 1; 3; 1; 2].



qp_code.m (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect qp result

Juan Pablo Carbajal-2
Hi Jonathan,

Thanks

I can reproduce this, could oyu please add a bug in the tracker?
QP is already flagged for improvement!


On Tue, Apr 24, 2018 at 4:23 AM, Jonathan Warner <[hidden email]> wrote:

> I was using the octave qp solver to solve a small quadratic program (as a
> test case for larger variants) and it gave me an incorrect result. It
> claimed (correctly) that the problem was convex, but failed to find the
> correct global minimum. It gives a value of 12, when the actual minimum
> value is 0. I have attached the code file for reference, and a valid value
> of x that attains the true minimum is given by x = [0; 2; 1; 3; 2; 1; 1; 3;
> 1; 2].
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Incorrect qp result

sshah
In reply to this post by Jonathan Warner
Are you sure this is a convex qp problem?

1) Is the objective convex?

H is non-symmetric with eig(H) < 0. So, it is not a convex objective.  Try
with H positive definite.

2) given  0 <= lb <= x=ub , and H positive definite,  it is not feasible to
get an objective value =0.


If you change the objective function to be convex, qp most likely will give
correct answers.



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html