Clp  1.15.10
ClpDualRowPivot.hpp
Go to the documentation of this file.
1 /* $Id: ClpDualRowPivot.hpp 1732 2011-05-31 08:09:41Z forrest $ */
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:
25 
27 
28 
30  virtual int pivotRow() = 0;
31 
34  virtual double updateWeights(CoinIndexedVector * input,
35  CoinIndexedVector * spare,
36  CoinIndexedVector * spare2,
37  CoinIndexedVector * updatedColumn) = 0;
38 
45  /* FIXME: this was pure virtul (=0). Why? */
46  virtual void updatePrimalSolution(CoinIndexedVector * input,
47  double theta,
48  double & changeInObjective) = 0;
59  virtual void saveWeights(ClpSimplex * model, int mode);
61  virtual void checkAccuracy();
63  virtual void unrollWeights();
65  virtual void clearArrays();
67  virtual bool looksOptimal() const {
68  return false;
69  }
71  virtual void maximumPivotsChanged() {}
73 
74 
76 
79 
82 
85 
87  virtual ~ClpDualRowPivot ();
88 
90  virtual ClpDualRowPivot * clone(bool copyData = true) const = 0;
91 
93 
95 
96  inline ClpSimplex * model() {
98  return model_;
99  }
100 
102  inline void setModel(ClpSimplex * newmodel) {
103  model_ = newmodel;
104  }
105 
107  inline int type() {
108  return type_;
109  }
110 
112 
113  //---------------------------------------------------------------------------
114 
115 protected:
117 
118  ClpSimplex * model_;
121  int type_;
123 };
124 #ifndef CLP_DUAL_COLUMN_MULTIPLIER
125 //#define CLP_DUAL_COLUMN_MULTIPLIER 0.99999
126 #endif
127 #endif
virtual ClpDualRowPivot * clone(bool copyData=true) const =0
Clone.
virtual double updateWeights(CoinIndexedVector *input, CoinIndexedVector *spare, CoinIndexedVector *spare2, CoinIndexedVector *updatedColumn)=0
Updates weights and returns pivot alpha.
void setModel(ClpSimplex *newmodel)
Sets model (normally to NULL)
ClpSimplex * model_
Pointer to model.
ClpDualRowPivot()
Default Constructor.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:55
virtual bool looksOptimal() const
Returns true if would not find any row.
virtual void clearArrays()
Gets rid of all arrays (may be empty)
virtual void saveWeights(ClpSimplex *model, int mode)
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
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 checkAccuracy()
checks accuracy and may re-initialize (may be empty)
virtual ~ClpDualRowPivot()
Destructor.
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
int type()
Returns type (above 63 is extra information)
int type_
Type of row pivot algorithm.
Dual Row Pivot Abstract Base Class.
virtual void unrollWeights()
Gets rid of last update (may be empty)
ClpDualRowPivot & operator=(const ClpDualRowPivot &rhs)
Assignment operator.
virtual int pivotRow()=0
Returns pivot row, -1 if none.
ClpSimplex * model()
Returns model.