Changeset 12 for branches


Ignore:
Timestamp:
Aug 6, 2002 1:55:36 PM (17 years ago)
Author:
forrest
Message:

Improve speed

Location:
branches/devel-1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-1/ClpSimplexDual.cpp

    r8 r12  
    257257  factorization_->slackValue(-1.0);
    258258  factorization_->zeroTolerance(1.0e-13);
     259  // save if sparse factorization wanted
     260  int saveSparse = factorization_->sparseThreshold();
     261
    259262  if (internalFactorize(0))
    260263    return 1; // some error
     
    316319    // Say good factorization
    317320    factorType=1;
     321    if (saveSparse) {
     322      // use default at present
     323      factorization_->sparseThreshold(0);
     324      factorization_->goSparse();
     325    }
    318326
    319327    // status stays at -1 while iterating, >=0 finished, -2 to invert
     
    641649  // Restore any saved stuff
    642650  perturbation_ = savePerturbation;
     651  factorization_->sparseThreshold(saveSparse);
    643652  dualBound_ = saveDualBound_;
    644653  return problemStatus_;
  • branches/devel-1/ClpSimplexPrimal.cpp

    r8 r12  
    257257  }
    258258
     259  // save if sparse factorization wanted
     260  int saveSparse = factorization_->sparseThreshold();
     261
    259262  // loop round to clean up solution if values pass
    260263  int numberThrownOut = -1;
     
    328331    // Say good factorization
    329332    factorType=1;
     333    if (saveSparse) {
     334      // use default at present
     335      factorization_->sparseThreshold(0);
     336      factorization_->goSparse();
     337    }
    330338
    331339    // Say no pivot has occurred (for steepest edge and updates)
     
    642650  // Restore any saved stuff
    643651  perturbation_ = savePerturbation;
     652  factorization_->sparseThreshold(saveSparse);
    644653  infeasibilityCost_ = saveInfeasibilityCost;
    645654  return problemStatus_;
Note: See TracChangeset for help on using the changeset viewer.