coin-Bcp
ClpDualRowPivot.hpp
Go to the documentation of this file.
1 /* $Id: ClpDualRowPivot.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef ClpDualRowPivot_H
7 #define ClpDualRowPivot_H
8 
9 class ClpSimplex;
10 class CoinIndexedVector;
11 
12 //#############################################################################
13 
23 
24 public:
26 
27 
29  virtual int pivotRow() = 0;
30 
33  virtual double updateWeights(CoinIndexedVector *input,
34  CoinIndexedVector *spare,
35  CoinIndexedVector *spare2,
36  CoinIndexedVector *updatedColumn)
37  = 0;
38 
45  /* FIXME: this was pure virtul (=0). Why? */
46  virtual void updatePrimalSolution(CoinIndexedVector *input,
47  double theta,
48  double &changeInObjective)
49  = 0;
62  virtual void saveWeights(ClpSimplex *model, int mode);
64  virtual void checkAccuracy();
66  virtual void unrollWeights();
68  virtual void clearArrays();
70  virtual bool looksOptimal() const
71  {
72  return false;
73  }
75  virtual void maximumPivotsChanged() {}
77 
79 
82 
85 
88 
90  virtual ~ClpDualRowPivot();
91 
93  virtual ClpDualRowPivot *clone(bool copyData = true) const = 0;
94 
96 
98 
99  inline ClpSimplex *model()
101  {
102  return model_;
103  }
104 
106  inline void setModel(ClpSimplex *newmodel)
107  {
108  model_ = newmodel;
109  }
110 
112  inline int type()
113  {
114  return type_;
115  }
116 
118 
119  //---------------------------------------------------------------------------
120 
121 protected:
123 
127  int type_;
129 };
130 #ifndef CLP_DUAL_COLUMN_MULTIPLIER
131 //#define CLP_DUAL_COLUMN_MULTIPLIER 0.99999
132 #endif
133 #endif
134 
135 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
136 */
Dual Row Pivot Abstract Base Class.
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
virtual ~ClpDualRowPivot()
Destructor.
void setModel(ClpSimplex *newmodel)
Sets model (normally to NULL)
virtual void checkAccuracy()
checks accuracy and may re-initialize (may be empty)
ClpDualRowPivot()
Default Constructor.
virtual double updateWeights(CoinIndexedVector *input, CoinIndexedVector *spare, CoinIndexedVector *spare2, CoinIndexedVector *updatedColumn)=0
Updates weights and returns pivot alpha.
ClpSimplex * model()
Returns model.
int type_
Type of row pivot algorithm.
Indexed Vector.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
virtual bool looksOptimal() const
Returns true if would not find any row.
virtual void unrollWeights()
Gets rid of last update (may be empty)
virtual void updatePrimalSolution(CoinIndexedVector *input, double theta, double &changeInObjective)=0
Updates primal solution (and maybe list of candidates) Uses input vector which it deletes Computes ch...
virtual void clearArrays()
Gets rid of all arrays (may be empty)
ClpSimplex * model_
Pointer to model.
virtual void saveWeights(ClpSimplex *model, int mode)
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
ClpDualRowPivot & operator=(const ClpDualRowPivot &rhs)
Assignment operator.
virtual int pivotRow()=0
Returns pivot row, -1 if none.
virtual ClpDualRowPivot * clone(bool copyData=true) const =0
Clone.
int type()
Returns type (above 63 is extra information)