misc sync code

This commit is contained in:
Laurent Perron
2022-01-21 11:59:32 +01:00
parent 0e11ae7986
commit 95dd14be0d
5 changed files with 10 additions and 2 deletions

View File

@@ -738,6 +738,13 @@ absl::Status GScip::SetLinearConstraintCoef(SCIP_CONS* constraint,
return absl::OkStatus();
}
absl::Status GScip::AddLinearConstraintCoef(SCIP_CONS* const constraint,
SCIP_VAR* const var,
const double value) {
RETURN_IF_SCIP_ERROR(SCIPaddCoefLinear(scip_, constraint, var, value));
return absl::OkStatus();
}
absl::StatusOr<GScipHintResult> GScip::SuggestHint(
const GScipSolution& partial_solution) {
SCIP_SOL* solution;

View File

@@ -233,6 +233,8 @@ class GScip {
absl::Status SetLinearConstraintUb(SCIP_CONS* constraint, double ub);
absl::Status SetLinearConstraintCoef(SCIP_CONS* constraint, SCIP_VAR* var,
double value);
absl::Status AddLinearConstraintCoef(SCIP_CONS* constraint, SCIP_VAR* var,
double value);
// Works on all constraint types. Unlike DeleteVariable, no special action is
// required before deleting a constraint.

View File

@@ -43,7 +43,6 @@ bool GurobiIsCorrectlyInstalled() {
// See the comment at the top of the script.
// This is the 'define' section.
std::function<int(GRBenv**, const char*, const char*, const char*, int,
const char*)>
GRBisqp = nullptr;

View File

@@ -20,6 +20,7 @@
#include "absl/status/statusor.h"
#include "absl/strings/match.h"
#include "absl/strings/str_split.h"
#include "ortools/base/protobuf_util.h"
#include "ortools/base/status_builder.h"
#include "ortools/lp_data/lp_types.h"

View File

@@ -31,7 +31,6 @@
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/container/node_hash_set.h"
#include "absl/flags/declare.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"