'How to write double summation in Gurobi Python
I am new to Gurobi and I would like to check if my code for the following formulation is correct.
m = Model("MIP1")
m.setObjective(quicksum(c[s]*x[a,p] for a in A for p in P for s in S), GRB.MINIMIZE)
m.addConstr(quicksum(Q[a]*x[a,p] for a in A for p in P <= K[s] for s in S,"c0")
m.addConstr(quicksum(x[a,p] for p in P)==1 for a in A,"c1")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

