Changeset 461 for trunk/ClpPresolve.cpp


Ignore:
Timestamp:
Oct 1, 2004 4:01:01 PM (15 years ago)
Author:
forrest
Message:

Trying to make faster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpPresolve.cpp

    r458 r461  
    390390  if (prob->anyProhibited())
    391391    doDualStuff=false;
    392   if ((presolveActions_&1)!=0)
     392  if (!doDual())
    393393    doDualStuff=false;
    394394#if     PRESOLVE_CONSISTENCY
     
    398398
    399399  if (!prob->status_) {
    400 #if 0
    401     const bool slackd = ATOI("SLACKD")!=0;
    402     //const bool forcing = ATOI("FORCING")!=0;
    403     const bool doubleton = ATOI("DOUBLETON")!=0;
    404     const bool forcing = ATOI("off")!=0;
    405     const bool ifree = ATOI("off")!=0;
    406     const bool zerocost = ATOI("off")!=0;
    407     const bool dupcol = ATOI("off")!=0;
    408     const bool duprow = ATOI("off")!=0;
    409     const bool dual = ATOI("off")!=0;
    410 #else
    411     // normal
    412 #if 0
    413     const bool slackd = true;
    414     const bool doubleton = false;
    415     const bool tripleton = true;
    416     const bool forcing = false;
    417     const bool ifree = true;
    418     const bool zerocost = true;
    419     const bool dupcol = false;
    420     const bool duprow = false;
     400    const bool slackd = doSingleton();
     401    const bool doubleton = doDoubleton();
     402    const bool tripleton = doTripleton();
     403    const bool forcing = doForcing();
     404    const bool ifree = doImpliedFree();
     405    const bool zerocost = doTighten();
     406    const bool dupcol = doDupcol();
     407    const bool duprow = doDuprow();
    421408    const bool dual = doDualStuff;
    422 #else
    423     const bool slackd = true;
    424     const bool doubleton = true;
    425     const bool tripleton = true;
    426     const bool forcing = true;
    427     const bool ifree = true;
    428     const bool zerocost = true;
    429     const bool dupcol = true;
    430     const bool duprow = true;
    431     const bool dual = doDualStuff;
    432 #endif
    433 #endif
    434409   
    435410    // some things are expensive so just do once (normally)
     
    469444    prob->pass_=0;
    470445    for (iLoop=0;iLoop<numberPasses_;iLoop++) {
     446    // See if we want statistics
     447    if ((presolveActions_&0x80000000)!=0)
     448      printf("Starting major pass %d after %g seconds\n",iLoop+1,CoinCpuTime()-prob->startTime_);
    471449#ifdef PRESOLVE_SUMMARY
    472450      printf("Starting major pass %d\n",iLoop+1);
     
    480458      while (1) {
    481459        whichPass++;
     460        prob->pass_++;
    482461        const CoinPresolveAction * const paction1 = paction_;
    483462
     
    521500        }
    522501
    523         if (ifree) {
    524           paction_ = implied_free_action::presolve(prob, paction_,fill_level);
    525           if (prob->status_)
    526             break;
     502        if (ifree&&(whichPass%5)==1) {
     503        paction_ = implied_free_action::presolve(prob, paction_,fill_level);
     504        if (prob->status_)
     505          break;
    527506        }
    528507
     
    617596        int itry;
    618597        for (itry=0;itry<5;itry++) {
    619           const CoinPresolveAction * const paction2 = paction_;
    620598          paction_ = remove_dual_action::presolve(prob, paction_);
    621599          if (prob->status_)
    622600            break;
     601          const CoinPresolveAction * const paction2 = paction_;
    623602          if (ifree) {
    624             int fill_level=0; // switches off substitution
     603            //int fill_level=0; // switches off substitution
    625604            paction_ = implied_free_action::presolve(prob, paction_,fill_level);
    626605            if (prob->status_)
     
    630609            break;
    631610        }
     611      } else if (ifree) {
     612        // just free
     613        int fill_level=0; // switches off substitution
     614        paction_ = implied_free_action::presolve(prob, paction_,fill_level);
     615        if (prob->status_)
     616          break;
    632617      }
    633618#if     PRESOLVE_DEBUG
     
    972957  hcol_(new int[2*nelems_in]),
    973958  integerType_(new unsigned char[ncols0_in]),
     959  tuning_(false),
     960  startTime_(0.0),
    974961  feasibilityTolerance_(0.0),
    975962  status_(-1),
     
    13331320                        presolvedModel_,
    13341321                        nrows_, nelems_,true,nonLinearValue_);
     1322    // See if we want statistics
     1323    if ((presolveActions_&0x80000000)!=0)
     1324      prob.statistics();
    13351325    // make sure row solution correct
    13361326    {
Note: See TracChangeset for help on using the changeset viewer.