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

Support Gurobi Cloud #141

Closed rschwarz closed 3 years ago

rschwarz commented 3 years ago

Currently, python-mip can be used to solve problems with Gurobi on the local machine. A recent mailing-list question asked about corresponding support for Gurobi Cloud.

It's true that this still requires a local Gurobi installation and that a different call must be made to create a Gurobi environment. Namely, in place of GRBloadenv, the related GRBc_loadcloudenv should be called, passing the license details as strings.

It might make sense to create a specific constructor for this, or else add a separate SolverGurobiCloud class for that purpose. I'd like to work on a PR for this feature, but I don't currently have a (cloud) license for testing.

h-g-s commented 3 years ago

Hi @rschwarz , this would be nice indeed ! Does gurobi has some temporary cloud license where you could test it ?

rschwarz commented 3 years ago

I don't think so, at least not in an automated way (the trial process requires manual confirmation). But I will reconsider this issue whenever I have access to a commercial Gurobi license in the future.

PMLP-novo commented 3 years ago

I think Gurobi should be interested in providing you that access. It could give my project the option to use Gurobi. Anybody knows somebody that could provide the access? @mattmilten

mattmilten commented 3 years ago

A simpler way is to specify the cloud via the license file. This should work without changing the code - you just use a cloud license as your default license file and the environment should start as a cloud environment.

rschwarz commented 3 years ago

This can be closed as the feature is already available after all.