 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

stable/2.9/Cbc/src/CbcCutGenerator.cpp
r2186 r2174 677 677 if (debugger && debugger>onOptimalPath(*solver)) { 678 678 if(debugger>invalidCut(*thisCut)) { 679 #if CGL_DEBUG>1680 const double * optimal = debugger>optimalSolution();681 CoinPackedVector rpv = thisCut>row();682 const int n = rpv.getNumElements();683 const int * indices = rpv.getIndices();684 const double * elements = rpv.getElements();685 686 double lb=thisCut>lb();687 double ub=thisCut>ub();688 double sum=0.0;689 690 for (int k=0; k<n; k++){691 int column=indices[k];692 sum += optimal[column]*elements[k];693 }694 // is it nearly violated695 if (sum >ub  1.0e8 sum < lb + 1.0e8) {696 double violation=CoinMax(sumub,lbsum);697 std::cout<<generatorName_<<" cut with "<<n698 <<" coefficients, nearly cuts off known solutions by "<<violation699 <<", lo="<<lb<<", ub="<<ub<<std::endl;700 for (int k=0; k<n; k++){701 int column=indices[k];702 std::cout<<"( "<<column<<" , "<<elements[k]<<" ) ";703 if ((k%4)==3)704 std::cout <<std::endl;705 }706 std::cout <<std::endl;707 std::cout <<"Non zero solution values are"<<std::endl;708 int j=0;709 for (int k=0; k<n; k++){710 int column=indices[k];711 if (fabs(optimal[column])>1.0e9) {712 std::cout<<"( "<<column<<" , "<<optimal[column]<<" ) ";713 if ((j%4)==3)714 std::cout <<std::endl;715 j++;716 }717 }718 std::cout <<std::endl;719 }720 #endif721 assert(!debugger>invalidCut(*thisCut));722 if(debugger>invalidCut(*thisCut))723 679 abort(); 724 680 }
Note: See TracChangeset
for help on using the changeset viewer.