Skip to content

Commit

Permalink
added model name and feasible status, testing with cmake and dev bran…
Browse files Browse the repository at this point in the history
…ch of highs
  • Loading branch information
galabovaa committed Sep 24, 2024
1 parent 38a3e1a commit a67b70b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmake/dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ if(BUILD_HIGHS)
FetchContent_Declare(
highs
GIT_REPOSITORY "https://github.com/ERGO-Code/HiGHS.git"
GIT_TAG "v1.7.2"
# GIT_TAG "v1.7.2"
GIT_BRANCH "ortools"
GIT_SHALLOW TRUE
#PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/highs.patch"
)
Expand Down
5 changes: 4 additions & 1 deletion ortools/linear_solver/proto_solver/highs_proto_solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ absl::StatusOr<MPSolutionResponse> HighsSolveProto(
// TODO(user): Set model name.
if (model.has_name()) {
const std::string model_name = model.name();
// highs.passModelName(model_name);
highs.passModelName(model_name);
}

if (request->has_solver_specific_parameters()) {
Expand Down Expand Up @@ -245,6 +245,9 @@ absl::StatusOr<MPSolutionResponse> HighsSolveProto(
break;
default: {
// TODO(user): report feasible status.
const HighsInfo& info = Highs::getInfo().
if (info.primal_solution_status == HighsSolutionStatus::kSolutionStatusFeasible)
response.set_status(MPSOLVER_FEASIBLE);
break;
}
}
Expand Down

0 comments on commit a67b70b

Please sign in to comment.