status of variables. More...
#include <ogdf/lib/abacus/lpvarstat.h>
Public Types | |
enum | STATUS { AtLowerBound , Basic , AtUpperBound , NonBasicFree , Eliminated , Unknown } |
The enumeration of the statuses a variable gets from the linear program solver. More... | |
Public Member Functions | |
LPVARSTAT () | |
This constructor initializes the status as Unknown. | |
LPVARSTAT (LPVARSTAT *lpVarStat) | |
This constructor make a copy of *lpVarStat. | |
LPVARSTAT (STATUS status) | |
This constructor initializes the LPVARSTAT. | |
bool | atBound () const |
Returns true if the variable status is AtUpperBound or AtLowerBound, false otherwise. | |
bool | basic () const |
Returns true If the status is Basic, false otherwise. | |
STATUS | status () const |
Returns the LP-status. | |
void | status (const LPVARSTAT *stat) |
Sets the status to stat. | |
void | status (STATUS stat) |
Sets the status to stat. | |
Public Member Functions inherited from abacus::AbacusRoot | |
virtual | ~AbacusRoot () |
The destructor. | |
Private Attributes | |
STATUS | status_ |
The LP-status. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const LPVARSTAT &rhs) |
The output operator. | |
Additional Inherited Members | |
Static Public Member Functions inherited from abacus::AbacusRoot | |
static bool | ascii2bool (const string &str) |
Converts the string str to a boolean value. | |
static bool | endsWith (const string &str, const string &end) |
Returns true if str ends with end, false otherwise. | |
static double | fracPart (double x) |
Returns the absolute value of the fractional part of x. | |
static const char * | onOff (bool value) |
Converts a boolean variable to the strings "on" and "off". | |
status of variables.
After the solution of a linear program by the simplex method each variable receives a status indicating if the variable is contained in the basis of the optimal solution, or is nonbasic and has a value equal to its lower or upper bound, or is a free variable not contained in the basis. We extend this notion since later in the interface from a cutting plane algorithm to the linear program variables might be eliminated.
Definition at line 50 of file lpvarstat.h.
The enumeration of the statuses a variable gets from the linear program solver.
Enumerator | |
---|---|
AtLowerBound | The variable is at its lower bound, but not in the basis. |
Basic | The variable is in the basis. |
AtUpperBound | The variable is at its upper bound , but not in the basis. |
NonBasicFree | The variable is unbounded and not in the basis. |
Eliminated | The variable has been removed by our preprocessor in the class LpSub. So, it is not present in the LP-solver. |
Unknown | The LP-status of the variable is unknown since no LP has been solved. This status is also assigned to variables which are fixed or set, yet still contained in the LP to avoid a wrong setting or fixing by reduced costs. |
Definition at line 54 of file lpvarstat.h.
|
inline |
This constructor initializes the status as Unknown.
Definition at line 70 of file lpvarstat.h.
|
inline |
This constructor initializes the LPVARSTAT.
status | The initial status. |
Definition at line 76 of file lpvarstat.h.
|
inline |
This constructor make a copy of *lpVarStat.
lpVarStat | A copy of this object is made. |
Definition at line 82 of file lpvarstat.h.
|
inline |
Returns true if the variable status is AtUpperBound or AtLowerBound, false otherwise.
Definition at line 115 of file lpvarstat.h.
|
inline |
Returns true If the status is Basic, false otherwise.
Definition at line 120 of file lpvarstat.h.
|
inline |
Returns the LP-status.
Definition at line 100 of file lpvarstat.h.
Sets the status to stat.
stat | The new LP-status. |
Definition at line 112 of file lpvarstat.h.
Sets the status to stat.
stat | The new LP-status. |
Definition at line 106 of file lpvarstat.h.
The output operator.
Writes the STATUS to an output stream in the form AtLowerBound
, Basic
, AtUpperBound
, NonBasicFree
, Eliminated
, Unknown
.
out | The output stream. |
rhs | The status being output. |
|
private |
The LP-status.
Definition at line 128 of file lpvarstat.h.