diff --git a/ortools/glop/parameters.proto b/ortools/glop/parameters.proto index 257ad096a5..8bb9d11ca0 100644 --- a/ortools/glop/parameters.proto +++ b/ortools/glop/parameters.proto @@ -22,7 +22,7 @@ syntax = "proto2"; package operations_research.glop; -// next id = 67 +// next id = 68 message GlopParameters { // Supported algorithms for scaling: @@ -469,4 +469,7 @@ message GlopParameters { // SetStartingVariableValuesForNextSolve(). optional bool push_to_vertex = 65 [default = true]; + // If presolve runs, include the pass that detects implied free variables. + optional bool use_implied_free_preprocessor = 67 [default = true]; + } diff --git a/ortools/glop/preprocessor.cc b/ortools/glop/preprocessor.cc index 6aaa928289..6f476b84d4 100644 --- a/ortools/glop/preprocessor.cc +++ b/ortools/glop/preprocessor.cc @@ -1381,6 +1381,7 @@ struct ColWithDegree { bool ImpliedFreePreprocessor::Run(LinearProgram* lp) { SCOPED_INSTRUCTION_COUNT(time_limit_); RETURN_VALUE_IF_NULL(lp, false); + if (!parameters_.use_implied_free_preprocessor()) return false; const RowIndex num_rows = lp->num_constraints(); const ColIndex num_cols = lp->num_variables();