#include <AbcWarmStart.hpp>
Public Member Functions | |
Methods to modify the warm start object | |
virtual void | setSize (int ns, int na) |
Set basis capacity; existing basis is discarded. More... | |
virtual void | resize (int newNumberRows, int newNumberColumns) |
Set basis capacity; existing basis is maintained. More... | |
virtual void | compressRows (int tgtCnt, const int *tgts) |
Delete a set of rows from the basis. More... | |
virtual void | deleteRows (int rawTgtCnt, const int *rawTgts) |
Delete a set of rows from the basis. More... | |
virtual void | deleteColumns (int number, const int *which) |
Delete a set of columns from the basis. More... | |
void | setModel (AbcSimplex *model) |
Set model. More... | |
AbcSimplex * | model () const |
Get model. More... | |
void | createBasis0 (const AbcSimplex *model) |
Create Basis type 0. More... | |
void | createBasis12 (const AbcSimplex *model) |
Create Basis type 12. More... | |
void | createBasis34 (const AbcSimplex *model) |
Create Basis type 34. More... | |
Constructors, destructors, and related functions | |
AbcWarmStart () | |
Default constructor. More... | |
AbcWarmStart (AbcSimplex *model, int type) | |
Constructs a warm start object with the specified status vectors. More... | |
AbcWarmStart (const AbcWarmStart &ws) | |
Copy constructor. More... | |
virtual CoinWarmStart * | clone () const |
`Virtual constructor' More... | |
virtual | ~AbcWarmStart () |
Destructor. More... | |
virtual AbcWarmStart & | operator= (const AbcWarmStart &rhs) |
Assignment. More... | |
virtual void | assignBasisStatus (int ns, int na, char *&sStat, char *&aStat) |
Assign the status vectors to be the warm start information. 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 CoinWarmStartDiff * | generateDiff (const CoinWarmStart *const oldCWS) const |
Generate a `diff' that can convert the warm start basis passed as a parameter to the warm start basis specified by this . More... | |
virtual void | applyDiff (const CoinWarmStartDiff *const cwsdDiff) |
Apply diff to this basis. More... | |
virtual void | mergeBasis (const CoinWarmStartBasis *src, const XferVec *xferRows, const XferVec *xferCols) |
Merge entries from a source basis into this 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... | |
virtual void | print () const |
Prints in readable format (for debug) 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... | |
Protected Attributes | |
Protected data members | |
int | typeExtraInformation_ |
Type of basis (always status arrays) 0 - as CoinWarmStartBasis 1,2 - plus factor order as shorts or ints (top bit set means column) 3,4 - plus compact saved factorization add 8 to say steepest edge weights stored (as floats) may want to change next,previous to tree info so can use a different basis for weights More... | |
int | lengthExtraInformation_ |
Length of extra information in bytes. More... | |
char * | extraInformation_ |
The extra information. More... | |
AbcSimplex * | model_ |
Pointer back to AbcSimplex (can only be applied to that) More... | |
AbcWarmStartOrganizer * | organizer_ |
Pointer back to AbcWarmStartOrganizer for organization. More... | |
AbcWarmStart * | previousBasis_ |
Pointer to previous basis. More... | |
AbcWarmStart * | nextBasis_ |
Pointer to next basis. More... | |
int | stamp_ |
Sequence stamp for deletion. More... | |
int | numberValidRows_ |
Number of valid rows (rest should have slacks) Check to see if weights are OK for these rows and then just btran new ones for weights. 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... | |
Additional Inherited Members | |
![]() | |
enum | Status { isFree = 0x00, basic = 0x01, atUpperBound = 0x02, atLowerBound = 0x03 } |
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... | |
![]() | |
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... | |
As CoinWarmStartBasis but with alternatives (Also uses Clp status meaning for slacks)
Definition at line 75 of file AbcWarmStart.hpp.
AbcWarmStart::AbcWarmStart | ( | ) |
Default constructor.
Creates a warm start object representing an empty basis (0 rows, 0 columns).
AbcWarmStart::AbcWarmStart | ( | AbcSimplex * | model, |
int | type | ||
) |
Constructs a warm start object with the specified status vectors.
The parameters are copied. Consider assignBasisStatus(int,int,char*&,char*&) if the object should assume ownership.
AbcWarmStart::AbcWarmStart | ( | const AbcWarmStart & | ws | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Set basis capacity; existing basis is discarded.
After execution of this routine, the warm start object does not describe a valid basis: all structural and artificial variables have status isFree.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Set basis capacity; existing basis is maintained.
After execution of this routine, the warm start object describes a valid basis: the status of new structural variables (added columns) is set to nonbasic at lower bound, and the status of new artificial variables (added rows) is set to basic. (The basis can be invalid if new structural variables do not have a finite lower bound.)
Reimplemented from CoinWarmStartBasis.
|
virtual |
Delete a set of rows from the basis.
Removal of a tight constraint with a nonbasic logical implies that some basic variable must be made nonbasic. This correction is left to the client.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Delete a set of rows from the basis.
Removal of a tight constraint with a nonbasic logical implies that some basic variable must be made nonbasic. This correction is left to the client.
Reimplemented from CoinWarmStartBasis.
|
virtual |
Delete a set of columns from the basis.
Removal of a basic variable implies that some nonbasic variable must be made basic. This correction is left to the client.
Reimplemented from CoinWarmStartBasis.
|
inline |
Set model.
Definition at line 140 of file AbcWarmStart.hpp.
|
inline |
Get model.
Definition at line 143 of file AbcWarmStart.hpp.
void AbcWarmStart::createBasis0 | ( | const AbcSimplex * | model | ) |
Create Basis type 0.
void AbcWarmStart::createBasis12 | ( | const AbcSimplex * | model | ) |
Create Basis type 12.
void AbcWarmStart::createBasis34 | ( | const AbcSimplex * | model | ) |
Create Basis type 34.
|
inlinevirtual |
`Virtual constructor'
Reimplemented from CoinWarmStartBasis.
Definition at line 177 of file AbcWarmStart.hpp.
|
virtual |
Assignment.
|
virtual |
Assign the status vectors to be the warm start information.
In this method the AbcWarmStart object assumes ownership of the pointers and upon return the argument pointers will be NULL. If copying is desirable, use the array constructor or the assignment operator .
Reimplemented from CoinWarmStartBasis.
|
protected |
Type of basis (always status arrays)
0 - as CoinWarmStartBasis 1,2 - plus factor order as shorts or ints (top bit set means column) 3,4 - plus compact saved factorization add 8 to say steepest edge weights stored (as floats) may want to change next,previous to tree info so can use a different basis for weights
Definition at line 218 of file AbcWarmStart.hpp.
|
protected |
Length of extra information in bytes.
Definition at line 220 of file AbcWarmStart.hpp.
|
protected |
The extra information.
Definition at line 222 of file AbcWarmStart.hpp.
|
protected |
Pointer back to AbcSimplex (can only be applied to that)
Definition at line 224 of file AbcWarmStart.hpp.
|
protected |
Pointer back to AbcWarmStartOrganizer for organization.
Definition at line 226 of file AbcWarmStart.hpp.
|
protected |
Pointer to previous basis.
Definition at line 228 of file AbcWarmStart.hpp.
|
protected |
Pointer to next basis.
Definition at line 230 of file AbcWarmStart.hpp.
|
protected |
Sequence stamp for deletion.
Definition at line 232 of file AbcWarmStart.hpp.
|
protected |
Number of valid rows (rest should have slacks) Check to see if weights are OK for these rows and then just btran new ones for weights.
Definition at line 237 of file AbcWarmStart.hpp.