Loading...
Searching...
No Matches
AbcPrimalColumnPivot Class Referenceabstract

Primal Column Pivot Abstract Base Class. More...

`#include <AbcPrimalColumnPivot.hpp>`

Inheritance diagram for AbcPrimalColumnPivot:
[legend]
Collaboration diagram for AbcPrimalColumnPivot:
[legend]

## Public Member Functions

Algorithmic methods
virtual int | pivotColumn (CoinPartitionedVector *updates, CoinPartitionedVector *spareRow2, CoinPartitionedVector *spareColumn1)=0
| Returns pivot column, -1 if none.
virtual void | updateWeights (CoinIndexedVector *input)
| Updates weights - part 1 (may be empty).
virtual void | saveWeights (AbcSimplex *model, int mode)=0
| Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (will save model) May also recompute infeasibility stuff 1) before factorization 2) after good factorization (if weights empty may initialize) 3) after something happened but no factorization (e.g.
virtual int | pivotRow (double &way)
| Signals pivot row choice: -2 (default) - use normal pivot row choice -1 to numberRows-1 - use this (will be checked) way should be -1 to go to lower bound, +1 to upper bound.
virtual void | clearArrays ()
| Gets rid of all arrays (may be empty).
virtual bool | looksOptimal () const
| Returns true if would not find any column.
virtual void | setLooksOptimal (bool flag)
| Sets optimality flag (for advanced use).
Constructors and destructors
| AbcPrimalColumnPivot ()
| Default Constructor.
| AbcPrimalColumnPivot (const AbcPrimalColumnPivot &)
| Copy constructor.
AbcPrimalColumnPivot & | operator= (const AbcPrimalColumnPivot &rhs)
| Assignment operator.
virtual | ~AbcPrimalColumnPivot ()
| Destructor.
virtual AbcPrimalColumnPivot * | clone (bool copyData=true) const =0
| Clone.
Other
AbcSimplex * | model ()
| Returns model.
void | setModel (AbcSimplex *newmodel)
| Sets model.
int | type ()
| Returns type (above 63 is extra information).
virtual int | numberSprintColumns (int &numberIterations) const
| Returns number of extra columns for sprint algorithm - 0 means off.
virtual void | switchOffSprint ()
| Switch off sprint idea.
virtual void | maximumPivotsChanged ()
| Called when maximum pivots changes.

## Protected Attributes

Protected member data
AbcSimplex * | model_
| Pointer to model.
int | type_
| Type of column pivot algorithm.
bool | looksOptimal_
| Says if looks optimal (normally computed).

## Detailed Description

Primal Column Pivot Abstract Base Class.

Abstract Base Class for describing an interface to an algorithm to choose column pivot in primal simplex algorithm. For some algorithms e.g. Dantzig choice then some functions may be null. For Dantzig the only one of any importance is pivotColumn.

If you wish to inherit from this look at AbcPrimalColumnDantzig.cpp as that is simplest version.

Definition at line 26 of file AbcPrimalColumnPivot.hpp.

## Constructor & Destructor Documentation

## AbcPrimalColumnPivot() [1/2]

AbcPrimalColumnPivot::AbcPrimalColumnPivot | ( |  | ) |

Default Constructor.

## AbcPrimalColumnPivot() [2/2]

AbcPrimalColumnPivot::AbcPrimalColumnPivot | ( | const AbcPrimalColumnPivot & |  | ) |

Copy constructor.

## ~AbcPrimalColumnPivot()

virtual AbcPrimalColumnPivot::~AbcPrimalColumnPivot | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## pivotColumn()

virtual int AbcPrimalColumnPivot::pivotColumn | ( | CoinPartitionedVector * | updates,
|  | CoinPartitionedVector * | spareRow2,
|  | CoinPartitionedVector * | spareColumn1 )

pure virtual

Returns pivot column, -1 if none.

Normally updates reduced costs using result of last iteration before selecting incoming column.

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

Inside pivotColumn the pivotRow_ and reduced cost from last iteration are also used.

So in the simplest case i.e. feasible we compute the row of the tableau corresponding to last pivot and add a multiple of this to current reduced costs.

We can use other arrays to help updates

Implemented in AbcPrimalColumnDantzig, and AbcPrimalColumnSteepest.

## updateWeights()

virtual void AbcPrimalColumnPivot::updateWeights | ( | CoinIndexedVector * | input | ) |

virtual

Updates weights - part 1 (may be empty).

Reimplemented in AbcPrimalColumnSteepest.

## saveWeights()

virtual void AbcPrimalColumnPivot::saveWeights | ( | AbcSimplex * | model,
|  | int | mode )

pure virtual

Saves any weights round factorization as pivot rows may change Will be empty unless steepest edge (will save model) May also recompute infeasibility stuff 1) before factorization 2) after good factorization (if weights empty may initialize) 3) after something happened but no factorization (e.g.

check for infeasible) 4) as 2 but restore weights from previous snapshot 5) forces some initialization e.g. weights Also sets model

Implemented in AbcPrimalColumnDantzig, and AbcPrimalColumnSteepest.

## pivotRow()

virtual int AbcPrimalColumnPivot::pivotRow | ( | double & | way | ) |

inline virtual

Signals pivot row choice: -2 (default) - use normal pivot row choice -1 to numberRows-1 - use this (will be checked) way should be -1 to go to lower bound, +1 to upper bound.

Definition at line 75 of file AbcPrimalColumnPivot.hpp.

## clearArrays()

virtual void AbcPrimalColumnPivot::clearArrays | ( |  | ) |

virtual

Gets rid of all arrays (may be empty).

Reimplemented in AbcPrimalColumnSteepest.

## looksOptimal()

virtual bool AbcPrimalColumnPivot::looksOptimal | ( |  | ) | const

inline virtual

Returns true if would not find any column.

Reimplemented in AbcPrimalColumnSteepest.

Definition at line 83 of file AbcPrimalColumnPivot.hpp.

## setLooksOptimal()

virtual void AbcPrimalColumnPivot::setLooksOptimal | ( | bool | flag | ) |

inline virtual

Sets optimality flag (for advanced use).

Definition at line 88 of file AbcPrimalColumnPivot.hpp.

## operator=()

AbcPrimalColumnPivot & AbcPrimalColumnPivot::operator= | ( | const AbcPrimalColumnPivot & | rhs | ) |

Assignment operator.

## clone()

virtual AbcPrimalColumnPivot * AbcPrimalColumnPivot::clone | ( | bool | copyData = true | ) | const

pure virtual

Clone.

Implemented in AbcPrimalColumnDantzig, and AbcPrimalColumnSteepest.

## model()

AbcSimplex * AbcPrimalColumnPivot::model | ( |  | ) |

inline

Returns model.

Definition at line 116 of file AbcPrimalColumnPivot.hpp.

## setModel()

void AbcPrimalColumnPivot::setModel | ( | AbcSimplex * | newmodel | ) |

inline

Sets model.

Definition at line 121 of file AbcPrimalColumnPivot.hpp.

## type()

int AbcPrimalColumnPivot::type | ( |  | ) |

inline

Returns type (above 63 is extra information).

Definition at line 127 of file AbcPrimalColumnPivot.hpp.

## numberSprintColumns()

virtual int AbcPrimalColumnPivot::numberSprintColumns | ( | int & | numberIterations | ) | const

virtual

Returns number of extra columns for sprint algorithm - 0 means off.

Also number of iterations before recompute

## switchOffSprint()

virtual void AbcPrimalColumnPivot::switchOffSprint | ( |  | ) |

virtual

Switch off sprint idea.

## maximumPivotsChanged()

virtual void AbcPrimalColumnPivot::maximumPivotsChanged | ( |  | ) |

inline virtual

Called when maximum pivots changes.

Reimplemented in AbcPrimalColumnSteepest.

Definition at line 139 of file AbcPrimalColumnPivot.hpp.

## Member Data Documentation

## model_

AbcSimplex* AbcPrimalColumnPivot::model_

protected

Pointer to model.

Definition at line 149 of file AbcPrimalColumnPivot.hpp.

## type_

int AbcPrimalColumnPivot::type_

protected

Type of column pivot algorithm.

Definition at line 151 of file AbcPrimalColumnPivot.hpp.

## looksOptimal_

bool AbcPrimalColumnPivot::looksOptimal_

protected

Says if looks optimal (normally computed).

Definition at line 153 of file AbcPrimalColumnPivot.hpp.

The documentation for this class was generated from the following file:

- Clp/src/AbcPrimalColumnPivot.hpp