 Timestamp:
 Mar 7, 2006 3:53:09 PM (14 years ago)
 Location:
 trunk
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/CbcModel.cpp
r264 r265 7047 7047 Perhaps an opportunity for a sanity check? 7048 7048 */ 7049 if ((solver_>isProvenOptimal()(specialOptions_&4)!=0) && objectiveValue <= cutoff) 7050 { 7051 double * solution = new double[numberColumns]; 7052 memcpy(solution ,solver_>getColSolution(),numberColumns*sizeof(double)) ; 7053 7049 if ((solver_>isProvenOptimal()(specialOptions_&4)!=0) && objectiveValue <= cutoff) { 7050 double * solution = new double[numberColumns]; 7051 memcpy(solution ,solver_>getColSolution(),numberColumns*sizeof(double)) ; 7052 7053 int iColumn; 7054 #ifndef NDEBUG 7055 double integerTolerance = getIntegerTolerance() ; 7056 #endif 7057 for (iColumn = 0 ; iColumn < numberColumns ; iColumn++) { 7058 double value = solution[iColumn] ; 7059 value = CoinMax(value, saveLower[iColumn]) ; 7060 value = CoinMin(value, saveUpper[iColumn]) ; 7061 if (solver_>isInteger(iColumn)) 7062 assert(fabs(valuesolution[iColumn]) <= integerTolerance) ; 7063 solution[iColumn] = value ; 7064 } 7065 if ((specialOptions_&16)==0) { 7054 7066 const double * rowLower = solver_>getRowLower() ; 7055 7067 const double * rowUpper = solver_>getRowUpper() ; … … 7057 7069 double *rowActivity = new double[numberRows] ; 7058 7070 memset(rowActivity,0,numberRows*sizeof(double)) ; 7059 7060 #ifndef NDEBUG7061 double integerTolerance = getIntegerTolerance() ;7062 #endif7063 int iColumn;7064 for (iColumn = 0 ; iColumn < numberColumns ; iColumn++)7065 { double value = solution[iColumn] ;7066 value = CoinMax(value, saveLower[iColumn]) ;7067 value = CoinMin(value, saveUpper[iColumn]) ;7068 if (solver_>isInteger(iColumn))7069 assert(fabs(valuesolution[iColumn]) <= integerTolerance) ;7070 solution[iColumn] = value ; }7071 7072 7071 solver_>getMatrixByCol()>times(solution,rowActivity) ; 7073 delete [] solution;7074 7072 double primalTolerance ; 7075 7073 solver_>getDblParam(OsiPrimalTolerance,primalTolerance) ; … … 7081 7079 rowActivity[i]rowUpper[i]); 7082 7080 } 7083 if (largestInfeasibility>100.0*primalTolerance) 7081 if (largestInfeasibility>100.0*primalTolerance) { 7084 7082 handler_>message(CBC_NOTFEAS3, messages_) 7085 7083 << largestInfeasibility << CoinMessageEol ; 7086 7087 delete [] rowActivity ; } 7088 else 7089 { objectiveValue=1.0e50 ; } 7084 objectiveValue=1.0e50 ; 7085 } 7086 delete [] rowActivity ; 7087 } 7088 delete [] solution; 7089 } else { 7090 objectiveValue=1.0e50 ; 7091 } 7090 7092 /* 7091 7093 Regardless of what we think of the solution, we may need to restore the 
trunk/include/CbcModel.hpp
r264 r265 1269 1269 0 bit (1)  check if cuts valid (if on debugger list) 1270 1270 1 bit (2)  use current basis to check integer solution (rather than all slack) 1271 2 bit (4)  don't check integer solution 1271 2 bit (4)  don't check integer solution (by solving LP) 1272 1272 3 bit (8)  fast analyze 1273 4 bit (16)  nonlinear model and someone too lazy to code "times" correctly  so skip row check 1273 1274 */ 1274 1275 /// Set special options
Note: See TracChangeset
for help on using the changeset viewer.