octave-bug-tracker
[Top][All Lists]

## [Octave-bug-tracker] [bug #41120] QP function result is not correct

 From: Mariotto Mauro Subject: [Octave-bug-tracker] [bug #41120] QP function result is not correct Date: Mon, 06 Jan 2014 10:02:09 +0000 User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0

```URL:
<http://savannah.gnu.org/bugs/?41120>

Summary: QP function result is not correct
Project: GNU Octave
Submitted by: mariottomauro
Submitted on: Mo 06 Jan 2014 10:02:08 GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.6.2
Operating System: GNU/Linux

_______________________________________________________

Details:

min f(x) = 0.5*x'Hx + Q'x

and the following example

min -3x1^2 -9x1x2 -3.5x2^2

sub 2x1 + 3x2 <= 12
x1>=0, x2>=0

Define the following matrices and vectors for the above problem:
A=[]
B=[]
Q=[]
LB=[0,0]'
A_IN=[2,3]
A_UB=[12]
H=[-6,-9; -9,-7]

Call the build-in Octave function

[X,F,I,L]=qp([],H,Q,A,B,LB,[],[],A_IN,A_UB)

Incorrect result given by Octave 3.6.2 and 3.6.4 in Ubuntu Linux 12.10 and
13.10 i686

x1=0
x2=0
f(x1,x2)=0

The correct result is however:

x1=6
x2=0
y1=18 Lagrange Multiplier or KKT Multiplier
f(x1,x2)=-108

_______________________________________________________

<http://savannah.gnu.org/bugs/?41120>

_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/

```