Skip to content

Commit

Permalink
math_opt fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Oct 11, 2023
1 parent 7230062 commit bc39e45
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions ortools/math_opt/solvers/glpk_solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,13 @@ absl::StatusOr<TerminationProto> SimplexTerminationOnSuccess(

// Returns a status error indicating that glp_get_dual_stat() returned an
// unexpected value.
const auto unexpected_dual_stat = [&]() {
return absl::InternalError(
absl::StrCat(
"glp_simplex() returned 0 but glp_get_dual_stat() returned the "
"unexpected value ",
SolutionStatusString(dual_status),
" while glp_get_prim_stat() returned ",
SolutionStatusString(prim_status)));
const auto unexpected_dual_stat = [&]() -> absl::Status {
return util::InternalErrorBuilder()
<< "glp_simplex() returned 0 but glp_get_dual_stat() returned the "
"unexpected value "
<< SolutionStatusString(dual_status)
<< " while glp_get_prim_stat() returned "
<< SolutionStatusString(prim_status);
};

switch (prim_status) {
Expand Down

0 comments on commit bc39e45

Please sign in to comment.