Skip to content

Commit

Permalink
Gurobi: report iterations only when relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
glebbelov committed Jun 12, 2024
1 parent c93b7e3 commit 7c8be43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solvers/gurobi/gurobibackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1063,12 +1063,12 @@ void GurobiBackend::AddGurobiMessage() {
fmt::format("{} simplex iteration{}\n", si, suffix));
si = BarrierIterations();
suffix = si == 1 ? "" : "s";
if (si)
if (si>0)
AddToSolverMessage(
fmt::format("{} barrier iteration{}\n", si, suffix));
si = NodeCount();
suffix = si == 1 ? "" : "s";
if (si)
if (si>0)
AddToSolverMessage(
fmt::format("{} branching node{}\n", si, suffix));
}
Expand Down

0 comments on commit 7c8be43

Please sign in to comment.