Cbc  2.9.7
 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 1899 2013-04-09 18:12:08Z stefan $
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 
18  // Default Constructor
20 
21  // Useful constructor - passed model index
22  CbcSimpleIntegerPseudoCost (CbcModel * model, int iColumn, double breakEven = 0.5);
23 
24  // Useful constructor - passed and model index and pseudo costs
25  CbcSimpleIntegerPseudoCost (CbcModel * model, int iColumn,
26  double downPseudoCost, double upPseudoCost);
27  // Useful constructor - passed and model index and pseudo costs
28  CbcSimpleIntegerPseudoCost (CbcModel * model, int dummy, int iColumn,
29  double downPseudoCost, double upPseudoCost);
30 
31  // Copy constructor
33 
35  virtual CbcObject * clone() const;
36 
37  // Assignment operator
39 
40  // Destructor
41  virtual ~CbcSimpleIntegerPseudoCost ();
42 
44  virtual double infeasibility(const OsiBranchingInformation * info,
45  int &preferredWay) const;
46 
48  virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
49 
51  inline double downPseudoCost() const {
52  return downPseudoCost_;
53  }
55  inline void setDownPseudoCost(double value) {
56  downPseudoCost_ = value;
57  }
58 
60  inline double upPseudoCost() const {
61  return upPseudoCost_;
62  }
64  inline void setUpPseudoCost(double value) {
65  upPseudoCost_ = value;
66  }
67 
69  inline double upDownSeparator() const {
70  return upDownSeparator_;
71  }
73  inline void setUpDownSeparator(double value) {
74  upDownSeparator_ = value;
75  }
76 
78  virtual double upEstimate() const;
80  virtual double downEstimate() const;
81 
83  inline int method() const {
84  return method_;
85  }
87  inline void setMethod(int value) {
88  method_ = value;
89  }
90 
91 protected:
93 
97  double upPseudoCost_;
109  int method_;
110 };
111 
112 
113 #endif
114 
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:245
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:240
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:101
virtual double downEstimate() const
Return "down" estimate (default 1.0e-5)