Cbc 2.10.8
CbcSimpleIntegerPseudoCost.hpp
Go to the documentation of this file.
1// $Id$
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
16public:
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
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
98protected:
100
117};
118
119#endif
120
121/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
122*/
Abstract branching object base class Now just difference with OsiBranchingObject.
Simple Branch and bound class.
Definition: CbcModel.hpp:100
CbcModel * model() const
Return model.
Definition: CbcObject.hpp:252
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
Definition: CbcObject.hpp:258
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.
int method_
Method - 0 - normal - return min (up,down) 1 - if before any solution return CoinMax(up,...
virtual ~CbcSimpleIntegerPseudoCost()
virtual double downEstimate() const
Return "down" estimate (default 1.0e-5)
int method() const
method - see below for details
void setUpDownSeparator(double value)
Set up down separator.
void setUpPseudoCost(double value)
Set up pseudo cost.
CbcSimpleIntegerPseudoCost(CbcModel *model, int dummy, int iColumn, double downPseudoCost, double upPseudoCost)
CbcSimpleIntegerPseudoCost & operator=(const CbcSimpleIntegerPseudoCost &rhs)
void setDownPseudoCost(double value)
Set down pseudo cost.
void setMethod(int value)
Set method.
double upPseudoCost() const
Up pseudo cost.
virtual double upEstimate() const
Return "up" estimate.
CbcSimpleIntegerPseudoCost(CbcModel *model, int iColumn, double breakEven=0.5)
virtual double infeasibility(const OsiBranchingInformation *info, int &preferredWay) const
Infeasibility - large is 0.5.
double upDownSeparator() const
Up down separator.
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
CbcSimpleIntegerPseudoCost(CbcModel *model, int iColumn, double downPseudoCost, double upPseudoCost)
virtual CbcObject * clone() const
Clone.
double downPseudoCost() const
Down pseudo cost.
CbcSimpleIntegerPseudoCost(const CbcSimpleIntegerPseudoCost &)
Define a single integer class.
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.