Ignore:
Timestamp:
Jan 2, 2008 5:14:29 AM (12 years ago)
Author:
forrest
Message:

changes to try and make faster

File:
1 edited

Legend:

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

    r1141 r1147  
    351351  int factorType=0;
    352352  // Start check for cycles
    353   progress_->startCheck();
     353  progress_.startCheck();
    354354  // Say change made on first iteration
    355355  changeMade_=1;
     
    429429    // If values pass then do easy ones on first time
    430430    if (ifValuesPass&&
    431         progress_->lastIterationNumber(0)<0&&saveDuals) {
     431        progress_.lastIterationNumber(0)<0&&saveDuals) {
    432432      doEasyOnesInValuesPass(saveDuals);
    433433    }
     
    625625    int factorType=0;
    626626    // Start check for cycles
    627     progress_->startCheck();
     627    progress_.startCheck();
    628628    // Say change made on first iteration
    629629    changeMade_=1;
     
    677677      // If values pass then do easy ones on first time
    678678      if (ifValuesPass&&
    679           progress_->lastIterationNumber(0)<0&&saveDuals) {
     679          progress_.lastIterationNumber(0)<0&&saveDuals) {
    680680        doEasyOnesInValuesPass(saveDuals);
    681681      }
     
    12041204#endif
    12051205              setFlagged(sequenceOut_);
    1206               progress_->clearBadTimes();
     1206              progress_.clearBadTimes();
    12071207              lastBadIteration_ = numberIterations_; // say be more cautious
    12081208              rowArray_[0]->clear();
     
    13291329#endif
    13301330            setFlagged(sequenceOut_);
    1331             progress_->clearBadTimes();
     1331            progress_.clearBadTimes();
    13321332            lastBadIteration_ = numberIterations_; // say be more cautious
    13331333            rowArray_[0]->clear();
     
    23262326    changeCost=0.0;
    23272327    // put back original bounds and then check
    2328     createRim(1);
     2328    createRim1(false);
    23292329    int iSequence;
    23302330    // bounds will get bigger - just look at ones at bounds
     
    34123412#endif
    34133413          setFlagged(sequenceOut_);
    3414           progress_->clearBadTimes();
     3414          progress_.clearBadTimes();
    34153415         
    34163416          // Go to safe
     
    34893489#endif
    34903490    setFlagged(sequenceOut_);
    3491     progress_->clearBadTimes();
     3491    progress_.clearBadTimes();
    34923492   
    34933493    // Go to safer
     
    35333533  }
    35343534  // Double check infeasibility if no action
    3535   if (progress_->lastIterationNumber(0)==numberIterations_) {
     3535  if (progress_.lastIterationNumber(0)==numberIterations_) {
    35363536    if (dualRowPivot_->looksOptimal()) {
    35373537      numberPrimalInfeasibilities_ = 0;
     
    35413541  } else {
    35423542    double thisObj = objectiveValue_;
    3543     double lastObj = progress_->lastObjective(0);
     3543    double lastObj = progress_.lastObjective(0);
    35443544    if(!ifValuesPass&&firstFree_<0) {
    35453545      if (lastObj>thisObj+1.0e-3*CoinMax(fabs(thisObj),fabs(lastObj))+1.0) {
     
    36063606  if (numberIterations_>CoinMax(1000,numberRows_>>4)&&(specialOptions_&64)!=0) {
    36073607    if (sumPrimalInfeasibilities_&&sumPrimalInfeasibilities_<1.0e5) {
    3608       int backIteration = progress_->lastIterationNumber(CLP_PROGRESS-1);
     3608      int backIteration = progress_.lastIterationNumber(CLP_PROGRESS-1);
    36093609      if (backIteration>0&&numberIterations_-backIteration<9*CLP_PROGRESS) {
    36103610        if (factorization_->pivotTolerance()<0.9) {
     
    36123612          factorization_->pivotTolerance(CoinMin(factorization_->pivotTolerance()*1.05+0.02,0.91));
    36133613          //printf("tol now %g\n",factorization_->pivotTolerance());
    3614           progress_->clearIterationNumbers();
     3614          progress_.clearIterationNumbers();
    36153615        }
    36163616      }
     
    36203620  int loop;
    36213621  if (!givenDuals&&type!=2)
    3622     loop = progress_->looping();
     3622    loop = progress_.looping();
    36233623  else
    36243624    loop=-1;
     
    36983698    //if (dualFeasible()||problemStatus_==-4||(primalFeasible()&&!numberDualInfeasibilitiesWithoutFree_)) {
    36993699    if (dualFeasible()||problemStatus_==-4) {
    3700       progress_->modifyObjective(objectiveValue_
     3700      progress_.modifyObjective(objectiveValue_
    37013701                               -sumDualInfeasibilities_*dualBound_);
    37023702      if (primalFeasible()&&!givenDuals) {
     
    37243724            changeBounds(true,NULL,changeCost);
    37253725            //computeObjectiveValue();
    3726             createRim(4);
     3726            createRim4(false);
    37273727            // make sure duals are current
    37283728            computeDuals(givenDuals);
     
    38073807              perturbation_=102; // stop any perturbations
    38083808              cleanDuals=1;
    3809               createRim(4);
     3809              createRim4(false);
    38103810              problemStatus_=-1;
    38113811            }
     
    38433843          // make sure fake bounds are back
    38443844          changeBounds(true,NULL,changeCost);
    3845           createRim(4);
     3845          createRim4(false);
    38463846        }
    38473847        if (numberChangedBounds<=0||dualBound_>1.0e20||
     
    38523852            //cleanDuals=1;
    38533853            //numberChangedBounds=1;
    3854             //createRim(4);
     3854            //createRim4(false);
    38553855          }
    38563856        } else {
     
    38893889        memcpy(xsolution,solution_,(numberRows_+numberColumns_)*sizeof(double));
    38903890#endif
    3891         createRim(4);
     3891        createRim4(false);
    38923892        // make sure duals are current
    38933893        computeDuals(givenDuals);
     
    41854185  }
    41864186#if 1
    4187   double thisObj = progress_->lastObjective(0);
    4188   double lastObj = progress_->lastObjective(1);
     4187  double thisObj = progress_.lastObjective(0);
     4188  double lastObj = progress_.lastObjective(1);
    41894189  if (lastObj>thisObj+1.0e-4*CoinMax(fabs(thisObj),fabs(lastObj))+1.0e-4
    41904190      &&givenDuals==NULL&&firstFree_<0) {
     
    47314731  if (!useFactorization||factorization_->numberRows()!=numberRows_) {
    47324732    useFactorization = false;
    4733     factorization_->increasingRows(2);
    4734     // row activities have negative sign
    4735     factorization_->slackValue(-1.0);
    4736     factorization_->zeroTolerance(1.0e-13);
     4733    factorization_->setDefaultValues();
    47374734
    47384735    int factorizationStatus = internalFactorize(0);
     
    51035100  }
    51045101  if (!useFactorization) {
    5105     factorization_->increasingRows(2);
    5106     // row activities have negative sign
    5107     factorization_->slackValue(-1.0);
    5108     factorization_->zeroTolerance(1.0e-13);
     5102    factorization_->setDefaultValues();
    51095103
    51105104    int factorizationStatus = internalFactorize(0);
     
    57975791ClpSimplexDual::resetFakeBounds()
    57985792{
     5793  // put back original bounds and then check
     5794  createRim1(false);
    57995795  double dummyChangeCost=0.0;
    58005796  changeBounds(true,rowArray_[2],dummyChangeCost);
Note: See TracChangeset for help on using the changeset viewer.