ClpDualRowSteepest.hpp
Go to the documentation of this file.
1 /* $Id: ClpDualRowSteepest.hpp 1525 2010-02-26 17:27:59Z mjs $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef ClpDualRowSteepest_H
5 #define ClpDualRowSteepest_H
6 
7 #include "ClpDualRowPivot.hpp"
8 class CoinIndexedVector;
9 
10 
11 //#############################################################################
12 
20 
21 public:
22 
24 
25 
27  virtual int pivotRow();
28 
31  virtual double updateWeights(CoinIndexedVector * input,
32  CoinIndexedVector * spare,
33  CoinIndexedVector * spare2,
34  CoinIndexedVector * updatedColumn);
35 
40  virtual void updatePrimalSolution(CoinIndexedVector * input,
41  double theta,
42  double & changeInObjective);
43 
54  virtual void saveWeights(ClpSimplex * model, int mode);
56  virtual void unrollWeights();
58  virtual void clearArrays();
60  virtual bool looksOptimal() const;
62  virtual void maximumPivotsChanged();
64 
67  enum Persistence {
68  normal = 0x00, // create (if necessary) and destroy
69  keep = 0x01 // create (if necessary) and leave
70  };
71 
73 
74 
81  ClpDualRowSteepest(int mode = 3);
82 
85 
88 
90  void fill(const ClpDualRowSteepest& rhs);
91 
93  virtual ~ClpDualRowSteepest ();
94 
96  virtual ClpDualRowPivot * clone(bool copyData = true) const;
97 
99 
101  inline int mode() const {
103  return mode_;
104  }
106  inline void setPersistence(Persistence life) {
107  persistence_ = life;
108  }
109  inline Persistence persistence() const {
110  return persistence_ ;
111  }
113 
114  //---------------------------------------------------------------------------
115 
116 private:
118 
123  int state_;
126  int mode_;
130  double * weights_;
132  CoinIndexedVector * infeasible_;
134  CoinIndexedVector * alternateWeights_;
136  CoinIndexedVector * savedWeights_;
140 };
141 
142 #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_
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...
virtual int pivotRow()
Returns pivot row, -1 if none.
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:49
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.