CbcBranchToFixLots.hpp
Go to the documentation of this file.
1 // Edwin 11/13/2009-- carved out of CbcBranchCut
2 #ifndef CbcBranchToFixLots_H
3 #define CbcBranchToFixLots_H
4 
5 #include "CbcBranchCut.hpp"
6 #include "CbcBranchBase.hpp"
7 #include "OsiRowCut.hpp"
8 #include "CoinPackedMatrix.hpp"
9 
18 
19 public:
20 
21  // Default Constructor
23 
30  CbcBranchToFixLots (CbcModel * model, double djTolerance,
31  double fractionFixed, int depth,
32  int numberClean = 0,
33  const char * mark = NULL,
34  bool alwaysCreate = false);
35 
36  // Copy constructor
38 
40  virtual CbcObject * clone() const;
41 
42  // Assignment operator
44 
45  // Destructor
47 
52  int shallWe() const;
53 
55  virtual double infeasibility(const OsiBranchingInformation * info,
56  int &preferredWay) const;
59  virtual bool canDoHeuristics() const {
60  return true;
61  }
62 
64  virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
66  virtual void redoSequenceEtc(CbcModel * model, int numberColumns, const int * originalColumns);
67 
68 
69 protected:
71 
73  double djTolerance_;
77  char * mark_;
79  CoinPackedMatrix matrixByRow_;
81  int depth_;
86 };
87 #endif
88 
Abstract branching object base class Now just difference with OsiBranchingObject. ...
int numberClean_
number of ==1 rows which need to be clean
Define a branch class that branches so that one way variables are fixed while the other way cuts off ...
int shallWe() const
Does a lot of the work, Returns 0 if no good, 1 if dj, 2 if clean, 3 if both FIXME: should use enum o...
double fractionFixed_
We only need to make sure this fraction fixed.
int depth_
Do if depth multiple of this.
virtual double infeasibility(const OsiBranchingInformation *info, int &preferredWay) const
Infeasibility for an integer variable - large is 0.5, but also can be infinity when known infeasible...
virtual CbcObject * clone() const
Clone.
virtual void redoSequenceEtc(CbcModel *model, int numberColumns, const int *originalColumns)
Redoes data when sequence numbers change.
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
Definition: CbcObject.hpp:235
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
CoinPackedMatrix matrixByRow_
Matrix by row.
Define a cut branching class.
CbcModel * model() const
Return model.
Definition: CbcObject.hpp:230
bool alwaysCreate_
If true then always create branch.
char * mark_
Never fix ones marked here.
Simple Branch and bound class.
Definition: CbcModel.hpp:98
CbcBranchToFixLots & operator=(const CbcBranchToFixLots &rhs)