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
ClpDualRowSteepest.hpp
Go to the documentation of this file.
1 /* $Id: ClpDualRowSteepest.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 ClpDualRowSteepest_H
7 #define ClpDualRowSteepest_H
8
9 #include "ClpDualRowPivot.hpp"
10 class CoinIndexedVector;
11
12 //#############################################################################
13
20 class ClpDualRowSteepest : public ClpDualRowPivot {
21
22 public:
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 void passInSavedWeights(const CoinIndexedVector *saved);
58 inline CoinIndexedVector *savedWeights()
59 {
60 return savedWeights_;
61 }
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
91 ClpDualRowSteepest(const ClpDualRowSteepest &);
92
94 ClpDualRowSteepest &operator=(const ClpDualRowSteepest &rhs);
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 {
111 return mode_;
112 }
114 inline void setMode(int mode)
115 {
116 mode_ = mode;
117 }
119 inline void setPersistence(Persistence life)
120 {
121 persistence_ = life;
122 }
123 inline Persistence persistence() const
124 {
125 return persistence_;
126 }
128
129 //---------------------------------------------------------------------------
130
131 protected:
133
138 int state_;
141 int mode_;
143 Persistence persistence_;
145 double *weights_;
147 CoinIndexedVector *infeasible_;
149 CoinIndexedVector *alternateWeights_;
151 CoinIndexedVector *savedWeights_;
153 int *dubiousWeights_;
155 };
156
157 #endif
158
159 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
160 */
ClpDualRowSteepest::keep
Definition: ClpDualRowSteepest.hpp:76
ClpDualRowSteepest::mode
int mode() const
Mode.
Definition: ClpDualRowSteepest.hpp:109
ClpDualRowSteepest::looksOptimal
virtual bool looksOptimal() const
Returns true if would not find any row.
ClpDualRowSteepest::Persistence
Persistence
enums for persistence
Definition: ClpDualRowSteepest.hpp:74
ClpDualRowSteepest::clone
virtual ClpDualRowPivot * clone(bool copyData=true) const
Clone.
ClpDualRowSteepest
Dual Row Pivot Steepest Edge Algorithm Class.
Definition: ClpDualRowSteepest.hpp:20
ClpDualRowSteepest::updatePrimalSolution
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...
ClpDualRowSteepest::state_
int state_
Status 0) Normal -1) Needs initialization 1) Weights are stored by sequence number.
Definition: ClpDualRowSteepest.hpp:138
ClpDualRowSteepest::setPersistence
void setPersistence(Persistence life)
Set/ get persistence.
Definition: ClpDualRowSteepest.hpp:119
ClpDualRowSteepest::clearArrays
virtual void clearArrays()
Gets rid of all arrays.
ClpDualRowSteepest::savedWeights
CoinIndexedVector * savedWeights()
Get saved weights.
Definition: ClpDualRowSteepest.hpp:58
ClpDualRowSteepest::infeasible_
CoinIndexedVector * infeasible_
square of infeasibility array (just for infeasible rows)
Definition: ClpDualRowSteepest.hpp:147
ClpDualRowSteepest::updateWeights
virtual double updateWeights(CoinIndexedVector *input, CoinIndexedVector *spare, CoinIndexedVector *spare2, CoinIndexedVector *updatedColumn)
Updates weights and returns pivot alpha.
ClpDualRowPivot.hpp
ClpDualRowSteepest::setMode
void setMode(int mode)
Set mode.
Definition: ClpDualRowSteepest.hpp:114
ClpDualRowSteepest::mode_
int mode_
If 0 then we are using uninitialized weights, 1 then full, if 2 then uninitialized partial...
Definition: ClpDualRowSteepest.hpp:141
ClpDualRowSteepest::maximumPivotsChanged
virtual void maximumPivotsChanged()
Called when maximum pivots changes.
ClpDualRowSteepest::persistence_
Persistence persistence_
Life of weights.
Definition: ClpDualRowSteepest.hpp:143
ClpDualRowSteepest::fill
void fill(const ClpDualRowSteepest &rhs)
Fill most values.
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
ClpDualRowSteepest::alternateWeights_
CoinIndexedVector * alternateWeights_
alternate weight array (so we can unroll)
Definition: ClpDualRowSteepest.hpp:149
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
ClpDualRowSteepest::unrollWeights
virtual void unrollWeights()
Gets rid of last update.
ClpDualRowSteepest::normal
Definition: ClpDualRowSteepest.hpp:75
ClpDualRowSteepest::pivotRow
virtual int pivotRow()
Returns pivot row, -1 if none.
ClpDualRowSteepest::saveWeights
virtual void saveWeights(ClpSimplex *model, int mode)
Saves any weights round factorization as pivot rows may change Save model May also recompute infeasib...
ClpDualRowSteepest::dubiousWeights_
int * dubiousWeights_
Dubious weights.
Definition: ClpDualRowSteepest.hpp:153
ClpDualRowSteepest::weights_
double * weights_
weight array
Definition: ClpDualRowSteepest.hpp:145
ClpDualRowSteepest::savedWeights_
CoinIndexedVector * savedWeights_
save weight array (so we can use checkpoint)
Definition: ClpDualRowSteepest.hpp:151
ClpDualRowSteepest::persistence
Persistence persistence() const
Definition: ClpDualRowSteepest.hpp:123
ClpDualRowPivot
Dual Row Pivot Abstract Base Class.
Definition: ClpDualRowPivot.hpp:22
ClpDualRowSteepest::operator=
ClpDualRowSteepest & operator=(const ClpDualRowSteepest &rhs)
Assignment operator.
ClpDualRowSteepest::~ClpDualRowSteepest
virtual ~ClpDualRowSteepest()
Destructor.
ClpDualRowPivot::model
ClpSimplex * model()
Returns model.
Definition: ClpDualRowPivot.hpp:100
ClpDualRowSteepest::passInSavedWeights
void passInSavedWeights(const CoinIndexedVector *saved)
Pass in saved weights.
ClpDualRowSteepest::ClpDualRowSteepest
ClpDualRowSteepest(int mode=3)
Default Constructor 0 is uninitialized, 1 full, 2 is partial uninitialized, 3 starts as 2 but may swi...