Ignore:
Timestamp:
Nov 4, 2010 12:16:21 PM (9 years ago)
Author:
lou
Message:

Changes to externals to make it easier to generate a new stable. Catches a few
changes in comments down in src.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:externals
      •  

        old new  
        44ThirdParty/Lapack https://projects.coin-or.org/svn/BuildTools/ThirdParty/Lapack/trunk
        55ThirdParty/Glpk   https://projects.coin-or.org/svn/BuildTools/ThirdParty/Glpk/trunk
        6 Data/Sample       https://projects.coin-or.org/svn/Data/trunk/Sample
        7 #Data/miplib3      https://projects.coin-or.org/svn/Data/trunk/miplib3
         6Data/Sample       https://projects.coin-or.org/svn/Data/Sample/trunk
         7#Data/miplib3      https://projects.coin-or.org/svn/Data/miplib3/trunk
        88CoinUtils         https://projects.coin-or.org/svn/CoinUtils/trunk/CoinUtils
        99Cgl               https://projects.coin-or.org/svn/Cgl/trunk/Cgl
        1010Clp               https://projects.coin-or.org/svn/Clp/trunk/Clp
        1111Osi               https://projects.coin-or.org/svn/Osi/trunk/Osi
        12 #Vol               https://projects.coin-or.org/svn/Vol/trunk/Vol
         12Vol               https://projects.coin-or.org/svn/Vol/trunk/Vol
  • trunk/Cbc/src/CbcStrategy.cpp

    r1393 r1521  
    133133}
    134134
    135 // Setup cut generators
     135/*
     136  Set up cut generators. Will instantiate Probing, Gomory, Knapsack, Clique,
     137  FlowCover, and MIR2 generators. Probing should be the first in the vector
     138  of generators as it tightens bounds on continuous variables.
     139
     140  Cut generators already installed will dominate cut generators instantiated
     141  here.
     142
     143  There's a classic magic number overloaded parameter example here. The
     144  variable genFlags below is interpreted as single-bit flags to control
     145  whether a cut generator will be instantiated: Probing:1, Gomory:2,
     146  Knapsack:4, Clique:8, FlowCover:16, MIR2:32. Normally it's hardcoded to 63.
     147  If CBC_GENERATE_TEST is defined, and the model's node limit is set between
     148  190000 and 190064, genFlags is loaded with the low-order bits.
     149*/
    136150void
    137151CbcStrategyDefault::setupCutGenerators(CbcModel & model)
     
    139153    if (cutsOnlyAtRoot_ < 0)
    140154        return; // no cuts wanted
    141     // Set up some cut generators and defaults
    142     // Probing first as gets tight bounds on continuous
    143     // See flags for Probing, Gomory, Knapsack, Clique, FlowCover, MixedIntegerRounding2 below (BK: lou removed this comment, why??)
     155
     156    // Magic number overloaded parameter -- see comment at head.
    144157    int genFlags = 63;
    145     //#define CBC_GENERATE_TEST
    146 #ifdef CBC_GENERATE_TEST
     158#   ifdef CBC_GENERATE_TEST
    147159    int nNodes = model.getMaximumNodes();
    148160    if (nNodes >= 190000 && nNodes < 190064)
    149161        genFlags = nNodes - 190000;
    150 #endif
     162#   endif
    151163
    152164    CglProbing generator1;
     
    182194    CglFlowCover flowGen;
    183195
    184     // Add in generators
     196    /*
     197      Add in generators. Do not override generators already installed.
     198    */
    185199    int setting = cutsOnlyAtRoot_ ? -99 : -1;
    186200    int numberGenerators = model.numberCutGenerators();
     
    199213        model.addCutGenerator(&generator1, setting, "Probing");
    200214    found = false;
     215
    201216    for (iGenerator = 0; iGenerator < numberGenerators; iGenerator++) {
    202217        CglCutGenerator * generator = model.cutGenerator(iGenerator)->generator();
     
    209224    if (!found && (genFlags&2) != 0)
    210225        model.addCutGenerator(&generator2, setting, "Gomory");
     226
    211227    found = false;
    212228    for (iGenerator = 0; iGenerator < numberGenerators; iGenerator++) {
     
    221237        model.addCutGenerator(&generator3, setting, "Knapsack");
    222238    //model.addCutGenerator(&generator4,setting,"OddHole");
     239
    223240    found = false;
    224241    for (iGenerator = 0; iGenerator < numberGenerators; iGenerator++) {
     
    232249    if (!found && (genFlags&8) != 0)
    233250        model.addCutGenerator(&generator5, setting, "Clique");
     251
    234252    found = false;
    235253    for (iGenerator = 0; iGenerator < numberGenerators; iGenerator++) {
     
    243261    if (!found && (genFlags&16) != 0)
    244262        model.addCutGenerator(&flowGen, setting, "FlowCover");
     263
    245264    found = false;
    246265    for (iGenerator = 0; iGenerator < numberGenerators; iGenerator++) {
     
    254273    if (!found && (genFlags&32) != 0)
    255274        model.addCutGenerator(&mixedGen, setting, "MixedIntegerRounding2");
     275
    256276    // Say we want timings
    257277    int newNumberGenerators = model.numberCutGenerators();
     
    260280        generator->setTiming(true);
    261281    }
     282
     283    // Caution! Undocumented magic numbers.
    262284    int currentPasses = model.getMaximumCutPassesAtRoot();
    263285    if (currentPasses >= 0) {
     
    615637    model.setNumberBeforeTrust(numberBeforeTrust_);
    616638}
     639
    617640// Create C++ lines to get to current state
    618641void
Note: See TracChangeset for help on using the changeset viewer.