I have an optimization problem and I'm using Python and Gurobi to optimize it. In my problem formulation there is a constraint that has a nested sum.
I've recently started learning python and I searched in gurobi documentation and example codes and I couldn't find any example of nested sum.
I was wondering if anyone could help me solve this problem. Thanks in advance!
Use two for statements inside the
quicksum()
function and two for statements in the generator expression:where m is your
Model
object.