ClpDualRowSteepest.hpp
Go to the documentation of this file.
1 /* $Id: ClpDualRowSteepest.hpp 2070 2014-11-18 11:12:54Z 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 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  void passInSavedWeights(const CoinIndexedVector * saved);
61  { return savedWeights_;}
63  virtual void unrollWeights();
65  virtual void clearArrays();
67  virtual bool looksOptimal() const;
69  virtual void maximumPivotsChanged();
71 
74  enum Persistence {
75  normal = 0x00, // create (if necessary) and destroy
76  keep = 0x01 // create (if necessary) and leave
77  };
78 
80 
81 
88  ClpDualRowSteepest(int mode = 3);
89 
92 
95 
97  void fill(const ClpDualRowSteepest& rhs);
98 
100  virtual ~ClpDualRowSteepest ();
101 
103  virtual ClpDualRowPivot * clone(bool copyData = true) const;
104 
106 
108  inline int mode() const {
110  return mode_;
111  }
113  inline void setMode(int mode) {
114  mode_ = mode;
115  }
117  inline void setPersistence(Persistence life) {
118  persistence_ = life;
119  }
120  inline Persistence persistence() const {
121  return persistence_ ;
122  }
124 
125  //---------------------------------------------------------------------------
126 
127 private:
129 
134  int state_;
137  int mode_;
141  double * weights_;
151 };
152 
153 #endif
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...
Dual Row Pivot Abstract Base Class.
virtual double updateWeights(CoinIndexedVector *input, CoinIndexedVector *spare, CoinIndexedVector *spare2, CoinIndexedVector *updatedColumn)
Updates weights and returns pivot alpha.
ClpDualRowSteepest & operator=(const ClpDualRowSteepest &rhs)
Assignment operator.
double * weights_
weight array
int mode_
If 0 then we are using uninitialized weights, 1 then full, if 2 then uninitialized partial...
virtual bool looksOptimal() const
Returns true if would not find any row.
virtual ~ClpDualRowSteepest()
Destructor.
int mode() const
Mode.
Persistence persistence_
Life of weights.
CoinIndexedVector * savedWeights()
Get saved weights.
CoinIndexedVector * savedWeights_
save weight array (so we can use checkpoint)
Persistence
enums for persistence
CoinIndexedVector * infeasible_
square of infeasibility array (just for infeasible rows)
virtual void clearArrays()
Gets rid of all arrays.
Dual Row Pivot Steepest Edge Algorithm Class.
ClpSimplex * model()
Returns model.
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
int state_
Status 0) Normal -1) Needs initialization 1) Weights are stored by sequence number.
virtual void saveWeights(ClpSimplex *model, int mode)
Saves any weights round factorization as pivot rows may change Save model May also recompute infeasib...
void setMode(int mode)
Set mode.
Indexed Vector.
void passInSavedWeights(const CoinIndexedVector *saved)
Pass in saved weights.
virtual int pivotRow()
Returns pivot row, -1 if none.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
CoinIndexedVector * alternateWeights_
alternate weight array (so we can unroll)
virtual void unrollWeights()
Gets rid of last update.
virtual ClpDualRowPivot * clone(bool copyData=true) const
Clone.
ClpDualRowSteepest(int mode=3)
Default Constructor 0 is uninitialized, 1 full, 2 is partial uninitialized, 3 starts as 2 but may swi...
void setPersistence(Persistence life)
Set/ get persistence.
void fill(const ClpDualRowSteepest &rhs)
Fill most values.
Persistence persistence() const
Mode.
int * dubiousWeights_
Dubious weights.