Scippy

SoPlex

Sequential object-oriented simPlex

spxgeometsc.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 spxgeometsc.h
17  * @brief LP geometric mean scaling.
18  */
19 #ifndef _SPXGEOMETSC_H_
20 #define _SPXGEOMETSC_H_
21 
22 #include <assert.h>
23 
24 #include "soplex/spxdefines.h"
25 #include "soplex/spxscaler.h"
26 
27 namespace soplex
28 {
29 /**@brief Geometric mean row/column scaling.
30  @ingroup Algo
31 
32  This SPxScaler implementation performs geometric mean scaling of the
33  LPs rows and columns.
34 */
35 template <class R>
36 class SPxGeometSC : public SPxScaler<R>
37 {
38 protected:
39 
40  //-------------------------------------
41  /**@name Data */
42  ///@{
43  const bool postequilibration; ///< equilibrate after geometric scaling?
44  const int m_maxIterations; ///< maximum number of scaling iterations.
45  const R m_minImprovement; ///< improvement necessary to carry on. (Bixby said Fourer said in MP 23, 274 ff. that 0.9 is a good value)
46  const R m_goodEnoughRatio; ///< no scaling needed if ratio is less than this.
47  ///@}
48 
49 public:
50 
51  //-------------------------------------
52  /**@name Construction / destruction */
53  ///@{
54  /// default constructor (this scaler makes no use of inherited members m_colFirst and m_doBoth)
55  explicit SPxGeometSC(bool equilibrate = false, int maxIters = 8, R minImpr = 0.85,
56  R goodEnough = 1e3);
57  /// copy constructor
58  SPxGeometSC(const SPxGeometSC& old);
59  /// assignment operator
61  /// destructor
62  virtual ~SPxGeometSC()
63  {}
64  /// clone function for polymorphism
65  inline virtual SPxScaler<R>* clone() const override
66  {
67  return new SPxGeometSC(*this);
68  }
69  ///@}
70 
71  //-------------------------------------
72  /**@name Scaling */
73  ///@{
74  /// Scale the loaded SPxLPBase<R>.
75  virtual void scale(SPxLPBase<R>& lp, bool persistent = true) override;
76  ///@}
77 
78 };
79 } // namespace soplex
80 
81 #include "spxgeometsc.hpp"
82 
83 #endif // _SPXGEOMETSC_H_
const R m_goodEnoughRatio
no scaling needed if ratio is less than this.
Definition: spxgeometsc.h:46
const int m_maxIterations
maximum number of scaling iterations.
Definition: spxgeometsc.h:44
Geometric mean row/column scaling.This SPxScaler implementation performs geometric mean scaling of th...
Definition: spxgeometsc.h:36
virtual SPxScaler< R > * clone() const override
clone function for polymorphism
Definition: spxgeometsc.h:65
const R m_minImprovement
improvement necessary to carry on. (Bixby said Fourer said in MP 23, 274 ff. that 0...
Definition: spxgeometsc.h:45
SPxGeometSC(bool equilibrate=false, int maxIters=8, R minImpr=0.85, R goodEnough=1e3)
default constructor (this scaler makes no use of inherited members m_colFirst and m_doBoth) ...
Debugging, floating point type and parameter definitions.
virtual void scale(SPxLPBase< R > &lp, bool persistent=true) override
Scale the loaded SPxLPBase<R>.
Everything should be within this namespace.
SPxGeometSC & operator=(const SPxGeometSC &)
assignment operator
Saving LPs in a form suitable for SoPlex.Class SPxLPBase provides the data structures required for sa...
Definition: spxlpbase.h:56
LP scaling base class.
LP scaler abstract base class.Instances of classes derived from SPxScaler may be loaded to SoPlex in ...
Definition: spxscaler.h:77
const bool postequilibration
equilibrate after geometric scaling?
Definition: spxgeometsc.h:43
virtual ~SPxGeometSC()
destructor
Definition: spxgeometsc.h:62