@@ -3393,10 +3393,7 @@ SCIP_RETCODE applyFixings(
3393
3393
3394
3394
if ( ( !SCIPisInfinity (scip , - consdata -> lhs ) && SCIPisFeasLT (scip , activity , consdata -> lhs ) )
3395
3395
|| ( !SCIPisInfinity (scip , consdata -> rhs ) && SCIPisFeasGT (scip , activity , consdata -> rhs ) ) )
3396
- {
3397
3396
* cutoff = TRUE;
3398
- return SCIP_OKAY ;
3399
- }
3400
3397
3401
3398
redundant = TRUE;
3402
3399
}
@@ -3407,7 +3404,7 @@ SCIP_RETCODE applyFixings(
3407
3404
assert ( vbdvarscalar != 0.0 );
3408
3405
3409
3406
/* 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 ) )
3411
3408
{
3412
3409
if ( consdata -> vbdcoef > 0.0 )
3413
3410
{
@@ -3418,9 +3415,8 @@ SCIP_RETCODE applyFixings(
3418
3415
if ( * cutoff )
3419
3416
{
3420
3417
SCIPdebugMsg (scip , " -> tightening <%s> >= %.15g infeasible\n" , SCIPvarGetName (consdata -> vbdvar ), newbnd );
3421
- return SCIP_OKAY ;
3422
3418
}
3423
- if ( tightened )
3419
+ else if ( tightened )
3424
3420
{
3425
3421
SCIPdebugMsg (scip , " -> tightened lower bound: <%s> >= %.15g\n" , SCIPvarGetName (consdata -> vbdvar ), SCIPvarGetLbGlobal (consdata -> vbdvar ));
3426
3422
(* nchgbds )++ ;
@@ -3435,16 +3431,15 @@ SCIP_RETCODE applyFixings(
3435
3431
if ( * cutoff )
3436
3432
{
3437
3433
SCIPdebugMsg (scip , " -> tightening <%s> <= %.15g infeasible\n" , SCIPvarGetName (consdata -> vbdvar ), newbnd );
3438
- return SCIP_OKAY ;
3439
3434
}
3440
- if ( tightened )
3435
+ else if ( tightened )
3441
3436
{
3442
3437
SCIPdebugMsg (scip , " -> tightened upper bound: <%s> <= %.15g\n" , SCIPvarGetName (consdata -> vbdvar ), SCIPvarGetUbGlobal (consdata -> vbdvar ));
3443
3438
(* nchgbds )++ ;
3444
3439
}
3445
3440
}
3446
3441
}
3447
- if ( !SCIPisInfinity (scip , consdata -> rhs ) )
3442
+ if ( !( * cutoff ) && ! SCIPisInfinity (scip , consdata -> rhs ) )
3448
3443
{
3449
3444
if ( consdata -> vbdcoef > 0.0 )
3450
3445
{
@@ -3455,9 +3450,8 @@ SCIP_RETCODE applyFixings(
3455
3450
if ( * cutoff )
3456
3451
{
3457
3452
SCIPdebugMsg (scip , " -> tightening <%s> <= %.15g infeasible\n" , SCIPvarGetName (consdata -> vbdvar ), newbnd );
3458
- return SCIP_OKAY ;
3459
3453
}
3460
- if ( tightened )
3454
+ else if ( tightened )
3461
3455
{
3462
3456
SCIPdebugMsg (scip , " -> tightened upper bound: <%s> <= %.15g\n" , SCIPvarGetName (consdata -> vbdvar ), SCIPvarGetUbGlobal (consdata -> vbdvar ));
3463
3457
(* nchgbds )++ ;
@@ -3472,9 +3466,8 @@ SCIP_RETCODE applyFixings(
3472
3466
if ( * cutoff )
3473
3467
{
3474
3468
SCIPdebugMsg (scip , " -> tightening <%s> >= %.15g infeasible\n" , SCIPvarGetName (consdata -> vbdvar ), newbnd );
3475
- return SCIP_OKAY ;
3476
3469
}
3477
- if ( tightened )
3470
+ else if ( tightened )
3478
3471
{
3479
3472
SCIPdebugMsg (scip , " -> tightened lower bound: <%s> >= %.15g\n" , SCIPvarGetName (consdata -> vbdvar ), SCIPvarGetLbGlobal (consdata -> vbdvar ));
3480
3473
(* nchgbds )++ ;
@@ -3581,7 +3574,7 @@ SCIP_RETCODE applyFixings(
3581
3574
assert ( !SCIPisZero (scip , varscalar ) );
3582
3575
3583
3576
/* 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 ) )
3585
3578
{
3586
3579
SCIP_Bool tightened ;
3587
3580
@@ -3590,15 +3583,14 @@ SCIP_RETCODE applyFixings(
3590
3583
if ( * cutoff )
3591
3584
{
3592
3585
SCIPdebugMsg (scip , " -> tightening <%s> >= %.15g infeasible\n" , SCIPvarGetName (consdata -> var ), newbnd );
3593
- return SCIP_OKAY ;
3594
3586
}
3595
- if ( tightened )
3587
+ else if ( tightened )
3596
3588
{
3597
3589
SCIPdebugMsg (scip , " -> tightened lower bound: <%s> >= %.15g\n" , SCIPvarGetName (consdata -> var ), SCIPvarGetLbGlobal (consdata -> var ));
3598
3590
(* nchgbds )++ ;
3599
3591
}
3600
3592
}
3601
- if ( !SCIPisInfinity (scip , consdata -> rhs ) )
3593
+ if ( !( * cutoff ) && ! SCIPisInfinity (scip , consdata -> rhs ) )
3602
3594
{
3603
3595
SCIP_Bool tightened ;
3604
3596
@@ -3607,9 +3599,8 @@ SCIP_RETCODE applyFixings(
3607
3599
if ( * cutoff )
3608
3600
{
3609
3601
SCIPdebugMsg (scip , " -> tightening <%s> <= %.15g infeasible\n" , SCIPvarGetName (consdata -> var ), newbnd );
3610
- return SCIP_OKAY ;
3611
3602
}
3612
- if ( tightened )
3603
+ else if ( tightened )
3613
3604
{
3614
3605
SCIPdebugMsg (scip , " -> tightened upper bound: <%s> <= %.15g\n" , SCIPvarGetName (consdata -> var ), SCIPvarGetUbGlobal (consdata -> var ));
3615
3606
(* nchgbds )++ ;
@@ -3618,7 +3609,7 @@ SCIP_RETCODE applyFixings(
3618
3609
redundant = TRUE;
3619
3610
}
3620
3611
}
3621
- else if ( vbdvar != consdata -> vbdvar )
3612
+ else if ( !( * cutoff ) && vbdvar != consdata -> vbdvar )
3622
3613
{
3623
3614
/* release and unlock old variable */
3624
3615
if ( consdata -> vbdcoef > 0.0 )
@@ -3672,6 +3663,10 @@ SCIP_RETCODE applyFixings(
3672
3663
{
3673
3664
SCIP_CALL ( catchEvents (scip , cons , eventhdlr ) );
3674
3665
}
3666
+
3667
+ /* terminate on cutoff after catching events */
3668
+ if ( * cutoff )
3669
+ return SCIP_OKAY ;
3675
3670
}
3676
3671
3677
3672
/* mark constraint changed, if a variable was exchanged */
0 commit comments