37 const glop::GlopParameters& glop_params, MPModelProto* model,
38 std::vector<std::unique_ptr<glop::Preprocessor>>* for_postsolve,
40 CHECK(model !=
nullptr);
43 if (!model->general_constraint().empty()) {
48 const bool hint_is_present = model->has_solution_hint();
49 const auto copy_of_hint = model->solution_hint();
63 if (!hint_is_present) {
64 const std::string header =
65 "Running basic LP presolve, initial problem dimensions: ";
68 std::vector<std::string> names;
69 std::vector<std::unique_ptr<glop::Preprocessor>> lp_preprocessors;
81 for (
int i = 0; i < lp_preprocessors.size(); ++i) {
83 auto& preprocessor = lp_preprocessors[i];
85 preprocessor->UseInMipContext();
86 const bool need_postsolve = preprocessor->Run(&lp);
87 names[i].resize(header.size(),
' ');
91 if (need_postsolve) for_postsolve->push_back(std::move(preprocessor));
96 if (!hint_is_present) {
98 std::make_unique<glop::ShiftVariableBoundsPreprocessor>(&glop_params);
99 shift_bounds->UseInMipContext();
100 const bool need_postsolve = shift_bounds->Run(&lp);
102 return shift_bounds->status();
104 if (need_postsolve) {
105 for_postsolve->push_back(std::move(shift_bounds));
113 if (hint_is_present) {
114 *model->mutable_solution_hint() = copy_of_hint;