next up previous
Next: About this document ... Up: Exercises Previous: Column Ordered

Ineffective Cuts

Exercise: After adding some cuts and resolving, check the corresponding dual values. For any (non-core) row with a dual value equal to zero (or very small), remove the cut from the matrix. Notice, these cuts are ineffective and can be removed without changing the bound.

int UFL::removeIneffCuts(){
  vector<int> ind;
  const double* dualValues = si->getRowPrice();
  for (int i = M + N; i < si->getNumRows(); ++i) {
    if (dualValues[i] < tolerance && dualValues[i] > -tolerance) 
      ind.push_back(i);
  }
  si->deleteRows(ind.size(), &ind[0]);
  return ind.size();
}



IP Seminar Series 2004-01-11