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
spxharrisrt.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 spxharrisrt.h
17
* @brief Harris pricing with shifting.
18
*/
19
#ifndef _SPXHARRISRT_H_
20
#define _SPXHARRISRT_H_
21
22
#include <assert.h>
23
24
#include "
spxdefines.h
"
25
#include "
spxratiotester.h
"
26
27
namespace
soplex
28
{
29
30
/**@brief Harris pricing with shifting.
31
@ingroup Algo
32
33
Class SPxHarrisRT is a stable implementation of a SPxRatioTester class
34
along the lines of Harris' two phase algorithm. Additionally it uses
35
shifting of bounds in order to avoid cycling.
36
37
See SPxRatioTester for a class documentation.
38
*/
39
/**@todo HarrisRT leads to cycling in dcmulti.sub.lp */
40
class
SPxHarrisRT
:
public
SPxRatioTester
41
{
42
private
:
43
44
//-------------------------------------
45
/**@name Private helpers */
46
//@{
47
///
48
Real
degenerateEps
()
const
;
49
50
///
51
int
maxDelta
(
52
Real
*
/*max*/
,
///< max abs value in \p upd
53
Real
* val,
///< initial and chosen value
54
int
num,
///< number of indices in \p idx
55
const
int
* idx,
///< nonzero indices in \p upd
56
const
Real
* upd,
///< update vector for \p vec
57
const
Real
* vec,
///< current vector
58
const
Real
* low,
///< lower bounds for \p vec
59
const
Real
* up,
///< upper bounds for \p vec
60
Real
epsilon
///< what is 0?
61
)
const
;
62
63
///
64
int
minDelta
(
65
Real
*
/*max*/
,
///< max abs value in \p upd
66
Real
* val,
///< initial and chosen value
67
int
num,
///< of indices in \p idx
68
const
int
* idx,
///< nonzero indices in \p upd
69
const
Real
* upd,
///< update vector for \p vec
70
const
Real
* vec,
///< current vector
71
const
Real
* low,
///< lower bounds for \p vec
72
const
Real
* up,
///< upper bounds for \p vec
73
Real
epsilon
///< what is 0?
74
)
const
;
75
//@}
76
77
public
:
78
79
//-------------------------------------
80
/**@name Construction / destruction */
81
//@{
82
/// default constructor
83
SPxHarrisRT
()
84
:
SPxRatioTester
(
"Harris"
)
85
{}
86
/// copy constructor
87
SPxHarrisRT
(
const
SPxHarrisRT
& old)
88
:
SPxRatioTester
(old)
89
{}
90
/// assignment operator
91
SPxHarrisRT
&
operator=
(
const
SPxHarrisRT
& rhs)
92
{
93
if
(
this
!= &rhs)
94
{
95
SPxRatioTester::operator=
(rhs);
96
}
97
98
return
*
this
;
99
}
100
/// destructor
101
virtual
~SPxHarrisRT
()
102
{}
103
/// clone function for polymorphism
104
inline
virtual
SPxRatioTester
*
clone
()
const
105
{
106
return
new
SPxHarrisRT
(*
this
);
107
}
108
//@}
109
110
//-------------------------------------
111
/**@name Leave / enter */
112
//@{
113
///
114
virtual
int
selectLeave
(
Real
& val,
Real
);
115
///
116
virtual
SPxId
selectEnter
(
Real
& val,
int
);
117
//@}
118
119
};
120
121
}
// namespace soplex
122
#endif // _SPXHARRISRT_H_