From 6c524fa9ebabaa3eedd2ba6ac6040f1903bb3892 Mon Sep 17 00:00:00 2001 From: Ambros Gleixner Date: Thu, 10 Oct 2024 17:33:49 +0200 Subject: [PATCH] fix check of available bestpscand in branch_relpscost.c --- src/scip/branch_relpscost.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scip/branch_relpscost.c b/src/scip/branch_relpscost.c index 7c46d60fce..615a0f1501 100644 --- a/src/scip/branch_relpscost.c +++ b/src/scip/branch_relpscost.c @@ -1234,8 +1234,8 @@ SCIP_RETCODE execRelpscost( for( c = 0; c < nbranchcands; ++c ) { if( needsStrongBranching(scip, branchrule, branchcands[c], branchcandsfrac[c], - bestpscand > 0 ? branchcands[bestpscand] : NULL, - bestpscand > 0 ? branchcandsfrac[bestpscand] : 0.0, + bestpscand >= 0 ? branchcands[bestpscand] : NULL, + bestpscand >= 0 ? branchcandsfrac[bestpscand] : 0.0, reliable, relerrorthreshold, clevel, useancpscost) ) { useancpscost = FALSE; @@ -1336,8 +1336,8 @@ SCIP_RETCODE execRelpscost( size = MIN(downsize, upsize); usesb = needsStrongBranching(scip, branchrule, branchcands[c], branchcandsfrac[c], - bestpscand > 0 ? branchcands[bestpscand] : NULL, - bestpscand > 0 ? branchcandsfrac[bestpscand] : 0.0, + bestpscand >= 0 ? branchcands[bestpscand] : NULL, + bestpscand >= 0 ? branchcandsfrac[bestpscand] : 0.0, reliable, relerrorthreshold, clevel, FALSE); /* count the number of variables that are completely uninitialized */