cog-imperial / entmoot

Multiobjective black-box optimization using gradient-boosted trees
https://entmoot.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
56 stars 12 forks source link

Enable Cloud Gurobi integration with solver factory params in pyomo #33

Closed TobyBoyne closed 6 months ago

TobyBoyne commented 6 months ago

This PR adds an additional option to solver_params, in the form of solver_factory_params. These are parameters that are added to the solver at creation time. This is relevant in the following example:

When using Gurobi Cloud, you must set the cloud parameters at creation time. Passing in these after creation does nothing, since the environment is already created to be the local environment.

To use this, during the creation of an optimizer, the params dictionary that is passed to the Optimizer should include the following:

params["solver_factory_options"] = {
      "CloudAccessID": "<access-id>",
      "CloudSecretKey": "<api-key>",
}
spiralulam commented 6 months ago

Thank you, @TobyBoyne !