Scippy

SoPlex

Sequential object-oriented simPlex

spxdantzigpr.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-2022 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 spxdantzigpr.h
17  * @brief Dantzig pricer.
18  */
19 #ifndef _SPXDEFAULTPR_H_
20 #define _SPXDEFAULTPR_H_
21 
22 #include <assert.h>
23 
24 #include "soplex/spxpricer.h"
25 
26 namespace soplex
27 {
28 
29 /**@brief Dantzig pricer.
30  @ingroup Algo
31 
32  Class SPxDantzigPR is an implementation class of an SPxPricer implementing
33  Dantzig's default pricing strategy, i.e., maximal/minimal reduced cost or
34  maximally violated constraint.
35 
36  See SPxPricer for a class documentation.
37 */
38 template <class R>
39 class SPxDantzigPR : public SPxPricer<R>
40 {
41 private:
42  int selectLeaveSparse();/**< sparse pricing method for leaving Simplex */
43 
44  SPxId
45  selectEnterX(); /**< choose the best entering index among columns and rows but prefer sparsity */
47  SPxId& id); /**< sparse pricing method for entering Simplex (slack variables)*/
49  SPxId& id); /**< sparse pricing method for entering Simplex */
50  SPxId selectEnterDenseDim(R& best,
51  SPxId& id); /**< selectEnter() in dense case (slack variables) */
53  SPxId& id); /**< selectEnter() in dense case */
54 public:
55 
56  //-------------------------------------
57  /**@name Constructors / destructors */
58  ///@{
59  /// default constructor
61  : SPxPricer<R>("Dantzig")
62  {}
63  /// copy constructor
65  : SPxPricer<R>(old)
66  {}
67  /// assignment operator
69  {
70  if(this != &rhs)
71  {
73  }
74 
75  return *this;
76  }
77  /// destructor
78  virtual ~SPxDantzigPR()
79  {}
80  /// clone function for polymorphism
81  inline virtual SPxPricer<R>* clone() const
82  {
83  return new SPxDantzigPR(*this);
84  }
85  ///@}
86 
87 
88  //-------------------------------------
89  /**@name Select enter/leave */
90  ///@{
91  ///
92  virtual int selectLeave();
93  ///
94  virtual SPxId selectEnter();
95  ///@}
96 };
97 } // namespace soplex
98 
99 // For general tempalted functions
100 #include "spxdantzigpr.hpp"
101 
102 #endif // _SPXDEFAULTPRR_H_
Abstract pricer base class.
SPxPricer & operator=(const SPxPricer &rhs)
assignment operator
Definition: spxpricer.h:281
virtual SPxId selectEnter()
SPxId selectEnterSparseDim(R &best, SPxId &id)
virtual int selectLeave()
Generic Ids for LP rows or columns.Both SPxColIds and SPxRowIds may be treated uniformly as SPxIds: ...
Definition: spxid.h:85
SPxId selectEnterDenseDim(R &best, SPxId &id)
SPxDantzigPR & operator=(const SPxDantzigPR &rhs)
assignment operator
Definition: spxdantzigpr.h:68
virtual SPxPricer< R > * clone() const
clone function for polymorphism
Definition: spxdantzigpr.h:81
virtual ~SPxDantzigPR()
destructor
Definition: spxdantzigpr.h:78
SPxDantzigPR()
default constructor
Definition: spxdantzigpr.h:60
Abstract pricer base class.Class SPxPricer is a pure virtual class defining the interface for pricer ...
Definition: spxpricer.h:47
Everything should be within this namespace.
Dantzig pricer.Class SPxDantzigPR is an implementation class of an SPxPricer implementing Dantzig&#39;s d...
Definition: spxdantzigpr.h:39
SPxId selectEnterDenseCoDim(R &best, SPxId &id)
SPxId selectEnterSparseCoDim(R &best, SPxId &id)
SPxDantzigPR(const SPxDantzigPR &old)
copy constructor
Definition: spxdantzigpr.h:64