Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcSimpleIntegerPseudoCost.hpp
Go to the documentation of this file.
1 // $Id: CbcSimpleIntegerPseudoCost.hpp 2465 2019-01-03 19:26:52Z unxusr $
2 // Copyright (C) 2002, 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/10/2009-- carved out of CbcBranchActual
7 
8 #ifndef CbcSimpleIntegerPseudoCost_H
9 #define CbcSimpleIntegerPseudoCost_H
10 
11 #include "CbcSimpleInteger.hpp"
13 
15 
16 public:
17  // Default Constructor
19 
20  // Useful constructor - passed model index
21  CbcSimpleIntegerPseudoCost(CbcModel *model, int iColumn, double breakEven = 0.5);
22 
23  // Useful constructor - passed and model index and pseudo costs
24  CbcSimpleIntegerPseudoCost(CbcModel *model, int iColumn,
25  double downPseudoCost, double upPseudoCost);
26  // Useful constructor - passed and model index and pseudo costs
27  CbcSimpleIntegerPseudoCost(CbcModel *model, int dummy, int iColumn,
28  double downPseudoCost, double upPseudoCost);
29 
30  // Copy constructor
32 
34  virtual CbcObject *clone() const;
35 
36  // Assignment operator
38 
39  // Destructor
41 
43  virtual double infeasibility(const OsiBranchingInformation *info,
44  int &preferredWay) const;
45 
47  virtual CbcBranchingObject *createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way);
48 
50  inline double downPseudoCost() const
51  {
52  return downPseudoCost_;
53  }
55  inline void setDownPseudoCost(double value)
56  {
57  downPseudoCost_ = value;
58  }
59 
61  inline double upPseudoCost() const
62  {
63  return upPseudoCost_;
64  }
66  inline void setUpPseudoCost(double value)
67  {
68  upPseudoCost_ = value;
69  }
70 
72  inline double upDownSeparator() const
73  {
74  return upDownSeparator_;
75  }
77  inline void setUpDownSeparator(double value)
78  {
79  upDownSeparator_ = value;
80  }
81 
83  virtual double upEstimate() const;
85  virtual double downEstimate() const;
86 
88  inline int method() const
89  {
90  return method_;
91  }
93  inline void setMethod(int value)
94  {
95  method_ = value;
96  }
97 
98 protected:
100 
116  int method_;
117 };
118 
119 #endif
120 
121 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
122 */
double downPseudoCost() const
Down pseudo cost.
CbcSimpleIntegerPseudoCost & operator=(const CbcSimpleIntegerPseudoCost &rhs)
virtual CbcObject * clone() const
Clone.
void setMethod(int value)
Set method.
virtual ~CbcSimpleIntegerPseudoCost()
double upPseudoCost() const
Up pseudo cost.
void setUpDownSeparator(double value)
Set up down separator.
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
Definition: CbcObject.hpp:258
Abstract Base Class for describing an interface to a solver.
Define a single integer class.
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
double infeasibility() const
Return infeasibility.
CbcModel * model() const
Return model.
Definition: CbcObject.hpp:252
Abstract branching object base class Now just difference with OsiBranchingObject. ...
int method() const
method - see below for details
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.
void setDownPseudoCost(double value)
Set down pseudo cost.
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.
void setUpPseudoCost(double value)
Set up pseudo cost.
Define a single integer class but with pseudo costs.
double upDownSeparator() const
Up down separator.
double upDownSeparator_
Up/down separator If >0.0 then do first branch up if value-floor(value) >= this value.
Simple Branch and bound class.
Definition: CbcModel.hpp:100
virtual double downEstimate() const
Return "down" estimate (default 1.0e-5)