I'm new to Gurobi in Python and I was wondering if someone knows how to code some common structures of linear constraints. I'm trying to understand how you'll code something like the following constraints: \begin{alignat}2\sum_{i\in A\mid i\ne j}\sum_{j\in A\mid i\ne j}x_{ij}&\le10\tag1\\\sum_{i\in A\mid i\ne j}x_{ij}&\le10\quad\forall j\in B\tag2\\x_{ij}&\le10\quad\forall i\in A,j\in B\mid i\ne j\tag3.\end{alignat}
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 structures in Gurobi Python.
If you can provide a code example, that would be great.