Toggle navigation
SCIP Optimization Suite
SCIP
SoPlex
ZIMPL
UG
GCG
Documentation
SoPlex 6.0.3
SoPlex 5.0.2
SoPlex 4.0.2
SoPlex 3.1.0
SoPlex 3.0.1
SoPlex 2.2.1
SoPlex
Sequential object-oriented simPlex
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
soplex-repo
src
spxparmultpr.h
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
/* */
3
/* This file is part of the class library */
4
/* SoPlex --- the Sequential object-oriented simPlex. */
5
/* */
6
/* Copyright (C) 1996-2015 Konrad-Zuse-Zentrum */
7
/* fuer Informationstechnik Berlin */
8
/* */
9
/* SoPlex is distributed under the terms of the ZIB Academic Licence. */
10
/* */
11
/* You should have received a copy of the ZIB Academic License */
12
/* along with SoPlex; see the file COPYING. If not email to soplex@zib.de. */
13
/* */
14
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15
16
/**@file spxparmultpr.h
17
* @brief Partial multiple pricing.
18
*/
19
#ifndef _SPXPARMULTPR_H_
20
#define _SPXPARMULTPR_H_
21
22
#include <assert.h>
23
24
#include "
spxdefines.h
"
25
#include "
spxpricer.h
"
26
#include "
dataarray.h
"
27
#include "
array.h
"
28
#include "
ssvector.h
"
29
30
namespace
soplex
31
{
32
33
/**@brief Partial multiple pricing.
34
@ingroup Algo
35
36
Class SPxParMultPr is an implementation class for SPxPricer implementing
37
Dantzig's default pricing strategy with partial multiple pricing.
38
Partial multiple pricing applies to the entering Simplex only. A set of
39
#partialSize eligible pivot indices is selected (partial pricing). In the
40
following Simplex iterations pricing is restricted to these indices
41
(multiple pricing) until no more eliiable pivots are available. Partial
42
multiple pricing significantly reduces the computation time for computing
43
the matrix-vector-product in the Simplex algorithm.
44
45
See SPxPricer for a class documentation.
46
*/
47
class
SPxParMultPR
:
public
SPxPricer
48
{
49
private
:
50
51
//-------------------------------------
52
/**@name Private types */
53
//@{
54
/// Helper structure.
55
struct
SPxParMultPr_Tmp
56
{
57
///
58
SPxId
id
;
59
///
60
Real
test
;
61
};
62
//@}
63
64
//-------------------------------------
65
/**@name Helper data */
66
//@{
67
///
68
DataArray < SPxParMultPr_Tmp >
pricSet
;
69
///
70
int
multiParts
;
71
///
72
int
used
;
73
///
74
int
min
;
75
///
76
int
last
;
77
/// Set size for partial pricing.
78
static
int
partialSize
;
79
//@}
80
81
public
:
82
83
//-------------------------------------
84
/**@name Construction / destruction */
85
//@{
86
/// default constructor
87
SPxParMultPR
()
88
:
SPxPricer
(
"ParMult"
)
89
,
multiParts
(0)
90
,
used
(0)
91
,
min
(0)
92
,
last
(0)
93
{}
94
/// copy constructor
95
SPxParMultPR
(
const
SPxParMultPR
& old)
96
:
SPxPricer
(old)
97
,
pricSet
(old.
pricSet
)
98
,
multiParts
(old.
multiParts
)
99
,
used
(old.
used
)
100
,
min
(old.
min
)
101
,
last
(old.
last
)
102
{
103
partialSize
= old.
partialSize
;
104
}
105
/// assignment operator
106
SPxParMultPR
&
operator=
(
const
SPxParMultPR
& rhs)
107
{
108
if
(
this
!= &rhs)
109
{
110
SPxPricer::operator=
(rhs);
111
pricSet
= rhs.
pricSet
;
112
multiParts
= rhs.
multiParts
;
113
used
= rhs.
used
;
114
min
= rhs.
min
;
115
last
= rhs.
last
;
116
partialSize
= rhs.
partialSize
;
117
}
118
119
return
*
this
;
120
}
121
/// destructor
122
virtual
~SPxParMultPR
()
123
{}
124
/// clone function for polymorphism
125
inline
virtual
SPxPricer
*
clone
()
const
126
{
127
return
new
SPxParMultPR
(*
this
);
128
}
129
//@}
130
131
//-------------------------------------
132
/**@name Interface */
133
//@{
134
/// set the solver
135
virtual
void
load
(
SPxSolver
*
solver
);
136
/// set entering or leaving algorithm
137
virtual
void
setType
(
SPxSolver::Type
tp);
138
///
139
virtual
int
selectLeave
();
140
///
141
virtual
SPxId
selectEnter
();
142
//@}
143
144
};
145
146
147
}
// namespace soplex
148
#endif // _SPXPARMULTPRR_H_