Ignore:
Timestamp:
Sep 4, 2008 4:46:53 PM (11 years ago)
Author:
forrest
Message:

trying to make faster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpPresolve.cpp

    r1197 r1266  
    441441    const bool doubleton = doDoubleton();
    442442    const bool tripleton = doTripleton();
     443#define NO_FORCING
     444#ifndef NO_FORCING
    443445    const bool forcing = doForcing();
     446#endif
    444447    const bool ifree = doImpliedFree();
    445448    const bool zerocost = doTighten();
     
    477480#endif
    478481    if (dupcol) {
    479       //paction_ = dupcol_action::presolve(prob, paction_);
     482      // maybe allow integer columns to be checked
     483      if ((presolveActions_&512)!=0)
     484        prob->setPresolveOptions(prob->presolveOptions()|1);
     485      paction_ = dupcol_action::presolve(prob, paction_);
     486    }
     487    if (duprow) {
     488      paction_ = duprow_action::presolve(prob, paction_);
     489    }
     490    if (doGubrow()) {
     491      paction_ = gubrow_action::presolve(prob, paction_);
    480492    }
    481493
     
    494506      const CoinPresolveAction * const paction0 = paction_;
    495507      // look for substitutions with no fill
    496       int fill_level=2;
    497       //fill_level=10;
    498       //printf("** fill_level == 10 !\n");
     508      int fill_level=3;
     509#define IMPLIED 3
     510#define IMPLIED2 99
     511#if IMPLIED!=3
     512#if IMPLIED>2&&IMPLIED<11
     513      fill_level=IMPLIED;
     514      printf("** fill_level == %d !\n",fill_level);
     515#endif
     516#if IMPLIED>11&&IMPLIED<21
     517      fill_level=-(IMPLIED-10);
     518      printf("** fill_level == %d !\n",fill_level);
     519#endif
     520#endif
    499521      int whichPass=0;
    500522      while (1) {
     
    534556            break;
    535557        }
    536 
     558#ifndef NO_FORCING
    537559        if (forcing) {
    538560          paction_ = forcing_constraint_action::presolve(prob, paction_);
     
    540562            break;
    541563        }
     564#endif
    542565
    543566        if (ifree&&(whichPass%5)==1) {
    544         paction_ = implied_free_action::presolve(prob, paction_,fill_level);
     567          paction_ = implied_free_action::presolve(prob, paction_,fill_level);
    545568        if (prob->status_)
    546569          break;
     
    642665          const CoinPresolveAction * const paction2 = paction_;
    643666          if (ifree) {
    644             //int fill_level=0; // switches off substitution
    645             paction_ = implied_free_action::presolve(prob, paction_,fill_level);
     667#if IMPLIED2 ==0
     668            int fill_level=0; // switches off substitution
     669#elif IMPLIED2!=99
     670            int fill_level=IMPLIED2;
     671#endif
     672            if ((itry&1)==0)
     673              paction_ = implied_free_action::presolve(prob, paction_,fill_level);
    646674            if (prob->status_)
    647675              break;
     
    652680      } else if (ifree) {
    653681        // just free
     682#if IMPLIED2 ==0
    654683        int fill_level=0; // switches off substitution
     684#elif IMPLIED2!=99
     685        int fill_level=IMPLIED2;
     686#endif
    655687        paction_ = implied_free_action::presolve(prob, paction_,fill_level);
    656688        if (prob->status_)
     
    10551087  numberNextRowsToDo_(0),
    10561088  presolveOptions_(0)
    1057 
    10581089{
    10591090  const int bufsize = bulk0_;
     
    10901121  // same thing for row rep
    10911122  CoinPackedMatrix * mRow = new CoinPackedMatrix();
     1123  mRow->setExtraGap(0.0);
     1124  mRow->setExtraMajor(0.0);
    10921125  mRow->reverseOrderedCopyOf(*m);
    1093   mRow->removeGaps();
    1094   mRow->setExtraGap(0.0);
     1126  //mRow->removeGaps();
     1127  //mRow->setExtraGap(0.0);
    10951128
    10961129  // Now get rid of matrix
     
    12071240  mcstrt_[ncols_] = bufsize-1;
    12081241  mrstrt_[nrows_] = bufsize-1;
     1242  // Allocate useful arrays
     1243  initializeStuff();
    12091244
    12101245#if     PRESOLVE_CONSISTENCY
     
    15071542    // Do presolve
    15081543    paction_ = presolve(&prob);
     1544    // Get rid of useful arrays
     1545    prob.deleteStuff();
    15091546
    15101547    result =0;
Note: See TracChangeset for help on using the changeset viewer.