Skip to content

Commit 7803551

Browse files
committed
skip checks in enfops of cons_fixedvar if solution already infeasible
- the conshdlr could not contribute anything new
1 parent 1bf51ec commit 7803551

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/scip/cons_fixedvar.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ SCIP_DECL_CONSENFOPS(consEnfopsFixedvar)
413413

414414
*result = SCIP_FEASIBLE;
415415

416+
/* skip check for solutions that are already declared infeasible
417+
* we could not do anything else than also signaling infeasibility
418+
*/
419+
if( solinfeasible )
420+
return SCIP_OKAY;
421+
416422
conshdlrdata = SCIPconshdlrGetData(conshdlr);
417423
assert(conshdlrdata != NULL);
418424

@@ -432,11 +438,9 @@ SCIP_DECL_CONSENFOPS(consEnfopsFixedvar)
432438

433439
if( (!SCIPisInfinity(scip, -lb) && SCIPisFeasLT(scip, val, lb)) || (!SCIPisInfinity(scip, ub) && SCIPisFeasGT(scip, val, ub)) )
434440
{
435-
/* if solution is already declared infeasible, then do not force solving an LP, as it may fail (we may be in enfops because the LP failed) */
436-
*result = solinfeasible ? SCIP_INFEASIBLE : SCIP_SOLVELP;
441+
*result = SCIP_SOLVELP;
437442

438-
if( !solinfeasible )
439-
assertSmallViolation(lb, val, ub);
443+
assertSmallViolation(lb, val, ub);
440444

441445
break;
442446
}

0 commit comments

Comments
 (0)