Loading...
Searching...
No Matches
ClpPEPrimalColumnSteepest Class Reference

Primal Column Pivot Steepest Edge Algorithm Class. More...

`#include <ClpPEPrimalColumnSteepest.hpp>`

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

## Public Member Functions

Constructors and destructors
| ClpPEPrimalColumnSteepest (double psi=0.5, 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.
| ClpPEPrimalColumnSteepest (const ClpPEPrimalColumnSteepest &rhs)
| Copy constructor.
ClpPEPrimalColumnSteepest & | operator= (const ClpPEPrimalColumnSteepest &rhs)
| Assignment operator.
virtual | ~ClpPEPrimalColumnSteepest ()
| Destructor.
virtual ClpPrimalColumnPivot * | clone (bool copyData=true) const
| Clone.
Public Member Functions inherited from ClpPrimalColumnSteepest
int | pivotColumnOldMethod (CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
| For quadratic or funny nonlinearities.
void | justDjs (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
| Just update djs.
int | partialPricing (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, int numberWanted, int numberLook)
| Update djs doing partial pricing (dantzig).
void | djsAndDevex (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
| Update djs, weights for Devex using djs.
void | djsAndSteepest (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
| Update djs, weights for Steepest using djs sets best sequence (possibly).
void | djsAndDevex2 (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
| Update djs, weights for Devex using pivot row.
void | djsAndSteepest2 (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
| Update djs, weights for Steepest using pivot row.
void | justDevex (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
| Update weights for Devex.
void | justSteepest (CoinIndexedVector *updates, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
| Update weights for Steepest.
int | transposeTimes2 (const CoinIndexedVector *pi1, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, CoinIndexedVector *spare, double scaleFactor)
| Updates two arrays for steepest.
void | checkAccuracy (int sequence, double relativeTolerance, CoinIndexedVector *rowArray1, CoinIndexedVector *rowArray2)
| Checks accuracy - just for debug.
void | initializeWeights ()
| Initialize weights.
void | redoInfeasibilities ()
| redo infeasibilities
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.
| ClpPrimalColumnSteepest (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.
| ClpPrimalColumnSteepest (const ClpPrimalColumnSteepest &rhs)
| Copy constructor.
ClpPrimalColumnSteepest & | operator= (const ClpPrimalColumnSteepest &rhs)
| Assignment operator.
virtual | ~ClpPrimalColumnSteepest ()
| Destructor.
bool | reference (int i) const
| reference would be faster using ClpSimplex's status_, but I prefer to keep modularity.
void | setReference (int i, bool trueFalse)
void | setPersistence (Persistence life)
| Set/ get persistence.
Persistence | persistence () const
int | mode () const
| Mode.
void | setMode (int mode)
| Set mode.
CoinIndexedVector * | infeasible () const
| square of infeasibility array (just for infeasible columns)
const double * | weights () const
| Weights.
CoinIndexedVector * | alternateWeights () const
| alternate weight array
virtual int | numberSprintColumns (int &numberIterations) const
| Returns number of extra columns for sprint algorithm - 0 means off.
virtual void | switchOffSprint ()
| Switch off sprint idea.
Public Member Functions inherited from ClpPrimalColumnPivot
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 | setLooksOptimal (bool flag)
| Sets optimality flag (for advanced use).
| ClpPrimalColumnPivot ()
| Default Constructor.
| ClpPrimalColumnPivot (const ClpPrimalColumnPivot &)
| Copy constructor.
ClpPrimalColumnPivot & | operator= (const ClpPrimalColumnPivot &rhs)
| Assignment operator.
virtual | ~ClpPrimalColumnPivot ()
| Destructor.
ClpSimplex * | model ()
| Returns model.
void | setModel (ClpSimplex *newmodel)
| Sets model.
int | type ()
| Returns type (above 63 is extra information).

## Algorithmic methods

ClpPESimplex * | modelPE_
double | psi_
int | iCurrent_
int | iInterval_
int | coDegenCompatibles_
int | coConsecutiveCompatibles_
bool | updateCompatibles_
virtual int | pivotColumn (CoinIndexedVector *updates, CoinIndexedVector *spareRow1, CoinIndexedVector *spareRow2, CoinIndexedVector *spareColumn1, CoinIndexedVector *spareColumn2)
| Returns pivot column, -1 if none.
virtual void | saveWeights (ClpSimplex *model, int mode)
| Save weights - this may initialize weights as well This is as parent but may initialize ClpPESimplex.
virtual void | updateWeights (CoinIndexedVector *input)
| Updates weights - as ordinary but checks for zero moves.
double | psi () const

## Additional Inherited Members

Public Types inherited from ClpPrimalColumnSteepest
enum | Persistence { normal = 0x00 , keep = 0x01 }
| enums for persistence More...
Protected Attributes inherited from ClpPrimalColumnSteepest
double | devex_
double * | weights_
| weight array
CoinIndexedVector * | infeasible_
| square of infeasibility array (just for infeasible columns)
CoinIndexedVector * | alternateWeights_
| alternate weight array (so we can unroll)
double * | savedWeights_
| save weight array (so we can use checkpoint)
unsigned int * | reference_
int | state_
| Status 0) Normal -1) Needs initialization 1) Weights are stored by sequence number.
int | mode_
| 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.
int | infeasibilitiesState_
Persistence | persistence_
| Life of weights.
int | numberSwitched_
| Number of times switched from partial dantzig to 0/2.
int | pivotSequence_
int | savedPivotSequence_
int | savedSequenceOut_
int | lastRectified_
int | sizeFactorization_
Protected Attributes inherited from ClpPrimalColumnPivot
ClpSimplex * | model_
| Pointer to model.
int | type_
| Type of column pivot algorithm.
bool | looksOptimal_
| Says if looks optimal (normally computed).

## Detailed Description

Primal Column Pivot Steepest Edge Algorithm Class.

See Forrest-Goldfarb paper for algorithm

Definition at line 29 of file ClpPEPrimalColumnSteepest.hpp.

## Constructor & Destructor Documentation

## ClpPEPrimalColumnSteepest() [1/2]

ClpPEPrimalColumnSteepest::ClpPEPrimalColumnSteepest | ( | double | psi = 0.5,
|  | 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.

## ClpPEPrimalColumnSteepest() [2/2]

ClpPEPrimalColumnSteepest::ClpPEPrimalColumnSteepest | ( | const ClpPEPrimalColumnSteepest & | rhs | ) |

Copy constructor.

## ~ClpPEPrimalColumnSteepest()

virtual ClpPEPrimalColumnSteepest::~ClpPEPrimalColumnSteepest | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## operator=()

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

Assignment operator.

## clone()

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

virtual

Clone.

Reimplemented from ClpPrimalColumnSteepest.

## pivotColumn()

virtual int ClpPEPrimalColumnSteepest::pivotColumn | ( | CoinIndexedVector * | updates,
|  | CoinIndexedVector * | spareRow1,
|  | CoinIndexedVector * | spareRow2,
|  | CoinIndexedVector * | spareColumn1,
|  | CoinIndexedVector * | spareColumn2 )

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

Reimplemented from ClpPrimalColumnSteepest.

## saveWeights()

virtual void ClpPEPrimalColumnSteepest::saveWeights | ( | ClpSimplex * | model,
|  | int | mode )

virtual

Save weights - this may initialize weights as well This is as parent but may initialize ClpPESimplex.

Reimplemented from ClpPrimalColumnSteepest.

## updateWeights()

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

virtual

Updates weights - as ordinary but checks for zero moves.

Reimplemented from ClpPrimalColumnSteepest.

## psi()

double ClpPEPrimalColumnSteepest::psi | ( |  | ) | const

inline

Definition at line 81 of file ClpPEPrimalColumnSteepest.hpp.

## Member Data Documentation

## modelPE_

ClpPESimplex* ClpPEPrimalColumnSteepest::modelPE_

private

Definition at line 88 of file ClpPEPrimalColumnSteepest.hpp.

## psi_

double ClpPEPrimalColumnSteepest::psi_

private

Definition at line 92 of file ClpPEPrimalColumnSteepest.hpp.

## iCurrent_

int ClpPEPrimalColumnSteepest::iCurrent_

private

Definition at line 95 of file ClpPEPrimalColumnSteepest.hpp.

## iInterval_

int ClpPEPrimalColumnSteepest::iInterval_

private

Definition at line 96 of file ClpPEPrimalColumnSteepest.hpp.

## coDegenCompatibles_

int ClpPEPrimalColumnSteepest::coDegenCompatibles_

private

Definition at line 99 of file ClpPEPrimalColumnSteepest.hpp.

## coConsecutiveCompatibles_

int ClpPEPrimalColumnSteepest::coConsecutiveCompatibles_

private

Definition at line 100 of file ClpPEPrimalColumnSteepest.hpp.

## updateCompatibles_

bool ClpPEPrimalColumnSteepest::updateCompatibles_

private

Definition at line 101 of file ClpPEPrimalColumnSteepest.hpp.

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

- Clp/src/ClpPEPrimalColumnSteepest.hpp