This commit is contained in:
Ivet Galabova
2024-10-21 16:33:37 +03:00
parent 88048888be
commit c4e47c522a
4 changed files with 6 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ Clp=1.17.7
Cgl=0.60.5
Cbc=2.10.7
GLPK=5.0
HiGHS=v1.7.2
HiGHS=v1.8.0
Scip=v900
# Python
pybind11=v2.12.0

View File

@@ -252,7 +252,7 @@ if(BUILD_HIGHS)
GIT_TAG "v1.8.0"
GIT_SHALLOW TRUE
PATCH_COMMAND git apply --ignore-whitespace
"${CMAKE_CURRENT_LIST_DIR}/../../patches/highs-v1.7.2.patch"
"${CMAKE_CURRENT_LIST_DIR}/../../patches/highs-v1.8.0.patch"
)
FetchContent_MakeAvailable(highs)
list(POP_BACK CMAKE_MESSAGE_INDENT)

View File

@@ -52,7 +52,7 @@ absl::StatusOr<MPSolutionResponse> HighsSolveProto(
const MPModelProto& model = **optional_model;
Highs highs;
// TODO(user): Set model name.
// Set model name.
if (model.has_name()) {
const std::string model_name = model.name();
highs.passModelName(model_name);
@@ -115,8 +115,7 @@ absl::StatusOr<MPSolutionResponse> HighsSolveProto(
highs.changeColCost(column, obj_coeffs[column]);
}
// TODO(user): Support variable names.
// Variable names
// Variable names.
for (int v = 0; v < variable_size; ++v) {
const MPVariableProto& variable = model.variable(v);
std::string varname_str = "";
@@ -126,7 +125,7 @@ absl::StatusOr<MPSolutionResponse> HighsSolveProto(
}
}
// TODO(user): Support hints.
// Hints.
int num_hints = model.solution_hint().var_index_size();
if (num_hints > 0) {
std::vector<HighsInt> hint_index(0, num_hints);
@@ -184,8 +183,7 @@ absl::StatusOr<MPSolutionResponse> HighsSolveProto(
}
}
// TODO(user): Support constraint names.
// Constraint names
// Constraint names.
for (int c = 0; c < model.constraint_size(); ++c) {
const MPConstraintProto& constraint = model.constraint(c);
std::string constraint_name_str = "";