Skip to content

Commit

Permalink
change GUROBI to Gurobi
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedongPeng committed Aug 22, 2023
1 parent c0d8ad9 commit fa810fd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pyomo/contrib/mindtpy/algorithm_base_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,7 @@ def check_config(self):
'appsi_gurobi',
} or config.mip_regularization_solver in {'gurobi', 'appsi_gurobi'}:
raise ValueError(
"GUROBI can not provide duals for mixed-integer problems."
"Gurobi can not provide duals for mixed-integer problems."
)

################################################################################################################################
Expand Down
2 changes: 1 addition & 1 deletion pyomo/contrib/mindtpy/single_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ def __call__(self):


def LazyOACallback_gurobi(cb_m, cb_opt, cb_where, mindtpy_solver, config):
"""This is a GUROBI callback function defined for LP/NLP based B&B algorithm.
"""This is a Gurobi callback function defined for LP/NLP based B&B algorithm.
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion pyomo/contrib/mindtpy/tests/test_mindtpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def test_OA_no_good_cuts(self):

@unittest.skipUnless(
SolverFactory('cplex').available() or SolverFactory('gurobi').available(),
"CPLEX or GUROBI not available.",
"CPLEX or Gurobi not available.",
)
def test_OA_quadratic_strategy(self):
"""Test the outer approximation decomposition algorithm."""
Expand Down
2 changes: 1 addition & 1 deletion pyomo/contrib/mindtpy/tests/test_mindtpy_global_lp_nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_GOA_tabu_list(self):
and SolverFactory('gurobi_direct').available(),
'gurobi_persistent and gurobi_direct solver is not available',
)
def test_GOA_GUROBI(self):
def test_GOA_Gurobi(self):
"""Test the global outer approximation decomposition algorithm."""
with SolverFactory('mindtpy') as opt:
for model in model_list:
Expand Down
2 changes: 1 addition & 1 deletion pyomo/contrib/mindtpy/tests/test_mindtpy_lp_nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_LPNLP_CPLEX(self):
'gurobi_persistent' in available_mip_solvers,
'gurobi_persistent solver is not available',
)
def test_LPNLP_GUROBI(self):
def test_LPNLP_Gurobi(self):
"""Test the LP/NLP decomposition algorithm."""
with SolverFactory('mindtpy') as opt:
for model in model_list:
Expand Down
8 changes: 4 additions & 4 deletions pyomo/contrib/mindtpy/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,18 +721,18 @@ def copy_var_list_values_from_solution_pool(


class GurobiPersistent4MindtPy(GurobiPersistent):
"""A new persistent interface to GUROBI.
"""A new persistent interface to Gurobi.
Args:
GurobiPersistent (PersistentSolver): A class that provides a persistent interface to GUROBI.
GurobiPersistent (PersistentSolver): A class that provides a persistent interface to Gurobi.
"""

def _intermediate_callback(self):
def f(gurobi_model, where):
"""Callback function for GUROBI.
"""Callback function for Gurobi.
Args:
gurobi_model (GUROBI model): the GUROBI model derived from pyomo model.
gurobi_model (Gurobi model): the Gurobi model derived from pyomo model.
where (int): an enum member of gurobipy.GRB.Callback.
"""
self._callback_func(
Expand Down

0 comments on commit fa810fd

Please sign in to comment.