Cbc  2.9.9
CbcBranchToFixLots.hpp
Go to the documentation of this file.
1 // $Id: CbcBranchToFixLots.hpp 1899 2013-04-09 18:12:08Z stefan $
2 // Copyright (C) 2004, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 // Edwin 11/13/2009-- carved out of CbcBranchCut
7 
8 #ifndef CbcBranchToFixLots_H
9 #define CbcBranchToFixLots_H
10 
11 #include "CbcBranchCut.hpp"
12 #include "CbcBranchBase.hpp"
13 #include "OsiRowCut.hpp"
14 #include "CoinPackedMatrix.hpp"
15 
24 
25 public:
26 
27  // Default Constructor
29 
36  CbcBranchToFixLots (CbcModel * model, double djTolerance,
37  double fractionFixed, int depth,
38  int numberClean = 0,
39  const char * mark = NULL,
40  bool alwaysCreate = false);
41 
42  // Copy constructor
44 
46  virtual CbcObject * clone() const;
47 
48  // Assignment operator
50 
51  // Destructor
53 
58  int shallWe() const;
59 
61  virtual double infeasibility(const OsiBranchingInformation * info,
62  int &preferredWay) const;
65  virtual bool canDoHeuristics() const {
66  return true;
67  }
68 
70  virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
72  virtual void redoSequenceEtc(CbcModel * model, int numberColumns, const int * originalColumns);
73 
74 
75 protected:
77 
79  double djTolerance_;
83  char * mark_;
85  CoinPackedMatrix matrixByRow_;
87  int depth_;
92 };
93 #endif
94 
CbcObject::preferredWay
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
Definition: CbcObject.hpp:245
CbcBranchToFixLots::CbcBranchToFixLots
CbcBranchToFixLots()
CbcBranchToFixLots::redoSequenceEtc
virtual void redoSequenceEtc(CbcModel *model, int numberColumns, const int *originalColumns)
Redoes data when sequence numbers change.
CbcBranchToFixLots::depth_
int depth_
Do if depth multiple of this.
Definition: CbcBranchToFixLots.hpp:87
CbcBranchToFixLots::numberClean_
int numberClean_
number of ==1 rows which need to be clean
Definition: CbcBranchToFixLots.hpp:89
CbcBranchToFixLots::clone
virtual CbcObject * clone() const
Clone.
CbcBranchCut.hpp
CbcBranchToFixLots::shallWe
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...
CbcBranchToFixLots::CbcBranchToFixLots
CbcBranchToFixLots(CbcModel *model, double djTolerance, double fractionFixed, int depth, int numberClean=0, const char *mark=NULL, bool alwaysCreate=false)
Useful constructor - passed reduced cost tolerance and fraction we would like fixed.
CbcBranchCut
Define a cut branching class.
Definition: CbcBranchCut.hpp:17
CbcModel
Simple Branch and bound class.
Definition: CbcModel.hpp:101
CbcBranchToFixLots::alwaysCreate_
bool alwaysCreate_
If true then always create branch.
Definition: CbcBranchToFixLots.hpp:91
CbcBranchingObject
Abstract branching object base class Now just difference with OsiBranchingObject.
Definition: CbcBranchingObject.hpp:53
CbcObject
Definition: CbcObject.hpp:67
CbcBranchToFixLots
Define a branch class that branches so that one way variables are fixed while the other way cuts off ...
Definition: CbcBranchToFixLots.hpp:23
CbcBranchBase.hpp
CbcBranchToFixLots::createCbcBranch
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
CbcBranchToFixLots::infeasibility
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.
CbcBranchToFixLots::fractionFixed_
double fractionFixed_
We only need to make sure this fraction fixed.
Definition: CbcBranchToFixLots.hpp:81
CbcBranchToFixLots::djTolerance_
double djTolerance_
data
Definition: CbcBranchToFixLots.hpp:79
CbcObject::model
CbcModel * model() const
Return model.
Definition: CbcObject.hpp:240
CbcBranchToFixLots::matrixByRow_
CoinPackedMatrix matrixByRow_
Matrix by row.
Definition: CbcBranchToFixLots.hpp:85
CbcBranchToFixLots::mark_
char * mark_
Never fix ones marked here.
Definition: CbcBranchToFixLots.hpp:83
CbcBranchToFixLots::operator=
CbcBranchToFixLots & operator=(const CbcBranchToFixLots &rhs)
CbcBranchToFixLots::CbcBranchToFixLots
CbcBranchToFixLots(const CbcBranchToFixLots &)
CbcBranchToFixLots::canDoHeuristics
virtual bool canDoHeuristics() const
Return true if object can take part in normal heuristics.
Definition: CbcBranchToFixLots.hpp:65
CbcBranchToFixLots::~CbcBranchToFixLots
~CbcBranchToFixLots()