Skip to content

Commit

Permalink
remove MPSWriteError
Browse files Browse the repository at this point in the history
  • Loading branch information
sgatto committed Nov 13, 2023
1 parent fddaba4 commit d750959
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 30 deletions.
1 change: 0 additions & 1 deletion ortools/linear_solver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ cc_library(
"linear_solver_callback.h",
"scip_callback.h",
"scip_helper_macros.h",
"MPSWriteError.h",
] + select({
":use_glop": ["glop_utils.h"],
"//conditions:default": [],
Expand Down
25 changes: 0 additions & 25 deletions ortools/linear_solver/MPSWriteError.h

This file was deleted.

2 changes: 1 addition & 1 deletion ortools/linear_solver/linear_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ class MPSolverInterface {
}

// Writes the model using the solver internal write function. Currently only
// available for GurobiInterface.
// available for GurobiInterface and XpressInterface.
virtual void Write(const std::string& filename);

// ----- Model modifications and extraction -----
Expand Down
4 changes: 1 addition & 3 deletions ortools/linear_solver/xpress_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include "absl/strings/str_format.h"
#include "ortools/base/logging.h"
#include "ortools/base/timer.h"
#include "ortools/base/types.h"
#include "ortools/linear_solver/MPSWriteError.h"
#include "ortools/linear_solver/linear_solver.h"
#include "ortools/xpress/environment.h"

Expand Down Expand Up @@ -2093,7 +2091,7 @@ void XpressInterface::Write(const std::string& filename) {
VLOG(1) << "Writing Xpress MPS \"" << filename << "\".";
const int status = XPRSwriteprob(mLp, filename.c_str(), "");
if (status) {
throw MPSWriteError("Failed to write MPS.");
LOG(ERROR) << "Xpress: Failed to write MPS! ";
}
}

Expand Down

0 comments on commit d750959

Please sign in to comment.