Changeset 2323 for trunk


Ignore:
Timestamp:
Apr 3, 2018 1:43:51 PM (19 months ago)
Author:
forrest
Message:

few things

Location:
trunk/Clp/src
Files:
4 edited

Legend:

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

    r2271 r2323  
    75477547      int iSequence=column[i];
    75487548      assert (model->getColumnStatus(iSequence) == ClpSimplex::isFree ||
    7549               model->getColumnStatus(iSequence) != ClpSimplex::superBasic);
     7549              model->getColumnStatus(iSequence) == ClpSimplex::superBasic);
    75507550    }
    75517551    for (int i=block->firstAtLower_;i<block->firstAtUpper_;i++) {
  • trunk/Clp/src/ClpSimplex.cpp

    r2322 r2323  
    31133113#endif
    31143114     for (iSequence = 0; iSequence < numberTotal; iSequence++) {
     3115       //#define LIKELY_SUPERBASIC
     3116#ifdef LIKELY_SUPERBASIC
     3117       if (getStatus(iSequence) == isFree || getStatus(iSequence) == superBasic)
     3118         moreSpecialOptions_ &= ~8;  // Say superbasic variables exist
     3119#endif
    31153120          double value = solution_[iSequence];
    31163121#ifdef COIN_DEBUG
     
    31243129          if (distanceUp < -primalTolerance) {
    31253130               double infeasibility = -distanceUp;
     3131#ifndef LIKELY_SUPERBASIC
    31263132               if (getStatus(iSequence) != basic)
    31273133                 moreSpecialOptions_ &= ~8;  // Say superbasic variables exist
     3134#endif
    31283135               sumPrimalInfeasibilities_ += infeasibility - primalTolerance_;
    31293136               if (infeasibility > relaxedToleranceP)
     
    31373144          } else if (distanceDown < -primalTolerance) {
    31383145               double infeasibility = -distanceDown;
     3146#ifndef LIKELY_SUPERBASIC
    31393147               if (getStatus(iSequence) != basic)
    31403148                 moreSpecialOptions_ &= ~8;  // Say superbasic variables exist
     3149#endif
    31413150               sumPrimalInfeasibilities_ += infeasibility - primalTolerance_;
    31423151               if (infeasibility > relaxedToleranceP)
     
    55895598#endif
    55905599     int returnCode = static_cast<ClpSimplexDual *> (this)->dual(ifValuesPass, startFinishOptions);
     5600#ifdef DUAL_STATS
     5601     static int nDuals=0;
     5602     static int nFeasDuals=0;
     5603     static int nTens=0;
     5604     static int nOdd=0;
     5605     bool needClean=false;
     5606     nDuals++;
     5607     if (problemStatus_==0) {
     5608       nFeasDuals++;
     5609     } else if (problemStatus_==1) {
     5610     } else if (problemStatus_==10) {
     5611       nTens++;
     5612       needClean=true;
     5613     } else {
     5614       printf("dual odd status %d\n",problemStatus_);
     5615       nOdd++;
     5616     }
     5617#endif
    55915618     eventHandler_->event(ClpEventHandler::looksEndInDual);
    55925619#ifdef EXPENSIVE
     
    57945821     //if (problemStatus_==1&&lastAlgorithm==1)
    57955822     //returnCode=10; // so will do primal after postsolve
     5823#ifdef DUAL_STATS
     5824     static int nFeasClean=0;
     5825     if (needClean) {
     5826       if (problemStatus_==0) {
     5827         nFeasClean++;
     5828       } else if (problemStatus_==1) {
     5829       } else if (problemStatus_==10) {
     5830         abort();
     5831       } else {
     5832         printf("dual odd status %d on cleanup\n",problemStatus_);
     5833         abort();
     5834       }
     5835     }
     5836     if ((nDuals%1000)==0)
     5837       printf("%d duals - %d feasible, %d infeasible and %d need cleaning (%d were feasible, %d infeasible) ( %d odd)\n",
     5838              nDuals,nFeasDuals,nDuals-nFeasDuals-nTens-nOdd,nTens,
     5839              nFeasClean,nTens-nFeasClean,nOdd);
     5840#endif
    57965841#ifdef CHECK_RAY
    57975842     if (problemStatus_==1&&ray_) {
  • trunk/Clp/src/ClpSimplexOther.cpp

    r2322 r2323  
    5959#endif
    6060     // long enough for rows+columns
    61      assert(rowArray_[3]->capacity() >= numberRows_ + numberColumns_);
    62      rowArray_[3]->clear();
    63      int * backPivot = rowArray_[3]->getIndices();
     61     int * backPivot = new int [numberRows_+numberColumns_];
    6462     int i;
    6563     for ( i = 0; i < numberRows_ + numberColumns_; i++) {
     
    257255     //columnArray_[1]->clear();
    258256     columnArray_[0]->clear();
    259      //rowArray_[3]->clear();
     257     delete [] backPivot;
    260258     if (!optimizationDirection_)
    261259          printf("*** ????? Ranging with zero optimization costs\n");
  • trunk/Clp/src/ClpSimplexPrimal.cpp

    r2322 r2323  
    14081408                              delete [] ray_;
    14091409                              //if ((specialOptions_&(32|0x01000000))!=0x01000000) {
    1410                               if ((specialOptions_&0x01000000)==0) {
     1410                              if ((specialOptions_&0x03000000)==0) {
    14111411                                ray_ = new double [numberRows_];
    14121412                                double * saveObjective = CoinCopyOfArray(objective(),
Note: See TracChangeset for help on using the changeset viewer.