Changeset 48 for trunk/CbcModel.cpp


Ignore:
Timestamp:
Dec 31, 2004 4:53:27 AM (16 years ago)
Author:
forrest
Message:

skip messages etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CbcModel.cpp

    r45 r48  
    580580    }
    581581    phase_=3;
     582    // only allow twenty passes
     583    int numberPassesLeft=20;
    582584    while (anyAction == -1)
    583     { anyAction = newNode->chooseBranch(this,NULL) ;
     585    {
     586      anyAction = newNode->chooseBranch(this,NULL,numberPassesLeft) ;
     587      numberPassesLeft--;
    584588      if (anyAction == -1)
    585589      { feasible = resolve() ;
     
    698702     Could use last parameter for subtle differences */
    699703  solver_->setHintParam(OsiDoInBranchAndCut,true,OsiHintDo,NULL) ;
     704  /*
     705    It is possible that strong branching fixes one variable and then the code goes round
     706    again and again.  This can take too long.  So we need to warn user - just once.
     707  */
     708  int numberLongStrong=0;
    700709/*
    701710  At last, the actual branch-and-cut search loop, which will iterate until
     
    897906          if (newNode->objectiveValue() >= getCutoff())
    898907            anyAction=-2;
     908          // only allow twenty passes
     909          int numberPassesLeft=20;
    899910          while (anyAction == -1)
    900           { anyAction = newNode->chooseBranch(this,node) ;
     911          {
     912            anyAction = newNode->chooseBranch(this,node,numberPassesLeft) ;
     913            numberPassesLeft--;
     914            if (numberPassesLeft<=-1) {
     915              if (!numberLongStrong)
     916                messageHandler()->message(CBC_WARNING_STRONG,
     917                                          messages()) << CoinMessageEol ;
     918              numberLongStrong++;
     919            }
    901920            if (anyAction == -1)
    902921            { feasible = resolve() ;
     
    24402459              OsiRowCut thisCut = theseCuts.rowCut(k) ;
    24412460              /* check size of elements.
    2442                  We can allow smaller but this helsp debug generators as it
     2461                 We can allow smaller but this helps debug generators as it
    24432462                 is unsafe to have small elements */
    24442463              int n=thisCut.row().getNumElements();
     
    31023121*/
    31033122  if (feasible)
    3104   { solver_->resolve() ;
     3123  {
     3124    solver_->resolve() ;
    31053125    numberIterations_ += getIterationCount() ;
    31063126    feasible = (solver_->isProvenOptimal() &&
Note: See TracChangeset for help on using the changeset viewer.