// Compare the current one with the best so far BCP_branching_object_relation ret_comp = p.user->compare_branching_candidates(tmp_presolved, best_presolved); #ifdef NO_BRANCH_ON_SINGLE BCP_vec new_obj; tmp_presolved->get_lower_bounds(new_obj); int nb_finite = 0, is_finite = -1; if(new_obj[0] < 1e100 / 2) { is_finite = 0; nb_finite++; } if(new_obj[1] < 1e100 / 2) { is_finite = 1; nb_finite++; } #endif switch (ret_comp) { case BCP_OldPresolvedIsBetter: break; case BCP_NewPresolvedIsBetter: std::swap(tmp_presolved, best_presolved); break; case BCP_NewPresolvedIsBetter_BranchOnIt: // Free the remaining candidates if there are any. This also resets // candidates.end(), thus purge_ptr_vector(candidates, cani + 1, candidates.end()); std::swap(tmp_presolved, best_presolved); break; } #ifdef NO_BRANCH_ON_SINGLE if(nb_finite == 1) { can->apply_child_bd(lp, is_finite); vars.set_lb_ub((*can->forced_var_pos), &((*can->forced_var_bd)[2*is_finite])); int ind_var = (*can->forced_var_pos)[0]; colbounds[2*ind_var] = (*can->forced_var_bd)[2*is_finite]; colbounds[2*ind_var+1] = (*can->forced_var_bd)[2*is_finite+1]; } #endif delete tmp_presolved;