Skip to content

Commit 6c060af

Browse files
committed
Merge remote-tracking branch 'origin/v92-bugfix' into v9-minor
2 parents 7611aed + 8b59d6a commit 6c060af

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

src/scip/cons_varbound.c

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3394,10 +3394,7 @@ SCIP_RETCODE applyFixings(
33943394

33953395
if( ( !SCIPisInfinity(scip, -consdata->lhs) && SCIPisFeasLT(scip, activity, consdata->lhs) )
33963396
|| ( !SCIPisInfinity(scip, consdata->rhs) && SCIPisFeasGT(scip, activity, consdata->rhs) ) )
3397-
{
33983397
*cutoff = TRUE;
3399-
return SCIP_OKAY;
3400-
}
34013398

34023399
redundant = TRUE;
34033400
}
@@ -3408,7 +3405,7 @@ SCIP_RETCODE applyFixings(
34083405
assert( vbdvarscalar != 0.0 );
34093406

34103407
/* x is fixed to varconstant: update bounds of y and delete the variable bound constraint */
3411-
if( !SCIPisInfinity(scip, -consdata->lhs) )
3408+
if( !(*cutoff) && !SCIPisInfinity(scip, -consdata->lhs) )
34123409
{
34133410
if( consdata->vbdcoef > 0.0 )
34143411
{
@@ -3419,9 +3416,8 @@ SCIP_RETCODE applyFixings(
34193416
if( *cutoff )
34203417
{
34213418
SCIPdebugMsg(scip, " -> tightening <%s> >= %.15g infeasible\n", SCIPvarGetName(consdata->vbdvar), newbnd);
3422-
return SCIP_OKAY;
34233419
}
3424-
if( tightened )
3420+
else if( tightened )
34253421
{
34263422
SCIPdebugMsg(scip, " -> tightened lower bound: <%s> >= %.15g\n", SCIPvarGetName(consdata->vbdvar), SCIPvarGetLbGlobal(consdata->vbdvar));
34273423
(*nchgbds)++;
@@ -3436,16 +3432,15 @@ SCIP_RETCODE applyFixings(
34363432
if( *cutoff )
34373433
{
34383434
SCIPdebugMsg(scip, " -> tightening <%s> <= %.15g infeasible\n", SCIPvarGetName(consdata->vbdvar), newbnd);
3439-
return SCIP_OKAY;
34403435
}
3441-
if( tightened )
3436+
else if( tightened )
34423437
{
34433438
SCIPdebugMsg(scip, " -> tightened upper bound: <%s> <= %.15g\n", SCIPvarGetName(consdata->vbdvar), SCIPvarGetUbGlobal(consdata->vbdvar));
34443439
(*nchgbds)++;
34453440
}
34463441
}
34473442
}
3448-
if( !SCIPisInfinity(scip, consdata->rhs) )
3443+
if( !(*cutoff) && !SCIPisInfinity(scip, consdata->rhs) )
34493444
{
34503445
if( consdata->vbdcoef > 0.0 )
34513446
{
@@ -3456,9 +3451,8 @@ SCIP_RETCODE applyFixings(
34563451
if( *cutoff )
34573452
{
34583453
SCIPdebugMsg(scip, " -> tightening <%s> <= %.15g infeasible\n", SCIPvarGetName(consdata->vbdvar), newbnd);
3459-
return SCIP_OKAY;
34603454
}
3461-
if( tightened )
3455+
else if( tightened )
34623456
{
34633457
SCIPdebugMsg(scip, " -> tightened upper bound: <%s> <= %.15g\n", SCIPvarGetName(consdata->vbdvar), SCIPvarGetUbGlobal(consdata->vbdvar));
34643458
(*nchgbds)++;
@@ -3473,9 +3467,8 @@ SCIP_RETCODE applyFixings(
34733467
if( *cutoff )
34743468
{
34753469
SCIPdebugMsg(scip, " -> tightening <%s> >= %.15g infeasible\n", SCIPvarGetName(consdata->vbdvar), newbnd);
3476-
return SCIP_OKAY;
34773470
}
3478-
if( tightened )
3471+
else if( tightened )
34793472
{
34803473
SCIPdebugMsg(scip, " -> tightened lower bound: <%s> >= %.15g\n", SCIPvarGetName(consdata->vbdvar), SCIPvarGetLbGlobal(consdata->vbdvar));
34813474
(*nchgbds)++;
@@ -3582,7 +3575,7 @@ SCIP_RETCODE applyFixings(
35823575
assert( !SCIPisZero(scip, varscalar) );
35833576

35843577
/* y is fixed to vbdvarconstant: update bounds of x and delete the variable bound constraint */
3585-
if( !SCIPisInfinity(scip, -consdata->lhs) )
3578+
if( !(*cutoff) && !SCIPisInfinity(scip, -consdata->lhs) )
35863579
{
35873580
SCIP_Bool tightened;
35883581

@@ -3591,15 +3584,14 @@ SCIP_RETCODE applyFixings(
35913584
if( *cutoff )
35923585
{
35933586
SCIPdebugMsg(scip, " -> tightening <%s> >= %.15g infeasible\n", SCIPvarGetName(consdata->var), newbnd);
3594-
return SCIP_OKAY;
35953587
}
3596-
if( tightened )
3588+
else if( tightened )
35973589
{
35983590
SCIPdebugMsg(scip, " -> tightened lower bound: <%s> >= %.15g\n", SCIPvarGetName(consdata->var), SCIPvarGetLbGlobal(consdata->var));
35993591
(*nchgbds)++;
36003592
}
36013593
}
3602-
if( !SCIPisInfinity(scip, consdata->rhs) )
3594+
if( !(*cutoff) && !SCIPisInfinity(scip, consdata->rhs) )
36033595
{
36043596
SCIP_Bool tightened;
36053597

@@ -3608,9 +3600,8 @@ SCIP_RETCODE applyFixings(
36083600
if( *cutoff )
36093601
{
36103602
SCIPdebugMsg(scip, " -> tightening <%s> <= %.15g infeasible\n", SCIPvarGetName(consdata->var), newbnd);
3611-
return SCIP_OKAY;
36123603
}
3613-
if( tightened )
3604+
else if( tightened )
36143605
{
36153606
SCIPdebugMsg(scip, " -> tightened upper bound: <%s> <= %.15g\n", SCIPvarGetName(consdata->var), SCIPvarGetUbGlobal(consdata->var));
36163607
(*nchgbds)++;
@@ -3619,7 +3610,7 @@ SCIP_RETCODE applyFixings(
36193610
redundant = TRUE;
36203611
}
36213612
}
3622-
else if( vbdvar != consdata->vbdvar )
3613+
else if( !(*cutoff) && vbdvar != consdata->vbdvar )
36233614
{
36243615
/* release and unlock old variable */
36253616
if( consdata->vbdcoef > 0.0 )
@@ -3673,6 +3664,10 @@ SCIP_RETCODE applyFixings(
36733664
{
36743665
SCIP_CALL( catchEvents(scip, cons, eventhdlr) );
36753666
}
3667+
3668+
/* terminate on cutoff after catching events */
3669+
if( *cutoff )
3670+
return SCIP_OKAY;
36763671
}
36773672

36783673
/* mark constraint changed, if a variable was exchanged */

0 commit comments

Comments
 (0)