#ifdef USE_CHILD_EFFECTIV /*********************************************************************/ void BCP_lp_adjust_row_effectiveness_child(BCP_lp_prob& p, const BCP_lp_result& lpres) { if (p.param(BCP_lp_par::IneffectiveConstraints) != BCP_IneffConstr_None){ BCP_cut_set& cuts = p.node->cuts; int i; const int cutnum = cuts.size(); switch (p.param(BCP_lp_par::IneffectiveConstraints)){ case BCP_IneffConstr_None: break; case BCP_IneffConstr_NonzeroSlack: { const double * lhs = lpres.lhs(); const double * rlb = p.lp_solver->getRowLower(); const double * rub = p.lp_solver->getRowUpper(); const double petol = p.lp_result->primalTolerance(); for (i = p.core->cutnum(); i < cutnum; ++i) { BCP_cut *cut = cuts[i]; if (rlb[i] + petol < lhs[i] && lhs[i] < rub[i] - petol) { } else { cut->increase_effective_count(); } } } break; case BCP_IneffConstr_ZeroDualValue: { const double * pi = lpres.pi(); const double detol = p.lp_result->dualTolerance(); for (i = p.core->cutnum(); i < cutnum; ++i) { BCP_cut *cut = cuts[i]; if (CoinAbs(pi[i]) < detol) { } else { cut->increase_effective_count(); } } } break; } if (p.param(BCP_lp_par::LpVerb_RowEffectivenessCount)) printf("LP: Row effectiveness adjusted for children\n"); } } #endif /* USE_CHILD_EFFECTIV */