Changeset 36


Ignore:
Timestamp:
Dec 8, 2004 5:05:12 PM (15 years ago)
Author:
forrest
Message:

start of CbcFathom? class

Location:
trunk
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CbcModel.cpp

    r35 r36  
    166166  return ; }
    167167
    168 #endif  /* CHECK_NODE_FULL */
     168#endif  /* CHECK_NODE_FULL */
    169169
    170170
     
    585585      { feasible = resolve() ;
    586586        resolved = true ;
    587 #       ifdef CBC_DEBUG
     587#       ifdef CBC_DEBUG
    588588        printf("Resolve (root) as something fixed, Obj value %g %d rows\n",
    589589                  solver_->getObjValue(),
    590590                  solver_->getNumRows()) ;
    591 #       endif
     591#       endif
    592592        if (!feasible) anyAction = -2 ; }
    593593      if (anyAction == -2||newNode->objectiveValue() >= cutoff)
     
    806806
    807807/*
    808   Rebuild the subproblem for this node:  Call addCuts() to adjust the model
     808  Rebuild the subproblem for this node:  Call addCuts() to adjust the model
    809809  to recreate the subproblem for this node (set proper variable bounds, add
    810810  cuts, create a basis).  This may result in the problem being fathomed by
     
    828828      if (node->branch())
    829829      { tree_->push(node) ;
    830         nodeOnTree=true; // back on tree
     830        nodeOnTree=true; // back on tree
    831831        deleteNode = false ;
    832 #       ifdef CHECK_NODE
     832#       ifdef CHECK_NODE
    833833        printf("Node %x pushed back on tree - %d left, %d count\n",node,
    834834               nodeInfo->numberBranchesLeft(),
    835835               nodeInfo->numberPointingToThis()) ;
    836 #       endif
     836#       endif
    837837      }
    838838      else
     
    918918              { printf("Number of rows after chooseBranch fix (node)"
    919919                       "(active only) %d\n",
    920                         numberRowsAtContinuous_+numberNewCuts+
     920                        numberRowsAtContinuous_+numberNewCuts+
    921921                        numberOldActiveCuts) ;
    922922                const CoinWarmStartBasis* debugws =
     
    985985#               ifdef CHECK_CUT_COUNTS
    986986                printf("Count on cut %x increased by %d\n",addedCuts_[i],
    987                         numberLeft-1) ;
     987                        numberLeft-1) ;
    988988#               endif
    989989                addedCuts_[i]->increment(numberLeft-1) ; } }
     
    20812081        lastws->getArtifStatus(i+numberRowsAtContinuous_);
    20822082      if (status != CoinWarmStartBasis::basic&&addedCuts_[i]) {
    2083 #       ifdef CHECK_CUT_COUNTS
     2083#       ifdef CHECK_CUT_COUNTS
    20842084        printf("Using cut %d %x as row %d\n",i,addedCuts_[i],
    20852085               numberRowsAtContinuous_+numberToAdd);
    2086 #       endif
     2086#       endif
    20872087        lastws->setArtifStatus(numberToAdd+numberRowsAtContinuous_,status);
    20882088        addCuts[numberToAdd++] = new OsiRowCut(*addedCuts_[i]);
    20892089      } else {
    2090 #       ifdef CHECK_CUT_COUNTS
     2090#       ifdef CHECK_CUT_COUNTS
    20912091        printf("Dropping cut %d %x\n",i,addedCuts_[i]);
    2092 #       endif
     2092#       endif
    20932093        addedCuts_[i]=NULL;
    20942094      }
     
    22142214                       generation
    22152215    maximumWhich: (i/o) capacity of whichGenerator; may be updated if
    2216                         whichGenerator grows.
     2216                        whichGenerator grows.
    22172217
    22182218    node: (currently unused)
     
    26822682    { if (numberToAdd > 0)
    26832683      { int i ;
    2684         // Faster to add all at once
     2684        // Faster to add all at once
    26852685        const OsiRowCut ** addCuts = new const OsiRowCut * [numberToAdd] ;
    26862686        for (i = 0 ; i < numberToAdd ; i++)
     
    27322732
    27332733  TODO: After successive rounds of code motion, there seems no need to
    2734         distinguish between the two checks for aborting the cut generation
     2734        distinguish between the two checks for aborting the cut generation
    27352735        loop. Confirm and clean up.
    27362736*/
     
    29172917  Remove slack cuts. We obtain a basis and scan it. Cuts with basic slacks
    29182918  are purged. If any cuts are purged, resolve() is called to restore the
    2919   solution held in the solver.  If resolve() pivots, there's the possibility
     2919  solution held in the solver.  If resolve() pivots, there's the possibility
    29202920  that a slack may be pivoted in (trust me :-), so the process iterates.
    29212921  Setting allowResolve to false will suppress reoptimisation (but see note
     
    45634563            if (jColumn >= 0) {
    45644564              if (upper[jColumn]<originalUpper[iColumn])
    4565                 originalUpper[iColumn]  = upper[jColumn];
     4565                originalUpper[iColumn]  = upper[jColumn];
    45664566              if (lower[jColumn]>originalLower[iColumn])
    4567                 originalLower[iColumn]  = lower[jColumn];
     4567                originalLower[iColumn]  = lower[jColumn];
    45684568            }
    45694569          }
  • trunk/Makefile.Cbc

    r13 r36  
    2121LIBSRC += CbcBranchLotsize.cpp
    2222LIBSRC += CbcBranchCut.cpp
     23LIBSRC += CbcFathom.cpp
     24LIBSRC += CbcFathomDynamicProgramming.cpp
    2325LIBSRC += CbcCompareActual.cpp
    2426LIBSRC += CbcCutGenerator.cpp
Note: See TracChangeset for help on using the changeset viewer.