Changeset 2172


Ignore:
Timestamp:
Sep 22, 2015 4:22:32 AM (4 years ago)
Author:
forrest
Message:

change to fastdual

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/1.16/Clp/src/ClpSimplexDual.cpp

    r2158 r2172  
    402402     double largestPrimalError = 0.0;
    403403     double largestDualError = 0.0;
     404     double smallestPrimalInfeasibility=COIN_DBL_MAX;
    404405     int numberRayTries=0;
    405406     // Start can skip some things in transposeTimes
     
    488489          statusOfProblemInDual(lastCleaned, factorType, saveDuals, data,
    489490                                ifValuesPass);
     491          smallestPrimalInfeasibility=CoinMin(smallestPrimalInfeasibility,
     492                                              sumPrimalInfeasibilities_);
     493          if (sumPrimalInfeasibilities_>1.0e5 &&
     494              sumPrimalInfeasibilities_>1.0e5*smallestPrimalInfeasibility &&
     495              (moreSpecialOptions_&256)==0 &&
     496              progress_.lastObjective(0)<-1.0e10 &&
     497              progress_.lastObjective(1)>-1.0e5) {
     498            // problems - try dual
     499            problemStatus_=10;
     500            // mark as large infeasibility cost wanted
     501            sumPrimalInfeasibilities_ = -123456789.0;
     502            //for (int i=0;i<numberRows_+numberColumns_;i++) {
     503            //if (fabs(cost_[i]*solution_[i])>1.0e4)
     504            //  printf("col %d cost %g sol %g bounds %g %g\n",
     505            //         i,cost_[i],solution_[i],lower_[i],upper_[i]);
     506            //}
     507          }
    490508          if ((specialOptions_&2097152)!=0&&problemStatus_==1&&!ray_&&
    491509              !numberRayTries && numberIterations_) {
     
    33923410  info.bestPossible = bestPossible;
    33933411}
     3412static
     3413void ClpMemmove(void * to, void * from,int nChar)
     3414{ memmove(to,from,nChar);}
    33943415// later do so less zeroing in first blocks
    33953416// and some of it combined for loop to move and zero
     
    35253546          upperTheta = CoinMin(upperTheta,info[0].upperTheta);
    35263547          for (int i=1;i<ABOCA_LITE;i++) {
    3527             memmove(index+numberRemaining,info[i].index,info[i].numberRemaining*sizeof(int));
     3548            ClpMemmove(index+numberRemaining,info[i].index,info[i].numberRemaining*sizeof(int));
    35283549            moveAndZero(spare+numberRemaining,info[i].spare,info[i].numberRemaining);
    35293550            numberRemaining += info[i].numberRemaining;
     
    68446865     }
    68456866     // slows down slightly - but more accurate
    6846      if (factorization_->pivots())
     6867     if (factorization_->pivots()) {
     6868       columnArray_[0]->clear();
    68476869       computeDuals(NULL);
     6870     }
    68486871       
    68496872     // clear
Note: See TracChangeset for help on using the changeset viewer.