Many integer programming programs as the following needed for Kemeny ranking
$$ \begin{array}{c} \text{minimiser} \sum_{i,j \in \mathcal{A}}\omega_{i,j} x_{i,j}+\omega_{j,i} x_{j,i}\\ \text{sous les contraintes} \\ x_{i,j}+ x_{j,i} = 1, \forall i \not=j\\ x_{i,j}+ x_{j,k}+ x_{k,i}\geq 1, \forall i \not=j\not=k\not=i \end{array} $$
I want to construct a function wich takes the vector or the list $\omega$ and return the solution. But to construct such a function iot will be safer for me not to be obliged to assign on variable with a index to all two indexed variables.
Is there a way ?