@@ -167,14 +167,9 @@ func eliminateSingletons(p *problem.Problem) (*problem.Problem, *reduction) {
167167 return q , & reduction {orig : p , records : records , colMap : colMap }
168168}
169169
170- // dropRedundantContinuousRows removes rows that (a) can never bind under the
171- // current column bounds (min activity >= lb and max activity <= ub) and (b)
172- // contain no integer column. Condition (a) makes removal exact for the LP;
173- // condition (b) keeps it clear of the GMI/MIR cut suite, which only derives
174- // from integer structure — so the relaxation, cuts and branch tree are all
175- // unchanged, only inert continuous rows leave (CBC forcing-row removal).
176- // Returns (nil,nil) when nothing qualifies; keep[origRow]=false when dropped.
177- func dropRedundantContinuousRows (p * problem.Problem ) (* problem.Problem , []bool ) {
170+ // dropRedundantRows removes never-binding rows (exact; postsolve: a·x, 0 dual).
171+ // includeInt also drops integer rows — CBC CglPreProcess forcing removal (D1).
172+ func dropRedundantRows (p * problem.Problem , includeInt bool ) (* problem.Problem , []bool ) {
178173 inf := problem .Inf
179174 keep := make ([]bool , len (p .Rows ))
180175 nkeep := 0
@@ -208,7 +203,7 @@ func dropRedundantContinuousRows(p *problem.Problem) (*problem.Problem, []bool)
208203 mx += a * lb
209204 }
210205 }
211- redundant := ! hasInt && mni == 0 && mxi == 0 && mn >= rlb - 1e-7 && mx <= rub + 1e-7
206+ redundant := ( includeInt || ! hasInt ) && mni == 0 && mxi == 0 && mn >= rlb - 1e-7 && mx <= rub + 1e-7
212207 keep [ri ] = ! redundant
213208 if keep [ri ] {
214209 nkeep ++
@@ -231,7 +226,7 @@ func dropRedundantContinuousRows(p *problem.Problem) (*problem.Problem, []bool)
231226 nri := q .AddRow (r .Name , r .Idx , r .Coef , r .Sense , r .RHS )
232227 q .Rows [nri ].HasRange , q .Rows [nri ].Range = r .HasRange , r .Range
233228 }
234- debugf ("presolve: dropped %d/%d redundant continuous rows" , len (p .Rows )- nkeep , len (p .Rows ))
229+ debugf ("presolve: dropped %d/%d redundant rows (includeInt=%v) " , len (p .Rows )- nkeep , len (p .Rows ), includeInt )
235230 return q , keep
236231}
237232
0 commit comments