Ignore:
Timestamp:
Oct 8, 2006 7:33:47 PM (13 years ago)
Author:
forrest
Message:

towards common use with other solvers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/src/CbcNode.hpp

    r416 r439  
    478478                           OsiSolverBranch * & branches,
    479479                           int numberPassesLeft);
     480  /** Create a branching object for the node
     481
     482    The routine scans the object list of the model and selects a set of
     483    unsatisfied objects as candidates for branching. The candidates are
     484    evaluated, and an appropriate branch object is installed.
     485
     486    The numberPassesLeft is decremented to stop fixing one variable each time
     487    and going on and on (e.g. for stock cutting, air crew scheduling)
     488
     489    If evaluation determines that an object is monotone or infeasible,
     490    the routine returns immediately. In the case of a monotone object,
     491    the branch object has already been called to modify the model.
     492
     493    Return value:
     494    <ul>
     495      <li>  0: A branching object has been installed
     496      <li> -1: A monotone object was discovered
     497      <li> -2: An infeasible object was discovered
     498    </ul>
     499    Branch state:
     500    <ul>
     501      <li> -1: start
     502      <li> -1: A monotone object was discovered
     503      <li> -2: An infeasible object was discovered
     504    </ul>
     505  */
     506  int chooseOsiBranch (CbcModel * model,
     507                       CbcNode * lastNode,
     508                       OsiBranchingInformation * usefulInfo,
     509                       int branchState);
    480510  int analyze(CbcModel * model,double * results);
    481511  /// Decrement active cut counts
     
    491521    This is a convenience routine, which will initialize the reference counts
    492522    in the attached CbcNodeInfo object based on the attached
    493     CbcBranchingObject.
     523    OsiBranchingObject.
    494524
    495525    \sa CbcNodeInfo::initializeInfo(int).
     
    509539  inline void setObjectiveValue(double value)
    510540  { objectiveValue_=value;};
    511   /// Number of arms defined for the attached CbcBranchingObject.
     541  /// Number of arms defined for the attached OsiBranchingObject.
    512542  inline int numberBranches() const
    513543  { if (branch_)
     
    516546      return (-1) ; } ;
    517547
    518   /** Branching `variable' associated with the attached CbcBranchingObject.
    519 
    520     Check CbcBranchingObject::variable() for a longer explanation of
    521     `variable'.
    522   */
    523   inline int variable() const
    524   {if (branch_) return branch_->variable();else return -1;};
    525 
    526   /* Active arm of the attached CbcBranchingObject.
     548  /* Active arm of the attached OsiBranchingObject.
    527549 
    528550   In the simplest instance, coded -1 for the down arm of the branch, +1 for
    529    the up arm. But see CbcBranchingObject::way()
     551   the up arm. But see OsiBranchingObject::way()
    530552     Use nodeInfo--.numberBranchesLeft_ to see how active
    531553  */
    532   inline int way() const
    533   {if (branch_) return branch_->way();else return 0;};
     554  int way() const;
    534555  /// Depth in branch-and-cut search tree
    535556  inline int depth() const
     
    545566  {guessedObjectiveValue_=value;};
    546567  /// Branching object for this node
    547   inline const CbcBranchingObject * branchingObject() const
     568  inline const OsiBranchingObject * branchingObject() const
    548569  { return branch_;};
    549570  /// Modifiable branching object for this node
    550   inline CbcBranchingObject * modifiableBranchingObject() const
     571  inline OsiBranchingObject * modifiableBranchingObject() const
    551572  { return branch_;};
    552573  /// Set branching object for this node (takes ownership)
    553   inline void setBranchingObject(CbcBranchingObject * branchingObject)
     574  inline void setBranchingObject(OsiBranchingObject * branchingObject)
    554575  { branch_ = branchingObject;};
    555576
     
    563584  double guessedObjectiveValue_;
    564585  /// Branching object for this node
    565   CbcBranchingObject * branch_;
     586  OsiBranchingObject * branch_;
    566587  /// Depth of the node in the search tree
    567588  int depth_;
Note: See TracChangeset for help on using the changeset viewer.