bump scip to 920

This commit is contained in:
Laurent Perron
2024-11-07 18:15:32 -08:00
parent 67ce2cbe4c
commit 49870addc7
7 changed files with 14 additions and 11 deletions

View File

@@ -10,7 +10,7 @@ Cgl=0.60.5
Cbc=2.10.7
GLPK=5.0
HiGHS=v1.8.0
Scip=v900
Scip=v920
# Python
pybind11=v2.12.0
pybind11_abseil=52f2739

View File

@@ -184,9 +184,9 @@ http_archive(
new_git_repository(
name = "scip",
build_file = "//bazel:scip.BUILD.bazel",
patches = ["//bazel:scip-v900.patch"],
patches = ["//bazel:scip-v920.patch"],
patch_args = ["-p1"],
tag = "v900",
tag = "v920",
remote = "https://github.com/scipopt/scip.git",
)

View File

@@ -280,9 +280,9 @@ if(BUILD_SCIP)
FetchContent_Declare(
scip
GIT_REPOSITORY "https://github.com/scipopt/scip.git"
GIT_TAG "v900"
GIT_TAG "v920"
GIT_SHALLOW TRUE
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/scip-v900.patch"
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/scip-v920.patch"
)
FetchContent_MakeAvailable(scip)
set(LPI_GLOP_SRC ${scip_SOURCE_DIR}/src/lpi/lpi_glop.cpp PARENT_SCOPE)

View File

@@ -1001,12 +1001,13 @@ absl::StatusOr<GScipResult> GScip::Solve(
}
const SCIP_STAGE stage = SCIPgetStage(scip_);
if (stage != SCIP_STAGE_PRESOLVING && stage != SCIP_STAGE_SOLVING &&
stage != SCIP_STAGE_SOLVED) {
stage != SCIP_STAGE_SOLVED && stage != SCIP_STAGE_PRESOLVED) {
result.gscip_output.set_status(GScipOutput::UNKNOWN);
result.gscip_output.set_status_detail(
absl::StrCat("Unexpected SCIP final stage= ", stage,
" was expected to be either SCIP_STAGE_PRESOLVING, "
"SCIP_STAGE_SOLVING, or SCIP_STAGE_SOLVED"));
"SCIP_STAGE_SOLVING, SCIP_STAGE_PRESOLVED, or "
"SCIP_STAGE_SOLVED"));
return result;
}
if (params.print_detailed_solving_stats()) {

View File

@@ -19,6 +19,7 @@
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "ortools/base/logging.h"
#include "ortools/base/status_macros.h"
@@ -80,7 +81,7 @@ absl::Status GScipCreateAbs(GScip* gscip, SCIP_Var* x, SCIP_Var* abs_x,
}
absl::Status GScipCreateMaximum(GScip* gscip, const GScipLinearExpr& resultant,
const std::vector<GScipLinearExpr>& terms,
absl::Span<const GScipLinearExpr> terms,
absl::string_view name) {
// TODO(user): it may be better to write this in terms of the disjuntive
// constraint, we need to support disjunctions in gscip.h to do this.
@@ -136,7 +137,7 @@ absl::Status GScipCreateMaximum(GScip* gscip, const GScipLinearExpr& resultant,
}
absl::Status GScipCreateMinimum(GScip* gscip, const GScipLinearExpr& resultant,
const std::vector<GScipLinearExpr>& terms,
absl::Span<const GScipLinearExpr> terms,
absl::string_view name) {
std::vector<GScipLinearExpr> negated_terms;
negated_terms.reserve(terms.size());

View File

@@ -31,6 +31,7 @@
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "ortools/gscip/gscip.h"
#include "scip/scip.h"
#include "scip/scip_prob.h"
@@ -70,13 +71,13 @@ GScipLinearRange GScipLe(GScipLinearExpr left, const GScipLinearExpr& right);
// Adds the constraint resultant = maximum(terms). Supports unbounded variables
// in terms.
absl::Status GScipCreateMaximum(GScip* gscip, const GScipLinearExpr& resultant,
const std::vector<GScipLinearExpr>& terms,
absl::Span<const GScipLinearExpr> terms,
absl::string_view name = "");
// Adds the constraint resultant = minimum(terms). Supports unbounded variables
// in terms.
absl::Status GScipCreateMinimum(GScip* gscip, const GScipLinearExpr& resultant,
const std::vector<GScipLinearExpr>& terms,
absl::Span<const GScipLinearExpr> terms,
absl::string_view name = "");
// Models the constraint z = 1 => lb <= ax <= ub