Gurobipy can apparently read the index of a list comprehension formulated within the parentheses of a function. How does this work? Shouldn't this formulation pass a generator object to the function? How do you read the index from that?
md = gp.Model()
md.addConstrs(True for i in [1,2,5,3])
The output contains the indices that where used in the list comprehension formulation:
{1: <gurobi.Constr *Awaiting Model Update*>,
2: <gurobi.Constr *Awaiting Model Update*>,
5: <gurobi.Constr *Awaiting Model Update*>,
3: <gurobi.Constr *Awaiting Model Update*>}
addConstrsretrieve the[1,2,5,3]from gen expression?