Closed IainNZ closed 10 years ago
Gurobi needs nonnegativity to play nicely with the SOC and rotated SOC constraints. It was put in, but I suspect it got lost in the git mess I got myself into yesterday.
An interesting thing to look into later on is if this is strictly necessary; the Python example for this same problem doesn't require explicit nonnegativity.
Hi guys, I'm kind of new to this, but I think this is an issue.
I can run the example (and my own SOCP) in Python without the nonnegativity constraints with no PSD error, but I can't run it (or my model) in either JuMP or JuliaOpt code (it gives the same PSD error unless I impose nonnegativity). I'm using Gurobi in both cases.
We call Gurobi through the C interface - the Python interface probably does some magic we don't before it too calls the C interface.
The gurobi python documentation states that nonnegativity is required for SOC constraints: http://www.gurobi.com/documentation/6.0/reference-manual/py_model_addqconstr#pythonmethod:Model.addQConstr. JuMP's behavior is correct here.
Thanks. You're right - gurobipy must be making the variables nonnegative automatically.
@joehuchette