Skip to content

Commit e21c1fd

Browse files
committed
Merge remote-tracking branch 'origin/v9-minor'
2 parents 02bb5bf + 6c060af commit e21c1fd

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
@@ -3393,10 +3393,7 @@ SCIP_RETCODE applyFixings(
33933393

33943394
if( ( !SCIPisInfinity(scip, -consdata->lhs) && SCIPisFeasLT(scip, activity, consdata->lhs) )
33953395
|| ( !SCIPisInfinity(scip, consdata->rhs) && SCIPisFeasGT(scip, activity, consdata->rhs) ) )
3396-
{
33973396
*cutoff = TRUE;
3398-
return SCIP_OKAY;
3399-
}
34003397

34013398
redundant = TRUE;
34023399
}
@@ -3407,7 +3404,7 @@ SCIP_RETCODE applyFixings(
34073404
assert( vbdvarscalar != 0.0 );
34083405

34093406
/* x is fixed to varconstant: update bounds of y and delete the variable bound constraint */
3410-
if( !SCIPisInfinity(scip, -consdata->lhs) )
3407+
if( !(*cutoff) && !SCIPisInfinity(scip, -consdata->lhs) )
34113408
{
34123409
if( consdata->vbdcoef > 0.0 )
34133410
{
@@ -3418,9 +3415,8 @@ SCIP_RETCODE applyFixings(
34183415
if( *cutoff )
34193416
{
34203417
SCIPdebugMsg(scip, " -> tightening <%s> >= %.15g infeasible\n", SCIPvarGetName(consdata->vbdvar), newbnd);
3421-
return SCIP_OKAY;
34223418
}
3423-
if( tightened )
3419+
else if( tightened )
34243420
{
34253421
SCIPdebugMsg(scip, " -> tightened lower bound: <%s> >= %.15g\n", SCIPvarGetName(consdata->vbdvar), SCIPvarGetLbGlobal(consdata->vbdvar));
34263422
(*nchgbds)++;
@@ -3435,16 +3431,15 @@ SCIP_RETCODE applyFixings(
34353431
if( *cutoff )
34363432
{
34373433
SCIPdebugMsg(scip, " -> tightening <%s> <= %.15g infeasible\n", SCIPvarGetName(consdata->vbdvar), newbnd);
3438-
return SCIP_OKAY;
34393434
}
3440-
if( tightened )
3435+
else if( tightened )
34413436
{
34423437
SCIPdebugMsg(scip, " -> tightened upper bound: <%s> <= %.15g\n", SCIPvarGetName(consdata->vbdvar), SCIPvarGetUbGlobal(consdata->vbdvar));
34433438
(*nchgbds)++;
34443439
}
34453440
}
34463441
}
3447-
if( !SCIPisInfinity(scip, consdata->rhs) )
3442+
if( !(*cutoff) && !SCIPisInfinity(scip, consdata->rhs) )
34483443
{
34493444
if( consdata->vbdcoef > 0.0 )
34503445
{
@@ -3455,9 +3450,8 @@ SCIP_RETCODE applyFixings(
34553450
if( *cutoff )
34563451
{
34573452
SCIPdebugMsg(scip, " -> tightening <%s> <= %.15g infeasible\n", SCIPvarGetName(consdata->vbdvar), newbnd);
3458-
return SCIP_OKAY;
34593453
}
3460-
if( tightened )
3454+
else if( tightened )
34613455
{
34623456
SCIPdebugMsg(scip, " -> tightened upper bound: <%s> <= %.15g\n", SCIPvarGetName(consdata->vbdvar), SCIPvarGetUbGlobal(consdata->vbdvar));
34633457
(*nchgbds)++;
@@ -3472,9 +3466,8 @@ SCIP_RETCODE applyFixings(
34723466
if( *cutoff )
34733467
{
34743468
SCIPdebugMsg(scip, " -> tightening <%s> >= %.15g infeasible\n", SCIPvarGetName(consdata->vbdvar), newbnd);
3475-
return SCIP_OKAY;
34763469
}
3477-
if( tightened )
3470+
else if( tightened )
34783471
{
34793472
SCIPdebugMsg(scip, " -> tightened lower bound: <%s> >= %.15g\n", SCIPvarGetName(consdata->vbdvar), SCIPvarGetLbGlobal(consdata->vbdvar));
34803473
(*nchgbds)++;
@@ -3581,7 +3574,7 @@ SCIP_RETCODE applyFixings(
35813574
assert( !SCIPisZero(scip, varscalar) );
35823575

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

@@ -3590,15 +3583,14 @@ SCIP_RETCODE applyFixings(
35903583
if( *cutoff )
35913584
{
35923585
SCIPdebugMsg(scip, " -> tightening <%s> >= %.15g infeasible\n", SCIPvarGetName(consdata->var), newbnd);
3593-
return SCIP_OKAY;
35943586
}
3595-
if( tightened )
3587+
else if( tightened )
35963588
{
35973589
SCIPdebugMsg(scip, " -> tightened lower bound: <%s> >= %.15g\n", SCIPvarGetName(consdata->var), SCIPvarGetLbGlobal(consdata->var));
35983590
(*nchgbds)++;
35993591
}
36003592
}
3601-
if( !SCIPisInfinity(scip, consdata->rhs) )
3593+
if( !(*cutoff) && !SCIPisInfinity(scip, consdata->rhs) )
36023594
{
36033595
SCIP_Bool tightened;
36043596

@@ -3607,9 +3599,8 @@ SCIP_RETCODE applyFixings(
36073599
if( *cutoff )
36083600
{
36093601
SCIPdebugMsg(scip, " -> tightening <%s> <= %.15g infeasible\n", SCIPvarGetName(consdata->var), newbnd);
3610-
return SCIP_OKAY;
36113602
}
3612-
if( tightened )
3603+
else if( tightened )
36133604
{
36143605
SCIPdebugMsg(scip, " -> tightened upper bound: <%s> <= %.15g\n", SCIPvarGetName(consdata->var), SCIPvarGetUbGlobal(consdata->var));
36153606
(*nchgbds)++;
@@ -3618,7 +3609,7 @@ SCIP_RETCODE applyFixings(
36183609
redundant = TRUE;
36193610
}
36203611
}
3621-
else if( vbdvar != consdata->vbdvar )
3612+
else if( !(*cutoff) && vbdvar != consdata->vbdvar )
36223613
{
36233614
/* release and unlock old variable */
36243615
if( consdata->vbdcoef > 0.0 )
@@ -3672,6 +3663,10 @@ SCIP_RETCODE applyFixings(
36723663
{
36733664
SCIP_CALL( catchEvents(scip, cons, eventhdlr) );
36743665
}
3666+
3667+
/* terminate on cutoff after catching events */
3668+
if( *cutoff )
3669+
return SCIP_OKAY;
36753670
}
36763671

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

0 commit comments

Comments
 (0)