Clp  1.15.10
ClpDualRowSteepest.hpp
Go to the documentation of this file.
1 /* $Id: ClpDualRowSteepest.hpp 1665 2011-01-04 17:55:54Z lou $ */
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 ClpDualRowSteepest_H
7 #define ClpDualRowSteepest_H
8 
9 #include "ClpDualRowPivot.hpp"
10 class CoinIndexedVector;
11 
12 
13 //#############################################################################
14 
22 
23 public:
24 
26 
27 
29  virtual int pivotRow();
30 
33  virtual double updateWeights(CoinIndexedVector * input,
34  CoinIndexedVector * spare,
35  CoinIndexedVector * spare2,
36  CoinIndexedVector * updatedColumn);
37 
42  virtual void updatePrimalSolution(CoinIndexedVector * input,
43  double theta,
44  double & changeInObjective);
45 
56  virtual void saveWeights(ClpSimplex * model, int mode);
58  virtual void unrollWeights();
60  virtual void clearArrays();
62  virtual bool looksOptimal() const;
64  virtual void maximumPivotsChanged();
66 
69  enum Persistence {
70  normal = 0x00, // create (if necessary) and destroy
71  keep = 0x01 // create (if necessary) and leave
72  };
73 
75 
76 
83  ClpDualRowSteepest(int mode = 3);
84 
87 
90 
92  void fill(const ClpDualRowSteepest& rhs);
93 
95  virtual ~ClpDualRowSteepest ();
96 
98  virtual ClpDualRowPivot * clone(bool copyData = true) const;
99 
101 
103  inline int mode() const {
105  return mode_;
106  }
108  inline void setPersistence(Persistence life) {
109  persistence_ = life;
110  }
111  inline Persistence persistence() const {
112  return persistence_ ;
113  }
115 
116  //---------------------------------------------------------------------------
117 
118 private:
120 
125  int state_;
128  int mode_;
130  Persistence persistence_;
132  double * weights_;
134  CoinIndexedVector * infeasible_;
136  CoinIndexedVector * alternateWeights_;
138  CoinIndexedVector * savedWeights_;
140  int * dubiousWeights_;
142 };
143 
144 #endif
Persistence
enums for persistence
Dual Row Pivot Steepest Edge Algorithm Class.
virtual void updatePrimalSolution(CoinIndexedVector *input, double theta, double &changeInObjective)
Updates primal solution (and maybe list of candidates) Uses input vector which it deletes Computes ch...
void setPersistence(Persistence life)
Set/ get persistence.
virtual void clearArrays()
Gets rid of all arrays.
virtual double updateWeights(CoinIndexedVector *input, CoinIndexedVector *spare, CoinIndexedVector *spare2, CoinIndexedVector *updatedColumn)
Updates weights and returns pivot alpha.
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
void fill(const ClpDualRowSteepest &rhs)
Fill most values.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:55
virtual void unrollWeights()
Gets rid of last update.
Persistence persistence() const
int mode() const
Mode.
virtual int pivotRow()
Returns pivot row, -1 if none.
virtual void saveWeights(ClpSimplex *model, int mode)
Saves any weights round factorization as pivot rows may change Save model May also recompute infeasib...
virtual ClpDualRowPivot * clone(bool copyData=true) const
Clone.
virtual bool looksOptimal() const
Returns true if would not find any row.
Dual Row Pivot Abstract Base Class.
ClpDualRowSteepest & operator=(const ClpDualRowSteepest &rhs)
Assignment operator.
virtual ~ClpDualRowSteepest()
Destructor.
ClpSimplex * model()
Returns model.
ClpDualRowSteepest(int mode=3)
Default Constructor 0 is uninitialized, 1 full, 2 is partial uninitialized, 3 starts as 2 but may swi...