Skip to content

Commit a07ec2a

Browse files
committed
remove knapsack solver interface
1 parent 3d7f967 commit a07ec2a

9 files changed

Lines changed: 287 additions & 401 deletions

ortools/linear_solver/BUILD.bazel

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ load("@protobuf//bazel:py_proto_library.bzl", "py_proto_library")
1818
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
1919
load("@rules_cc//cc:cc_library.bzl", "cc_library")
2020

21-
# For all the linear_solver_interface_tests rules.
22-
2321
package(default_visibility = ["//visibility:public"])
2422

2523
# OSS solvers
@@ -582,11 +580,18 @@ cc_binary(
582580

583581
cc_library(
584582
name = "scip_helper_macros",
583+
srcs = ["scip_helper_macros.cc"],
585584
hdrs = ["scip_helper_macros.h"],
586585
deps = [
587586
"//ortools/base:status_macros",
587+
"@abseil-cpp//absl/base",
588+
"@abseil-cpp//absl/base:nullability",
589+
"@abseil-cpp//absl/log",
590+
"@abseil-cpp//absl/log:check",
588591
"@abseil-cpp//absl/status",
589-
"@abseil-cpp//absl/strings:str_format",
592+
"@abseil-cpp//absl/strings",
593+
"@abseil-cpp//absl/strings:string_view",
594+
"@scip",
590595
],
591596
)
592597

ortools/linear_solver/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ list(APPEND _SRCS
2323
model_exporter.h
2424
model_validator.cc
2525
model_validator.h
26+
sat_interface.cc
27+
scip_helper_macros.cc
2628
solve_mp_model.cc
2729
solve_mp_model.h
28-
sat_interface.cc
2930
)
3031

3132
if(USE_BOP)

ortools/linear_solver/highs_interface.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,10 @@ int64_t HighsInterface::nodes() const {
224224
}
225225

226226
MPSolver::BasisStatus HighsInterface::row_status(int constraint_index) const {
227-
// TODO(user): While basis status isn't well defined for PDLP, we could
228-
// guess statuses that might be useful.
229227
return MPSolver::BasisStatus::FREE;
230228
}
231229

232230
MPSolver::BasisStatus HighsInterface::column_status(int variable_index) const {
233-
// TODO(user): While basis status isn't well defined for PDLP, we could
234-
// guess statuses that might be useful.
235231
return MPSolver::BasisStatus::FREE;
236232
}
237233

@@ -241,10 +237,8 @@ bool HighsInterface::IsLP() const { return true; }
241237

242238
bool HighsInterface::IsMIP() const { return solve_as_a_mip_; }
243239

244-
std::string HighsInterface::SolverVersion() const { return "PDLP Solver"; }
240+
std::string HighsInterface::SolverVersion() const { return "HiGHS Solver"; }
245241

246-
// TODO(user): Consider returning the SolveLog here, as it could be essential
247-
// for interpreting the PDLP solution.
248242
void* HighsInterface::underlying_solver() { return nullptr; }
249243

250244
void HighsInterface::ExtractNewVariables() { NonIncrementalChange(); }

0 commit comments

Comments
 (0)