Changeset 1158


Ignore:
Timestamp:
Feb 13, 2008 12:20:34 PM (12 years ago)
Author:
forrest
Message:

for diving heuristics

Location:
trunk/Clp/src
Files:
2 edited

Legend:

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

    r1152 r1158  
    3636static bool doPrinting=true;
    3737std::string afterEquals="";
     38static char printArray[200];
    3839void setCbcOrClpPrinting(bool yesNo)
    3940{
     
    881882    currentKeyWord_=value;
    882883}
     884// Sets current parameter option and returns printable string
     885const char *
     886CbcOrClpParam::setCurrentOptionWithMessage ( int value )
     887{
     888  if (value!=currentKeyWord_) {
     889    sprintf(printArray,"Option for %s changed from %s to %s",
     890            name_.c_str(),definedKeyWords_[currentKeyWord_].c_str(),
     891            definedKeyWords_[value].c_str());
     892
     893    currentKeyWord_=value;
     894  } else {
     895    printArray[0]='\0';
     896  }
     897  return printArray;
     898}
    883899void
    884900CbcOrClpParam::setIntValue ( int value )
     
    14841500     );
    14851501#ifdef COIN_HAS_CBC
     1502  parameters[numberParameters++]=
     1503      CbcOrClpParam("Diving","Whether to try Diving heuristics",
     1504                    "off",DIVING);
     1505  parameters[numberParameters-1].append("V");
     1506  parameters[numberParameters-1].append("G");
     1507  parameters[numberParameters-1].append("GV");
     1508  parameters[numberParameters-1].append("F");
     1509  parameters[numberParameters-1].append("FV");
     1510  parameters[numberParameters-1].append("FG");
     1511  parameters[numberParameters-1].append("FGV");
     1512  parameters[numberParameters-1].append("C");
     1513  parameters[numberParameters-1].append("CV");
     1514  parameters[numberParameters-1].append("CG");
     1515  parameters[numberParameters-1].append("CGV");
     1516  parameters[numberParameters-1].append("CF");
     1517  parameters[numberParameters-1].append("CFV");
     1518  parameters[numberParameters-1].append("CFG");
     1519  parameters[numberParameters-1].append("on");
     1520  parameters[numberParameters-1].setLonghelp
     1521    (
     1522     "This switches on various diving heuristics. \
     1523C - Coefficient, F - Fractional, G - Guided, V - VectorLength."
     1524     );
    14861525  parameters[numberParameters++]=
    14871526    CbcOrClpParam("doH!euristic","Do heuristics before any preprocessing",
  • trunk/Clp/src/CbcOrClpParam.hpp

    r1152 r1158  
    7979    ROUNDING,SOLVER,CLIQUECUTS,COSTSTRATEGY,FLOWCUTS,MIXEDCUTS,
    8080    TWOMIRCUTS,PREPROCESS,FPUMP,GREEDY,COMBINE,LOCALTREE,SOS,
    81     LANDPCUTS,RINS,RESIDCUTS,RENS,
     81    LANDPCUTS,RINS,RESIDCUTS,RENS,DIVING,
    8282   
    8383    DIRECTORY=301,DIRSAMPLE,DIRNETLIB,DIRMIPLIB,IMPORT,EXPORT,RESTORE,SAVE,DUALSIMPLEX,PRIMALSIMPLEX,EITHERSIMPLEX,
     
    173173  /// Sets current parameter option
    174174  void setCurrentOption ( int value , bool printIt=false);
     175  /// Sets current parameter option and returns printable string
     176  const char * setCurrentOptionWithMessage ( int value );
    175177  /// Sets current parameter option using string
    176178  void setCurrentOption (const std::string value );
Note: See TracChangeset for help on using the changeset viewer.