Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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.
 
virtual ~LpSubOsi ()
 The destructor.
 
- Public Member Functions inherited from abacus::LpSub
 LpSub (Master *master, const Sub *sub)
 The constructor.
 
virtual ~LpSub ()
 The destructor.
 
virtual double barXVal (int i) const override
 We have to redefine the function barXVal(i) since variables may have been eliminated.
 
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.
 
ArrayBuffer< InfeasCon * > * infeasCon ()
 Returns a pointer to the buffer holding the infeasible constraints.
 
virtual bool infeasible () const override
 
double lBound (int i) const
 We have to redefine the function lBound(i) since variables may have been eliminated.
 
virtual void loadBasis (Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat) override
 Loads a new basis for the linear program.
 
virtual LPVARSTAT::STATUS lpVarStat (int i) const override
 Returns the status of the variable in the linear program.
 
virtual double reco (int i) const override
 We define the reduced costs of eliminated variables as 0.
 
const Subsub () const
 
int trueNCol () const
 Returns the number of columns which are passed to the LP-solver.
 
int trueNnz () const
 Returns the number of nonzeros which are currently present in the constraint matrix of the LP-solver.
 
double uBound (int i) const
 We have to redefine the function uBound(i) since variables may have been eliminated.
 
virtual double value () const override
 Returns the objective function value of the linear program.
 
virtual double xVal (int i) const override
 We have to redefine the function xVal(i) since variables may have been eliminated.
 
- Public Member Functions inherited from abacus::LP
 LP (Master *master)
 Creates a linear program.
 
virtual ~LP ()
 The destructor.
 
void addCols (ArrayBuffer< Column * > &newCols)
 Adds columns to the linear program.
 
void addRows (ArrayBuffer< Row * > &newRows)
 Adds rows to the linear program.
 
SOLSTAT barXValStatus () const
 
SOLSTAT basisStatus () const
 
void changeRhs (Array< double > &newRhs)
 Changes the complete right hand side of the linear program.
 
void colRealloc (int newSize)
 Performs a reallocation of the column space of the linear program.
 
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.
 
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:
 
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.
 
SOLSTAT recoStatus () const
 
void remCols (ArrayBuffer< int > &cols)
 Removes columns from the linear program.
 
void remRows (ArrayBuffer< int > &ind)
 Removes rows of the linear program.
 
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.
 
OptSense sense () const
 
void sense (const OptSense &newSense)
 
int setSimplexIterationLimit (int limit)
 Changes the iteration limit of the Simplex algorithm.
 
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.
 
SOLSTAT xValStatus () const
 
virtual double yVal (int c) const
 
SOLSTAT yValStatus () const
 
- Public Member Functions inherited from abacus::AbacusRoot
virtual ~AbacusRoot ()
 The destructor.
 
- Public Member Functions inherited from abacus::OsiIF
 OsiIF (Master *master)
 Constructor without initialization.
 
 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.
 
virtual ~OsiIF ()
 The destructor.
 
SOLVERTYPE currentSolverType () const
 
OsiSolverInterfaceosiLP ()
 

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.
 
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 charonOff (bool value)
 Converts a boolean variable to the strings "on" and "off".
 
- Protected Member Functions inherited from abacus::LpSub
virtual void initialize ()
 This function will pass the linear program of the associated subproblem to the solver.
 
- Protected Member Functions inherited from abacus::LP
void colRangeCheck (int i) const
 Terminates the program if there is no column with index i.
 
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.
 
void rowRangeCheck (int r) const
 Terminates the program if there is no row with index r.
 
void rows2cols (int nRow, Array< Row * > &rows, Array< SparVec * > &cols)
 Computes the columnwise representation of the row matrix.
 
- 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.
 
ogdf::StopwatchCPU lpSolverTime_
 
Mastermaster_
 A pointer to the corresponding master of the optimization.
 
int nOpt_
 The number of optimizations of the linear program.
 
OPTSTAT optStat_
 The status of the linear program.
 
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.
 
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.
 
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.
 
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/.
 

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: