- Timestamp:
- Dec 20, 2010 7:39:29 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Clp/src/ClpSolve.cpp
r1612 r1650 421 421 if (!status_) 422 422 allSlackBasis(); 423 ClpPresolve pinfo;424 pinfo .setSubstitution(options.substitution());423 ClpPresolve * pinfo = new ClpPresolve(); 424 pinfo->setSubstitution(options.substitution()); 425 425 int presolveOptions = options.presolveActions(); 426 426 bool presolveToFile = (presolveOptions & 0x40000000) != 0; 427 427 presolveOptions &= ~0x40000000; 428 428 if ((presolveOptions & 0xffff) != 0) 429 pinfo .setPresolveActions(presolveOptions);429 pinfo->setPresolveActions(presolveOptions); 430 430 // switch off singletons to slacks 431 //pinfo .setDoSingletonColumn(false); // done by bits431 //pinfo->setDoSingletonColumn(false); // done by bits 432 432 int printOptions = options.getSpecialOption(5); 433 433 if ((printOptions & 1) != 0) 434 pinfo .statistics();434 pinfo->statistics(); 435 435 double timePresolve = 0.0; 436 436 double timeIdiot = 0.0; … … 463 463 costedSlacks = true; 464 464 // switch on singletons to slacks 465 pinfo .setDoSingletonColumn(true);465 pinfo->setDoSingletonColumn(true); 466 466 // gub stuff for testing 467 //pinfo .setDoGubrow(true);467 //pinfo->setDoGubrow(true); 468 468 } 469 469 #ifndef CLP_NO_STD … … 471 471 // PreSolve to file - not fully tested 472 472 printf("Presolving to file - presolve.save\n"); 473 pinfo .presolvedModelToFile(*this, "presolve.save", dblParam_[ClpPresolveTolerance],473 pinfo->presolvedModelToFile(*this, "presolve.save", dblParam_[ClpPresolveTolerance], 474 474 false, numberPasses); 475 475 model2 = this; 476 476 } else { 477 477 #endif 478 model2 = pinfo .presolvedModel(*this, dblParam_[ClpPresolveTolerance],478 model2 = pinfo->presolvedModel(*this, dblParam_[ClpPresolveTolerance], 479 479 false, numberPasses, true, costedSlacks); 480 480 #ifndef CLP_NO_STD … … 494 494 problemStatus_ = 1; // may be unbounded but who cares 495 495 if (options.infeasibleReturn() || (moreSpecialOptions_ & 1) != 0) { 496 delete pinfo; 496 497 return -1; 497 498 } … … 503 504 if (rcode==2) { 504 505 delete model2; 506 delete pinfo; 505 507 return -2; 506 508 } else if (rcode==3) { 507 509 delete model2; 510 delete pinfo; 508 511 return -3; 509 512 } 510 513 } 514 model2->setMoreSpecialOptions(model2->moreSpecialOptions()&(~1024)); 511 515 model2->eventHandler()->setSimplex(model2); 512 516 // We may be better off using original (but if dual leave because of bounds) … … 2469 2473 else 2470 2474 setLogLevel(CoinMin(0, saveLevel)); 2471 pinfo.postsolve(true); 2475 pinfo->postsolve(true); 2476 delete pinfo; 2477 pinfo = NULL; 2472 2478 factorization_->areaFactor(model2->factorization()->adjustedAreaFactor()); 2473 2479 time2 = CoinCpuTime(); … … 2577 2583 } 2578 2584 eventHandler()->event(ClpEventHandler::presolveEnd); 2585 delete pinfo; 2579 2586 return finalStatus; 2580 2587 } … … 2701 2708 { 2702 2709 } 2703 // See header file for de atils2710 // See header file for details 2704 2711 void 2705 2712 ClpSolve::setSpecialOption(int which, int value, int extraInfo)
Note: See TracChangeset
for help on using the changeset viewer.