Loading...
Searching...
No Matches
OsiDylpWarmStartBasis Class Reference

The dylp warm start class. More...

`#include <OsiDylpWarmStartBasis.hpp>`

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

## Public Member Functions

Methods to get and set basis information.
Methods for structural and artificial variables are inherited from CoinWarmStartBasis. Constraint status is coded using the CoinWarmStartBasis::Status codes. Active constraints are coded as atLowerBound, inactive as isFree.
int | numberActiveConstraints () const
| Return the number of active constraints.
Status | getConStatus (int i) const
| Return the status of the specified constraint.
void | setConStatus (int i, Status st)
| Set the status of the specified constraint.
char * | getConstraintStatus ()
| Return the status array for constraints.
const char * | getConstraintStatus () const
| `const` overload for getConstraintStatus()
void | setPhase (dyphase_enum phase)
| Set the lp phase for this basis.
dyphase_enum | getPhase () const
| Get the lp phase for this basis.
Basis ‘diff’ methods
CoinWarmStartDiff * | generateDiff (const CoinWarmStart *const oldCWS) const
| Generate a ‘diff’ that can convert oldBasis to this basis.
void | applyDiff (const CoinWarmStartDiff *const cwsdDiff)
| Apply `diff` to this basis.
Methods to modify the warm start object
void | setSize (int ns, int na)
| Set basis capacity; existing basis is discarded.
void | resize (int numRows, int numCols)
| Set basis capacity; existing basis is maintained.
void | compressRows (int tgtCnt, const int *tgts)
| Delete a set of rows from the basis.
void | deleteRows (int number, const int *which)
| Delete a set of rows from the basis.
virtual void | mergeBasis (const CoinWarmStartBasis *src, const XferVec *xferRows, const XferVec *xferCols)
| Merge entries from a source basis into this basis.
Constructors, destructors, and related functions
| OsiDylpWarmStartBasis ()
| Default constructor (empty object)
| OsiDylpWarmStartBasis (int ns, int na, const char *sStat, const char *aStat, const char *cStat=0)
| Constructs a warm start object with the specified status arrays.
| OsiDylpWarmStartBasis (const CoinWarmStartBasis &cwsb)
| Construct an OsiDylpWarmStartBasis from a CoinWarmStartBasis.
| OsiDylpWarmStartBasis (const OsiDylpWarmStartBasis &ws)
| Copy constructor.
CoinWarmStart * | clone () const
| ‘Virtual constructor’
| ~OsiDylpWarmStartBasis ()
| Destructor.
OsiDylpWarmStartBasis & | operator= (const OsiDylpWarmStartBasis &rhs)
| Assignment.
void | assignBasisStatus (int ns, int na, char *&sStat, char *&aStat, char *&cStat)
| Assign the status vectors to be the warm start information.
void | assignBasisStatus (int ns, int na, char *&sStat, char *&aStat)
| Assign the status vectors to be the warm start information.
Miscellaneous methods
void | print () const
| Prints in readable format (for debug)
void | checkBasis (CoinMessageHandler *msghandler=NULL) const
| Performs basis consistency checks (for debug)

## Private Attributes

Constraint status private data members
dyphase_enum | phase_
| dylp phase
char * | constraintStatus_
| vector of constraint status information

## Detailed Description

The dylp warm start class.

This derived class is necessary because dylp by default works with a subset of the full constraint system. The warm start object needs to contain a list of the active constraints in addition to the status information included in CoinWarmStartBasis. It is also convenient to include the solver phase in the warm start object.

Definition at line 44 of file OsiDylpWarmStartBasis.hpp.

## Constructor & Destructor Documentation

## OsiDylpWarmStartBasis() [1/4]

OsiDylpWarmStartBasis::OsiDylpWarmStartBasis | ( |  | ) |

Default constructor (empty object)

## OsiDylpWarmStartBasis() [2/4]

OsiDylpWarmStartBasis::OsiDylpWarmStartBasis | ( | int | ns,
|  | int | na,
|  | const char * | sStat,
|  | const char * | aStat,
|  | const char * | cStat = `0`
| ) |  |

Constructs a warm start object with the specified status arrays.

## OsiDylpWarmStartBasis() [3/4]

OsiDylpWarmStartBasis::OsiDylpWarmStartBasis | ( | const CoinWarmStartBasis & | cwsb | ) |

Construct an OsiDylpWarmStartBasis from a CoinWarmStartBasis.

## OsiDylpWarmStartBasis() [4/4]

OsiDylpWarmStartBasis::OsiDylpWarmStartBasis | ( | const OsiDylpWarmStartBasis & | ws | ) |

Copy constructor.

## ~OsiDylpWarmStartBasis()

OsiDylpWarmStartBasis::~OsiDylpWarmStartBasis | ( |  | ) |

Destructor.

## Member Function Documentation

## numberActiveConstraints()

int OsiDylpWarmStartBasis::numberActiveConstraints | ( |  | ) | const

Return the number of active constraints.

## getConStatus()

Status OsiDylpWarmStartBasis::getConStatus | ( | int | i | ) | const

inline

Return the status of the specified constraint.

Definition at line 64 of file OsiDylpWarmStartBasis.hpp.

## setConStatus()

void OsiDylpWarmStartBasis::setConStatus | ( | int | i,
|  | Status | st
| ) |  |

inline

Set the status of the specified constraint.

Definition at line 72 of file OsiDylpWarmStartBasis.hpp.

## getConstraintStatus() [1/2]

char * OsiDylpWarmStartBasis::getConstraintStatus | ( |  | ) |

inline

Return the status array for constraints.

Definition at line 81 of file OsiDylpWarmStartBasis.hpp.

## getConstraintStatus() [2/2]

const char * OsiDylpWarmStartBasis::getConstraintStatus | ( |  | ) | const

inline

`const` overload for getConstraintStatus()

Definition at line 89 of file OsiDylpWarmStartBasis.hpp.

## setPhase()

void OsiDylpWarmStartBasis::setPhase | ( | dyphase_enum | phase | ) |

inline

Set the lp phase for this basis.

Definition at line 96 of file OsiDylpWarmStartBasis.hpp.

## getPhase()

dyphase_enum OsiDylpWarmStartBasis::getPhase | ( |  | ) | const

inline

Get the lp phase for this basis.

Definition at line 100 of file OsiDylpWarmStartBasis.hpp.

## generateDiff()

CoinWarmStartDiff * OsiDylpWarmStartBasis::generateDiff | ( | const CoinWarmStart *const | oldCWS | ) | const

Generate a ‘diff’ that can convert oldBasis to this basis.

## applyDiff()

void OsiDylpWarmStartBasis::applyDiff | ( | const CoinWarmStartDiff *const | cwsdDiff | ) |

Apply `diff` to this basis.

## setSize()

void OsiDylpWarmStartBasis::setSize | ( | int | ns,
|  | int | na
| ) |  |

Set basis capacity; existing basis is discarded.

## resize()

void OsiDylpWarmStartBasis::resize | ( | int | numRows,
|  | int | numCols
| ) |  |

Set basis capacity; existing basis is maintained.

## compressRows()

void OsiDylpWarmStartBasis::compressRows | ( | int | tgtCnt,
|  | const int * | tgts
| ) |  |

Delete a set of rows from the basis.

Warning
  This routine assumes that the set of indices to be deleted is sorted in ascending order and is free from duplicates. Use deleteRows if this is not guaranteed.
  The resulting basis is guaranteed valid only if all deleted constraints are slack (hence the associated logicals are basic).

## deleteRows()

void OsiDylpWarmStartBasis::deleteRows | ( | int | number,
|  | const int * | which
| ) |  |

Delete a set of rows from the basis.

Warning
  The resulting basis is guaranteed valid only if all deleted constraints are slack (hence the associated logicals are basic).

## mergeBasis()

virtual void OsiDylpWarmStartBasis::mergeBasis | ( | const CoinWarmStartBasis * | src,
|  | const XferVec * | xferRows,
|  | const XferVec * | xferCols
| ) |  |

virtual

Merge entries from a source basis into this basis.

Warning
  It's the client's responsibility to ensure validity of the merged basis, if that's important to the application.

The vector xferCols (xferRows) specifies runs of entries to be taken from the source basis and placed in this basis. Each entry is a CoinTriple, with first specifying the starting source index of a run, second specifying the starting destination index, and third specifying the run length.

## clone()

CoinWarmStart * OsiDylpWarmStartBasis::clone | ( |  | ) | const

‘Virtual constructor’

## operator=()

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

Assignment.

## assignBasisStatus() [1/2]

void OsiDylpWarmStartBasis::assignBasisStatus | ( | int | ns,
|  | int | na,
|  | char *& | sStat,
|  | char *& | aStat,
|  | char *& | cStat
| ) |  |

Assign the status vectors to be the warm start information.

## assignBasisStatus() [2/2]

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

Assign the status vectors to be the warm start information.

## print()

void OsiDylpWarmStartBasis::print | ( |  | ) | const

Prints in readable format (for debug)

## checkBasis()

void OsiDylpWarmStartBasis::checkBasis | ( | CoinMessageHandler * | msghandler = `NULL` | ) | const

Performs basis consistency checks (for debug)

## Member Data Documentation

## phase_

dyphase_enum OsiDylpWarmStartBasis::phase_

private

dylp phase

Definition at line 233 of file OsiDylpWarmStartBasis.hpp.

## constraintStatus_

char* OsiDylpWarmStartBasis::constraintStatus_

private

vector of constraint status information

Definition at line 235 of file OsiDylpWarmStartBasis.hpp.

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

- /build/reproducible-path/coinor-dylp-1.10.4/DyLP/src/OsiDylp/OsiDylpWarmStartBasis.hpp