Clp  1.17.8
AbcPrimalColumnPivot.hpp
Go to the documentation of this file.
1 /* $Id$ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others, Copyright (C) 2012, FasterCoin. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef AbcPrimalColumnPivot_H
7 #define AbcPrimalColumnPivot_H
8 #include "AbcCommon.hpp"
9 
10 class AbcSimplex;
11 class CoinIndexedVector;
12 
13 //#############################################################################
14 
27 
28 public:
30 
31 
50  virtual int pivotColumn(CoinPartitionedVector *updates,
51  CoinPartitionedVector *spareRow2,
52  CoinPartitionedVector *spareColumn1)
53  = 0;
54 
56  virtual void updateWeights(CoinIndexedVector *input);
57 
69  virtual void saveWeights(AbcSimplex *model, int mode) = 0;
75  virtual int pivotRow(double &way)
76  {
77  way = 0;
78  return -2;
79  }
81  virtual void clearArrays();
83  virtual bool looksOptimal() const
84  {
85  return looksOptimal_;
86  }
88  virtual void setLooksOptimal(bool flag)
89  {
90  looksOptimal_ = flag;
91  }
93 
95 
98 
101 
104 
106  virtual ~AbcPrimalColumnPivot();
107 
109  virtual AbcPrimalColumnPivot *clone(bool copyData = true) const = 0;
110 
112 
114 
115  inline AbcSimplex *model()
117  {
118  return model_;
119  }
121  inline void setModel(AbcSimplex *newmodel)
122  {
123  model_ = newmodel;
124  }
125 
127  inline int type()
128  {
129  return type_;
130  }
131 
135  virtual int numberSprintColumns(int &numberIterations) const;
137  virtual void switchOffSprint();
139  virtual void maximumPivotsChanged() {}
140 
142 
143  //---------------------------------------------------------------------------
144 
145 protected:
147 
151  int type_;
155 };
156 #ifndef CLP_PRIMAL_SLACK_MULTIPLIER
157 #define CLP_PRIMAL_SLACK_MULTIPLIER 1.01
158 #endif
159 #endif
160 
161 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
162 */
AbcPrimalColumnPivot::saveWeights
virtual void saveWeights(AbcSimplex *model, int mode)=0
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
AbcPrimalColumnPivot::pivotRow
virtual int pivotRow(double &way)
Signals pivot row choice: -2 (default) - use normal pivot row choice -1 to numberRows-1 - use this (w...
Definition: AbcPrimalColumnPivot.hpp:75
AbcPrimalColumnPivot::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty)
AbcPrimalColumnPivot::AbcPrimalColumnPivot
AbcPrimalColumnPivot()
Default Constructor.
AbcPrimalColumnPivot::switchOffSprint
virtual void switchOffSprint()
Switch off sprint idea.
AbcPrimalColumnPivot::looksOptimal_
bool looksOptimal_
Says if looks optimal (normally computed)
Definition: AbcPrimalColumnPivot.hpp:153
AbcCommon.hpp
AbcPrimalColumnPivot::numberSprintColumns
virtual int numberSprintColumns(int &numberIterations) const
Returns number of extra columns for sprint algorithm - 0 means off.
AbcPrimalColumnPivot::~AbcPrimalColumnPivot
virtual ~AbcPrimalColumnPivot()
Destructor.
AbcPrimalColumnPivot::model
AbcSimplex * model()
Returns model.
Definition: AbcPrimalColumnPivot.hpp:116
AbcPrimalColumnPivot::updateWeights
virtual void updateWeights(CoinIndexedVector *input)
Updates weights - part 1 (may be empty)
AbcPrimalColumnPivot::operator=
AbcPrimalColumnPivot & operator=(const AbcPrimalColumnPivot &rhs)
Assignment operator.
AbcSimplex
Definition: AbcSimplex.hpp:62
AbcPrimalColumnPivot::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
Definition: AbcPrimalColumnPivot.hpp:139
AbcPrimalColumnPivot::type_
int type_
Type of column pivot algorithm.
Definition: AbcPrimalColumnPivot.hpp:151
AbcPrimalColumnPivot::model_
AbcSimplex * model_
Pointer to model.
Definition: AbcPrimalColumnPivot.hpp:149
AbcPrimalColumnPivot::type
int type()
Returns type (above 63 is extra information)
Definition: AbcPrimalColumnPivot.hpp:127
AbcPrimalColumnPivot::pivotColumn
virtual int pivotColumn(CoinPartitionedVector *updates, CoinPartitionedVector *spareRow2, CoinPartitionedVector *spareColumn1)=0
Returns pivot column, -1 if none.
AbcPrimalColumnPivot::setLooksOptimal
virtual void setLooksOptimal(bool flag)
Sets optimality flag (for advanced use)
Definition: AbcPrimalColumnPivot.hpp:88
AbcPrimalColumnPivot::clone
virtual AbcPrimalColumnPivot * clone(bool copyData=true) const =0
Clone.
AbcPrimalColumnPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any column.
Definition: AbcPrimalColumnPivot.hpp:83
AbcPrimalColumnPivot::setModel
void setModel(AbcSimplex *newmodel)
Sets model.
Definition: AbcPrimalColumnPivot.hpp:121
AbcPrimalColumnPivot
Primal Column Pivot Abstract Base Class.
Definition: AbcPrimalColumnPivot.hpp:26