Cgl 0.60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClpPrimalColumnPivot.hpp
Go to the documentation of this file.
1 /* $Id: ClpPrimalColumnPivot.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
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 ClpPrimalcolumnPivot_H
7 #define ClpPrimalcolumnPivot_H
8
9 class ClpSimplex;
10 class CoinIndexedVector;
11
12 //#############################################################################
13
25 class ClpPrimalColumnPivot {
26
27 public:
29
30
49 virtual int pivotColumn(CoinIndexedVector *updates,
50 CoinIndexedVector *spareRow1,
51 CoinIndexedVector *spareRow2,
52 CoinIndexedVector *spareColumn1,
53 CoinIndexedVector *spareColumn2)
54 = 0;
55
57 virtual void updateWeights(CoinIndexedVector *input);
58
70 virtual void saveWeights(ClpSimplex *model, int mode) = 0;
76 virtual int pivotRow(double &way)
77 {
78 way = 0;
79 return -2;
80 }
82 virtual void clearArrays();
84 virtual bool looksOptimal() const
85 {
86 return looksOptimal_;
87 }
89 virtual void setLooksOptimal(bool flag)
90 {
91 looksOptimal_ = flag;
92 }
94
96
97 ClpPrimalColumnPivot();
99
101 ClpPrimalColumnPivot(const ClpPrimalColumnPivot &);
102
104 ClpPrimalColumnPivot &operator=(const ClpPrimalColumnPivot &rhs);
105
107 virtual ~ClpPrimalColumnPivot();
108
110 virtual ClpPrimalColumnPivot *clone(bool copyData = true) const = 0;
111
113
115
116 inline ClpSimplex *model()
118 {
119 return model_;
120 }
122 inline void setModel(ClpSimplex *newmodel)
123 {
124 model_ = newmodel;
125 }
126
128 inline int type()
129 {
130 return type_;
131 }
132
136 virtual int numberSprintColumns(int &numberIterations) const;
138 virtual void switchOffSprint();
140 virtual void maximumPivotsChanged() {}
141
143
144 //---------------------------------------------------------------------------
145
146 protected:
148
149 ClpSimplex *model_;
152 int type_;
154 bool looksOptimal_;
156 };
157 #ifndef CLP_PRIMAL_SLACK_MULTIPLIER
158 #define CLP_PRIMAL_SLACK_MULTIPLIER 1.01
159 #endif
160 #endif
161
162 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
163 */
ClpPrimalColumnPivot::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
Definition: ClpPrimalColumnPivot.hpp:140
ClpPrimalColumnPivot::model_
ClpSimplex * model_
Pointer to model.
Definition: ClpPrimalColumnPivot.hpp:150
ClpPrimalColumnPivot
Primal Column Pivot Abstract Base Class.
Definition: ClpPrimalColumnPivot.hpp:25
ClpPrimalColumnPivot::saveWeights
virtual void saveWeights(ClpSimplex *model, int mode)=0
Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (wi...
ClpPrimalColumnPivot::clearArrays
virtual void clearArrays()
Gets rid of all arrays (may be empty)
ClpPrimalColumnPivot::looksOptimal_
bool looksOptimal_
Says if looks optimal (normally computed)
Definition: ClpPrimalColumnPivot.hpp:154
ClpPrimalColumnPivot::switchOffSprint
virtual void switchOffSprint()
Switch off sprint idea.
ClpPrimalColumnPivot::operator=
ClpPrimalColumnPivot & operator=(const ClpPrimalColumnPivot &rhs)
Assignment operator.
ClpPrimalColumnPivot::updateWeights
virtual void updateWeights(CoinIndexedVector *input)
Updates weights - part 1 (may be empty)
ClpPrimalColumnPivot::clone
virtual ClpPrimalColumnPivot * clone(bool copyData=true) const =0
Clone.
ClpPrimalColumnPivot::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: ClpPrimalColumnPivot.hpp:76
ClpPrimalColumnPivot::type
int type()
Returns type (above 63 is extra information)
Definition: ClpPrimalColumnPivot.hpp:128
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
ClpPrimalColumnPivot::pivotColumn
virtual int pivotColumn(CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)=0
Returns pivot column, -1 if none.
ClpPrimalColumnPivot::setLooksOptimal
virtual void setLooksOptimal(bool flag)
Sets optimality flag (for advanced use)
Definition: ClpPrimalColumnPivot.hpp:89
ClpPrimalColumnPivot::ClpPrimalColumnPivot
ClpPrimalColumnPivot()
Default Constructor.
ClpPrimalColumnPivot::numberSprintColumns
virtual int numberSprintColumns(int &numberIterations) const
Returns number of extra columns for sprint algorithm - 0 means off.
ClpPrimalColumnPivot::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any column.
Definition: ClpPrimalColumnPivot.hpp:84
ClpPrimalColumnPivot::model
ClpSimplex * model()
Returns model.
Definition: ClpPrimalColumnPivot.hpp:117
ClpPrimalColumnPivot::~ClpPrimalColumnPivot
virtual ~ClpPrimalColumnPivot()
Destructor.
ClpPrimalColumnPivot::type_
int type_
Type of column pivot algorithm.
Definition: ClpPrimalColumnPivot.hpp:152
ClpPrimalColumnPivot::setModel
void setModel(ClpSimplex *newmodel)
Sets model.
Definition: ClpPrimalColumnPivot.hpp:122