107 optStat_(Unoptimized),
108 xValStatus_(Missing),
109 barXValStatus_(Missing),
110 yValStatus_(Missing),
111 recoStatus_(Missing),
112 slackStatus_(Missing),
113 basisStatus_(Missing),
170 _initialize(sense, nRow, maxRow, nCol, maxCol, obj, lBound, uBound, rows);
191 int nRow,
int maxRow,
192 int nCol,
int maxCol,
199 _initialize(sense, nRow, maxRow, nCol, maxCol, obj, lBound, uBound, rows);
200 loadBasis(lpVarStat,slackStat);
212 _loadBasis(lpVarStat,slackStat);
219 int nRow()
const {
return _nRow(); }
223 int nCol()
const {
return _nCol(); }
227 int nnz()
const {
return _nnz(); }
264 virtual double value()
const {
return _value(); }
266 virtual double xVal(
int i)
const {
280 virtual double reco(
int i)
const {
287 virtual double yVal(
int c)
const {
313 int nOpt()
const {
return nOpt_; }
316 return ( optStat_ == Infeasible );
346 virtual int getInfeas(
int &infeasRow,
int &infeasCol,
double *bInvRow)
const {
347 return _getInfeas(infeasRow,infeasCol,bInvRow);
354 return _lpVarStat(i);
361 return _slackStat(i);
422 virtual void changeLBound(
int i,
double newLb);
429 virtual void changeUBound(
int i,
double newUb);
446 _rowRealloc(newSize);
454 _colRealloc(newSize);
466 int writeBasisMatrix(
const char *fileName);
476 return _setSimplexIterationLimit(limit);
486 return _getSimplexIterationLimit(limit);
524 void rowRangeCheck(
int r)
const;
530 void colRangeCheck(
int i)
const;
535 virtual OptSense _sense()
const = 0;
536 virtual void _sense(
const OptSense &newSense) = 0;
541 virtual int _nRow()
const = 0;
546 virtual int _maxRow()
const = 0;
551 virtual int _nCol()
const = 0;
556 virtual int _maxCol()
const = 0;
563 virtual int _nnz()
const = 0;
569 virtual double _obj(
int i)
const = 0;
574 virtual double _lBound(
int i)
const = 0;
579 virtual double _uBound(
int i)
const = 0;
584 virtual double _rhs(
int i)
const = 0;
589 virtual void _row(
int i,
Row &r)
const = 0;
604 virtual void _initialize(
OptSense sense,
int nRow,
int maxRow,
605 int nCol,
int maxCol,
621 virtual OPTSTAT _primalSimplex() = 0;
627 virtual OPTSTAT _dualSimplex() = 0;
633 virtual OPTSTAT _barrier(
bool doCrossover) = 0;
645 virtual double _value()
const = 0;
651 virtual double _xVal(
int i)
const = 0;
652 virtual double _barXVal(
int i)
const = 0;
657 virtual double _reco(
int i)
const = 0;
662 virtual double _slack(
int i)
const = 0;
668 virtual double _yVal(
int i)
const = 0;
694 virtual int _getInfeas(
int &infeasRow,
int &infeasCol,
695 double *bInvRow)
const = 0;
731 virtual void _changeLBound(
int i,
double newLb) = 0;
737 virtual void _changeUBound(
int i,
double newUb) = 0;
755 virtual void _rowRealloc(
int newSize) = 0;
761 virtual void _colRealloc(
int newSize) = 0;
771 virtual int _setSimplexIterationLimit(
int limit) = 0;
782 virtual int _getSimplexIterationLimit(
int &limit)
const = 0;
842 optStat_= Unoptimized;
843 xValStatus_= barXValStatus_= recoStatus_= Missing;
844 slackStatus_= yValStatus_= basisStatus_= Missing;
848 const LP &operator=(
const LP &rhs);
888 inline double LP::obj(
int i)
const 920 inline double LP::rhs(
int i)
const 980 return barXValStatus_;
1000 return basisStatus_;
1010 if (optStat_ == Infeasible)
return true;
1019 return _lpVarStat(i);
1027 return _slackStat(i);
STATUS
The different statuses of a slack variable.
void initPostOpt()
Resets the optimization status and the availability statuses of the solution.
virtual double yVal(int c) const
Base class of all other classes of ABACUS.
Representation of constraints in the row format.
The master of the optimization.
SOLSTAT slackStatus_
This member becomes Available if the values of the slack variables of the optimal solution can be acc...
ogdf::StopwatchCPU lpSolverTime_
ogdf::StopwatchCPU * lpSolverTime()
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Declaration of stopwatch classes.
The primal simplex method.
virtual double reco(int i) const
int nOpt_
The number of optimizations of the linear program.
SOLSTAT slackStatus() 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 row(int i, Row &r) const
SOLSTAT recoStatus() const
void colRealloc(int newSize)
Performs a reallocation of the column space of the linear program.
void remCols(ArrayBuffer< int > &cols)
Removes columns from the linear program.
status of slack variables
SOLSTAT recoStatus_
This member becomes Available if the reduced costs of the optimal solution can be accessed with the f...
SOLSTAT basisStatus_
This member becomes Available if the status of the variables and the slack variables of the optimal s...
The part of the solution is available.
SOLSTAT barXValStatus() const
OPTSTAT
The optimization status of the linear program.
virtual double xVal(int i) const
The optimal solution has been computed.
SOLSTAT yValStatus_
This member becomes Available if the values of the dual variables of the optimal solution can be acce...
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 th...
The linear program is unbounded.
virtual SlackStat::STATUS slackStat(int i) const
virtual LPVARSTAT::STATUS lpVarStat(int i) const
Master * master_
A pointer to the corresponding master of the optimization.
LP(Master *master)
Creates a linear program.
The barrier method without crossover.
SOLSTAT xValStatus() const
virtual double slack(int c) const
virtual int getInfeas(int &infeasRow, int &infeasCol, double *bInvRow) const
Can be called if the last linear program has been solved with the dual simplex method and is infeasib...
SOLSTAT yValStatus() const
SOLSTAT xValStatus_
This member becomes Available if the -values of the optimal solution can be accessed with the functio...
int getSimplexIterationLimit(int &limit) const
void sense(const OptSense &newSense)
virtual bool infeasible() const
int setSimplexIterationLimit(int limit)
Changes the iteration limit of the Simplex algorithm.
virtual double barXVal(int i) const
void changeRhs(Array< double > &newRhs)
Changes the complete right hand side of the linear program.
STATUS
The enumeration of the statuses a variable gets from the linear program solver.
METHOD
The solution method for the linear program.
ostream & operator<<(ostream &out, const Active< BaseType, CoType > &rhs)
virtual void loadBasis(Array< LPVARSTAT::STATUS > &lpVarStat, Array< SlackStat::STATUS > &slackStat)
Loads a new basis for the linear program.
double uBound(int i) const
virtual double value() const
void remRows(ArrayBuffer< int > &ind)
Removes rows of the linear program.
SOLSTAT
Describes if parts of the solution like x-values, reduced costs, etc. are available.
double lBound(int i) const
void rowRealloc(int newSize)
Performs a reallocation of the row space of the linear program.
The linear program is primal infeasible.
virtual ~LP()
The destructor.
OPTSTAT optStat_
The status of the linear program.
SOLSTAT basisStatus() const
An error has happened during optimization.
Implements a stopwatch measuring CPU time.
The barrier method followed by a crossover to a basis.