Skip to content

Commit

Permalink
[solvers] Fix Gurobi console logging obey our defaults again (#22108)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri authored Nov 1, 2024
1 parent 16e7281 commit d6ff6cc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions solvers/gurobi_solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -954,9 +954,7 @@ void GurobiSolver::DoSolve2(const MathematicalProgram& prog,

// Copy the remaining options into model_env.
options->Respell([](const auto& common, auto* respelled) {
if (common.print_to_console) {
respelled->emplace("LogToConsole", 1);
}
respelled->emplace("LogToConsole", common.print_to_console ? 1 : 0);
if (!common.print_file_name.empty()) {
respelled->emplace("LogFile", common.print_file_name);
}
Expand Down

0 comments on commit d6ff6cc

Please sign in to comment.