CbcSimpleIntegerPseudoCost.hpp
Go to the documentation of this file.
1 // Edwin 11/10/2009-- carved out of CbcBranchActual
2 #ifndef CbcSimpleIntegerPseudoCost_H
3 #define CbcSimpleIntegerPseudoCost_H
4 
5 #include "CbcSimpleInteger.hpp"
7 
9 
10 public:
11 
12  // Default Constructor
14 
15  // Useful constructor - passed model index
16  CbcSimpleIntegerPseudoCost (CbcModel * model, int iColumn, double breakEven = 0.5);
17 
18  // Useful constructor - passed and model index and pseudo costs
19  CbcSimpleIntegerPseudoCost (CbcModel * model, int iColumn,
20  double downPseudoCost, double upPseudoCost);
21  // Useful constructor - passed and model index and pseudo costs
22  CbcSimpleIntegerPseudoCost (CbcModel * model, int dummy, int iColumn,
23  double downPseudoCost, double upPseudoCost);
24 
25  // Copy constructor
27 
29  virtual CbcObject * clone() const;
30 
31  // Assignment operator
33 
34  // Destructor
35  virtual ~CbcSimpleIntegerPseudoCost ();
36 
38  virtual double infeasibility(const OsiBranchingInformation * info,
39  int &preferredWay) const;
40 
42  virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
43 
45  inline double downPseudoCost() const {
46  return downPseudoCost_;
47  }
49  inline void setDownPseudoCost(double value) {
50  downPseudoCost_ = value;
51  }
52 
54  inline double upPseudoCost() const {
55  return upPseudoCost_;
56  }
58  inline void setUpPseudoCost(double value) {
59  upPseudoCost_ = value;
60  }
61 
63  inline double upDownSeparator() const {
64  return upDownSeparator_;
65  }
67  inline void setUpDownSeparator(double value) {
68  upDownSeparator_ = value;
69  }
70 
72  virtual double upEstimate() const;
74  virtual double downEstimate() const;
75 
77  inline int method() const {
78  return method_;
79  }
81  inline void setMethod(int value) {
82  method_ = value;
83  }
84 
85 protected:
87 
91  double upPseudoCost_;
103  int method_;
104 };
105 
106 
107 #endif
108 
Abstract branching object base class Now just difference with OsiBranchingObject. ...
void setDownPseudoCost(double value)
Set down pseudo cost.
Define a single integer class.
void setUpPseudoCost(double value)
Set up pseudo cost.
virtual double infeasibility(const OsiBranchingInformation *info, int &preferredWay) const
Infeasibility - large is 0.5.
Define a single integer class but with pseudo costs.
double upDownSeparator_
Up/down separator If >0.0 then do first branch up if value-floor(value) >= this value.
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
CbcSimpleIntegerPseudoCost & operator=(const CbcSimpleIntegerPseudoCost &rhs)
virtual CbcObject * clone() const
Clone.
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
Definition: CbcObject.hpp:235
virtual ~CbcSimpleIntegerPseudoCost()
virtual double downEstimate() const
Return "down" estimate (default 1.0e-5)
void setUpDownSeparator(double value)
Set up down separator.
CbcModel * model() const
Return model.
Definition: CbcObject.hpp:230
double upDownSeparator() const
Up down separator.
int method_
Method - 0 - normal - return min (up,down) 1 - if before any solution return CoinMax(up,down) 2 - if before branched solution return CoinMax(up,down) 3 - always return CoinMax(up,down)
virtual double upEstimate() const
Return "up" estimate.
double upPseudoCost() const
Up pseudo cost.
double downPseudoCost() const
Down pseudo cost.
int method() const
method - see below for details
Simple Branch and bound class.
Definition: CbcModel.hpp:98
void setMethod(int value)
Set method.
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.