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