[GLOP] add presolve parameter

This commit is contained in:
Laurent Perron
2021-11-03 19:27:24 +01:00
parent 80af13789a
commit c3587095ab
2 changed files with 5 additions and 1 deletions

View File

@@ -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];
}

View File

@@ -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();