Skip to content

Commit

Permalink
Merge pull request #33 from TobyBoyne/feature/cloudguoribi
Browse files Browse the repository at this point in the history
Enable Cloud Gurobi integration with solver factory params in pyomo
  • Loading branch information
spiralulam authored May 6, 2024
2 parents 5d90ab3 + fd9d792 commit 9c6f53b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion entmoot/optimizers/pyomo_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ def solve(
assert sum(weights) == 1.0, "weights don't add up to 1.0"

# choose solver
opt = pyo.SolverFactory(self._params["solver_name"])
opt = pyo.SolverFactory(
self._params["solver_name"],
manage_env="solver_factory_options" in self._params,
options=self._params.get("solver_factory_options", {}),
)

# set solver parameters
if "solver_options" in self._params:
Expand Down

0 comments on commit 9c6f53b

Please sign in to comment.