Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

abacus::LpSubOsi Class Reference

#include <ogdf/lib/abacus/lpsubosi.h>

+ Inheritance diagram for abacus::LpSubOsi:

Public Member Functions

 LpSubOsi (Master *master, Sub *sub)
 The constructor. More...
 
virtual ~LpSubOsi ()
 The destructor. More...
 
- Public Member Functions inherited from abacus::LpSub
 LpSub (Master *master, const Sub *sub)
 The constructor. More...
 
virtual ~LpSub ()
 The destructor. More...
 
virtual double barXVal (int i) const override
 We have to redefine the function barXVal(i) since variables may have been eliminated. More...
 
virtual int getInfeas (int &infeasCon, int &infeasVar, double *bInvRow) const override
 Is called if the last linear program has been solved with the dual simplex method and is infeasible. More...
 
ArrayBuffer< InfeasCon * > * infeasCon ()
 Returns a pointer to the buffer holding the infeasible constraints. More...
 
virtual bool infeasible () const override
 
double lBound (int i) const
 We have to redefine the function lBound(i) since variables may have been eliminated. More...
 
virtual void loadBasis (Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat) override
 Loads a new basis for the linear program. More...
 
virtual LPVARSTAT::STATUS lpVarStat (int i) const override
 Returns the status of the variable in the linear program. More...
 
virtual double reco (int i) const override
 We define the reduced costs of eliminated variables as 0. More...
 
const Subsub () const
 
int trueNCol () const
 Returns the number of columns which are passed to the LP-solver. More...
 
int trueNnz () const
 Returns the number of nonzeros which are currently present in the constraint matrix of the LP-solver. More...
 
double uBound (int i) const
 We have to redefine the function uBound(i) since variables may have been eliminated. More...
 
virtual double value () const override
 Returns the objective function value of the linear program. More...
 
virtual double xVal (int i) const override
 We have to redefine the function xVal(i) since variables may have been eliminated. More...
 
- Public Member Functions inherited from abacus::LP
 LP (Master *master)
 Creates a linear program. More...
 
virtual ~LP ()
 The destructor. More...
 
void addCols (ArrayBuffer< Column * > &newCols)
 Adds columns to the linear program. More...
 
void addRows (ArrayBuffer< Row * > &newRows)
 Adds rows to the linear program. More...
 
SOLSTAT barXValStatus () const
 
SOLSTAT basisStatus () const
 
void changeRhs (Array< double > &newRhs)
 Changes the complete right hand side of the linear program. More...
 
void colRealloc (int newSize)
 Performs a reallocation of the column space of the linear program. More...
 
int getSimplexIterationLimit (int &limit) const
 
void initialize (OptSense sense, int nRow, int maxRow, int nCol, int maxCol, Array< double > &obj, Array< double > &lBound, Array< double > &uBound, Array< Row * > &rows)
 Loads the linear program defined by its arguments. More...
 
void initialize (OptSense sense, int nRow, int maxRow, int nCol, int maxCol, Array< double > &obj, Array< double > &lBound, Array< double > &uBound, Array< Row * > &rows, Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat)
 This version of the function initialize() performs like its previous version, but also initializes the basis with the arguments: More...
 
double lBound (int i) const
 
ogdf::StopwatchCPUlpSolverTime ()
 
int maxCol () const
 
int maxRow () const
 
int nCol () const
 
int nnz () const
 
int nOpt () const
 
int nRow () const
 
double obj (int i) const
 
virtual int pivotSlackVariableIn (ArrayBuffer< int > &rows)
 Pivots the slack variables stored in the buffer rows into the basis. More...
 
SOLSTAT recoStatus () const
 
void remCols (ArrayBuffer< int > &cols)
 Removes columns from the linear program. More...
 
void remRows (ArrayBuffer< int > &ind)
 Removes rows of the linear program. More...
 
double rhs (int i) const
 
void row (int i, Row &r) const
 
void rowRealloc (int newSize)
 Performs a reallocation of the row space of the linear program. More...
 
OptSense sense () const
 
void sense (const OptSense &newSense)
 
int setSimplexIterationLimit (int limit)
 Changes the iteration limit of the Simplex algorithm. More...
 
virtual double slack (int c) const
 
virtual SlackStat::STATUS slackStat (int i) const
 
SOLSTAT slackStatus () const
 
double uBound (int i) const
 
int writeBasisMatrix (const char *fileName)
 Writes the complete basis of an optimal linear program to a file. More...
 
SOLSTAT xValStatus () const
 
virtual double yVal (int c) const
 
SOLSTAT yValStatus () const
 
- Public Member Functions inherited from abacus::AbacusRoot
virtual ~AbacusRoot ()
 The destructor. More...
 
- Public Member Functions inherited from abacus::OsiIF
 OsiIF (Master *master)
 Constructor without initialization. More...
 
 OsiIF (Master *master, OptSense sense, int nRow, int maxRow, int nCol, int maxCol, Array< double > &obj, Array< double > &lb, Array< double > &ub, Array< Row * > &rows)
 A constructor with initialization. More...
 
virtual ~OsiIF ()
 The destructor. More...
 
SOLVERTYPE currentSolverType () const
 
OsiSolverInterface * osiLP ()
 

Private Member Functions

 LpSubOsi (const LpSubOsi &rhs)
 
const LpSubOsioperator= (const LpSubOsi &rhs)
 

Additional Inherited Members

- Public Types inherited from abacus::LP
enum  METHOD { Primal, Dual, BarrierAndCrossover, BarrierNoCrossover, Approximate }
 The solution method for the linear program. More...
 
enum  OPTSTAT { Optimal, Unoptimized, Error, Feasible, Infeasible, Unbounded, LimitReached }
 The optimization status of the linear program. More...
 
enum  SOLSTAT { Available, Missing }
 Describes if parts of the solution like x-values, reduced costs, etc. are available. More...
 
- Public Types inherited from abacus::OsiIF
enum  SOLVERTYPE { Exact, Approx }
 The enumeration of possible solver types. More...
 
- Static Public Member Functions inherited from abacus::AbacusRoot
static bool ascii2bool (const string &str)
 Converts the string str to a boolean value. More...
 
static bool endsWith (const string &str, const string &end)
 Returns true if str ends with end, false otherwise. More...
 
static double fracPart (double x)
 Returns the absolute value of the fractional part of x. More...
 
static const char * onOff (bool value)
 Converts a boolean variable to the strings "on" and "off". More...
 
- Protected Member Functions inherited from abacus::LpSub
virtual void initialize ()
 This function will pass the linear program of the associated subproblem to the solver. More...
 
- Protected Member Functions inherited from abacus::LP
void colRangeCheck (int i) const
 Terminates the program if there is no column with index i. More...
 
void colsNnz (int nRow, Array< Row * > &rows, Array< int > &nnz)
 Computes the number of nonzero elements in each column of a given set of rows. More...
 
void rowRangeCheck (int r) const
 Terminates the program if there is no row with index r. More...
 
void rows2cols (int nRow, Array< Row * > &rows, Array< SparVec * > &cols)
 Computes the columnwise representation of the row matrix. More...
 
- Protected Attributes inherited from abacus::LP
SOLSTAT barXValStatus_
 
SOLSTAT basisStatus_
 This member becomes Available if the status of the variables and the slack variables of the optimal solution can be accessed with the functions lpVarStat() and slackStat(), otherwise it has the value Missing. More...
 
ogdf::StopwatchCPU lpSolverTime_
 
Mastermaster_
 A pointer to the corresponding master of the optimization. More...
 
int nOpt_
 The number of optimizations of the linear program. More...
 
OPTSTAT optStat_
 The status of the linear program. More...
 
SOLSTAT recoStatus_
 This member becomes Available if the reduced costs of the optimal solution can be accessed with the function reco(), otherwise it has the value Missing. More...
 
SOLSTAT slackStatus_
 This member becomes Available if the values of the slack variables of the optimal solution can be accessed with the function slack(), otherwise it has the value Missing. More...
 
SOLSTAT xValStatus_
 This member becomes Available if the \(x\)-values of the optimal solution can be accessed with the function xVal(), otherwise it has the value Missing. More...
 
SOLSTAT yValStatus_
 This member becomes Available if the values of the dual variables of the optimal solution can be accessed with the function yVal(), otherwise it has the value Missing/. More...
 

Detailed Description

Definition at line 45 of file lpsubosi.h.

Constructor & Destructor Documentation

◆ LpSubOsi() [1/2]

abacus::LpSubOsi::LpSubOsi ( Master master,
Sub sub 
)
inline

The constructor.

Calls the function initialize() of the base classLpSub, which sets up the linear program and passes the data to the LP-solver.

Parameters
masterA pointer to the corresponding master of the optimization.
subThe subproblem of which the LP-relaxation is solved.

Definition at line 57 of file lpsubosi.h.

◆ ~LpSubOsi()

virtual abacus::LpSubOsi::~LpSubOsi ( )
inlinevirtual

The destructor.

Definition at line 66 of file lpsubosi.h.

◆ LpSubOsi() [2/2]

abacus::LpSubOsi::LpSubOsi ( const LpSubOsi rhs)
private

Member Function Documentation

◆ operator=()

const LpSubOsi& abacus::LpSubOsi::operator= ( const LpSubOsi rhs)
private

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