Ignore:
Timestamp:
Nov 11, 2013 12:27:32 PM (6 years ago)
Author:
forrest
Message:

Minor stability fixes and an option to allow perturbation after presolve

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/1.15/Clp/src/AbcSimplex.cpp

    r1910 r1989  
    188188  abcLower_ = ClpCopyOfArray(rhs.abcLower_, sizeArray);
    189189  abcUpper_ = ClpCopyOfArray(rhs.abcUpper_, sizeArray);
    190   abcCost_ = ClpCopyOfArray(rhs.abcCost_, sizeArray);
     190  abcCost_ = ClpCopyOfArray(rhs.abcCost_, sizeArray+maximumNumberTotal_);
    191191  abcDj_ = ClpCopyOfArray(rhs.abcDj_, sizeArray);
     192
    192193  abcSolution_ = ClpCopyOfArray(rhs.abcSolution_, sizeArray+maximumNumberTotal_);
    193194  abcPerturbation_ = ClpCopyOfArray(rhs.abcPerturbation_,sizeArray);
     
    368369    abcDualRowPivot_ = new AbcDualRowSteepest();
    369370    abcPrimalColumnPivot_ = new AbcPrimalColumnSteepest();
    370     internalStatus_ = newArray(reinterpret_cast<unsigned char *>(NULL),sizeArray+maximumNumberTotal_);
     371    internalStatus_ = newArray(reinterpret_cast<unsigned char *>(NULL),
     372                               sizeArray+maximumNumberTotal_);
    371373    abcLower_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
    372374    abcUpper_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
    373     abcCost_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
     375    abcCost_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+maximumNumberTotal_);
    374376    abcDj_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
    375377    abcSolution_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+maximumNumberTotal_);
     
    417419  scaleFromExternal_ = resizeArray(scaleFromExternal_,maximumAbcNumberRows_,maximumAbcNumberColumns_,newSize1,newSize2,0);
    418420  //scaleToExternal_ = resizeArray(scaleToExternal_,maximumAbcNumberRows_,maximumAbcNumberColumns_,newSize1,newSize2,1,0);
    419   internalStatus_ = resizeArray(internalStatus_,maximumAbcNumberRows_,maximumAbcNumberColumns_,newSize1,newSize2,numberTotal_);
     421  internalStatus_ = resizeArray(internalStatus_,maximumAbcNumberRows_,
     422                                maximumAbcNumberColumns_,
     423                                newSize1,newSize2,numberTotal_);
    420424  abcLower_ = resizeArray(abcLower_,maximumAbcNumberRows_,maximumAbcNumberColumns_,newSize1,newSize2,0);
    421425  abcUpper_ = resizeArray(abcUpper_,maximumAbcNumberRows_,maximumAbcNumberColumns_,newSize1,newSize2,0);
    422   abcCost_ = resizeArray(abcCost_,maximumAbcNumberRows_,maximumAbcNumberColumns_,newSize1,newSize2,0);
     426  abcCost_ = resizeArray(abcCost_,maximumAbcNumberRows_,maximumAbcNumberColumns_,newSize1,newSize2,numberTotal_);
    423427  abcDj_ = resizeArray(abcDj_,maximumAbcNumberRows_,maximumAbcNumberColumns_,newSize1,newSize2,0);
    424428  abcSolution_ = resizeArray(abcSolution_,maximumAbcNumberRows_,maximumAbcNumberColumns_,newSize1,newSize2,numberTotal_);
     
    649653  previousVector->clear();
    650654  // accumulate non basic stuff
    651  
    652655  double *  COIN_RESTRICT array = arrayVector->denseVector();
    653656  CoinAbcScatterZeroTo(abcSolution_,abcPivotVariable_,numberRows_);
     
    10391042    }
    10401043    status = CoinMax(numberSlacks - numberRows_, 0);
     1044    if (status)
     1045      printf("%d singularities\n",status);
    10411046    // special case if all slack
    10421047    if (numberSlacks == numberRows_) {
     
    37343739  }
    37353740  int totalNumberIterations=numberIterations_;
     3741  if (problemStatus_ == 10 && (moreSpecialOptions_&32768)!=0 &&sumDualInfeasibilities_ < 0.1) {
     3742    problemStatus_=0;
     3743  }
    37363744#ifndef TRY_ABC_GUS
    37373745  if (problemStatus_==10) {
     
    57835791  } else if (which==-1) {
    57845792    for (int i=0;i<ABC_NUMBER_USEFUL_NORMAL;i++) {
    5785       if (usefulArray_[i].getNumElements())
     5793      if (usefulArray_[i].getNumElements()) {
    57865794        usefulArray_[i].clear();
     5795        usefulArray_[i].clearAndReset();
     5796      }
    57875797    }
    57885798    stateOfProblem_&= ~255;
Note: See TracChangeset for help on using the changeset viewer.