I have a quadratic problem with the variables e
and a
, both of which are non-negative. I have a constraint that reads
a <= e (1 - a).
When transformed, the matrix Q reads [[0,-1][0,0]] which is obviously neither positive nor negative semi-definite for arbitrary a and e. However, it is negative semi-definite for non-negative e and a (or positive semi-definite when brought to the left side). Thus, this should solve according to https://www.ibm.com/support/knowledgecenter/en/SSSA5P_12.8.0/ilog.odms.cplex.help/refcallablelibrary/macros/CPXERR_Q_NOT_POS_DEF.html. However, I still get error 5002 Q in ''q1'' is not positive semi-definite
.
I found that Q must be semi-definite for all vectors x, regardless of their feasilibility (https://www.ibm.com/support/knowledgecenter/en/SSSA5P_12.8.0/ilog.odms.cplex.help/CPLEX/UsrMan/topics/cont_optim/qp/02_convexity_defn.html), but I was hoping that there was some way around this ... Is there a work-around to get this running?
Some comments: I created a and e as follows:
e = cplex.numVar(0, Double.MAX_VALUE);
a = cplex.numVar(0, 1);
The constraint is added as
IloLQNumExpr constr = cplex.lqNumExpr();
constr.addTerm(1.0, e, a);
constr.addTerm(-1.0, e);
constr.addTerm(1, a);
cplex.addLe(constr,0);
I get this problem regardless of the objective I used, I tried min, max, linear obj, quadratic obj ...
Thank you very much in advance!