Ignore:
Timestamp:
Jan 14, 2009 4:14:09 PM (11 years ago)
Author:
forrest
Message:

out compiler warnings and stability improvements

File:
1 edited

Legend:

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

    r1320 r1321  
    3333#else
    3434static char coin_prompt[]="Clp:";
     35#endif
     36#if WSSMP_BARRIER>=2
     37#ifndef CBC_THREAD
     38#define CBC_THREAD
     39#endif
    3540#endif
    3641static bool doPrinting=true;
     
    335340    std::cout<<" "<<thisOne;
    336341  }
    337   assert (currentKeyWord_>=0&&currentKeyWord_<(int)definedKeyWords_.size());
     342  assert (currentKeyWord_>=0&&currentKeyWord_<static_cast<int>(definedKeyWords_.size()));
    338343  std::string current = definedKeyWords_[currentKeyWord_];
    339344  std::string::size_type  shriekPos = current.find('!');
     
    576581    case SPECIALOPTIONS:
    577582      model->setSpecialOptions(value);
    578 #ifdef COIN_HAS_CBC
     583#ifndef COIN_HAS_CBC
     584#ifdef CBC_THREAD
    579585    case THREADS:
    580586      model->setNumberThreads(value);
    581587      break;
     588#endif
    582589#endif
    583590    default:
     
    611618    break;
    612619#ifndef COIN_HAS_CBC
     620#ifdef CBC_THREAD
    613621  case THREADS:
    614622    value = model->numberThreads();
     623#endif
    615624#endif
    616625  default:
     
    13501359  parameters[numberParameters-1].append("ifmove");
    13511360  parameters[numberParameters-1].append("forceOn");
     1361  parameters[numberParameters-1].append("onglobal");
     1362  parameters[numberParameters-1].append("rootglobal");
    13521363  parameters[numberParameters-1].setLonghelp
    13531364    (
     
    13591370                  "off",COMBINE);
    13601371  parameters[numberParameters-1].append("on");
    1361   parameters[numberParameters-1].append("do");
     1372  parameters[numberParameters-1].append("both");
     1373  parameters[numberParameters-1].append("before");
    13621374  parameters[numberParameters-1].setLonghelp
    13631375    (
     
    13651377using variables which have appeared in one or more solutions. \
    13661378It obviously only tries after two or more solutions. \
    1367 The Do option switches on before preprocessing."
     1379See Rounding for meaning of on,both,before"
    13681380     );
    13691381  parameters[numberParameters++]=
     
    15201532      CbcOrClpParam("Dins","Whether to try Distance Induced Neighborhood Search",
    15211533                    "off",DINS);
    1522     parameters[numberParameters-1].append("on");
    1523     parameters[numberParameters-1].append("often");
    1524   parameters[numberParameters-1].setLonghelp
    1525     (
    1526      "This switches on Distance induced neighborhood Search."
     1534  parameters[numberParameters-1].append("on");
     1535  parameters[numberParameters-1].append("both");
     1536  parameters[numberParameters-1].append("before");
     1537  parameters[numberParameters-1].append("often");
     1538  parameters[numberParameters-1].setLonghelp
     1539    (
     1540     "This switches on Distance induced neighborhood Search. \
     1541See Rounding for meaning of on,both,before"
    15271542     );
    15281543#endif
     
    15921607                    "off",DIVINGS);
    15931608  parameters[numberParameters-1].append("on");
    1594   parameters[numberParameters-1].append("do");
     1609  parameters[numberParameters-1].append("both");
     1610  parameters[numberParameters-1].append("before");
    15951611  parameters[numberParameters-1].setLonghelp
    15961612    (
    15971613     "This switches on a random diving heuristic at various times. \
    15981614C - Coefficient, F - Fractional, G - Guided, L - LineSearch, P - PseudoCost, V - VectorLength. \
    1599 You may prefer to use individual on/off"
     1615You may prefer to use individual on/off \
     1616See Rounding for meaning of on,both,before"
    16001617     );
    16011618  parameters[numberParameters++]=
     
    16031620                    "off",DIVINGC);
    16041621  parameters[numberParameters-1].append("on");
    1605   parameters[numberParameters-1].append("do");
     1622  parameters[numberParameters-1].append("both");
     1623  parameters[numberParameters-1].append("before");
    16061624  parameters[numberParameters++]=
    16071625      CbcOrClpParam("DivingF!ractional","Whether to try DiveFractional",
    16081626                    "off",DIVINGF);
    16091627  parameters[numberParameters-1].append("on");
    1610   parameters[numberParameters-1].append("do");
     1628  parameters[numberParameters-1].append("both");
     1629  parameters[numberParameters-1].append("before");
    16111630  parameters[numberParameters++]=
    16121631      CbcOrClpParam("DivingG!uided","Whether to try DiveGuided",
    16131632                    "off",DIVINGG);
    16141633  parameters[numberParameters-1].append("on");
    1615   parameters[numberParameters-1].append("do");
     1634  parameters[numberParameters-1].append("both");
     1635  parameters[numberParameters-1].append("before");
    16161636  parameters[numberParameters++]=
    16171637      CbcOrClpParam("DivingL!ineSearch","Whether to try DiveLineSearch",
    16181638                    "off",DIVINGL);
    16191639  parameters[numberParameters-1].append("on");
    1620   parameters[numberParameters-1].append("do");
     1640  parameters[numberParameters-1].append("both");
     1641  parameters[numberParameters-1].append("before");
    16211642  parameters[numberParameters++]=
    16221643      CbcOrClpParam("DivingP!seudoCost","Whether to try DivePseudoCost",
    16231644                    "off",DIVINGP);
    16241645  parameters[numberParameters-1].append("on");
    1625   parameters[numberParameters-1].append("do");
     1646  parameters[numberParameters-1].append("both");
     1647  parameters[numberParameters-1].append("before");
    16261648  parameters[numberParameters++]=
    16271649      CbcOrClpParam("DivingV!ectorLength","Whether to try DiveVectorLength",
    16281650                    "off",DIVINGV);
    16291651  parameters[numberParameters-1].append("on");
    1630   parameters[numberParameters-1].append("do");
     1652  parameters[numberParameters-1].append("both");
     1653  parameters[numberParameters-1].append("before");
    16311654  parameters[numberParameters++]=
    16321655    CbcOrClpParam("doH!euristic","Do heuristics before any preprocessing",
     
    17801803                  "off",FPUMP);
    17811804  parameters[numberParameters-1].append("on");
    1782   parameters[numberParameters-1].append("do");
    1783   parameters[numberParameters-1].setLonghelp
    1784     (
    1785      "This switches on feasibility pump heuristic at root. This is due to Fischetti and Lodi and Glover \
     1805  parameters[numberParameters-1].append("both");
     1806  parameters[numberParameters-1].append("before");
     1807  parameters[numberParameters-1].setLonghelp
     1808    (
     1809     "This switches on feasibility pump heuristic at root. This is due to Fischetti, Lodi and Glover \
    17861810and uses a sequence of Lps to try and get an integer feasible solution. \
    17871811Some fine tuning is available by passFeasibilityPump and also pumpTune. \
    1788 Do option does heuristic before preprocessing"
     1812See Rounding for meaning of on,both,before"
    17891813     );
    17901814  parameters[numberParameters++]=
     
    18041828    parameters[numberParameters-1].append("ifmove");
    18051829    parameters[numberParameters-1].append("forceOn");
     1830  parameters[numberParameters-1].append("onglobal");
     1831  parameters[numberParameters-1].append("rootglobal");
    18061832    parameters[numberParameters-1].setLonghelp
    18071833    (
     
    18381864  parameters[numberParameters-1].append("ifmove");
    18391865  parameters[numberParameters-1].append("forceOn");
     1866  parameters[numberParameters-1].append("onglobal");
     1867  parameters[numberParameters-1].append("rootglobal");
    18401868  parameters[numberParameters-1].append("forceLongOn");
    18411869  parameters[numberParameters-1].append("long");
     
    18521880                  "off",GREEDY);
    18531881  parameters[numberParameters-1].append("on");
    1854   parameters[numberParameters-1].append("do");
     1882  parameters[numberParameters-1].append("both");
     1883  parameters[numberParameters-1].append("before");
    18551884  //parameters[numberParameters-1].append("root");
    18561885  parameters[numberParameters-1].setLonghelp
     
    18581887     "Switches on a greedy heuristic which will try and obtain a solution.  It may just fix a \
    18591888percentage of variables and then try a small branch and cut run. \
    1860 The Do option switches on before preprocessing."
     1889See Rounding for meaning of on,both,before"
    18611890     );
    18621891  parameters[numberParameters++]=
     
    18801909     );
    18811910#ifdef COIN_HAS_CBC
     1911  parameters[numberParameters++]=
     1912    CbcOrClpParam("hOp!tions","Heuristic options",
     1913                  -9999999,9999999,HOPTIONS);
     1914  parameters[numberParameters-1].setLonghelp
     1915    (
     1916     "0 doh 1 nodes -1 2 doh+hot 3 nodes-1+hot 4 ord heur+hot. \
     1917More usefully 100 says stop heuristic immediately allowable gap reached."
     1918     );
     1919  parameters[numberParameters-1].setIntValue(0);
    18821920  parameters[numberParameters++]=
    18831921    CbcOrClpParam("hot!StartMaxIts","Maximum iterations on hot start",
     
    19662004  parameters[numberParameters-1].append("ifmove");
    19672005  parameters[numberParameters-1].append("forceOn");
     2006  parameters[numberParameters-1].append("onglobal");
     2007  parameters[numberParameters-1].append("rootglobal");
    19682008  parameters[numberParameters-1].setLonghelp
    19692009    (
     
    20802120  parameters[numberParameters-1].append("ifmove");
    20812121  parameters[numberParameters-1].append("forceOn");
     2122  parameters[numberParameters-1].append("onglobal");
     2123  parameters[numberParameters-1].append("rootglobal");
    20822124  parameters[numberParameters-1].setLonghelp
    20832125    (
     
    21132155                    "off",NAIVE);
    21142156  parameters[numberParameters-1].append("on");
    2115   parameters[numberParameters-1].append("do");
    2116   parameters[numberParameters-1].setLonghelp
    2117     (
    2118      "Really silly stuff e.g. fix all integers with costs to zero!."
    2119      );
     2157  parameters[numberParameters-1].append("both");
     2158  parameters[numberParameters-1].append("before");
     2159  parameters[numberParameters-1].setLonghelp
     2160    (
     2161     "Really silly stuff e.g. fix all integers with costs to zero!. \
     2162Do options does heuristic before preprocessing"     );
    21202163#endif
    21212164#ifdef COIN_HAS_CLP
     
    22942337                    "off",PIVOTANDFIX);
    22952338  parameters[numberParameters-1].append("on");
    2296   parameters[numberParameters-1].append("do");
    2297   parameters[numberParameters-1].setLonghelp
    2298     (
    2299      "stuff needed."
    2300      );
     2339  parameters[numberParameters-1].append("both");
     2340  parameters[numberParameters-1].append("before");
     2341  parameters[numberParameters-1].setLonghelp
     2342    (
     2343     "stuff needed. \
     2344Do options does heuristic before preprocessing"     );
    23012345#endif
    23022346#ifdef COIN_HAS_CLP
     
    24702514  parameters[numberParameters-1].append("ifmove");
    24712515  parameters[numberParameters-1].append("forceOn");
     2516  parameters[numberParameters-1].append("onglobal");
     2517  parameters[numberParameters-1].append("rootglobal");
    24722518  parameters[numberParameters-1].append("forceOnBut");
    24732519  parameters[numberParameters-1].append("forceOnStrong");
     
    25062552                    "off",RANDROUND);
    25072553  parameters[numberParameters-1].append("on");
    2508   parameters[numberParameters-1].append("do");
    2509   parameters[numberParameters-1].setLonghelp
    2510     (
    2511      "stuff needed."
    2512      );
     2554  parameters[numberParameters-1].append("both");
     2555  parameters[numberParameters-1].append("before");
     2556  parameters[numberParameters-1].setLonghelp
     2557    (
     2558     "stuff needed. \
     2559Do options does heuristic before preprocessing"     );
    25132560  parameters[numberParameters++]=
    25142561    CbcOrClpParam("ratio!Gap","Stop when gap between best possible and \
     
    25222569way of using absolute value rather than fraction."
    25232570     );
     2571  parameters[numberParameters++]=
     2572    CbcOrClpParam("readS!tored","Import stored cuts from file",
     2573                  STOREDFILE,3,false);
    25242574#endif
    25252575#ifdef COIN_HAS_CLP
     
    25942644                    "off",RENS);
    25952645    parameters[numberParameters-1].append("on");
     2646    parameters[numberParameters-1].append("both");
     2647    parameters[numberParameters-1].append("before");
    25962648    parameters[numberParameters-1].append("200");
    25972649    parameters[numberParameters-1].append("1000");
     
    26012653     "This switches on Relaxation enforced neighborhood Search. \
    26022654on just does feasibility pump \
    2603 200 or 1000 does that many nodes."
    2604      );
     2655200 or 1000 does that many nodes. \
     2656Do options does heuristic before preprocessing"     );
    26052657  parameters[numberParameters++]=
    26062658      CbcOrClpParam("Rins","Whether to try Relaxed Induced Neighborhood Search",
    26072659                    "off",RINS);
    26082660    parameters[numberParameters-1].append("on");
     2661    parameters[numberParameters-1].append("both");
     2662    parameters[numberParameters-1].append("before");
    26092663    parameters[numberParameters-1].append("often");
    26102664  parameters[numberParameters-1].setLonghelp
    26112665    (
    2612      "This switches on Relaxed induced neighborhood Search."
    2613      );
     2666     "This switches on Relaxed induced neighborhood Search. \
     2667Do options does heuristic before preprocessing"     );
    26142668  parameters[numberParameters++]=
    26152669    CbcOrClpParam("round!ingHeuristic","Whether to use Rounding heuristic",
    26162670                  "off",ROUNDING);
    26172671  parameters[numberParameters-1].append("on");
    2618   parameters[numberParameters-1].append("do");
     2672  parameters[numberParameters-1].append("both");
     2673  parameters[numberParameters-1].append("before");
    26192674  parameters[numberParameters-1].setLonghelp
    26202675    (
    26212676     "This switches on a simple (but effective) rounding heuristic at each node of tree.  \
    2622 The Do option switches on before preprocessing."
    2623      );
     2677On means do in solve i.e. after preprocessing, \
     2678Before means do if doHeuristics used, off otherwise, \
     2679and both means do if doHeuristics and in solve."
     2680     );
     2681
    26242682#endif
    26252683  parameters[numberParameters++]=
     
    28422900  parameters[numberParameters++]=
    28432901    CbcOrClpParam("thread!s","Number of threads to try and use",
    2844                   -100,10000,THREADS,false);
     2902                  -100,100000,THREADS,false);
    28452903  parameters[numberParameters-1].setLonghelp
    28462904    (
    28472905     "To use multiple threads, set threads to number wanted.  It may be better \
    28482906to use one or two more than number of cpus available.  If 100+n then n threads and \
    2849 threads used in sub-trees, if 200+n use threads for root cuts, 300+n - both."
     2907search is repeatable (maybe be somewhat slower), \
     2908if 200+n use threads for root cuts, 400+n threads used in sub-trees."
    28502909     );
    28512910#endif
     
    28962955  parameters[numberParameters-1].append("ifmove");
    28972956  parameters[numberParameters-1].append("forceOn");
     2957  parameters[numberParameters-1].append("onglobal");
     2958  parameters[numberParameters-1].append("rootglobal");
    28982959  parameters[numberParameters-1].append("forceLongOn");
    28992960  parameters[numberParameters-1].setLonghelp
     
    29533014     );
    29543015  parameters[numberParameters-1].setIntValue(-1);
     3016  parameters[numberParameters++]=
     3017    CbcOrClpParam("zero!HalfCuts","Whether to use zero half cuts",
     3018                  "off",ZEROHALFCUTS);
     3019  parameters[numberParameters-1].append("on");
     3020  parameters[numberParameters-1].append("root");
     3021  parameters[numberParameters-1].append("ifmove");
     3022  parameters[numberParameters-1].append("forceOn");
     3023  parameters[numberParameters-1].append("onglobal");
     3024  parameters[numberParameters-1].append("rootglobal");
     3025  parameters[numberParameters-1].setLonghelp
     3026    (
     3027     "This switches on knapsack cuts (either at root or in entire tree) \
     3028See branchAndCut for information on options."
     3029     );
    29553030#endif
    29563031  assert(numberParameters<CBCMAXPARAMETERS);
Note: See TracChangeset for help on using the changeset viewer.