coin-or / python-mip

Python-MIP: collection of Python tools for the modeling and solution of Mixed-Integer Linear programs
Eclipse Public License 2.0
525 stars 92 forks source link

check if gurobi is available only once #136

Closed jurasofish closed 4 years ago

jurasofish commented 4 years ago

As covered in #135, checking if Gurobi is available is done every time a Model is instantiated and is extremely slow. In my use case, a few milliseconds makes a substantial difference to total application runtime since I'm solving many small models.

This change does that check just once.

h-g-s commented 4 years ago

Excellent ! Much better.