Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bazel_dep(name = "eigen", version = "3.4.0.bcr.3")
bazel_dep(name = "glpk", version = "5.0.bcr.4")
bazel_dep(name = "google_benchmark", version = "1.9.2")
bazel_dep(name = "googletest", version = "1.17.0")
bazel_dep(name = "highs", version = "1.11.0")
bazel_dep(name = "highs", version = "1.12.0")
bazel_dep(name = "protobuf-matchers", version = "0.1.1")
bazel_dep(name = "protobuf", version = "32.0")
bazel_dep(name = "re2", version = "2025-08-12")
Expand Down
5 changes: 5 additions & 0 deletions examples/cpp/uncapacitated_facility_location.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ void RunAllExamples(int32_t facilities, int32_t clients, double fix_cost) {
UncapacitatedFacilityLocation(facilities, clients, fix_cost,
MPSolver::GLPK_MIXED_INTEGER_PROGRAMMING);
#endif
#if defined(USE_HIGHS)
LOG(INFO) << "---- Integer programming example with HiGHS ----";
UncapacitatedFacilityLocation(facilities, clients, fix_cost,
MPSolver::HIGHS_MIXED_INTEGER_PROGRAMMING);
#endif
#if defined(USE_SCIP)
LOG(INFO) << "---- Integer programming example with SCIP ----";
UncapacitatedFacilityLocation(facilities, clients, fix_cost,
Expand Down
1 change: 1 addition & 0 deletions makefiles/Makefile.cpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ detect_cpp:
@echo USE_COINOR = $(USE_COINOR)
@echo USE_SCIP = $(USE_SCIP)
@echo USE_GLPK = $(USE_GLPK)
@echo USE_HIGHS = $(USE_HIGHS)
@echo USE_CPLEX = $(USE_CPLEX)
ifdef GLPK_ROOT
@echo GLPK_ROOT = $(GLPK_ROOT)
Expand Down
1 change: 1 addition & 0 deletions or-tools.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"USE_GLOP",
"USE_CLP",
"USE_CBC",
"USE_HIGHS",
"USE_PDLP",
"USE_SCIP"
],
Expand Down
11 changes: 7 additions & 4 deletions ortools/graph/christofides.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ class ChristofidesPathSolver {
public:
enum class MatchingAlgorithm {
MINIMUM_WEIGHT_MATCHING,
#if defined(USE_CBC) || defined(USE_SCIP)
#if defined(USE_CBC) || defined(USE_SCIP) || defined(USE_HIGHS)
MINIMUM_WEIGHT_MATCHING_WITH_MIP,
#endif // defined(USE_CBC) || defined(USE_SCIP)
#endif // defined(USE_CBC) || defined(USE_SCIP) || defined(USE_HIGHS)
MINIMAL_WEIGHT_MATCHING,
};
ChristofidesPathSolver(NodeIndex num_nodes, CostFunction costs);
Expand Down Expand Up @@ -155,7 +155,7 @@ ComputeMinimumWeightMatching(const GraphType& graph,
return match;
}

#if defined(USE_CBC) || defined(USE_SCIP)
#if defined(USE_CBC) || defined(USE_SCIP) || defined(USE_HIGHS)
// Computes a minimum weight perfect matching on an undirected graph using a
// Mixed Integer Programming model.
// TODO(user): Handle infeasible cases if this algorithm is used outside of
Expand Down Expand Up @@ -211,6 +211,9 @@ ComputeMinimumWeightMatchingWithMIP(const GraphType& graph,
#if defined(USE_SCIP)
MPSolver mp_solver("MatchingWithSCIP",
MPSolver::SCIP_MIXED_INTEGER_PROGRAMMING);
#elif defined(USE_HIGHS)
MPSolver mp_solver("MatchingWithHiGHS",
MPSolver::HIGHS_MIXED_INTEGER_PROGRAMMING);
#elif defined(USE_CBC)
MPSolver mp_solver("MatchingWithCBC",
MPSolver::CBC_MIXED_INTEGER_PROGRAMMING);
Expand Down Expand Up @@ -330,7 +333,7 @@ ChristofidesPathSolver<CostType, ArcIndex, NodeIndex, CostFunction>::Solve() {
result->swap(closure_arcs);
break;
}
#endif // defined(USE_CBC) || defined(USE_SCIP)
#endif // defined(USE_CBC) || defined(USE_SCIP) || defined(USE_HIGHS)
case MatchingAlgorithm::MINIMAL_WEIGHT_MATCHING: {
// TODO(user): Cost caching was added and can gain up to 20% but
// increases memory usage; see if we can avoid caching.
Expand Down
8 changes: 4 additions & 4 deletions ortools/linear_solver/highs_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ int64_t HighsInterface::nodes() const {
}

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

MPSolver::BasisStatus HighsInterface::column_status(int variable_index) const {
// TODO(user): While basis status isn't well defined for PDLP, we could
// TODO(user): While basis status isn't well defined for HiGHS, we could
// guess statuses that might be useful.
return MPSolver::BasisStatus::FREE;
}
Expand All @@ -242,10 +242,10 @@ bool HighsInterface::IsLP() const { return true; }

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

std::string HighsInterface::SolverVersion() const { return "PDLP Solver"; }
std::string HighsInterface::SolverVersion() const { return "HiGHS Solver"; }

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

void HighsInterface::ExtractNewVariables() { NonIncrementalChange(); }
Expand Down