Ignore:
Timestamp:
Sep 13, 2012 12:31:33 PM (8 years ago)
Author:
forrest
Message:

fix a few problems with Aboca

File:
1 edited

Legend:

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

    r1878 r1879  
    40504050  // add values pass options
    40514051  minimumThetaMovement_=1.0e-12;
     4052  if ((specialOptions_&8192)!=0)
     4053    minimumThetaMovement_=1.0e-15;
    40524054  int returnCode=static_cast<AbcSimplexPrimal *> (this)->primal(ifValuesPass);
    40534055  stateOfProblem_ &= ~VALUES_PASS;
     
    40644066  minimumThetaMovement_=1.0e-12;
    40654067  int iPass=0;
    4066   while (problemStatus_==10) {
     4068  while (problemStatus_==10&&minimumThetaMovement_>1.0e-15) {
    40674069    iPass++;
    40684070    if (minimumThetaMovement_==1.0e-12)
     
    40794081      perturbation_=101;
    40804082    baseIteration_=numberIterations_;
    4081     static_cast<AbcSimplexDual *> (this)->dual();
     4083    if ((specialOptions_&8192)==0)
     4084      static_cast<AbcSimplexDual *> (this)->dual();
    40824085    baseIteration_=numberIterations_;
    40834086    if (problemStatus_==10) {
    4084       perturbation_=100;
     4087      if (initialSumInfeasibilities_>=0.0) {
     4088        if (savePerturbation>=100) {
     4089          perturbation_=100;
     4090        } else {
     4091          if (savePerturbation==50)
     4092            perturbation_=CoinMax(51,HEAVY_PERTURBATION-4-iPass); //smaller
     4093          else
     4094            perturbation_=CoinMax(51,savePerturbation-1-iPass); //smaller
     4095        }
     4096      } else {
     4097        specialOptions_ |= 8192; // stop going to dual
     4098        perturbation_=savePerturbation;
     4099        abcFactorization_->setPivots(100000); // force factorization
     4100        initialSumInfeasibilities_=1.23456789e-5;
     4101        // clean pivots
     4102        int numberBasic=0;
     4103        int * pivot=pivotVariable();
     4104        for (int i=0;i<numberTotal_;i++) {
     4105          if (getInternalStatus(i)==basic)
     4106            pivot[numberBasic++]=i;
     4107        }
     4108        assert (numberBasic==numberRows_);
     4109      }
     4110      if (iPass>2)
     4111        perturbation_=100;
    40854112      copyFromSaved(14);
    40864113      baseIteration_=numberIterations_;
     
    59245951      << numberTimes_
    59255952      << CoinMessageEol;
     5953    printf("loop detected %d times out of %d\n",numberBadTimes_,numberTimes_);
    59265954    numberBadTimes_++;
    59275955    if (numberBadTimes_ < 10) {
     
    59736001          model->setSequenceIn(iSequence);
    59746002          model->setFlagged(iSequence);
     6003          model->setLastBadIteration(model->numberIterations());
    59756004          model->setSequenceIn(save);
    59766005          //printf("flagging %d from loop\n",iSequence);
Note: See TracChangeset for help on using the changeset viewer.