Scippy

SoPlex

Sequential object-oriented simPlex

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-2019 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 "soplex/spxdefines.h"
25 #include "soplex/spxpricer.h"
26 #include "soplex/dataarray.h"
27 #include "soplex/array.h"
28 #include "soplex/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.
56  {
57  ///
59  ///
61  };
62  //@}
63 
64  //-------------------------------------
65  /**@name Helper data */
66  //@{
67  ///
69  ///
71  ///
72  int used;
73  ///
74  int min;
75  ///
76  int last;
77  /// Set size for partial pricing.
79  //@}
80 
81 public:
82 
83  //-------------------------------------
84  /**@name Construction / destruction */
85  //@{
86  /// default constructor
88  : SPxPricer("ParMult")
89  , multiParts(0)
90  , used(0)
91  , min(0)
92  , last(0)
93  , partialSize(17)
94  {}
95  /// copy constructor
97  : SPxPricer(old)
98  , pricSet(old.pricSet)
99  , multiParts(old.multiParts)
100  , used(old.used)
101  , min(old.min)
102  , last(old.last)
103  , partialSize(old.partialSize)
104  {}
105  /// assignment operator
107  {
108  if(this != &rhs)
109  {
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 } // namespace soplex
147 #endif // _SPXPARMULTPRR_H_
SPxParMultPR(const SPxParMultPR &old)
copy constructor
Definition: spxparmultpr.h:96
Safe arrays of data objects.Class DataArray provides safe arrays of Data Objects. For general C++ obj...
Definition: dataarray.h:63
Type
Algorithmic type.
Definition: spxsolver.h:124
Abstract pricer base class.
SPxParMultPR()
default constructor
Definition: spxparmultpr.h:87
SPxPricer & operator=(const SPxPricer &rhs)
assignment operator
Definition: spxpricer.h:277
Partial multiple pricing.Class SPxParMultPr is an implementation class for SPxPricer implementing Dan...
Definition: spxparmultpr.h:47
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:218
virtual void load(SPxSolver *solver)
set the solver
virtual SPxId selectEnter()
virtual int selectLeave()
Semi sparse vector.
Abstract pricer base class.Class SPxPricer is a pure virtual class defining the interface for pricer ...
Definition: spxpricer.h:46
SPxParMultPR & operator=(const SPxParMultPR &rhs)
assignment operator
Definition: spxparmultpr.h:106
virtual void setType(SPxSolver::Type tp)
set entering or leaving algorithm
Debugging, floating point type and parameter definitions.
Sequential object-oriented SimPlex.SPxSolver is an LP solver class using the revised Simplex algorith...
Definition: spxsolver.h:85
Everything should be within this namespace.
virtual SPxPricer * clone() const
clone function for polymorphism
Definition: spxparmultpr.h:125
int partialSize
Set size for partial pricing.
Definition: spxparmultpr.h:78
virtual ~SPxParMultPR()
destructor
Definition: spxparmultpr.h:122
Save arrays of arbitrary types.
virtual SPxSolver * solver() const
returns loaded SPxSolver object.
Definition: spxpricer.h:124
DataArray< SPxParMultPr_Tmp > pricSet
Definition: spxparmultpr.h:68
Save arrays of data objects.