ABA_LPVARSTAT Class Reference

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. More...

#include <lpvarstat.h>

Inheritance diagram for ABA_LPVARSTAT:

ABA_ABACUSROOT List of all members.

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

 ABA_LPVARSTAT (ABA_GLOBAL *glob)
 ABA_LPVARSTAT (ABA_GLOBAL *glob, STATUS status)
 ABA_LPVARSTAT (ABA_LPVARSTAT *lpVarStat)
STATUS status () const
void status (STATUS stat)
 This version of status() sets the status.
void status (const ABA_LPVARSTAT *stat)
 Another version of the function status() for setting the status.
bool atBound () const
bool basic () const

Private Attributes

ABA_GLOBALglob_
STATUS status_

Friends

ostream & operator<< (ostream &out, const ABA_LPVARSTAT &rhs)
 The output operator writes the STATUS to an output stream in the form { AtLowerBound}, { Basic}, { AtUpper\-Bound}, { NonBasicFree}, { Eliminated}, { Unknown}.

Detailed Description

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.

Definition at line 51 of file lpvarstat.h.


Member Enumeration Documentation

enum ABA_LPVARSTAT::STATUS

The enumeration of the statuses a variable gets from the linear program solver:.

Parameters:
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 ABA_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.
Enumerator:
AtLowerBound 
Basic 
AtUpperBound 
NonBasicFree 
Eliminated 
Unknown 

Definition at line 73 of file lpvarstat.h.


Constructor & Destructor Documentation

ABA_LPVARSTAT::ABA_LPVARSTAT ( ABA_GLOBAL glob  )  [inline]

This constructor initializes the status as Unknown.

Parameters:
glob A pointer to the corresponding global object.

Definition at line 164 of file lpvarstat.h.

ABA_LPVARSTAT::ABA_LPVARSTAT ( ABA_GLOBAL glob,
STATUS  status 
) [inline]

This constructor initializes the ABA_LPVARSTAT.

Parameters:
glob A pointer to the corresponding global object.
status The initial status.

Definition at line 170 of file lpvarstat.h.

ABA_LPVARSTAT::ABA_LPVARSTAT ( ABA_LPVARSTAT lpVarStat  )  [inline]

This constructor make a copy of *lpVarStat.

Parameters:
lpVarStat A copy of this object is made.

Definition at line 176 of file lpvarstat.h.


Member Function Documentation

ABA_LPVARSTAT::STATUS ABA_LPVARSTAT::status (  )  const [inline]

Returns:
The LP-status.

Definition at line 182 of file lpvarstat.h.

void ABA_LPVARSTAT::status ( STATUS  stat  )  [inline]

This version of status() sets the status.

Parameters:
stat The new LP-status.

Definition at line 187 of file lpvarstat.h.

void ABA_LPVARSTAT::status ( const ABA_LPVARSTAT stat  )  [inline]

Another version of the function status() for setting the status.

Parameters:
stat The new LP-status.

Definition at line 192 of file lpvarstat.h.

bool ABA_LPVARSTAT::atBound (  )  const [inline]

Returns:
true If the variable status is AtUpperBound or AtLowerBound,

false otherwise.

Definition at line 197 of file lpvarstat.h.

bool ABA_LPVARSTAT::basic (  )  const [inline]

Returns:
true If the status is Basic,

false otherwise.

Definition at line 203 of file lpvarstat.h.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const ABA_LPVARSTAT rhs 
) [friend]

The output operator writes the STATUS to an output stream in the form { AtLowerBound}, { Basic}, { AtUpper\-Bound}, { NonBasicFree}, { Eliminated}, { Unknown}.

Returns:
A reference to the output stream.
Parameters:
out The output stream.
rhs The status being output.


Member Data Documentation

ABA_GLOBAL* ABA_LPVARSTAT::glob_ [private]

A pointer to the corresponding global object.

Definition at line 156 of file lpvarstat.h.

STATUS ABA_LPVARSTAT::status_ [private]

The LP-status.

Definition at line 160 of file lpvarstat.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:09:57 2007 for ABACUS by  doxygen 1.5.1