Skip to content

Commit

Permalink
add output_flag (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
pchtsp authored Mar 4, 2024
1 parent cfc898e commit cfb8a0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pulp/apis/highs_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,16 @@ def callSolver(self, lp):
def createAndConfigureSolver(self, lp):
lp.solverModel = highspy.Highs()

if self.msg or self.callbackTuple:
if self.msg and self.callbackTuple:
callbackTuple = self.callbackTuple or (
HiGHS.DEFAULT_CALLBACK,
HiGHS.DEFAULT_CALLBACK_VALUE,
)
lp.solverModel.setLogCallback(*callbackTuple)

if not self.msg:
lp.solverModel.setOptionValue("output_flag", False)

if self.gapRel is not None:
lp.solverModel.setOptionValue("mip_rel_gap", self.gapRel)

Expand Down

0 comments on commit cfb8a0f

Please sign in to comment.