Cbc
2.10.13
Toggle main menu visibility
Loading...
Searching...
No Matches
Cbc
src
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
14
class
CbcSimpleIntegerPseudoCost
:
public
CbcSimpleInteger
{
15
16
public
:
17
// Default Constructor
18
CbcSimpleIntegerPseudoCost
();
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
31
CbcSimpleIntegerPseudoCost
(
const
CbcSimpleIntegerPseudoCost
&);
32
34
virtual
CbcObject *
clone
()
const
;
35
36
// Assignment operator
37
CbcSimpleIntegerPseudoCost
&
operator=
(
const
CbcSimpleIntegerPseudoCost
&rhs);
38
39
// Destructor
40
virtual
~CbcSimpleIntegerPseudoCost
();
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
}
54
55
inline
void
setDownPseudoCost
(
double
value)
56
{
57
downPseudoCost_
= value;
58
}
59
61
inline
double
upPseudoCost
()
const
62
{
63
return
upPseudoCost_
;
64
}
65
66
inline
void
setUpPseudoCost
(
double
value)
67
{
68
upPseudoCost_
= value;
69
}
70
72
inline
double
upDownSeparator
()
const
73
{
74
return
upDownSeparator_
;
75
}
76
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
}
92
93
inline
void
setMethod
(
int
value)
94
{
95
method_
= value;
96
}
97
98
protected
:
100
102
double
downPseudoCost_
;
104
double
upPseudoCost_
;
109
double
upDownSeparator_
;
116
int
method_
;
117
};
118
119
#endif
120
121
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
122
*/
way
int way() const
model
CbcModel * model() const
Return model.
Definition
CbcObject.hpp:252
preferredWay
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
Definition
CbcObject.hpp:258
CbcSimpleInteger.hpp
CbcBranchingObject
Abstract branching object base class Now just difference with OsiBranchingObject.
Definition
CbcBranchingObject.hpp:51
CbcModel
Simple Branch and bound class.
Definition
CbcModel.hpp:100
CbcSimpleIntegerPseudoCost::upDownSeparator_
double upDownSeparator_
Up/down separator If >0.0 then do first branch up if value-floor(value) >= this value.
Definition
CbcSimpleIntegerPseudoCost.hpp:109
CbcSimpleIntegerPseudoCost::downPseudoCost_
double downPseudoCost_
data
Definition
CbcSimpleIntegerPseudoCost.hpp:102
CbcSimpleIntegerPseudoCost::method_
int method_
Method - 0 - normal - return min (up,down) 1 - if before any solution return CoinMax(up,...
Definition
CbcSimpleIntegerPseudoCost.hpp:116
CbcSimpleIntegerPseudoCost::~CbcSimpleIntegerPseudoCost
virtual ~CbcSimpleIntegerPseudoCost()
CbcSimpleIntegerPseudoCost::upPseudoCost_
double upPseudoCost_
Up pseudo cost.
Definition
CbcSimpleIntegerPseudoCost.hpp:104
CbcSimpleIntegerPseudoCost::downEstimate
virtual double downEstimate() const
Return "down" estimate (default 1.0e-5).
CbcSimpleIntegerPseudoCost::method
int method() const
method - see below for details
Definition
CbcSimpleIntegerPseudoCost.hpp:88
CbcSimpleIntegerPseudoCost::setUpDownSeparator
void setUpDownSeparator(double value)
Set up down separator.
Definition
CbcSimpleIntegerPseudoCost.hpp:77
CbcSimpleIntegerPseudoCost::setUpPseudoCost
void setUpPseudoCost(double value)
Set up pseudo cost.
Definition
CbcSimpleIntegerPseudoCost.hpp:66
CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost
CbcSimpleIntegerPseudoCost(CbcModel *model, int dummy, int iColumn, double downPseudoCost, double upPseudoCost)
CbcSimpleIntegerPseudoCost::operator=
CbcSimpleIntegerPseudoCost & operator=(const CbcSimpleIntegerPseudoCost &rhs)
CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost
CbcSimpleIntegerPseudoCost()
CbcSimpleIntegerPseudoCost::setDownPseudoCost
void setDownPseudoCost(double value)
Set down pseudo cost.
Definition
CbcSimpleIntegerPseudoCost.hpp:55
CbcSimpleIntegerPseudoCost::setMethod
void setMethod(int value)
Set method.
Definition
CbcSimpleIntegerPseudoCost.hpp:93
CbcSimpleIntegerPseudoCost::upPseudoCost
double upPseudoCost() const
Up pseudo cost.
Definition
CbcSimpleIntegerPseudoCost.hpp:61
CbcSimpleIntegerPseudoCost::upEstimate
virtual double upEstimate() const
Return "up" estimate.
CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost
CbcSimpleIntegerPseudoCost(CbcModel *model, int iColumn, double breakEven=0.5)
CbcSimpleIntegerPseudoCost::infeasibility
virtual double infeasibility(const OsiBranchingInformation *info, int &preferredWay) const
Infeasibility - large is 0.5.
CbcSimpleIntegerPseudoCost::upDownSeparator
double upDownSeparator() const
Up down separator.
Definition
CbcSimpleIntegerPseudoCost.hpp:72
CbcSimpleIntegerPseudoCost::createCbcBranch
virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost
CbcSimpleIntegerPseudoCost(CbcModel *model, int iColumn, double downPseudoCost, double upPseudoCost)
CbcSimpleIntegerPseudoCost::clone
virtual CbcObject * clone() const
Clone.
CbcSimpleIntegerPseudoCost::downPseudoCost
double downPseudoCost() const
Down pseudo cost.
Definition
CbcSimpleIntegerPseudoCost.hpp:50
CbcSimpleIntegerPseudoCost::CbcSimpleIntegerPseudoCost
CbcSimpleIntegerPseudoCost(const CbcSimpleIntegerPseudoCost &)
CbcSimpleInteger::CbcSimpleInteger
CbcSimpleInteger()
Generated by
1.17.0