I am trying to model a MILP problem using Python with Gurobi Solver. I have the latest Gurobi solver version. My problem started after I added a constraint with new function of gurobi m.addGenConstrAbs which add the abs value of the function as a constraint. Here is my code which create a gurobi feedback as:
AttributeError: 'gurobipy.LinExpr' object has no attribute '__colno__'.
My code which results with this feedback is:
for t in range(0,Period):
m.addGenConstrAbs(PEN[t], EG [t]+STG[t]-XXX, "PEN Constraint")
where EG[t], STD[t] and XXX are decision variables.
I don't understand why Gurobi or Python returns with this error. What do you think the problem came from? Thanks.