linear_solver: google3 export
This commit is contained in:
@@ -524,6 +524,7 @@ bool MPSolver::SupportsProblemType(OptimizationProblemType problem_type) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,6 @@ class MPSolver {
|
||||
CPLEX_MIXED_INTEGER_PROGRAMMING = 11,
|
||||
XPRESS_LINEAR_PROGRAMMING = 101,
|
||||
XPRESS_MIXED_INTEGER_PROGRAMMING = 102,
|
||||
|
||||
HIGHS_MIXED_INTEGER_PROGRAMMING = 16,
|
||||
|
||||
// Boolean optimization problem (requires only integer variables and works
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
@@ -259,8 +260,11 @@ absl::StatusOr<MPSolutionResponse> SatSolveProto(
|
||||
}
|
||||
}
|
||||
if (params.mip_var_scaling() != 1.0) {
|
||||
const double max_bound = params.mip_scale_large_domain()
|
||||
? std::numeric_limits<double>::infinity()
|
||||
: params.mip_max_bound();
|
||||
const std::vector<double> other_scaling = sat::ScaleContinuousVariables(
|
||||
params.mip_var_scaling(), params.mip_max_bound(), mp_model);
|
||||
params.mip_var_scaling(), max_bound, mp_model);
|
||||
for (int i = 0; i < var_scaling.size(); ++i) {
|
||||
var_scaling[i] *= other_scaling[i];
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace operations_research {
|
||||
|
||||
#define ADD_LP_PREPROCESSOR(name) \
|
||||
names.push_back(#name); \
|
||||
lp_preprocessors.push_back(absl::make_unique<name>(&glop_params));
|
||||
lp_preprocessors.push_back(std::make_unique<name>(&glop_params));
|
||||
|
||||
glop::ProblemStatus ApplyMipPresolveSteps(
|
||||
const glop::GlopParameters& glop_params, MPModelProto* model,
|
||||
|
||||
@@ -166,7 +166,7 @@ ScipSeparationResult RunSeparation(internal::ScipCallbackRunner* runner,
|
||||
CHECK_OK(SCIP_TO_STATUS(SCIPreleaseRow(scip, &row)));
|
||||
// TODO(user): when infeasible is true, it better to have the scip
|
||||
// return status be cutoff instead of cutting plane added (e.g. see
|
||||
// cs/scip/cons_knapsack.c). However, as we use
|
||||
// cs/scip/src/scip/cons_knapsack.c). However, as we use
|
||||
// SCIPaddRow(), it isn't clear this will even happen.
|
||||
if (result != ScipSeparationResult::kLazyConstraintAdded) {
|
||||
// NOTE(user): if we have already found a violated lazy constraint,
|
||||
|
||||
Reference in New Issue
Block a user