Changeset 43 for branches


Ignore:
Timestamp:
Oct 14, 2002 4:43:21 PM (17 years ago)
Author:
forrest
Message:

Still trying to make more rugged on IBM Burlington problems

Location:
branches/devel-1
Files:
7 edited

Legend:

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

    r19 r43  
    360360    case ClpSimplex::atUpperBound:
    361361      if (!toNearest) {
    362         assert(fabs(value-upperValue)<=primalTolerance*1.0001) ;
     362        // With increasing tolerances - we may be at wrong place
     363        if (fabs(value-upperValue)>primalTolerance*1.0001) {
     364          assert(fabs(value-lowerValue)<=primalTolerance*1.0001);
     365          model_->setStatus(iSequence,ClpSimplex::atLowerBound);
     366        }
    363367      } else {
    364368        solution[iSequence] = upperValue;
     
    367371    case ClpSimplex::atLowerBound:
    368372      if (!toNearest) {
    369         assert(fabs(value-lowerValue)<=primalTolerance*1.0001);
     373        // With increasing tolerances - we may be at wrong place
     374        if (fabs(value-lowerValue)>primalTolerance*1.0001) {
     375          assert(fabs(value-upperValue)<=primalTolerance*1.0001);
     376          model_->setStatus(iSequence,ClpSimplex::atUpperBound);
     377        }
    370378      } else {
    371379        solution[iSequence] = lowerValue;
     
    583591  case ClpSimplex::atLowerBound:
    584592    // set correctly
    585     if (fabs(value-lower)<=primalTolerance*1.001) 
     593    if (fabs(value-lower)<=primalTolerance*1.001){
    586594      model_->setStatus(iPivot,ClpSimplex::atLowerBound);
    587     else if (fabs(value-upper)<=primalTolerance*1.001)
     595    } else if (fabs(value-upper)<=primalTolerance*1.001){
    588596      model_->setStatus(iPivot,ClpSimplex::atUpperBound);
    589     else
    590       assert(fabs(value-lower)<=primalTolerance*1.0001||
    591              fabs(value-upper)<=primalTolerance*1.0001);
     597    } else {
     598      // set superBasic
     599      model_->setStatus(iPivot,ClpSimplex::superBasic);
     600    }
    592601    break;
    593602  }
  • branches/devel-1/ClpSimplex.cpp

    r40 r43  
    27612761
    27622762  for (i=0;i<CLP_PROGRESS;i++) {
    2763     if (objective==objective_[i]&&
    2764         infeasibility==infeasibility_[i]&&
    2765         numberInfeasibilities==numberInfeasibilities_[i]) {
     2763    bool matchedOnObjective = (objective==objective_[i]);
     2764    bool matchedOnInfeasibility = (infeasibility==infeasibility_[i]);
     2765    bool matchedOnInfeasibilities =
     2766      (numberInfeasibilities==numberInfeasibilities_[i]);
     2767    if (matchedOnObjective&&matchedOnInfeasibility&&matchedOnInfeasibilities) {
    27662768      matched |= (1<<i);
    27672769      numberMatched++;
    27682770    }
     2771    if (numberMatched||numberTimes_>50)
     2772      printf("%d %d %d %d\n",numberMatched,
     2773             matchedOnObjective,matchedOnInfeasibility,
     2774             matchedOnInfeasibilities);
    27692775    if (i) {
    27702776      objective_[i-1] = objective_[i];
     
    28392845  smallestObj=1.0e100;
    28402846  largestObj=0.0;
     2847  // If bounds are too close - fix
     2848  double fixTolerance = 1.1*primalTolerance_;
    28412849  for (i=numberColumns_;i<numberColumns_+numberRows_;i++) {
    28422850    double value;
     
    28572865      if (firstBad<0)
    28582866        firstBad=i;
    2859     } else if (value<=primalTolerance_) {
     2867    } else if (value<=fixTolerance) {
    28602868      if (value) {
    28612869        // modify
     
    29092917      if (firstBad<0)
    29102918        firstBad=i;
    2911     } else if (value<=primalTolerance_) {
     2919    } else if (value<=fixTolerance) {
    29122920      if (value) {
    29132921        // modify
  • branches/devel-1/ClpSimplexPrimal.cpp

    r35 r43  
    372372  int ifValuesPass=0;
    373373  int returnCode=-1;
     374  int startIteration = numberIterations_;
    374375  if (firstSuperBasic<numberRows_+numberColumns_)
    375376    ifValuesPass=1;
     
    626627        returnCode=3;
    627628        break;
     629      } else if(numberIterations_ == startIteration
     630                + 2 * factorization_->maximumPivots()) {
     631        // done a lot of flips - be safe
     632        problemStatus_ =-2; // refactorize
    628633      }
    629634    } else {
  • branches/devel-1/Makefile.Clp

    r41 r43  
    5555CXXFLAGS += -DUSE_PRESOLVE
    5656ifeq ($(OptLevel),-g)
    57      CXXFLAGS += -DCLP_DEBUG
     57#     CXXFLAGS += -DCLP_DEBUG
    5858#    CXXFLAGS += -DPRESOLVE_SUMMARY=1 -DDEBUG_PRESOLVE -DCHECK_CONSISTENCY=1
    5959endif
  • branches/devel-1/Presolve.cpp

    r41 r43  
    557557      // look for substitutions with no fill
    558558      int fill_level=2;
     559      int whichPass=0;
    559560      while (1) {
     561        whichPass++;
    560562        const PresolveAction * const paction1 = paction_;
    561563       
     
    610612#endif
    611613       
    612         prob->whichpass_++;
    613614         
    614615        // set up for next pass
     
    625626          if (index==kcheck) {
    626627            printf("row %d on list after pass %d\n",kcheck,
    627                    prob->whichpass_);
     628                   whichPass);
    628629            found=true;
    629630          }
     
    641642          if (index==kcheck) {
    642643            printf("col %d on list after pass %d\n",kcheck,
    643                    prob->whichpass_);
     644                   whichPass);
    644645            found=true;
    645646          }
     
    706707            numberDropped++;
    707708        printf("%d rows dropped after pass %d\n",numberDropped,
    708                prob->whichpass_+1);
     709               iLoop+1);
    709710      }
    710711      if (paction_ == paction0)
  • branches/devel-1/PresolveMatrix.cpp

    r35 r43  
    284284  ztoldj_(getTolerance(si, ClpDualTolerance)),
    285285
    286   maxmin_(si.getObjSense()),
    287 
    288   whichpass_(0)
     286  maxmin_(si.getObjSense())
     287
    289288{
    290289  si.getDblParam(ClpObjOffset,originalOffset_);
  • branches/devel-1/include/PresolveMatrix.hpp

    r41 r43  
    173173  double maxmin_;
    174174
    175   int whichpass_;       // mostly for debugging
    176175
    177176  PrePostsolveMatrix(const ClpSimplex& si,
Note: See TracChangeset for help on using the changeset viewer.