Clp  1.17.8
List of all members
AbcDualRowSteepest Class Reference

Dual Row Pivot Steepest Edge Algorithm Class. More...

#include <AbcDualRowSteepest.hpp>

+ Inheritance diagram for AbcDualRowSteepest:
+ Collaboration diagram for AbcDualRowSteepest:

Public Member Functions

Constructors and destructors
 AbcDualRowSteepest (int mode=3)
 Default Constructor 0 is uninitialized, 1 full, 2 is partial uninitialized, 3 starts as 2 but may switch to 1. More...
 
 AbcDualRowSteepest (const AbcDualRowSteepest &)
 Copy constructor. More...
 
AbcDualRowSteepestoperator= (const AbcDualRowSteepest &rhs)
 Assignment operator. More...
 
void fill (const AbcDualRowSteepest &rhs)
 Fill most values. More...
 
virtual ~AbcDualRowSteepest ()
 Destructor. More...
 
virtual AbcDualRowPivotclone (bool copyData=true) const
 Clone. More...
 
gets and sets
int mode () const
 Mode. More...
 
void setPersistence (Persistence life)
 Set/ get persistence. More...
 
Persistence persistence () const
 
CoinIndexedVector * infeasible () const
 Infeasible vector. More...
 
CoinIndexedVector * weights () const
 Weights vector. More...
 
AbcSimplexmodel () const
 Model. More...
 
- Public Member Functions inherited from AbcDualRowPivot
virtual void checkAccuracy ()
 checks accuracy and may re-initialize (may be empty) More...
 
 AbcDualRowPivot ()
 Default Constructor. More...
 
 AbcDualRowPivot (const AbcDualRowPivot &)
 Copy constructor. More...
 
AbcDualRowPivotoperator= (const AbcDualRowPivot &rhs)
 Assignment operator. More...
 
virtual ~AbcDualRowPivot ()
 Destructor. More...
 
AbcSimplexmodel ()
 Returns model. More...
 
void setModel (AbcSimplex *newmodel)
 Sets model (normally to NULL) More...
 
int type ()
 Returns type (above 63 is extra information) More...
 

Private Attributes

Private member data

norm saved before going into update

double norm_
 
double factorizationRatio_
 Ratio of size of factorization to number of rows. More...
 
int state_
 Status 0) Normal -1) Needs initialization 1) Weights are stored by sequence number. More...
 
int mode_
 If 0 then we are using uninitialized weights, 1 then full, if 2 then uninitialized partial, 3 switchable. More...
 
Persistence persistence_
 Life of weights. More...
 
CoinIndexedVector * weights_
 weight array More...
 
CoinIndexedVector * infeasible_
 square of infeasibility array (just for infeasible rows) More...
 
CoinIndexedVector * savedWeights_
 save weight array (so we can use checkpoint) More...
 

Algorithmic methods

enum  Persistence { normal = 0x00, keep = 0x01 }
 enums for persistence More...
 
virtual int pivotRow ()
 Returns pivot row, -1 if none. More...
 
virtual double updateWeights (CoinIndexedVector &input, CoinIndexedVector &updatedColumn)
 Updates weights and returns pivot alpha. More...
 
virtual double updateWeights1 (CoinIndexedVector &input, CoinIndexedVector &updateColumn)
 Does most of work for weights and returns pivot alpha. More...
 
virtual void updateWeightsOnly (CoinIndexedVector &input)
 
virtual void updateWeights2 (CoinIndexedVector &input, CoinIndexedVector &updateColumn)
 Actually updates weights. More...
 
virtual void updatePrimalSolution (CoinIndexedVector &input, double theta)
 Updates primal solution (and maybe list of candidates) Uses input vector which it deletes. More...
 
virtual void updatePrimalSolutionAndWeights (CoinIndexedVector &weightsVector, CoinIndexedVector &updateColumn, double theta)
 
virtual void saveWeights (AbcSimplex *model, int mode)
 Saves any weights round factorization as pivot rows may change 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. More...
 
virtual void recomputeInfeasibilities ()
 Recompute infeasibilities. More...
 
virtual void clearArrays ()
 Gets rid of all arrays. More...
 
virtual bool looksOptimal () const
 Returns true if would not find any row. More...
 

Additional Inherited Members

- Protected Attributes inherited from AbcDualRowPivot
AbcSimplexmodel_
 Pointer to model. More...
 
int type_
 Type of row pivot algorithm. More...
 

Detailed Description

Dual Row Pivot Steepest Edge Algorithm Class.

See Forrest-Goldfarb paper for algorithm

Definition at line 20 of file AbcDualRowSteepest.hpp.

Member Enumeration Documentation

◆ Persistence

enums for persistence

Enumerator
normal 
keep 

Definition at line 67 of file AbcDualRowSteepest.hpp.

Constructor & Destructor Documentation

◆ AbcDualRowSteepest() [1/2]

AbcDualRowSteepest::AbcDualRowSteepest ( int  mode = 3)

Default Constructor 0 is uninitialized, 1 full, 2 is partial uninitialized, 3 starts as 2 but may switch to 1.

By partial is meant that the weights are updated as normal but only part of the infeasible basic variables are scanned. This can be faster on very easy problems.

◆ AbcDualRowSteepest() [2/2]

AbcDualRowSteepest::AbcDualRowSteepest ( const AbcDualRowSteepest )

Copy constructor.

◆ ~AbcDualRowSteepest()

virtual AbcDualRowSteepest::~AbcDualRowSteepest ( )
virtual

Destructor.

Member Function Documentation

◆ pivotRow()

virtual int AbcDualRowSteepest::pivotRow ( )
virtual

Returns pivot row, -1 if none.

Implements AbcDualRowPivot.

◆ updateWeights()

virtual double AbcDualRowSteepest::updateWeights ( CoinIndexedVector &  input,
CoinIndexedVector &  updatedColumn 
)
virtual

Updates weights and returns pivot alpha.

Also does FT update

Implements AbcDualRowPivot.

◆ updateWeights1()

virtual double AbcDualRowSteepest::updateWeights1 ( CoinIndexedVector &  input,
CoinIndexedVector &  updateColumn 
)
virtual

Does most of work for weights and returns pivot alpha.

Also does FT update

Implements AbcDualRowPivot.

◆ updateWeightsOnly()

virtual void AbcDualRowSteepest::updateWeightsOnly ( CoinIndexedVector &  input)
virtual

Implements AbcDualRowPivot.

◆ updateWeights2()

virtual void AbcDualRowSteepest::updateWeights2 ( CoinIndexedVector &  input,
CoinIndexedVector &  updateColumn 
)
virtual

Actually updates weights.

Implements AbcDualRowPivot.

◆ updatePrimalSolution()

virtual void AbcDualRowSteepest::updatePrimalSolution ( CoinIndexedVector &  input,
double  theta 
)
virtual

Updates primal solution (and maybe list of candidates) Uses input vector which it deletes.

Implements AbcDualRowPivot.

◆ updatePrimalSolutionAndWeights()

virtual void AbcDualRowSteepest::updatePrimalSolutionAndWeights ( CoinIndexedVector &  weightsVector,
CoinIndexedVector &  updateColumn,
double  theta 
)
virtual

Reimplemented from AbcDualRowPivot.

◆ saveWeights()

virtual void AbcDualRowSteepest::saveWeights ( AbcSimplex model,
int  mode 
)
virtual

Saves any weights round factorization as pivot rows may change 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) for strong branching - initialize (uninitialized) , infeasibilities

Reimplemented from AbcDualRowPivot.

◆ recomputeInfeasibilities()

virtual void AbcDualRowSteepest::recomputeInfeasibilities ( )
virtual

Recompute infeasibilities.

Reimplemented from AbcDualRowPivot.

◆ clearArrays()

virtual void AbcDualRowSteepest::clearArrays ( )
virtual

Gets rid of all arrays.

Reimplemented from AbcDualRowPivot.

◆ looksOptimal()

virtual bool AbcDualRowSteepest::looksOptimal ( ) const
virtual

Returns true if would not find any row.

Reimplemented from AbcDualRowPivot.

◆ operator=()

AbcDualRowSteepest& AbcDualRowSteepest::operator= ( const AbcDualRowSteepest rhs)

Assignment operator.

◆ fill()

void AbcDualRowSteepest::fill ( const AbcDualRowSteepest rhs)

Fill most values.

◆ clone()

virtual AbcDualRowPivot* AbcDualRowSteepest::clone ( bool  copyData = true) const
virtual

Clone.

Implements AbcDualRowPivot.

◆ mode()

int AbcDualRowSteepest::mode ( ) const
inline

Mode.

Definition at line 102 of file AbcDualRowSteepest.hpp.

◆ setPersistence()

void AbcDualRowSteepest::setPersistence ( Persistence  life)
inline

Set/ get persistence.

Definition at line 107 of file AbcDualRowSteepest.hpp.

◆ persistence()

Persistence AbcDualRowSteepest::persistence ( ) const
inline

Definition at line 111 of file AbcDualRowSteepest.hpp.

◆ infeasible()

CoinIndexedVector* AbcDualRowSteepest::infeasible ( ) const
inline

Infeasible vector.

Definition at line 116 of file AbcDualRowSteepest.hpp.

◆ weights()

CoinIndexedVector* AbcDualRowSteepest::weights ( ) const
inline

Weights vector.

Definition at line 121 of file AbcDualRowSteepest.hpp.

◆ model()

AbcSimplex* AbcDualRowSteepest::model ( ) const
inline

Model.

Definition at line 126 of file AbcDualRowSteepest.hpp.

Member Data Documentation

◆ norm_

double AbcDualRowSteepest::norm_
private

Definition at line 137 of file AbcDualRowSteepest.hpp.

◆ factorizationRatio_

double AbcDualRowSteepest::factorizationRatio_
private

Ratio of size of factorization to number of rows.

Definition at line 139 of file AbcDualRowSteepest.hpp.

◆ state_

int AbcDualRowSteepest::state_
private

Status 0) Normal -1) Needs initialization 1) Weights are stored by sequence number.

Definition at line 145 of file AbcDualRowSteepest.hpp.

◆ mode_

int AbcDualRowSteepest::mode_
private

If 0 then we are using uninitialized weights, 1 then full, if 2 then uninitialized partial, 3 switchable.

Definition at line 148 of file AbcDualRowSteepest.hpp.

◆ persistence_

Persistence AbcDualRowSteepest::persistence_
private

Life of weights.

Definition at line 150 of file AbcDualRowSteepest.hpp.

◆ weights_

CoinIndexedVector* AbcDualRowSteepest::weights_
private

weight array

Definition at line 152 of file AbcDualRowSteepest.hpp.

◆ infeasible_

CoinIndexedVector* AbcDualRowSteepest::infeasible_
private

square of infeasibility array (just for infeasible rows)

Definition at line 154 of file AbcDualRowSteepest.hpp.

◆ savedWeights_

CoinIndexedVector* AbcDualRowSteepest::savedWeights_
private

save weight array (so we can use checkpoint)

Definition at line 156 of file AbcDualRowSteepest.hpp.


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