|
Clp
trunk
|
Primal Column Pivot Steepest Edge Algorithm Class. More...
#include <AbcPrimalColumnSteepest.hpp>
Inheritance diagram for AbcPrimalColumnSteepest:
Collaboration diagram for AbcPrimalColumnSteepest:Public Types | |
| enum | Persistence { normal = 0x00, keep = 0x01 } |
| enums for persistence More... | |
Public Member Functions | |
Algorithmic methods | |
| virtual int | pivotColumn (CoinPartitionedVector *updates, CoinPartitionedVector *spareRow2, CoinPartitionedVector *spareColumn1) |
| Returns pivot column, -1 if none. | |
| void | justDjs (CoinIndexedVector *updates, CoinIndexedVector *spareColumn1) |
| Just update djs. | |
| int | partialPricing (CoinIndexedVector *updates, int numberWanted, int numberLook) |
| Update djs doing partial pricing (dantzig) | |
| void | djsAndDevex (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1) |
| Update djs, weights for Devex using djs. | |
| void | djsAndDevex2 (CoinIndexedVector *updates, CoinIndexedVector *spareColumn1) |
| Update djs, weights for Devex using pivot row. | |
| void | justDevex (CoinIndexedVector *updates, CoinIndexedVector *spareColumn1) |
| Update weights for Devex. | |
| int | doSteepestWork (CoinPartitionedVector *updates, CoinPartitionedVector *spareRow2, CoinPartitionedVector *spareColumn1, int type) |
| Does steepest work type - 0 - just djs 1 - just steepest 2 - both using scaleFactor 3 - both using extra array. | |
| virtual void | updateWeights (CoinIndexedVector *input) |
| Updates weights - part 1 - also checks accuracy. | |
| void | checkAccuracy (int sequence, double relativeTolerance, CoinIndexedVector *rowArray1) |
| Checks accuracy - just for debug. | |
| void | initializeWeights () |
| Initialize weights. | |
| virtual void | saveWeights (AbcSimplex *model, int mode) |
| Save weights - this may initialize weights as well mode is - 1) before factorization 2) after factorization 3) just redo infeasibilities 4) restore weights 5) at end of values pass (so need initialization) | |
| virtual void | unrollWeights () |
| Gets rid of last update. | |
| virtual void | clearArrays () |
| Gets rid of all arrays. | |
| virtual bool | looksOptimal () const |
| Returns true if would not find any column. | |
| virtual void | maximumPivotsChanged () |
| Called when maximum pivots changes. | |
gets and sets | |
| int | mode () const |
| Mode. | |
Constructors and destructors | |
| AbcPrimalColumnSteepest (int mode=3) | |
| Default Constructor 0 is exact devex, 1 full steepest, 2 is partial exact devex 3 switches between 0 and 2 depending on factorization 4 starts as partial dantzig/devex but then may switch between 0 and 2. | |
| AbcPrimalColumnSteepest (const AbcPrimalColumnSteepest &rhs) | |
| Copy constructor. | |
| AbcPrimalColumnSteepest & | operator= (const AbcPrimalColumnSteepest &rhs) |
| Assignment operator. | |
| virtual | ~AbcPrimalColumnSteepest () |
| Destructor. | |
| virtual AbcPrimalColumnPivot * | clone (bool copyData=true) const |
| Clone. | |
Private functions to deal with devex | |
| bool | reference (int i) const |
| reference would be faster using AbcSimplex's status_, but I prefer to keep modularity. | |
| void | setReference (int i, bool trueFalse) |
| void | setPersistence (Persistence life) |
| Set/ get persistence. | |
| Persistence | persistence () const |
Primal Column Pivot Steepest Edge Algorithm Class.
See Forrest-Goldfarb paper for algorithm
Definition at line 23 of file AbcPrimalColumnSteepest.hpp.
enums for persistence
Definition at line 108 of file AbcPrimalColumnSteepest.hpp.
| AbcPrimalColumnSteepest::AbcPrimalColumnSteepest | ( | int | mode = 3 | ) |
Default Constructor 0 is exact devex, 1 full steepest, 2 is partial exact devex 3 switches between 0 and 2 depending on factorization 4 starts as partial dantzig/devex but then may switch between 0 and 2.
By partial exact devex is meant that the weights are updated as normal but only part of the nonbasic variables are scanned. This can be faster on very easy problems.
Copy constructor.
| virtual AbcPrimalColumnSteepest::~AbcPrimalColumnSteepest | ( | ) | [virtual] |
Destructor.
| virtual int AbcPrimalColumnSteepest::pivotColumn | ( | CoinPartitionedVector * | updates, |
| CoinPartitionedVector * | spareRow2, | ||
| CoinPartitionedVector * | spareColumn1 | ||
| ) | [virtual] |
Returns pivot column, -1 if none.
The Packed CoinIndexedVector updates has cost updates - for normal LP that is just +-weight where a feasibility changed. It also has reduced cost from last iteration in pivot row Parts of operation split out into separate functions for profiling and speed
Implements AbcPrimalColumnPivot.
| void AbcPrimalColumnSteepest::justDjs | ( | CoinIndexedVector * | updates, |
| CoinIndexedVector * | spareColumn1 | ||
| ) |
Just update djs.
| int AbcPrimalColumnSteepest::partialPricing | ( | CoinIndexedVector * | updates, |
| int | numberWanted, | ||
| int | numberLook | ||
| ) |
Update djs doing partial pricing (dantzig)
| void AbcPrimalColumnSteepest::djsAndDevex | ( | CoinIndexedVector * | updates, |
| CoinIndexedVector * | spareRow2, | ||
| CoinIndexedVector * | spareColumn1 | ||
| ) |
Update djs, weights for Devex using djs.
| void AbcPrimalColumnSteepest::djsAndDevex2 | ( | CoinIndexedVector * | updates, |
| CoinIndexedVector * | spareColumn1 | ||
| ) |
Update djs, weights for Devex using pivot row.
| void AbcPrimalColumnSteepest::justDevex | ( | CoinIndexedVector * | updates, |
| CoinIndexedVector * | spareColumn1 | ||
| ) |
Update weights for Devex.
| int AbcPrimalColumnSteepest::doSteepestWork | ( | CoinPartitionedVector * | updates, |
| CoinPartitionedVector * | spareRow2, | ||
| CoinPartitionedVector * | spareColumn1, | ||
| int | type | ||
| ) |
Does steepest work type - 0 - just djs 1 - just steepest 2 - both using scaleFactor 3 - both using extra array.
| virtual void AbcPrimalColumnSteepest::updateWeights | ( | CoinIndexedVector * | input | ) | [virtual] |
Updates weights - part 1 - also checks accuracy.
Reimplemented from AbcPrimalColumnPivot.
| void AbcPrimalColumnSteepest::checkAccuracy | ( | int | sequence, |
| double | relativeTolerance, | ||
| CoinIndexedVector * | rowArray1 | ||
| ) |
Checks accuracy - just for debug.
Initialize weights.
| virtual void AbcPrimalColumnSteepest::saveWeights | ( | AbcSimplex * | model, |
| int | mode | ||
| ) | [virtual] |
Save weights - this may initialize weights as well mode is - 1) before factorization 2) after factorization 3) just redo infeasibilities 4) restore weights 5) at end of values pass (so need initialization)
Implements AbcPrimalColumnPivot.
| virtual void AbcPrimalColumnSteepest::unrollWeights | ( | ) | [virtual] |
Gets rid of last update.
| virtual void AbcPrimalColumnSteepest::clearArrays | ( | ) | [virtual] |
Gets rid of all arrays.
Reimplemented from AbcPrimalColumnPivot.
| virtual bool AbcPrimalColumnSteepest::looksOptimal | ( | ) | const [virtual] |
Returns true if would not find any column.
Reimplemented from AbcPrimalColumnPivot.
| virtual void AbcPrimalColumnSteepest::maximumPivotsChanged | ( | ) | [virtual] |
Called when maximum pivots changes.
Reimplemented from AbcPrimalColumnPivot.
| int AbcPrimalColumnSteepest::mode | ( | ) | const [inline] |
Mode.
Definition at line 101 of file AbcPrimalColumnSteepest.hpp.
| AbcPrimalColumnSteepest& AbcPrimalColumnSteepest::operator= | ( | const AbcPrimalColumnSteepest & | rhs | ) |
Assignment operator.
| virtual AbcPrimalColumnPivot* AbcPrimalColumnSteepest::clone | ( | bool | copyData = true | ) | const [virtual] |
Clone.
Implements AbcPrimalColumnPivot.
| bool AbcPrimalColumnSteepest::reference | ( | int | i | ) | const [inline] |
reference would be faster using AbcSimplex's status_, but I prefer to keep modularity.
Definition at line 143 of file AbcPrimalColumnSteepest.hpp.
| void AbcPrimalColumnSteepest::setReference | ( | int | i, |
| bool | trueFalse | ||
| ) | [inline] |
Definition at line 146 of file AbcPrimalColumnSteepest.hpp.
| void AbcPrimalColumnSteepest::setPersistence | ( | Persistence | life | ) | [inline] |
Set/ get persistence.
Definition at line 155 of file AbcPrimalColumnSteepest.hpp.
| Persistence AbcPrimalColumnSteepest::persistence | ( | ) | const [inline] |
Definition at line 158 of file AbcPrimalColumnSteepest.hpp.
1.7.6.1