Changeset 727


Ignore:
Timestamp:
Feb 18, 2006 3:32:41 PM (15 years ago)
Author:
forrest
Message:

for docs

Location:
trunk/Test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Test/CbcOrClpParam.cpp

    r726 r727  
    117117CbcOrClpParam::CbcOrClpParam (std::string name, std::string help,
    118118                    std::string firstValue,
    119                     CbcOrClpParameterType type,int defaultIndex,
     119                    CbcOrClpParameterType type,int whereUsed,
    120120                    bool display)
    121121  : type_(type),
     
    129129    longHelp_(),
    130130    action_(type),
    131     currentKeyWord_(defaultIndex),
     131    currentKeyWord_(0),
    132132    display_(display),
    133133    intValue_(-1),
    134134    doubleValue_(-1.0),
    135135    stringValue_(""),
    136     whereUsed_(7)
     136    whereUsed_(whereUsed)
    137137{
    138138  gutsOfConstructor();
     
    323323CbcOrClpParam::printOptions (  ) const
    324324{
    325   std::cout<<"Possible options for "<<name_<<" are:"<<std::endl;
     325  std::cout<<"<Possible options for "<<name_<<" are:";
    326326  unsigned int it;
    327327  for (it=0;it<definedKeyWords_.size();it++) {
     
    333333        "("+thisOne.substr(shriekPos+1)+")";
    334334    }
    335     std::cout<<thisOne<<std::endl;
    336   }
     335    std::cout<<" "<<thisOne;
     336  }
     337  assert (currentKeyWord_>=0&&currentKeyWord_<(int)definedKeyWords_.size());
     338  std::string current = definedKeyWords_[currentKeyWord_];
     339  std::string::size_type  shriekPos = current.find('!');
     340  if ( shriekPos!=std::string::npos ) {
     341    //contains '!'
     342    current = current.substr(0,shriekPos)+
     343      "("+current.substr(shriekPos+1)+")";
     344  }
     345  std::cout<<", current  "<<current<<">"<<std::endl;
    337346}
    338347// Print action and string
     
    375384{
    376385  if (type_>=1&&type_<400) {
    377     if (type_<LOGLEVEL) {
    378       printf("Range of values is %g to %g\n",lowerDoubleValue_,upperDoubleValue_);
     386    CoinReadPrintit(longHelp_.c_str());
     387    if (type_<SOLVERLOGLEVEL) {
     388      printf("<Range of values is %g to %g, current %g>\n",lowerDoubleValue_,upperDoubleValue_, doubleValue_);
     389      assert (upperDoubleValue_>lowerDoubleValue_);
    379390    } else if (type_<DIRECTION) {
    380       printf("Range of values is %d to %d\n",lowerIntValue_,upperIntValue_);
     391      printf("<Range of values is %d to %d, current %d>\n",lowerIntValue_,upperIntValue_,intValue_);
     392      assert (upperIntValue_>lowerIntValue_);
    381393    } else if (type_<DIRECTORY) {
    382394      printOptions();
    383395    }
    384     CoinReadPrintit(longHelp_.c_str());
    385396  }
    386397}
     
    10891100  parameters[numberParameters++]=
    10901101    CbcOrClpParam("auto!Scale","Whether to scale objective, rhs and bounds of problem if they look odd",
    1091                   "off",AUTOSCALE,0,false);
     1102                  "off",AUTOSCALE,7,false);
    10921103  parameters[numberParameters-1].append("on");
    10931104  parameters[numberParameters-1].setLonghelp
     
    11311142  parameters[numberParameters-1].append("LX");
    11321143  parameters[numberParameters-1].append("LL");
     1144  parameters[numberParameters-1].setCurrentOption("LX");
    11331145#endif
    11341146#ifdef COIN_USE_CBC
     
    11441156  parameters[numberParameters++]=
    11451157    CbcOrClpParam("bscale","Whether to scale in barrier",
    1146                   "off",BARRIERSCALE,0,false);
     1158                  "off",BARRIERSCALE,7,false);
    11471159  parameters[numberParameters-1].append("on");
    11481160  parameters[numberParameters++]=
    11491161    CbcOrClpParam("chol!esky","Which cholesky algorithm",
    1150                   "native",CHOLESKY,-1,false);
     1162                  "native",CHOLESKY,7,false);
    11511163  parameters[numberParameters-1].append("dense");
    11521164  //#ifdef FOREIGN_BARRIER
     
    14261438  parameters[numberParameters++]=
    14271439    CbcOrClpParam("gamma!(Delta)","Whether to regularize barrier",
    1428                   "off",GAMMA,0,false);
     1440                  "off",GAMMA,7,false);
    14291441  parameters[numberParameters-1].append("on");
    14301442  parameters[numberParameters-1].append("gamma");
     
    15531565  parameters[numberParameters++]=
    15541566    CbcOrClpParam("KKT","Whether to use KKT factorization",
    1555                   "off",KKT,0,false);
     1567                  "off",KKT,7,false);
    15561568  parameters[numberParameters-1].append("on");
    15571569#endif
     
    16091621  parameters[numberParameters-1].setLonghelp
    16101622    (
    1611      "If this is at its initial value of 201 then in this executable clp will guess at a\
     1623     "If this is at its initial value of 200 then in this executable clp will guess at a\
    16121624 value to use.  Otherwise the user can set a value.  The code may decide to re-factorize\
    16131625 earlier."
     
    18261838  parameters[numberParameters++]=
    18271839    CbcOrClpParam("PFI","Whether to use Product Form of Inverse in simplex",
    1828                   "off",PFI,0,false);
     1840                  "off",PFI,7,false);
    18291841  parameters[numberParameters-1].append("on");
    18301842  parameters[numberParameters-1].setLonghelp
     
    19391951    CbcOrClpParam("printO!ptions","Print options",
    19401952                  0,INT_MAX,PRINTOPTIONS);
     1953  parameters[numberParameters-1].setIntValue(0);
    19411954#endif
    19421955#ifdef COIN_USE_CBC
     
    21402153  parameters[numberParameters++]=
    21412154    CbcOrClpParam("spars!eFactor","Whether factorization treated as sparse",
    2142                   "on",SPARSEFACTOR,0,false);
     2155                  "on",SPARSEFACTOR,7,false);
    21432156  parameters[numberParameters-1].append("off");
    21442157  parameters[numberParameters++]=
  • trunk/Test/CbcOrClpParam.hpp

    r726 r727  
    101101  // Other strings will be added by insert
    102102  CbcOrClpParam (std::string name, std::string help, std::string firstValue,
    103            CbcOrClpParameterType type,int defaultIndex=0,bool display=true);
     103           CbcOrClpParameterType type,int whereUsed=7,bool display=true);
    104104  // Action
    105105  CbcOrClpParam (std::string name, std::string help,
  • trunk/Test/ClpMain.cpp

    r725 r727  
    239239          for (iType=0;iType<4;iType++) {
    240240            int across=0;
     241            if ((verbose%4)!=0)
     242              std::cout<<std::endl;
    241243            std::cout<<types[iType]<<std::endl;
    242244            if ((verbose&2)!=0)
     
    264266                      std::cout<<"---- description"<<std::endl;
    265267                      parameters[iParam].printLongHelp();
    266                       std::cout<<"----"<<std::endl;
     268                      std::cout<<"----"<<std::endl<<std::endl;
    267269                    }
    268270                  } else {
Note: See TracChangeset for help on using the changeset viewer.