Scippy

SoPlex

Sequential object-oriented simPlex

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-2017 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 */
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
84  : SPxRatioTester("Harris")
85  {}
86  /// copy constructor
87  SPxHarrisRT(const SPxHarrisRT& old)
88  : SPxRatioTester(old)
89  {}
90  /// assignment operator
92  {
93  if(this != &rhs)
94  {
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, bool);
115  ///
116  virtual SPxId selectEnter(Real& val, int, bool);
117  //@}
118 
119 };
120 
121 } // namespace soplex
122 #endif // _SPXHARRISRT_H_
virtual SPxId selectEnter(Real &val, int, bool)
virtual int selectLeave(Real &val, Real, bool)
Abstract ratio test base class.
Real degenerateEps() const
Definition: spxharrisrt.cpp:33
Abstract ratio test base class.Class SPxRatioTester is the virtual base class for computing the ratio...
Generic Ids for LP rows or columns.Both SPxColIds and SPxRowIds may be treated uniformly as SPxIds: ...
Definition: spxid.h:85
double Real
Definition: spxdefines.h:215
virtual ~SPxHarrisRT()
destructor
Definition: spxharrisrt.h:101
int minDelta(Real *, Real *val, int num, const int *idx, const Real *upd, const Real *vec, const Real *low, const Real *up, Real epsilon) const
Definition: spxharrisrt.cpp:90
int maxDelta(Real *, Real *val, int num, const int *idx, const Real *upd, const Real *vec, const Real *low, const Real *up, Real epsilon) const
Definition: spxharrisrt.cpp:39
SPxHarrisRT & operator=(const SPxHarrisRT &rhs)
assignment operator
Definition: spxharrisrt.h:91
SPxRatioTester & operator=(const SPxRatioTester &rhs)
assignment operator
Debugging, floating point type and parameter definitions.
Everything should be within this namespace.
SPxHarrisRT()
default constructor
Definition: spxharrisrt.h:83
SPxHarrisRT(const SPxHarrisRT &old)
copy constructor
Definition: spxharrisrt.h:87
virtual SPxRatioTester * clone() const
clone function for polymorphism
Definition: spxharrisrt.h:104
Harris pricing with shifting.Class SPxHarrisRT is a stable implementation of a SPxRatioTester class a...
Definition: spxharrisrt.h:40