Cbc
2.10.13
Toggle main menu visibility
Loading...
Searching...
No Matches
Cbc
examples
CbcSolver2.hpp
Go to the documentation of this file.
1
// $Id$
2
// Copyright (C) 2005, 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
#ifndef CbcSolver2_H
7
#define CbcSolver2_H
8
9
#include "OsiClpSolverInterface.hpp"
10
class
CbcModel
;
11
//#############################################################################
12
21
22
class
CbcSolver2
:
public
OsiClpSolverInterface {
23
24
public
:
25
//---------------------------------------------------------------------------
28
29
virtual
void
initialSolve
();
30
32
virtual
void
resolve
();
33
35
38
39
CbcSolver2
();
40
42
virtual
OsiSolverInterface *
clone
(
bool
CopyData =
true
)
const
;
43
45
CbcSolver2
(
const
CbcSolver2
&);
46
48
CbcSolver2
&
operator=
(
const
CbcSolver2
&rhs);
49
51
virtual
~CbcSolver2
();
52
54
57
58
void
initialize
(
CbcModel
*
model
,
const
char
*keep);
60
inline
const
int
*
when
()
const
61
{
62
return
node_
;
63
}
64
65
inline
int
getMemory
()
const
66
{
67
return
memory_
;
68
}
69
70
inline
int
getCount
()
const
71
{
72
return
count_
;
73
}
74
75
inline
void
setMemory
(
int
value)
76
{
77
memory_
= value;
78
}
79
80
inline
void
setAlgorithm
(
int
value)
81
{
82
algorithm_
= value;
83
}
84
85
inline
int
getAlgorithm
()
const
86
{
87
return
algorithm_
;
88
}
89
90
inline
void
setStrategy
(
int
value)
91
{
92
strategy_
= value;
93
}
94
95
inline
int
getStrategy
()
const
96
{
97
return
strategy_
;
98
}
99
100
101
//---------------------------------------------------------------------------
102
103
private
:
106
107
int
*
node_
;
109
int
*
howMany_
;
111
CbcModel
*
model_
;
113
int
count_
;
115
int
memory_
;
117
int
algorithm_
;
119
int
strategy_
;
121
};
122
123
#endif
model
CbcModel * model() const
Return model.
Definition
CbcObject.hpp:252
CbcModel
Simple Branch and bound class.
Definition
CbcModel.hpp:100
CbcSolver2::node_
int * node_
Node number when variable last in problem.
Definition
CbcSolver2.hpp:107
CbcSolver2::model_
CbcModel * model_
Pointer back to model.
Definition
CbcSolver2.hpp:111
CbcSolver2::getCount
int getCount() const
Get current count.
Definition
CbcSolver2.hpp:70
CbcSolver2::~CbcSolver2
virtual ~CbcSolver2()
Destructor.
CbcSolver2::setStrategy
void setStrategy(int value)
Strategy.
Definition
CbcSolver2.hpp:90
CbcSolver2::setMemory
void setMemory(int value)
Set memory (i.e. how recent use should be).
Definition
CbcSolver2.hpp:75
CbcSolver2::algorithm_
int algorithm_
If 0 nothing, 1 compress and fix, 2 long thin.
Definition
CbcSolver2.hpp:117
CbcSolver2::howMany_
int * howMany_
How many times in problem.
Definition
CbcSolver2.hpp:109
CbcSolver2::resolve
virtual void resolve()
Resolve an LP relaxation after problem modification.
CbcSolver2::setAlgorithm
void setAlgorithm(int value)
Say whether to just count usage.
Definition
CbcSolver2.hpp:80
CbcSolver2::memory_
int memory_
How recently it must have been used.
Definition
CbcSolver2.hpp:115
CbcSolver2::CbcSolver2
CbcSolver2(const CbcSolver2 &)
Copy constructor.
CbcSolver2::clone
virtual OsiSolverInterface * clone(bool CopyData=true) const
Clone.
CbcSolver2::CbcSolver2
CbcSolver2()
Default Constructor.
CbcSolver2::getAlgorithm
int getAlgorithm() const
Say whether to just count usage.
Definition
CbcSolver2.hpp:85
CbcSolver2::getStrategy
int getStrategy() const
Strategy.
Definition
CbcSolver2.hpp:95
CbcSolver2::strategy_
int strategy_
If 0 get rid of rows, 1 keep rows (to stay dual feasible).
Definition
CbcSolver2.hpp:119
CbcSolver2::initialize
void initialize(CbcModel *model, const char *keep)
Setup arrays - ones in keep will always be in.
CbcSolver2::getMemory
int getMemory() const
Get memory (i.e. how recent use should be).
Definition
CbcSolver2.hpp:65
CbcSolver2::when
const int * when() const
get which ones have been used
Definition
CbcSolver2.hpp:60
CbcSolver2::count_
int count_
Counter.
Definition
CbcSolver2.hpp:113
CbcSolver2::operator=
CbcSolver2 & operator=(const CbcSolver2 &rhs)
Assignment operator.
CbcSolver2::initialSolve
virtual void initialSolve()
Solve initial LP relaxation.
Generated by
1.17.0