I'm new to Gurobi in Python and I was wondering if someone knows how to code some common structures of linear constraints. Punctually, I'm trying to understand how you'll code something like the following constraints:
This one:
And this one:
In FICO Xpress, the first constraint would be coded like:
sum(i in A, j in A | i<>j)x(i,j)<=10
But I don't know how to code such structure in Gurobi Python.
Thanks for your help!
If you can provide a code example, that would be great.