Quantcast
Channel: Common structures in Gurobi - Python - Operations Research Stack Exchange
Viewing all articles
Browse latest Browse all 3

Common structures in Gurobi - Python

$
0
0

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:

First constraint

This one:

Second constraint

And this one:

third constraint

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.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>