Ignore:
Timestamp:
Aug 16, 2002 12:02:38 PM (17 years ago)
Author:
forrest
Message:

Hope this works from wincvs

Fix error in values pass

File:
1 edited

Legend:

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

    r14 r15  
    259259  int numberThrownOut = -1;
    260260  int firstSuperBasic=numberRows_+numberColumns_;
     261  int totalNumberThrownOut=0;
    261262  while(numberThrownOut) {
    262     if (internalFactorize(0+10*ifValuesPass))
     263    int status = internalFactorize(0+10*ifValuesPass);
     264    if (status<0)
    263265      return 1; // some error
     266    else
     267      totalNumberThrownOut+= status;
     268
    264269    // for this we need clean basis so it is after factorize
    265270    numberThrownOut=gutsOfSolution(rowActivityWork_,columnActivityWork_,
    266271                                   ifValuesPass);
     272    totalNumberThrownOut+= numberThrownOut;
    267273
    268274    // find first superbasic - columns, then rows
     
    273279    }
    274280  }
     281
     282  if (totalNumberThrownOut)
     283    handler_->message(CLP_SINGULARITIES,messages_)
     284    <<totalNumberThrownOut
     285    <<OsiMessageEol;
    275286
    276287  problemStatus_ = -1;
     
    366377}
    367378void
    368 ClpSimplexPrimal::whileIterating(int firstSuperBasic)
     379ClpSimplexPrimal::whileIterating(int & firstSuperBasic)
    369380{
    370381
     
    442453          break;
    443454        }
    444        
     455
    445456        // and get variable
    446457        primalColumn(rowArray_[1],rowArray_[2],rowArray_[3],
     
    496507        printf("btran dj %g, ftran dj %g\n",saveDj,dualIn_);
    497508#endif
    498       if (saveDj*dualIn_<1.0e-20||
     509      if ((saveDj*dualIn_<1.0e-20&&!ifValuesPass)||
    499510          fabs(saveDj-dualIn_)>1.0e-5*(1.0+fabs(saveDj))) {
    500511        handler_->message(CLP_PRIMAL_DJ,messages_)
     
    725736        infeasibilityCost_=1.0e30;
    726737      }
    727        
     738
    728739      if (infeasibilityCost_<1.0e20) {
    729740        infeasibilityCost_ *= 5.0;
     
    10111022     
    10121023      for (iIndex=0;iIndex<numberRemaining;iIndex++) {
    1013        
     1024
    10141025        int iRow = index[iIndex];
    10151026        double alpha = spare[iIndex];
    10161027        double oldValue = rhs[iRow];
    10171028        double value = oldValue-tentativeTheta*fabs(alpha);
    1018        
     1029
    10191030        if (value<-primalTolerance_) {
    10201031          // how much would it cost to go thru
Note: See TracChangeset for help on using the changeset viewer.