Skip to content

Commit

Permalink
Fix update of appsi_copt
Browse files Browse the repository at this point in the history
  • Loading branch information
wujianjack committed Oct 12, 2023
1 parent cd877a9 commit 0928ace
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pyomo/contrib/appsi/solvers/copt.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,10 @@ def _solve(self, timer: HierarchicalTimer):
config = self.config
options = self.copt_options

if config.stream_solver:
self._solver_model.setParam('LogToConsole', 1)
else:
self._solver_model.setParam('LogToConsole', 0)
self._solver_model.setLogFile(config.logfile)
if not config.stream_solver:
self._solver_model.setParam("LogToConsole", 0)
if config.logfile:
self._solver_model.setLogFile(config.logfile)

if config.time_limit is not None:
self._solver_model.setParam('TimeLimit', config.time_limit)
Expand Down Expand Up @@ -1068,7 +1067,7 @@ def get_slacks(self, cons_to_load=None):
return slack

def update(self, timer: HierarchicalTimer = None):
pass
super(Copt, self).update(timer=timer)

def get_model_attr(self, attr):
"""
Expand Down

0 comments on commit 0928ace

Please sign in to comment.