CbcBranchDynamic.hpp
Go to the documentation of this file.
1 /* $Id: CbcBranchDynamic.hpp 1432 2010-02-07 19:33:53Z bjarni $ */
2 // Copyright (C) 2005, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef CbcBranchDynamic_H
5 #define CbcBranchDynamic_H
6 
7 #include "CoinPackedMatrix.hpp"
9 #include "CbcBranchActual.hpp"
10 
18 public:
19  // Default Constructor
21 
22  // Copy constructor
24 
25  virtual ~CbcBranchDynamicDecision();
26 
28  virtual CbcBranchDecision * clone() const;
29 
31  virtual void initialize(CbcModel * model);
32 
52  virtual int betterBranch(CbcBranchingObject * thisOne,
53  CbcBranchingObject * bestSoFar,
54  double changeUp, int numInfUp,
55  double changeDn, int numInfDn);
57  virtual void setBestCriterion(double value);
58  virtual double getBestCriterion() const;
61  virtual int whichMethod() {
62  return 3;
63  }
64 
67  virtual void saveBranchingObject(OsiBranchingObject * object) ;
70  virtual void updateInformation(OsiSolverInterface * solver,
71  const CbcNode * node);
72 
73 
74 private:
75 
78 
80 
83 
85  double bestChangeUp_;
86 
89 
92 
95 
98 };
110 
111 public:
112 
115 
124  int way , double value,
126 
134  CbcDynamicPseudoCostBranchingObject (CbcModel *model, int variable, int way,
135  double lowerValue, double upperValue) ;
136 
139 
142 
144  virtual CbcBranchingObject * clone() const;
145 
148 
150  void fillPart (int variable,
151  int way , double value,
153 
159  virtual double branch();
160 
165  virtual int fillStrongInfo( CbcStrongInfo & info);
166 
168  inline double changeInGuessed() const {
169  return changeInGuessed_;
170  }
172  inline void setChangeInGuessed(double value) {
173  changeInGuessed_ = value;
174  }
177  return object_;
178  }
181  object_ = object;
182  }
183 
185  virtual CbcBranchObjType type() const {
187  }
188 
189  // LL: compareOriginalObject and compareBranchingObject are inherited from
190  // CbcIntegerBranchingObject thus need not be declared/defined here. After
191  // all, this kind of branching object is simply using pseudocosts to make
192  // decisions, but once the decisions are made they are the same kind as in
193  // the underlying class.
194 
195 protected:
200 
201 };
202 
203 #endif
204 
Abstract branching object base class Now just difference with OsiBranchingObject. ...
int bestNumberDown_
Number of infeasibilities for down.
double bestChangeUp_
Change up for best.
CbcSimpleIntegerDynamicPseudoCost * object() const
Return object.
void setChangeInGuessed(double value)
Set change in guessed.
CbcBranchDynamicDecision & operator=(const CbcBranchDynamicDecision &rhs)
Illegal Assignment operator.
int bestNumberUp_
Number of infeasibilities for up.
double changeInGuessed() const
Change in guessed.
virtual CbcBranchingObject * clone() const
Clone.
virtual ~CbcDynamicPseudoCostBranchingObject()
Destructor.
virtual int fillStrongInfo(CbcStrongInfo &info)
Some branchingObjects may claim to be able to skip strong branching.
CbcBranchObjType
Define a single integer class but with dynamic pseudo costs.
virtual void initialize(CbcModel *model)
Initialize, e.g. before the start of branch selection at a node.
virtual CbcBranchDecision * clone() const
Clone.
Branching decision dynamic class.
virtual double branch()
Sets the bounds for the variable according to the current arm of the branch and advances the object s...
virtual CbcBranchObjType type() const
Return the type (an integer identifier) of this.
virtual void setBestCriterion(double value)
Sets or gets best criterion so far.
int variable() const
Index identifying the associated CbcObject within its class.
virtual double getBestCriterion() const
CbcDynamicPseudoCostBranchingObject & operator=(const CbcDynamicPseudoCostBranchingObject &rhs)
Assignment operator.
virtual void updateInformation(OsiSolverInterface *solver, const CbcNode *node)
Pass in information on branch just done.
double bestChangeDown_
Change down for best.
CbcDynamicPseudoCostBranchingObject()
Default constructor.
Simple branching object for an integer variable.
CbcBranchingObject * bestObject_
Pointer to best branching object.
void setObject(CbcSimpleIntegerDynamicPseudoCost *object)
Set object.
int way() const
Get the state of the branching object.
virtual ~CbcBranchDynamicDecision()
virtual void saveBranchingObject(OsiBranchingObject *object)
Saves a clone of current branching object.
void fillPart(int variable, int way, double value, CbcSimpleIntegerDynamicPseudoCost *object)
Does part of constructor.
Information required while the node is live.
Definition: CbcNode.hpp:47
Simple branching object for an integer variable with pseudo costs.
CbcSimpleIntegerDynamicPseudoCost * object_
Pointer back to object.
double changeInGuessed_
Change in guessed objective value for next branch.
Abstract base class for `objects'.
Definition: CbcObject.hpp:45
CbcModel * model() const
Return model.
Simple Branch and bound class.
Definition: CbcModel.hpp:98
virtual int whichMethod()
Says whether this method can handle both methods - 1 better, 2 best, 3 both.
virtual double branch()=0
Execute the actions required to branch, as specified by the current state of the branching object...
virtual int betterBranch(CbcBranchingObject *thisOne, CbcBranchingObject *bestSoFar, double changeUp, int numInfUp, double changeDn, int numInfDn)
Compare two branching objects.