Changeset 1284 for trunk/Clp


Ignore:
Timestamp:
Sep 23, 2008 6:06:00 AM (11 years ago)
Author:
forrest
Message:

allow coinsimpfactorization

Location:
trunk/Clp/src
Files:
5 edited

Legend:

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

    r1278 r1284  
    14851485#endif
    14861486#ifdef COIN_HAS_CLP
     1487#if CLP_MULTIPLE_FACTORIZATIONS == 1
    14871488  parameters[numberParameters++]=
    14881489    CbcOrClpParam("dense!Threshold","Whether to use dense factorization",
     
    14901491  parameters[numberParameters-1].setLonghelp
    14911492    (
    1492      "If processed problem <= this use dense factorization (for testing)"
     1493     "If processed problem <= this use dense factorization"
    14931494     );
    14941495  parameters[numberParameters-1].setIntValue(-1);
     1496#endif
    14951497#endif
    14961498#ifdef COIN_HAS_CBC
     
    26832685sequential Lps to get a good approximate solution."
    26842686     );
     2687#if CLP_MULTIPLE_FACTORIZATIONS == 2
     2688  parameters[numberParameters++]=
     2689    CbcOrClpParam("small!Factorization","Whether to use small factorization",
     2690                  -1,10000,DENSE,false);
     2691  parameters[numberParameters-1].setLonghelp
     2692    (
     2693     "If processed problem <= this use small factorization"
     2694     );
     2695  parameters[numberParameters-1].setIntValue(-1);
     2696#endif
    26852697#endif
    26862698  parameters[numberParameters++]=
  • trunk/Clp/src/CbcOrClpParam.hpp

    r1278 r1284  
    6666    NUMBERMINI,MIPOPTIONS,MOREMIPOPTIONS,MAXHOTITS,FPUMPITS,MAXSOLS,
    6767    FPUMPTUNE,TESTOSI,EXTRA1,EXTRA2,EXTRA3,EXTRA4,CUTPASSINTREE,
    68     THREADS,CUTPASS,VUBTRY,DENSE,EXPERIMENT,DIVEOPT,STRATEGY,
     68    THREADS,CUTPASS,VUBTRY,DENSE,EXPERIMENT,DIVEOPT,STRATEGY,SMALLFACT,
    6969#ifdef COIN_HAS_CBC
    7070    LOGLEVEL ,
  • trunk/Clp/src/ClpFactorization.cpp

    r1217 r1284  
    11131113  coinFactorizationA_ = new CoinFactorization() ;
    11141114  coinFactorizationB_ = NULL;
    1115   //coinFactorizationB_ = new CoinDenseFactorization();
     1115  //coinFactorizationB_ = new CoinOtherFactorization();
    11161116  goDenseThreshold_ = -1;
    11171117}
     
    11361136    coinFactorizationA_=NULL;
    11371137  if (rhs.coinFactorizationB_)
    1138     coinFactorizationB_ = new CoinDenseFactorization(*(rhs.coinFactorizationB_));
     1138    coinFactorizationB_ = new CoinOtherFactorization(*(rhs.coinFactorizationB_));
    11391139  else
    11401140    coinFactorizationB_=NULL;
     
    11611161}
    11621162
    1163 ClpFactorization::ClpFactorization (const CoinDenseFactorization & rhs)
     1163ClpFactorization::ClpFactorization (const CoinOtherFactorization & rhs)
    11641164{
    11651165#ifdef CLP_FACTORIZATION_INSTRUMENT
     
    11701170#endif
    11711171  coinFactorizationA_ = NULL;
    1172   coinFactorizationB_ = new CoinDenseFactorization(rhs);
     1172  coinFactorizationB_ = new CoinOtherFactorization(rhs);
    11731173  goDenseThreshold_ = -1;
    11741174#ifdef CLP_FACTORIZATION_INSTRUMENT
     
    12131213    delete coinFactorizationB_;
    12141214    if (rhs.coinFactorizationB_)
    1215       coinFactorizationB_ = new CoinDenseFactorization(*(rhs.coinFactorizationB_));
     1215      coinFactorizationB_ = new CoinOtherFactorization(*(rhs.coinFactorizationB_));
    12161216    else
    12171217      coinFactorizationB_=NULL;
     
    12291229  delete coinFactorizationB_;
    12301230  coinFactorizationA_ = NULL;
    1231   coinFactorizationB_ = new CoinDenseFactorization();
    1232   //printf("going dense\n");
     1231  coinFactorizationB_ = new CoinOtherFactorization();
     1232  printf("going dense\n");
    12331233}
    12341234int
  • trunk/Clp/src/ClpFactorization.hpp

    r1266 r1284  
    1111class ClpSimplex;
    1212class ClpNetworkBasis;
    13 #define CLP_MULTIPLE_FACTORIZATIONS   
    14 #ifdef CLP_MULTIPLE_FACTORIZATIONS   
     13#ifndef CLP_MULTIPLE_FACTORIZATIONS
     14#define CLP_MULTIPLE_FACTORIZATIONS 1
     15#endif   
     16#if CLP_MULTIPLE_FACTORIZATIONS == 1
    1517#include "CoinDenseFactorization.hpp"
     18typedef CoinDenseFactorization CoinOtherFactorization;
     19#elif CLP_MULTIPLE_FACTORIZATIONS == 2
     20#include "CoinSimpFactorization.hpp"
     21typedef CoinSimpFactorization CoinOtherFactorization;
    1622#endif
    1723
     
    5965   ClpFactorization(const CoinFactorization&);
    6066#ifdef CLP_MULTIPLE_FACTORIZATIONS   
    61    /** The copy constructor from an CoinDenseFactorization. */
    62    ClpFactorization(const CoinDenseFactorization&);
     67   /** The copy constructor from an CoinOtherFactorization. */
     68   ClpFactorization(const CoinOtherFactorization&);
    6369#endif
    6470   ClpFactorization& operator=(const ClpFactorization&);
     
    327333  /// Pointer to CoinFactorization
    328334  CoinFactorization * coinFactorizationA_;
    329   /// Pointer to CoinDenseFactorization
    330   CoinDenseFactorization * coinFactorizationB_;
     335  /// Pointer to CoinOtherFactorization
     336  CoinOtherFactorization * coinFactorizationB_;
    331337  /// Switch to dense if number rows <= this
    332338  int goDenseThreshold_;
  • trunk/Clp/src/ClpSimplex.cpp

    r1283 r1284  
    77967796    //rowArray_[1]->setNumElements(0);
    77977797    // see where something went to
     7798#ifndef NDEBUG
     7799    CoinRelFltEq eq(1.0e-9);
     7800#endif
    77987801    if (sequenceOut_<0) {
    77997802      if (directionIn_<0) {
    7800         assert (fabs(solution_[sequenceIn_]-upperIn_)<5.0e-7);
     7803        assert (eq(solution_[sequenceIn_],upperIn_));
    78017804        solution_[sequenceIn_]=upperIn_;
    78027805      } else {
    7803         assert (fabs(solution_[sequenceIn_]-lowerIn_)<5.0e-7);
     7806        assert (eq(solution_[sequenceIn_],lowerIn_));
    78047807        solution_[sequenceIn_]=lowerIn_;
    78057808      }
    78067809    } else {
    78077810      if (directionOut_<0) {
    7808         assert (fabs(solution_[sequenceOut_]-upperOut_)<5.0e-7);
     7811        assert (eq(solution_[sequenceOut_],upperOut_));
    78097812        solution_[sequenceOut_]=upperOut_;
    78107813      } else {
    7811         assert (fabs(solution_[sequenceOut_]-lowerOut_)<5.0e-7);
     7814        assert (eq(solution_[sequenceOut_],lowerOut_));
    78127815        solution_[sequenceOut_]=lowerOut_;
    78137816      }
Note: See TracChangeset for help on using the changeset viewer.