mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-10 11:28:51 -06:00
Add _gurobipy suffix to all build_model functions
This commit is contained in:
@@ -11,7 +11,7 @@ from pyomo import environ as pe
|
||||
def _gurobipy_set_params(model: gp.Model, params: Optional[dict[str, Any]]) -> None:
|
||||
assert isinstance(model, gp.Model)
|
||||
if params is not None:
|
||||
for (param_name, param_value) in params.items():
|
||||
for param_name, param_value in params.items():
|
||||
setattr(model.params, param_name, param_value)
|
||||
|
||||
|
||||
@@ -24,5 +24,5 @@ def _pyomo_set_params(
|
||||
solver == "gurobi_persistent"
|
||||
), "setting parameters is only supported with gurobi_persistent"
|
||||
if solver == "gurobi_persistent" and params is not None:
|
||||
for (param_name, param_value) in params.items():
|
||||
for param_name, param_value in params.items():
|
||||
model.solver.set_gurobi_param(param_name, param_value)
|
||||
|
||||
Reference in New Issue
Block a user