Ignore:
Timestamp:
Dec 5, 2009 10:54:48 AM (10 years ago)
Author:
EdwinStraver
Message:

Added comments from Lou

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/Cbc/src/CbcHeuristicFPump.cpp

    r1286 r1364  
    221221    char pumpPrint[LEN_PRINT];
    222222    pumpPrint[0] = '\0';
     223/*
     224  Decide if we want to run. Standard values for when are described in
     225  CbcHeuristic.hpp. If we're off, or running only at root and this isn't the
     226  root, bail out.
     227
     228  The double test (against phase, then atRoot and passNumber) has a fair bit
     229  of redundancy, but the results will differ depending on whether we're
     230  actually at the root of the main search tree or at the root of a small tree
     231  (recursive call to branchAndBound).
     232
     233  FPump also supports some exotic values (11 -- 15) for when, described in
     234  CbcHeuristicFPump.hpp.
     235*/
    223236    if (!when() || (when() == 1 && model_->phase() != 1))
    224237        return 0; // switched off
     
    283296    int numberIterationsLastPass = 0;
    284297    // 1. initially check 0-1
     298/*
     299  I'm skeptical of the above comment, but it's likely accurate as the default.
     300  Bit 4 or bit 8 needs to be set in order to consider working with general
     301  integers.
     302*/
    285303    int i, j;
    286304    int general = 0;
     
    290308    bool doGeneral = (accumulate_ & 4) != 0;
    291309    j = 0;
     310/*
     311  Scan the objects, recording the columns and counting general integers.
     312
     313  Seems like the NDEBUG tests could be made into an applicability test. If
     314  a scan of the objects reveals complex objects, just clean up and return
     315  failure.
     316*/
    292317    for (i = 0; i < numberIntegers; i++) {
    293318        int iColumn = integerVariableOrig[i];
     
    308333        }
    309334    }
     335/*
     336  If 2/3 of integers are general integers, and we're not going to work with
     337  them, might as well go home.
     338
     339  The else case is unclear to me. We reach it if general integers are less than
     340  2/3 of the total, or if either of bit 4 or 8 is set. But only bit 8 is used
     341  in the decision. (Let manyGen = 1 if more than 2/3 of integers are general
     342  integers. Then a k-map on manyGen, bit4, and bit8 shows it clearly.)
     343
     344  So there's something odd here. In the case where bit4 = 1 and bit8 = 0,
     345  we've included general integers in integerVariable, but we're not going to
     346  process them.
     347*/
    310348    if (general*3 > 2*numberIntegers && !doGeneral) {
    311349        delete [] integerVariable;
     
    326364        printf("DOing general with %d out of %d\n", general, numberIntegers);
    327365#endif
     366/*
     367  This `closest solution' will satisfy integrality, but violate some other
     368  constraints?
     369*/
    328370    // For solution closest to feasible if none found
    329371    int * closestSolution = general ? NULL : new int[numberIntegers];
     
    345387    }
    346388    double time1 = CoinCpuTime();
     389/*
     390  Obtain a relaxed lp solution.
     391*/
    347392    model_->solver()->resolve();
    348393    if (!model_->solver()->isProvenOptimal()) {
     
    363408        }
    364409    }
     410/*
     411  I have no idea why we're doing this, except perhaps that saveBasis will be
     412  automagically deleted on exit from the routine.
     413*/
    365414    CoinWarmStartBasis saveBasis;
    366415    CoinWarmStartBasis * basis =
     
    638687        // 5. MAIN WHILE LOOP
    639688        //bool newLineNeeded=false;
     689/*
     690  finished occurs exactly twice in this routine: immediately above, where it's
     691  set to false, and here in the loop condition.
     692*/
    640693        while (!finished) {
    641694            double newTrueSolutionValue = 0.0;
     
    19652018        }
    19662019    }
     2020/*
     2021  End of the `exitAll' loop.
     2022*/
    19672023#ifdef RAND_RAND
    19682024    delete [] randomFactor;
Note: See TracChangeset for help on using the changeset viewer.