SoPlex
Toggle main menu visibility
Loading...
Searching...
No Matches
src
soplex
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-2026 Zuse Institute Berlin (ZIB) */
7
/* */
8
/* Licensed under the Apache License, Version 2.0 (the "License"); */
9
/* you may not use this file except in compliance with the License. */
10
/* You may obtain a copy of the License at */
11
/* */
12
/* http://www.apache.org/licenses/LICENSE-2.0 */
13
/* */
14
/* Unless required by applicable law or agreed to in writing, software */
15
/* distributed under the License is distributed on an "AS IS" BASIS, */
16
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17
/* See the License for the specific language governing permissions and */
18
/* limitations under the License. */
19
/* */
20
/* You should have received a copy of the Apache-2.0 license */
21
/* along with SoPlex; see the file LICENSE. If not email to soplex@zib.de. */
22
/* */
23
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25
/**@file spxparmultpr.h
26
* @brief Partial multiple pricing.
27
*/
28
#ifndef _SPXPARMULTPR_H_
29
#define _SPXPARMULTPR_H_
30
31
#include <assert.h>
32
33
#include "
soplex/spxdefines.h
"
34
#include "
soplex/spxpricer.h
"
35
#include "
soplex/dataarray.h
"
36
#include "
soplex/array.h
"
37
#include "
soplex/ssvector.h
"
38
39
namespace
soplex
40
{
41
42
/**@brief Partial multiple pricing.
43
@ingroup Algo
44
45
Class SPxParMultPr is an implementation class for SPxPricer implementing
46
Dantzig's default pricing strategy with partial multiple pricing.
47
Partial multiple pricing applies to the entering Simplex only. A set of
48
#partialSize eligible pivot indices is selected (partial pricing). In the
49
following Simplex iterations pricing is restricted to these indices
50
(multiple pricing) until no more eliiable pivots are available. Partial
51
multiple pricing significantly reduces the computation time for computing
52
the matrix-vector-product in the Simplex algorithm.
53
54
See SPxPricer for a class documentation.
55
*/
56
template
<
class
R>
57
class
SPxParMultPR
:
public
SPxPricer
<R>
58
{
59
private
:
60
61
//-------------------------------------
62
/**@name Private types */
63
///@{
64
/// Helper structure.
65
struct
SPxParMultPr_Tmp
66
{
67
///
68
SPxId
id
;
69
///
70
R
test
;
71
};
72
///@}
73
74
//-------------------------------------
75
/**@name Helper data */
76
///@{
77
///
78
Array < SPxParMultPr_Tmp >
pricSet
;
79
///
80
int
multiParts
;
81
///
82
int
used
;
83
///
84
int
min
;
85
///
86
int
last
;
87
/// Set size for partial pricing.
88
int
partialSize
;
89
///@}
90
91
public
:
92
93
//-------------------------------------
94
/**@name Construction / destruction */
95
///@{
96
/// default constructor
97
SPxParMultPR
()
98
:
SPxPricer
<R>(
"ParMult"
)
99
,
multiParts
(0)
100
,
used
(0)
101
,
min
(0)
102
,
last
(0)
103
,
partialSize
(17)
104
{}
105
/// copy constructor
106
SPxParMultPR
(
const
SPxParMultPR
& old)
107
:
SPxPricer
<R>(old)
108
,
pricSet
(old.
pricSet
)
109
,
multiParts
(old.
multiParts
)
110
,
used
(old.
used
)
111
,
min
(old.
min
)
112
,
last
(old.
last
)
113
,
partialSize
(old.
partialSize
)
114
{}
115
/// assignment operator
116
SPxParMultPR
&
operator=
(
const
SPxParMultPR
& rhs)
117
{
118
if
(
this
!= &rhs)
119
{
120
SPxPricer<R>::operator=
(rhs);
121
pricSet
= rhs.
pricSet
;
122
multiParts
= rhs.
multiParts
;
123
used
= rhs.
used
;
124
min
= rhs.
min
;
125
last
= rhs.
last
;
126
partialSize
= rhs.
partialSize
;
127
}
128
129
return
*
this
;
130
}
131
/// destructor
132
virtual
~SPxParMultPR
()
133
{}
134
/// clone function for polymorphism
135
inline
virtual
SPxPricer<R>
*
clone
()
const
136
{
137
return
new
SPxParMultPR
(*
this
);
138
}
139
///@}
140
141
//-------------------------------------
142
/**@name Interface */
143
///@{
144
/// set the solver
145
virtual
void
load
(
SPxSolverBase<R>
*
solver
);
146
/// set entering or leaving algorithm
147
virtual
void
setType
(
typename
SPxSolverBase<R>::Type
tp);
148
///
149
virtual
int
selectLeave
();
150
///
151
virtual
SPxId
selectEnter
();
152
///@}
153
154
};
155
156
}
// namespace soplex
157
158
#include "spxparmultpr.hpp"
159
#endif
// _SPXPARMULTPRR_H_
array.h
Save arrays of arbitrary types.
soplex::SPxId
Generic Ids for LP rows or columns.
Definition
spxid.h:95
soplex::SPxParMultPR::SPxParMultPR
SPxParMultPR()
default constructor
Definition
spxparmultpr.h:97
soplex::SPxParMultPR::clone
virtual SPxPricer< R > * clone() const
clone function for polymorphism
Definition
spxparmultpr.h:135
soplex::SPxParMultPR::SPxParMultPR
SPxParMultPR(const SPxParMultPR &old)
copy constructor
Definition
spxparmultpr.h:106
soplex::SPxParMultPR::min
int min
Definition
spxparmultpr.h:84
soplex::SPxParMultPR::pricSet
Array< SPxParMultPr_Tmp > pricSet
Definition
spxparmultpr.h:78
soplex::SPxParMultPR::used
int used
Definition
spxparmultpr.h:82
soplex::SPxParMultPR::operator=
SPxParMultPR & operator=(const SPxParMultPR &rhs)
assignment operator
Definition
spxparmultpr.h:116
soplex::SPxParMultPR::last
int last
Definition
spxparmultpr.h:86
soplex::SPxParMultPR::load
virtual void load(SPxSolverBase< R > *solver)
set the solver
soplex::SPxParMultPR::multiParts
int multiParts
Definition
spxparmultpr.h:80
soplex::SPxParMultPR::setType
virtual void setType(typename SPxSolverBase< R >::Type tp)
set entering or leaving algorithm
soplex::SPxParMultPR::selectLeave
virtual int selectLeave()
soplex::SPxParMultPR::partialSize
int partialSize
Set size for partial pricing.
Definition
spxparmultpr.h:88
soplex::SPxParMultPR::~SPxParMultPR
virtual ~SPxParMultPR()
destructor
Definition
spxparmultpr.h:132
soplex::SPxParMultPR::selectEnter
virtual SPxId selectEnter()
soplex::SPxPricer::solver
virtual SPxSolverBase< R > * solver() const
returns loaded SPxSolverBase object.
Definition
spxpricer.h:139
soplex::SPxPricer::SPxPricer
SPxPricer(const char *p_name)
constructor
Definition
spxpricer.h:284
soplex::SPxPricer::operator=
SPxPricer & operator=(const SPxPricer &rhs)
assignment operator
Definition
spxpricer.h:298
soplex::SPxSolverBase
Sequential object-oriented SimPlex.
Definition
spxsolver.h:104
soplex::SPxSolverBase::Type
Type
Algorithmic type.
Definition
spxsolver.h:143
dataarray.h
Save arrays of data objects.
soplex
Everything should be within this namespace.
spxdefines.h
Debugging, floating point type and parameter definitions.
spxpricer.h
Abstract pricer base class.
ssvector.h
Semi sparse vector.
soplex::SPxParMultPR::SPxParMultPr_Tmp
Helper structure.
Definition
spxparmultpr.h:66
soplex::SPxParMultPR::SPxParMultPr_Tmp::test
R test
Definition
spxparmultpr.h:70
soplex::SPxParMultPR::SPxParMultPr_Tmp::id
SPxId id
Definition
spxparmultpr.h:68
Generated by
1.17.0