DyLP
1.10.4
|
The dylp warm start class. More...
#include <OsiDylpWarmStartBasis.hpp>
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. More... | |
Status | getConStatus (int i) const |
Return the status of the specified constraint. More... | |
void | setConStatus (int i, Status st) |
Set the status of the specified constraint. More... | |
char * | getConstraintStatus () |
Return the status array for constraints. More... | |
const char * | getConstraintStatus () const |
const overload for getConstraintStatus() More... | |
void | setPhase (dyphase_enum phase) |
Set the lp phase for this basis. More... | |
dyphase_enum | getPhase () const |
Get the lp phase for this basis. More... | |
Basis `diff' methods | |
CoinWarmStartDiff * | generateDiff (const CoinWarmStart *const oldCWS) const |
Generate a `diff' that can convert oldBasis to this basis. More... | |
void | applyDiff (const CoinWarmStartDiff *const cwsdDiff) |
Apply diff to this basis. More... | |
Methods to modify the warm start object | |
void | setSize (int ns, int na) |
Set basis capacity; existing basis is discarded. More... | |
void | resize (int numRows, int numCols) |
Set basis capacity; existing basis is maintained. More... | |
void | compressRows (int tgtCnt, const int *tgts) |
Delete a set of rows from the basis. More... | |
void | deleteRows (int number, const int *which) |
Delete a set of rows from the basis. More... | |
virtual void | mergeBasis (const CoinWarmStartBasis *src, const XferVec *xferRows, const XferVec *xferCols) |
Merge entries from a source basis into this basis. More... | |
Constructors, destructors, and related functions | |
OsiDylpWarmStartBasis () | |
Default constructor (empty object) More... | |
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. More... | |
OsiDylpWarmStartBasis (const CoinWarmStartBasis &cwsb) | |
Construct an OsiDylpWarmStartBasis from a CoinWarmStartBasis. More... | |
OsiDylpWarmStartBasis (const OsiDylpWarmStartBasis &ws) | |
Copy constructor. More... | |
CoinWarmStart * | clone () const |
`Virtual constructor' More... | |
~OsiDylpWarmStartBasis () | |
Destructor. More... | |
OsiDylpWarmStartBasis & | operator= (const OsiDylpWarmStartBasis &rhs) |
Assignment. More... | |
void | assignBasisStatus (int ns, int na, char *&sStat, char *&aStat, char *&cStat) |
Assign the status vectors to be the warm start information. More... | |
void | assignBasisStatus (int ns, int na, char *&sStat, char *&aStat) |
Assign the status vectors to be the warm start information. More... | |
Miscellaneous methods | |
void | print () const |
Prints in readable format (for debug) More... | |
void | checkBasis (CoinMessageHandler *msghandler=NULL) const |
Performs basis consistency checks (for debug) More... | |
![]() | |
int | getNumStructural () const |
Return the number of structural variables. More... | |
int | getNumArtificial () const |
Return the number of artificial variables. More... | |
int | numberBasicStructurals () const |
Return the number of basic structurals. More... | |
Status | getStructStatus (int i) const |
Return the status of the specified structural variable. More... | |
void | setStructStatus (int i, Status st) |
Set the status of the specified structural variable. More... | |
char * | getStructuralStatus () |
Return the status array for the structural variables. More... | |
const char * | getStructuralStatus () const |
const overload for getStructuralStatus() More... | |
char * | getArtificialStatus () |
As for getStructuralStatus , but returns the status array for the artificial variables. More... | |
Status | getArtifStatus (int i) const |
Return the status of the specified artificial variable. More... | |
void | setArtifStatus (int i, Status st) |
Set the status of the specified artificial variable. More... | |
const char * | getArtificialStatus () const |
const overload for getArtificialStatus() More... | |
virtual void | deleteColumns (int number, const int *which) |
Delete a set of columns from the basis. More... | |
CoinWarmStartBasis () | |
Default constructor. More... | |
CoinWarmStartBasis (int ns, int na, const char *sStat, const char *aStat) | |
Constructs a warm start object with the specified status vectors. More... | |
CoinWarmStartBasis (const CoinWarmStartBasis &ws) | |
Copy constructor. More... | |
virtual | ~CoinWarmStartBasis () |
Destructor. More... | |
virtual CoinWarmStartBasis & | operator= (const CoinWarmStartBasis &rhs) |
Assignment. More... | |
bool | fullBasis () const |
Returns true if full basis (for debug) More... | |
bool | fixFullBasis () |
Returns true if full basis and fixes up (for debug) More... | |
![]() | |
virtual | ~CoinWarmStart () |
Abstract destructor. More... | |
Private Attributes | |
Constraint status private data members | |
dyphase_enum | phase_ |
dylp phase More... | |
char * | constraintStatus_ |
vector of constraint status information More... | |
Additional Inherited Members | |
![]() | |
enum | Status { isFree = 0x00, basic = 0x01, atUpperBound = 0x02, atLowerBound = 0x03, superBasic = 0x04 } |
Enum for status of variables. More... | |
typedef CoinTriple< int, int, int > | XferEntry |
Transfer vector entry for mergeBasis(const CoinWarmStartBasis*,const XferVec*,const XferVec*) More... | |
typedef std::vector< XferEntry > | XferVec |
Transfer vector for mergeBasis(const CoinWarmStartBasis*,const XferVec*,const XferVec*) More... | |
![]() | |
int | numStructural_ |
The number of structural variables. More... | |
int | numArtificial_ |
The number of artificial variables. More... | |
int | maxSize_ |
The maximum sise (in ints - actually 4*char) (so resize does not need to do new) More... | |
char * | structuralStatus_ |
The status of the structural variables. More... | |
char * | artificialStatus_ |
The status of the artificial variables. More... | |
![]() | |
CoinWarmStartBasis::Status | getStatus (const char *array, int i) |
Get the status of the specified variable in the given status array. More... | |
void | setStatus (char *array, int i, CoinWarmStartBasis::Status st) |
Set the status of the specified variable in the given status array. More... | |
const char * | statusName (CoinWarmStartBasis::Status status) |
Generate a print string for a status code. More... | |
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.
OsiDylpWarmStartBasis::OsiDylpWarmStartBasis | ( | ) |
Default constructor (empty object)
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::OsiDylpWarmStartBasis | ( | const CoinWarmStartBasis & | cwsb | ) |
Construct an OsiDylpWarmStartBasis from a CoinWarmStartBasis.
OsiDylpWarmStartBasis::OsiDylpWarmStartBasis | ( | const OsiDylpWarmStartBasis & | ws | ) |
Copy constructor.
OsiDylpWarmStartBasis::~OsiDylpWarmStartBasis | ( | ) |
Destructor.
int OsiDylpWarmStartBasis::numberActiveConstraints | ( | ) | const |
Return the number of active constraints.
|
inline |
Return the status of the specified constraint.
Definition at line 64 of file OsiDylpWarmStartBasis.hpp.
|
inline |
Set the status of the specified constraint.
Definition at line 72 of file OsiDylpWarmStartBasis.hpp.
|
inline |
Return the status array for constraints.
Definition at line 81 of file OsiDylpWarmStartBasis.hpp.
|
inline |
const
overload for getConstraintStatus()
Definition at line 89 of file OsiDylpWarmStartBasis.hpp.
|
inline |
Set the lp phase for this basis.
Definition at line 96 of file OsiDylpWarmStartBasis.hpp.
|
inline |
Get the lp phase for this basis.
Definition at line 100 of file OsiDylpWarmStartBasis.hpp.
|
virtual |
Generate a `diff' that can convert oldBasis to this basis.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Apply diff
to this basis.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Set basis capacity; existing basis is discarded.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Set basis capacity; existing basis is maintained.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Delete a set of rows from the basis.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Delete a set of rows from the basis.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Merge entries from a source basis into this basis.
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.
Reimplemented from CoinWarmStartBasis.
|
virtual |
`Virtual constructor'
Reimplemented from CoinWarmStartBasis.
OsiDylpWarmStartBasis& OsiDylpWarmStartBasis::operator= | ( | const OsiDylpWarmStartBasis & | rhs | ) |
Assignment.
void OsiDylpWarmStartBasis::assignBasisStatus | ( | int | ns, |
int | na, | ||
char *& | sStat, | ||
char *& | aStat, | ||
char *& | cStat | ||
) |
Assign the status vectors to be the warm start information.
|
virtual |
Assign the status vectors to be the warm start information.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Prints in readable format (for debug)
Reimplemented from CoinWarmStartBasis.
void OsiDylpWarmStartBasis::checkBasis | ( | CoinMessageHandler * | msghandler = NULL | ) | const |
Performs basis consistency checks (for debug)
|
private |
dylp phase
Definition at line 233 of file OsiDylpWarmStartBasis.hpp.
|
private |
vector of constraint status information
Definition at line 235 of file OsiDylpWarmStartBasis.hpp.