jump-dev / Gurobi.jl

A Julia interface to the Gurobi Optimizer
http://www.gurobi.com/
MIT License
223 stars 81 forks source link

Provide a way to set configuration parameters in Gurobi.Env #588

Open simonbowly opened 4 days ago

simonbowly commented 4 days ago

From https://github.com/jump-dev/Gurobi_jll.jl/issues/30.

For WLS licenses, compute servers, cluster managers it's necessary to set parameters on an empty environment before starting it (if, that is, you don't want to keep those parameters in the license file).

https://docs.gurobi.com/projects/optimizer/en/11.0/concepts/environments/configuration.html#empty-environment-example

It would be helpful if there were a way to provide these parameters without calling C API functions directly. In gurobipy we use the following pattern to pass a mapping of parameters to be set before the environment is started:

import gurobipy as gp

env = gp.Env(params={
    "CSManager": "<url>",
    "CSAPIAccessID": "<api key>",
    "CSAPISecret": "<api secret>",
})

@odow would it be reasonable to provide a Gurobi.Env constructor that takes a Dict? That would generalise the approach currently in Gurobi.jl of having separate constructors for memory limits and compute servers.

odow commented 4 days ago

I've moved this to Gurobi.jl.

No objection.