I'm still stuck. Does the AddGenConstrAnd Function work with sums? I used:
z ={}
for k in range(numGridpoints):
for i in range(numCustomer):
for l in range(numGridpoints):
if k!=0 and l!=0:
z[k,i,l] = m.addVar(vtype=GRB.BINARY, name= "z%d,%d,%d"%(k,i,l))
m.addGenConstrAnd(z[k,i,l] , [quicksum(y[k,i,l] for k in range(numGridpoints) if k!=0),quicksum(y[k,i,l] for l in range(numGridpoints) if l!=0)] , "slackconstraintEq17,%d,%d,%d"%(k,i,l))
So first I added a slackvariable z and then tried to add the Constraint. But I get the error:
GurobiError: Invalid data in vars array
Do you know what am I doing wrong and/or how it would work?