Changeset 1278 for trunk/Clp


Ignore:
Timestamp:
Sep 19, 2008 11:24:47 AM (11 years ago)
Author:
forrest
Message:

for ratiogap

Location:
trunk/Clp/src
Files:
3 edited

Legend:

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

    r1267 r1278  
    734734      model.setDblParam(CbcModel::CbcAllowableGap,value);
    735735      break;
     736    case GAPRATIO:
     737      oldValue=model.getDblParam(CbcModel::CbcAllowableFractionGap);
     738      model.setDblParam(CbcModel::CbcAllowableFractionGap,value);
     739      break;
    736740    case CUTOFF:
    737741      oldValue=model.getCutoff();
     
    773777  case INCREMENT:
    774778    value=model.getDblParam(CbcModel::CbcCutoffIncrement);
     779    break;
    775780  case ALLOWABLEGAP:
    776781    value=model.getDblParam(CbcModel::CbcAllowableGap);
     782    break;
     783  case GAPRATIO:
     784    value=model.getDblParam(CbcModel::CbcAllowableFractionGap);
    777785    break;
    778786  case CUTOFF:
     
    18281836  parameters[numberParameters-1].append("forceOn");
    18291837  parameters[numberParameters-1].append("forceLongOn");
     1838  parameters[numberParameters-1].append("long");
    18301839  parameters[numberParameters-1].setLonghelp
    18311840    (
  • trunk/Clp/src/CbcOrClpParam.hpp

    r1267 r1278  
    5050   
    5151    INFEASIBILITYWEIGHT = 51, CUTOFF, INTEGERTOLERANCE,INCREMENT,ALLOWABLEGAP,
    52     TIMELIMIT_BAB,
    53    
    54     DJFIX = 81, GAPRATIO,TIGHTENFACTOR,PRESOLVETOLERANCE,OBJSCALE2,
     52    TIMELIMIT_BAB, GAPRATIO,
     53   
     54    DJFIX = 81, TIGHTENFACTOR,PRESOLVETOLERANCE,OBJSCALE2,
    5555    DEXTRA1, DEXTRA2, DEXTRA3, DEXTRA4, DEXTRA5,
    5656
  • trunk/Clp/src/ClpSimplex.cpp

    r1267 r1278  
    77587758    int number = rowArray_[1]->getNumElements();
    77597759    double * element = rowArray_[1]->denseVector();
     7760    assert ( !rowArray_[3]->getNumElements());
     7761    double * saveSolution = rowArray_[3]->denseVector();
    77607762    for (i=0;i<number;i++) {
    77617763      int ii = index[i];
     
    77897791      int ij = pivotVariable_[ii];
    77907792      double value=element[ii];
    7791       element[ii]= solution_[ij];
     7793      saveSolution[ii]= solution_[ij];
    77927794      solution_[ij] -= movement*value;
    77937795    }
     
    78787880      int * index = rowArray_[1]->getIndices();
    78797881      int number = rowArray_[1]->getNumElements();
    7880       double * element = rowArray_[1]->denseVector();
    78817882      for (i=0;i<number;i++) {
    78827883        int ii = index[i];
    78837884        // get column
    78847885        int ij = pivotVariable_[ii];
    7885         solution_[ij] = element[ii];
     7886        solution_[ij] = saveSolution[ii];
    78867887      }
    78877888      if (sequenceOut_>=0)
     
    78967897        }
    78977898        gutsOfSolution(NULL,NULL);
     7899        valueIn_=solution_[sequenceIn_];
     7900        if (sequenceOut_>=0)
     7901          valueOut_=solution_[sequenceOut_];
    78987902        roundAgain=true;
    78997903      } else {
     
    79097913                                   factorization_->areaFactor() * 1.1);
    79107914      returnCode =1; // factorize now
     7915    }
     7916    {
     7917      // clear saveSolution
     7918      int * index = rowArray_[1]->getIndices();
     7919      int number = rowArray_[1]->getNumElements();
     7920      for (i=0;i<number;i++) {
     7921        int ii = index[i];
     7922        saveSolution[ii]=0.0;
     7923      }
    79117924    }
    79127925    rowArray_[1]->clear();
     
    1086610879      }
    1086710880#endif
    10868       if (depth>0||true) {
     10881      if (depth>0) {
    1086910882        int way=nodeInfo[useDepth+1]->way();
    1087010883        int sequence = nodeInfo[useDepth+1]->sequence();
     
    1126311276    // check which algorithms allowed
    1126411277    baseIteration_=numberIterations_;
     11278    // save upper and lower around primal
     11279    double * saveLower2 = CoinCopyOfArray(lower_,numberColumns_+numberRows_);
     11280    double * saveUpper2 = CoinCopyOfArray(upper_,numberColumns_+numberRows_);
    1126511281    status = ((ClpSimplexPrimal *) this)->primal(1,7);
     11282    CoinMemcpyN(saveLower2,numberColumns_+numberRows_,lower_);
     11283    delete [] saveLower2;
     11284    CoinMemcpyN(saveUpper2,numberColumns_+numberRows_,upper_);
     11285    delete [] saveUpper2;
    1126611286    baseIteration_=0;
    1126711287    if (saveObjective != objective_) {
     
    1127111291      if (!problemStatus_) {
    1127211292        // carry on
     11293        // save upper and lower around primal
     11294        double * saveLower2 = CoinCopyOfArray(lower_,numberColumns_+numberRows_);
     11295        double * saveUpper2 = CoinCopyOfArray(upper_,numberColumns_+numberRows_);
    1127311296        status = ((ClpSimplexPrimal *) this)->primal(1,7);
     11297        CoinMemcpyN(saveLower2,numberColumns_+numberRows_,lower_);
     11298        delete [] saveLower2;
     11299        CoinMemcpyN(saveUpper2,numberColumns_+numberRows_,upper_);
     11300        delete [] saveUpper2;
    1127411301      }
    1127511302    }
Note: See TracChangeset for help on using the changeset viewer.