Changeset 943
- Timestamp:
- Feb 6, 2013 10:11:36 PM (8 years ago)
- Location:
- trunk/Couenne/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Couenne/src/main/BonCouenne.cpp
r925 r943 239 239 exit(1); 240 240 } 241 242 // round cbcSol's integer coordinates 243 244 // for (int i=0; i<modelNvars; i++) 245 // if (cp -> Var (i) -> isDefinedInteger ()) 246 // cbcSol [i] = COUENNE_round (cbcSol [i]); 241 247 242 248 if (cbcObjVal < 1e49 && !infeasible) { … … 265 271 bool couenneSolIsFeas = false; 266 272 273 // round couenneSol's integer coordinates 274 275 // for (int i=0; i<modelNvars; i++) 276 // if (cp -> Var (i) -> isDefinedInteger ()) 277 // couenneSol [i] = COUENNE_round (couenneSol [i]); 278 267 279 if(couenneSol != NULL) { 268 280 #ifdef FM_CHECKNLP2 281 int cMS = rs->getCardModSol(); 269 282 couenneSolIsFeas = cp->checkNLP2(couenneSol, 0, false, 270 283 false, true, 271 284 cp->getFeasTol()); 272 int cMS = rs->getCardModSol();273 285 CoinCopyN(rs->getModSol(cMS), cMS, modCouenneSol); 274 286 modCouenneSolVal = rs->getModSolVal(); 275 287 modCouenneSolMaxViol = rs->getModSolMaxViol(); 276 288 #else /* not FM_CHECKNLP2 */ 289 int cMS = cp->nVars(); 277 290 couenneSolIsFeas = cp->checkNLP(couenneSol, modCouenneSolVal, true); 278 int cMS = cp->nVars();279 291 CoinCopyN(couenneSol, cMS, modCouenneSol); 280 292 modCouenneSolMaxViol = cp->getFeasTol(); … … 283 295 } 284 296 285 retcomp = rs -> compareAndSave (modCbcSol, modCbcSolVal, 286 modCbcSolMaxViol, cbcSolIsFeas, 287 modCouenneSol, modCouenneSolVal, 288 modCouenneSolMaxViol, couenneSolIsFeas, 297 retcomp = rs -> compareAndSave (modCbcSol, modCbcSolVal, modCbcSolMaxViol, cbcSolIsFeas, 298 modCouenneSol, modCouenneSolVal, modCouenneSolMaxViol, couenneSolIsFeas, 289 299 modelNvars, cp->getFeasTol()); 290 300 -
trunk/Couenne/src/problem/CouenneRecordBestSol.cpp
r936 r943 215 215 modSol = newSol; 216 216 cardSol = givenCard; 217 218 217 } 219 218 } … … 258 257 259 258 /*****************************************************************************/ 260 int CouenneRecordBestSol::compareAndSave(const double *solA, const double solAVal, 261 const double solAMaxViol, 262 const bool solAIsFeas, 263 const double *solB, const double solBVal, 264 const double solBMaxViol, 265 const bool solBIsFeas, 266 const int cardSol, 267 const double precision) { 259 int CouenneRecordBestSol::compareAndSave(const double *solA, const double solAVal, const double solAMaxViol, const bool solAIsFeas, 260 const double *solB, const double solBVal, const double solBMaxViol, const bool solBIsFeas, 261 const int cardSol, 262 const double precision) { 268 263 int retval = -2; 269 264 if(solBIsFeas) {
Note: See TracChangeset
for help on using the changeset viewer.