CoinWarmStartBasis

The default COIN simplex (basis-oriented) warm start class.

The default COIN simplex (basis-oriented) warm start class.

Inheritance

Inherits from: CoinWarmStart

Description

CoinWarmStartBasis provides for a warm start object which contains the status of each variable (structural and artificial). TodoModify this class so that the number of status entries per byte and bytes per status vector allocation unit are not hardcoded. At the least, collect this into a couple of macros. TodoConsider separate fields for allocated capacity and actual basis size. We could avoid some reallocation, at the price of retaining more space than we need. Perhaps more important, we could do much better sanity checks.

Public Methods

getNumStructural

Return the number of structural variables.

int getNumStructural()

getNumArtificial

Return the number of artificial variables.

int getNumArtificial()

numberBasicStructurals

Return the number of basic structurals.

int numberBasicStructurals()

getStructStatus

Return the status of the specified structural variable.

Status getStructStatus(int i)

Parameters:

setStructStatus

Set the status of the specified structural variable.

void setStructStatus(int i, Status st)

Parameters:

getStructuralStatus

Return the status array for the structural variables.

char * getStructuralStatus()

getStructuralStatus

const overload for getStructuralStatus()

const char * getStructuralStatus()

getArtificialStatus

As for getStructuralStatus , but returns the status array for the artificial variables.

char * getArtificialStatus()

getArtifStatus

Return the status of the specified artificial variable.

Status getArtifStatus(int i)

Parameters:

setArtifStatus

Set the status of the specified artificial variable.

void setArtifStatus(int i, Status st)

Parameters:

getArtificialStatus

const overload for getArtificialStatus()

const char * getArtificialStatus()

generateDiff

Generate a diff that can convert the warm start basis passed as a parameter to the warm start basis specified by this.

CoinWarmStartDiff * generateDiff(const CoinWarmStart *const oldCWS)

Parameters:

applyDiff

Apply diff to this basis.

void applyDiff(const CoinWarmStartDiff *const cwsdDiff)

Parameters:

setSize

Set basis capacity; existing basis is discarded.

void setSize(int ns, int na)

Parameters:

resize

Set basis capacity; existing basis is maintained.

void resize(int newNumberRows, int newNumberColumns)

Parameters:

compressRows

Delete a set of rows from the basis.

void compressRows(int tgtCnt, const int * tgts)

Parameters:

deleteRows

Delete a set of rows from the basis.

void deleteRows(int rawTgtCnt, const int * rawTgts)

Parameters:

deleteColumns

Delete a set of columns from the basis.

void deleteColumns(int number, const int * which)

Parameters:

mergeBasis

Merge entries from a source basis into this basis.

void mergeBasis(const CoinWarmStartBasis * src, const XferVec * xferRows, const XferVec * xferCols)

Parameters:

CoinWarmStartBasis

Default constructor.

 CoinWarmStartBasis()

CoinWarmStartBasis

Constructs a warm start object with the specified status vectors.

 CoinWarmStartBasis(int ns, int na, const char * sStat, const char * aStat)

Parameters:

CoinWarmStartBasis

Copy constructor.

 CoinWarmStartBasis(const CoinWarmStartBasis & ws)

Parameters:

clone

Virtual constructor

CoinWarmStart * clone()

~CoinWarmStartBasis

Destructor.

 ~CoinWarmStartBasis()

operator=

Assignment.

CoinWarmStartBasis & operator=(const CoinWarmStartBasis & rhs)

Parameters:

assignBasisStatus

Assign the status vectors to be the warm start information.

void assignBasisStatus(int ns, int na, char *& sStat, char *& aStat)

Parameters:

print

Prints in readable format (for debug)

void print()

fullBasis

Returns true if full basis (for debug)

bool fullBasis()

fixFullBasis

Returns true if full basis and fixes up (for debug)

bool fixFullBasis()

getStatus

Get the status of the specified variable in the given status array.

CoinWarmStartBasis::Status getStatus(const char * array, int i)

Parameters:

setStatus

Set the status of the specified variable in the given status array.

void setStatus(char * array, int i, CoinWarmStartBasis::Status st)

Parameters:

statusName

Generate a print string for a status code.

const char * statusName(CoinWarmStartBasis::Status status)

Parameters:

Source

Header: layer-0/CoinUtils/src/CoinWarmStartBasis.hpp