Hello,
I'm running several times a QCP in pyhton, adding in each iteration new constraints to the model. If the problem is optimal I ask for the dual of a given linear constraint, and some times I get the following error:
beta = Const1.getAttr("Pi")
File "constr.pxi", line 125, in gurobipy.Constr.getAttr (../../src/python/gurobipy.c:20278)
gurobipy.GurobiError: Unable to retrieve attribute 'Pi'
At first I thought that maybe it was because the problem is unbounded, but I checked and the objective function is finite. Also, I only call for the dual if the problem is optimal, and therefore feasible using the statement "if m.status == GRB.Status.OPTIMAL"
I hope someone can help me with this.
Matias Siebert