Hello GAMS World community,

Today I came across a peculiar thing (at least for me) and I hope that

you can clarify it for me. I searched the archive already for an

answer but couldn’t find anything fitting.

I formulated an easy QCP in GAMS and tried to solve it via CPLEX

obtaining the error

*** CPLEX Error 5002: Q in %s is not positive semi-definite

But as far as I see that simply isn’t true. Here is the whole code:

$TITLE example

$offlisting

SETS

i /i1*i10/

;

PARAMETERS

a(i) / i1 26

i2 26

i3 26.2

i4 26.2

i5 26.6

i6 27

i7 27.5

i8 30

i9 31

i10 31.4 /

c(i) / i1*i10 50/

d

;

d = sum(i,a(i))/10;

FREE VARIABLES

ob1

;

POSITIVE VARIABLES

v1(i)

;

v1.lo(i) = 0.01;

v1.l(i) = 1;

EQUATIONS

eq_con1,

eq_con2,

eq_ob1

;

eq_con1(i) …

v1(i) =L= c(i);

eq_con2 …

sum(i,v1(i)) =G= d;

eq_ob1 …

ob1 =E= sum(i, a(i)*v1(i)*v1(i));

MODEL model1 / eq_con1, eq_con2, eq_ob1 /;

OPTION QCP = CPLEX;

SOLVE model1 MAXIMIZING ob1 USING QCP;

The objective ob1 is given as a positive definite quadratic form, the

constraints are linear. So how does a non-definiteness arise?

I would be very thankful for any answers.

- Nomaris

\