3

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!

Layla
  • 125
  • 10
  • Did you consider approximation with piecewise linear functions? a=1 is infeasible so you could divide by a-1. That leaves a/(a-1) on the left-hand side which could be approximated by a piecewise linear function. Not sure this is accurate enough, though. – Daniel Junglas Jun 23 '20 at 13:04
  • I thought about it, but the entire thing is already an approximation, so I did not want to "approximate even further" ... it would end up with too many intervals ... I was just curious why this isn't possible, since the same constraint can be implemented in Gurobi – Layla Jun 23 '20 at 13:27

1 Answers1

1

in cplex we do some transformations to turn a quadratic constraint into a standard second order cone. Those transformations do not cover all possibilities and happen not to cover this one.

However, if you model it as follows it will work:

x^2 - y*z <= 0
x = 1
y + a = 1
z - e = 1
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92