Changeset 482


Ignore:
Timestamp:
Oct 18, 2004 2:54:40 PM (15 years ago)
Author:
forrest
Message:

? valgrind error + maxits on strong branching

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpDualRowSteepest.cpp

    r451 r482  
    664664  const int * pivotVariable = model_->pivotVariable();
    665665  int i;
    666   if (mode==1&&weights_) {
    667     alternateWeights_->clear();
    668     // change from row numbers to sequence numbers
    669     int * which = alternateWeights_->getIndices();
    670     for (i=0;i<numberRows;i++) {
    671       int iPivot=pivotVariable[i];
    672       which[i]=iPivot;
    673     }
    674     state_=1;
     666  if (mode==1) {
     667    if(weights_) {
     668      // Check if size has changed
     669      if (infeasible_->capacity()==numberRows) {
     670        alternateWeights_->clear();
     671        // change from row numbers to sequence numbers
     672        int * which = alternateWeights_->getIndices();
     673        for (i=0;i<numberRows;i++) {
     674          int iPivot=pivotVariable[i];
     675          which[i]=iPivot;
     676        }
     677        state_=1;
     678      } else {
     679        // size has changed - clear everything
     680        delete [] weights_;
     681        weights_=NULL;
     682        delete [] dubiousWeights_;
     683        dubiousWeights_=NULL;
     684        delete infeasible_;
     685        infeasible_=NULL;
     686        delete alternateWeights_;
     687        alternateWeights_=NULL;
     688        delete savedWeights_;
     689        savedWeights_=NULL;
     690        state_=-1;
     691      }
     692    }
    675693  } else if (mode==2||mode==4||mode==5) {
    676694    // restore
  • trunk/ClpSimplexDual.cpp

    r480 r482  
    40464046      double * givenPi=NULL;
    40474047      returnCode = whileIterating(givenPi);
    4048       if ((!alwaysFinish&&(returnCode<1)||returnCode==3)) {
     4048      if ((!alwaysFinish&&returnCode<1)||returnCode==3) {
    40494049        double limit = 0.0;
    40504050        getDblParam(ClpDualObjectiveLimit, limit);
     
    40594059                 numberIterations_,returnCode);
    40604060#endif
    4061           break;
    4062         }
     4061        } else {
     4062          // looks as if it is infeasible
     4063          returnCode=0;
     4064        }
     4065        break;
    40634066      }
    40644067      returnCode=0;
Note: See TracChangeset for help on using the changeset viewer.