Ignore:
Timestamp:
Jan 11, 2008 5:05:20 PM (12 years ago)
Author:
forrest
Message:

try and make a bit faster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcStrategy.cpp

    r838 r854  
    146146  // Only look at rows with fewer than this number of elements
    147147  generator1.setMaxElements(200);
     148  generator1.setMaxElementsRoot(300);
    148149  //generator1.setRowCuts(3);
    149150
     
    375376    generator1.setMaxProbeRoot(CoinMin(3000,solver->getNumCols()));
    376377    generator1.setMaxElements(100);
     378    generator1.setMaxElementsRoot(200);
    377379    generator1.setMaxLookRoot(50);
    378380    generator1.setRowCuts(3);
     
    468470            int * fake = new int[n];
    469471            int i;
     472            // This was wrong (now is correct) - so could never have been called
     473            abort();
    470474            for ( i=0;i<n;i++)
    471475              fake[i]=-1;
     
    799803  model.setNumberBeforeTrust(numberBeforeTrust_);
    800804}
     805// For uniform setting of cut and heuristic options
     806void
     807setCutAndHeuristicOptions(CbcModel & model)
     808{
     809  int numberGenerators = model.numberCutGenerators();
     810  int iGenerator;
     811  for (iGenerator=0;iGenerator<numberGenerators;iGenerator++) {
     812    CglCutGenerator * generator = model.cutGenerator(iGenerator)->generator();
     813    CglProbing * cglProbing = dynamic_cast<CglProbing *>(generator);
     814    if (cglProbing) {
     815      cglProbing->setUsingObjective(1);
     816      cglProbing->setMaxPass(1);
     817      cglProbing->setMaxPassRoot(1);
     818      // Number of unsatisfied variables to look at
     819      cglProbing->setMaxProbe(10);
     820      cglProbing->setMaxProbeRoot(50);
     821      // How far to follow the consequences
     822      cglProbing->setMaxLook(10);
     823      cglProbing->setMaxLookRoot(50);
     824      cglProbing->setMaxLookRoot(10);
     825      // Only look at rows with fewer than this number of elements
     826      cglProbing->setMaxElements(200);
     827      cglProbing->setMaxElementsRoot(300);
     828      cglProbing->setRowCuts(3);
     829    }
     830#if 0
     831    CglGomory * cglGomory = dynamic_cast<CglGomory *>(generator);
     832    if (cglGomory) {
     833      // try larger limit
     834      cglGomory->setLimitAtRoot(1000);
     835      cglGomory->setLimit(50);
     836    }
     837    CglKnapsackCover * cglKnapsackCover = dynamic_cast<CglKnapsackCover *>(generator);
     838    if (cglKnapsackCoverq) {
     839    }
     840#endif
     841  }
     842}
    801843
    802844
Note: See TracChangeset for help on using the changeset viewer.