@@ -770,17 +770,21 @@ bool HighsTransformedLp::transformSNFRelaxation(
770770 // Decide whether to use {simple, variable} {lower, upper} bound
771771 if (lbDist[col] < ubDist[col] - mip.mipdata_ ->feastol ) {
772772 if (!checkValidityVB (bestVlb[col].first , bestVlb[col].second , vals[i],
773- vectorsum.getValue (bestVlb[col].first ), lb, ub,
774- false )) {
773+ bestVlb[col].first == -1
774+ ? 0
775+ : vectorsum.getValue (bestVlb[col].first ),
776+ lb, ub, false )) {
775777 boundTypes[col] = BoundType::kSimpleLb ;
776778 } else if (simpleLbDist[col] > lbDist[col] + mip.mipdata_ ->feastol ) {
777779 boundTypes[col] = BoundType::kVariableLb ;
778780 } else
779781 boundTypes[col] = BoundType::kSimpleLb ;
780782 } else if (ubDist[col] < lbDist[col] - mip.mipdata_ ->feastol ) {
781783 if (!checkValidityVB (bestVub[col].first , bestVub[col].second , vals[i],
782- vectorsum.getValue (bestVub[col].first ), lb, ub,
783- true )) {
784+ bestVub[col].first == -1
785+ ? 0
786+ : vectorsum.getValue (bestVub[col].first ),
787+ lb, ub, true )) {
784788 boundTypes[col] = BoundType::kSimpleUb ;
785789 } else if (simpleUbDist[col] > ubDist[col] + mip.mipdata_ ->feastol ) {
786790 boundTypes[col] = BoundType::kVariableUb ;
@@ -789,16 +793,20 @@ bool HighsTransformedLp::transformSNFRelaxation(
789793 }
790794 } else if (vals[i] > 0 ) {
791795 if (checkValidityVB (bestVlb[col].first , bestVlb[col].second , vals[i],
792- vectorsum.getValue (bestVlb[col].first ), lb, ub,
793- false )) {
796+ bestVlb[col].first == -1
797+ ? 0
798+ : vectorsum.getValue (bestVlb[col].first ),
799+ lb, ub, false )) {
794800 boundTypes[col] = BoundType::kVariableLb ;
795801 } else {
796802 boundTypes[col] = BoundType::kSimpleLb ;
797803 }
798804 } else {
799805 if (checkValidityVB (bestVub[col].first , bestVub[col].second , vals[i],
800- vectorsum.getValue (bestVub[col].first ), lb, ub,
801- true )) {
806+ bestVub[col].first == -1
807+ ? 0
808+ : vectorsum.getValue (bestVub[col].first ),
809+ lb, ub, true )) {
802810 boundTypes[col] = BoundType::kVariableUb ;
803811 } else {
804812 boundTypes[col] = BoundType::kSimpleUb ;
0 commit comments