• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/build/buildd/coinor-cbc-2.5.0/Cbc/src/CbcBranchDynamic.hpp

Go to the documentation of this file.
00001 /* $Id: CbcBranchDynamic.hpp 1432 2010-02-07 19:33:53Z bjarni $ */
00002 // Copyright (C) 2005, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 #ifndef CbcBranchDynamic_H
00005 #define CbcBranchDynamic_H
00006 
00007 #include "CoinPackedMatrix.hpp"
00008 #include "CbcSimpleIntegerDynamicPseudoCost.hpp"
00009 #include "CbcBranchActual.hpp"
00010 
00017 class CbcBranchDynamicDecision : public CbcBranchDecision {
00018 public:
00019     // Default Constructor
00020     CbcBranchDynamicDecision ();
00021 
00022     // Copy constructor
00023     CbcBranchDynamicDecision ( const CbcBranchDynamicDecision &);
00024 
00025     virtual ~CbcBranchDynamicDecision();
00026 
00028     virtual CbcBranchDecision * clone() const;
00029 
00031     virtual void initialize(CbcModel * model);
00032 
00052     virtual int betterBranch(CbcBranchingObject * thisOne,
00053                              CbcBranchingObject * bestSoFar,
00054                              double changeUp, int numInfUp,
00055                              double changeDn, int numInfDn);
00057     virtual void setBestCriterion(double value);
00058     virtual double getBestCriterion() const;
00061     virtual int whichMethod() {
00062         return 3;
00063     }
00064 
00067     virtual void saveBranchingObject(OsiBranchingObject * object) ;
00070     virtual void updateInformation(OsiSolverInterface * solver,
00071                                    const CbcNode * node);
00072 
00073 
00074 private:
00075 
00077     CbcBranchDynamicDecision & operator=(const CbcBranchDynamicDecision& rhs);
00078 
00080 
00082     double bestCriterion_;
00083 
00085     double bestChangeUp_;
00086 
00088     int bestNumberUp_;
00089 
00091     double bestChangeDown_;
00092 
00094     int bestNumberDown_;
00095 
00097     CbcBranchingObject * bestObject_;
00098 };
00109 class CbcDynamicPseudoCostBranchingObject : public CbcIntegerBranchingObject {
00110 
00111 public:
00112 
00114     CbcDynamicPseudoCostBranchingObject ();
00115 
00123     CbcDynamicPseudoCostBranchingObject (CbcModel *model, int variable,
00124                                          int way , double value,
00125                                          CbcSimpleIntegerDynamicPseudoCost * object) ;
00126 
00134     CbcDynamicPseudoCostBranchingObject (CbcModel *model, int variable, int way,
00135                                          double lowerValue, double upperValue) ;
00136 
00138     CbcDynamicPseudoCostBranchingObject ( const CbcDynamicPseudoCostBranchingObject &);
00139 
00141     CbcDynamicPseudoCostBranchingObject & operator= (const CbcDynamicPseudoCostBranchingObject& rhs);
00142 
00144     virtual CbcBranchingObject * clone() const;
00145 
00147     virtual ~CbcDynamicPseudoCostBranchingObject ();
00148 
00150     void fillPart (int variable,
00151                    int way , double value,
00152                    CbcSimpleIntegerDynamicPseudoCost * object) ;
00153 
00154     using CbcBranchingObject::branch ;
00159     virtual double branch();
00160 
00165     virtual int fillStrongInfo( CbcStrongInfo & info);
00166 
00168     inline double changeInGuessed() const {
00169         return changeInGuessed_;
00170     }
00172     inline void setChangeInGuessed(double value) {
00173         changeInGuessed_ = value;
00174     }
00176     inline CbcSimpleIntegerDynamicPseudoCost * object() const {
00177         return object_;
00178     }
00180     inline void setObject(CbcSimpleIntegerDynamicPseudoCost * object) {
00181         object_ = object;
00182     }
00183 
00185     virtual CbcBranchObjType type() const {
00186         return DynamicPseudoCostBranchObj;
00187     }
00188 
00189     // LL: compareOriginalObject and compareBranchingObject are inherited from
00190     // CbcIntegerBranchingObject thus need not be declared/defined here. After
00191     // all, this kind of branching object is simply using pseudocosts to make
00192     // decisions, but once the decisions are made they are the same kind as in
00193     // the underlying class.
00194 
00195 protected:
00197     double changeInGuessed_;
00199     CbcSimpleIntegerDynamicPseudoCost * object_;
00200 
00201 };
00202 
00203 #endif
00204 

Generated on Sat Oct 23 2010 23:46:54 by  doxygen 1.7.1