section provides a generic interface class to linear programs, from which we will derive further classes both for the solution of LP-relaxations (ABA_LPSUB) with a \ algorithm and for interfaces to LP-solvers (ABA_OSIIF).
#include <lp.h>
Inheritance diagram for ABA_LP::
|
This enumeration describes if parts of the solution like x-values, reduced costs, etc. are available.
The destructor.
This version of the function initialize() performs like its previous version, but also initializes the basis with the arguments:.
Can be called if the last linear program has been solved with the dual simplex method and is infeasible and all inactive variables price out correctly.
Writes the complete basis of an optimal linear program to a file.
The pure virtual function _sense() must be defined by the used LP-solver and return the sense of the optimization.
The pure virtual function _nRow() must be defined by the used LP-solver and return the number of rows of the problem.
The pure virtual function _maxRow() must be defined by the used LP-solver and return the maximal number of rows.
The pure virtual function _nCol() must be defined by the used LP-solver and return the number of columns.
The pure virtual function _maxCol() must be defined by the the used LP-solver and return the maximal number of columns.
The pure virtual function _nnz() must be defined by the used LP-solver and return the number of nonzero elements of the constraint matrix not including the right hand side and the bounds of the variables.
The pure virtual function _obj() must be defined by the used LP-solver and return the objective function coefficient of variable i.
The pure virtual function _lBound() must be defined by the used LP-solver and return the lower bound of variable i.
The pure virtual function _uBound() must be defined by the used LP-solver and return the upper bound of variable i.
The pure virtual function _rhs() must be defined by the used LP-solver and return the right hand side of constraint i.
The pure virtual function _initialize() must be defined by the used LP-solver and should initialize the LP-solver with.
The pure virtual function _primalSimplex() must be defined by the used LP-solver and should call the primal simplex method of the used LP-solver.
The pure virtual function _dualSimplex() must be defined by the used LP-solver and should call the dual simplex method of the used LP-solver.
The pure virtual function _barrier() must be defined by the used LP-solver and should call the barrier method of the used LP-solver.
The pure virtual function _approx() must be defined by the used LP-solver and should call the approximative method of the used LP-solver.
The pure virtual function _value() must be defined by the used LP-solver and should return the optimum value of the linear program after it has been solved.
The pure virtual function _xVal() must be defined by the used LP-solver and should return the value of variable i in the LP-solution.
The pure virtual function _reco() must be defined by the used LP-solver and should return the reduced cost of variable i.
The pure virtual function _slack() must be defined by the used LP-solver and should return the value of the slack variable i.
The pure virtual function _yVal() must be defined by the used LP-solver and should return the value of the dual variable of the constraint i.
The pure virtual function _lpVarStat() must be defined by the used LP-solver and should return the status of the variable i in the LP-solution.
The pure virtual function _slackStat() must be defined by the used LP-solver and should return the status of the slack variable i in the LP-solution.
The pure virtual function _getInfeas() must be defined by the used LP-solver and can be called if the last linear program has been solved with the dual simplex method and is infeasible.
The pure virtual function _remRows() must be defined by the used LP-solver and should remove the rows with numbers given in the buffer ind from the LP-solver.
The pure virtual function _addRows() must be defined by the used LP-solver and should add the rows given in the buffer newRows to the LP.
The pure virtual function _remCols() must be defined by the used LP-solver and should remove the columns with numbers given in vars from the LP.
The pure virtual function _addCols() must be defined by the used LP-solver and should add the columns newCols to the LP.
The pure virtual function _changeRhs() must be defined by the used LP-solver and should set the right hand side of the constraint matrix of the LP to newRhs.
The pure virtual function _changeLBound() must be defined by the used LP-solver and should set the lower bound of variable i to newLb.
The pure virtual function _changeLBound() must be defined by the used LP-solver and should set the upper bound of variable i to newUb.
The function pivotSlackVariableIn() pivots the slack variables stored in the buffer rows into the basis.
The pure virtual function _rowRealloc() must be defined in the used LP-solver and should reallocate its memory such that up to newSize rows can be handled.
The pure virtual function _colRealloc() must be defined by the used LP-solver and should reallocate its memory such that up to newSize columns can be handled.
The function setSimplexIterationLimit() changes the iteration limit of the Simplex algorithm.
The function getSimplexIterationLimit() retrieves the value of the iteration limit of the simplex algorithm.
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.
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/.
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.
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.
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.
Resets the optimization status and the availability statuses of the solution.
The output operator writes the objective function, followed by the constraints, the bounds on the columns and the solution values (if available) to an output stream.
section provides a generic interface class to linear programs, from which we will derive further classes both for the solution of LP-relaxations (ABA_LPSUB) with a \ algorithm and for interfaces to LP-solvers (ABA_OSIIF).
Definition at line 70 of file lp.h.
The optimization status of the linear program.
Definition at line 87 of file lp.h.
This enumeration describes if parts of the solution like x-values, reduced costs, etc. are available.
Definition at line 96 of file lp.h.
The solution method for the linear program.
Definition at line 107 of file lp.h.
The constructor.
The destructor.
Loads the linear program defined by its arguments.
We do not perform the initialization via arguments of a constructor, since for the most frequent application of linear programs within , the solution of the linear programming relaxations in the subproblems, the problem data is preprocessed before it is loaded. Only after the preprocessing in the constructor of the derived class, we can call initialize().
Of course, it would be possible to provide an extra constructor with automatic initialization if required.
Reimplemented in ABA_LPSUB.
This version of the function initialize() performs like its previous version, but also initializes the basis with the arguments:.
Reimplemented in ABA_LPSUB.
Loads a new basis for the linear program.
Reimplemented in ABA_LPSUB.
Definition at line 705 of file lp.h.
Definition at line 710 of file lp.h.
Definition at line 715 of file lp.h.
Definition at line 720 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 725 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 730 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 735 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 740 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 748 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 756 of file lp.h.
Definition at line 764 of file lp.h.
Definition at line 772 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 780 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 785 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 793 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 801 of file lp.h.
Definition at line 809 of file lp.h.
Definition at line 817 of file lp.h.
Definition at line 825 of file lp.h.
Definition at line 830 of file lp.h.
Definition at line 840 of file lp.h.
Definition at line 835 of file lp.h.
Definition at line 845 of file lp.h.
Definition at line 850 of file lp.h.
Definition at line 855 of file lp.h.
Reimplemented in ABA_LPSUB.
Definition at line 860 of file lp.h.
Can be called if the last linear program has been solved with the dual simplex method and is infeasible and all inactive variables price out correctly.
Then, the basis is dual feasible, but primal infeasible, i.e., some variables or slack variables violate their bounds. In this case the function getInfeas() determines an infeasible variable or slack variable.
0 On success,
1 otherwise.
Reimplemented in ABA_LPSUB.
Reimplemented in ABA_LPSUB.
Definition at line 866 of file lp.h.
Definition at line 874 of file lp.h.
Performs the optimization of the linear program.
The status of the optimization.
Reimplemented in ABA_LPSUB.
Removes rows of the linear program.
Adds rows to the linear program.
If the new number of rows exceeds the maximal number of rows a reallocation is performed.
Removes columns from the linear program.
Adds columns to the linear program.
If the new number of columns exceeds the maximal number of columns a reallocation is performed.
Changes the complete right hand side of the linear program.
Changes the lower bound of a single column.
Reimplemented in ABA_LPSUB.
Changes the upper bound of a single column.
Reimplemented in ABA_LPSUB.
Pivots the slack variables stored in the buffer rows into the basis.
0 All variables could be pivoted in,
1 otherwise.
Performs a reallocation of the row space of the linear program.
Reimplemented in ABA_LPSUB.
Performs a reallocation of the column space of the linear program.
Reimplemented in ABA_LPSUB.
Writes the complete basis of an optimal linear program to a file.
0 If a basis is available and could be written,
1 otherwise.
Changes the iteration limit of the Simplex algorithm.
0 If the iteration limit could be set,
1 otherwise.
0 If the iteration limit could be get,
1 otherwise.
Definition at line 347 of file lp.h.
Computes the number of nonzero elements in each column of a given set of rows.
Computes the columnwise representation of the row matrix.
Terminates the program if there is no row with index r.
Terminates the program if there is no column with index i.
The pure virtual function _sense() must be defined by the used LP-solver and return the sense of the optimization.
Implemented in ABA_OSIIF.
Implemented in ABA_OSIIF.
The pure virtual function _nRow() must be defined by the used LP-solver and return the number of rows of the problem.
Implemented in ABA_OSIIF.
The pure virtual function _maxRow() must be defined by the used LP-solver and return the maximal number of rows.
Implemented in ABA_OSIIF.
The pure virtual function _nCol() must be defined by the used LP-solver and return the number of columns.
Implemented in ABA_OSIIF.
The pure virtual function _maxCol() must be defined by the the used LP-solver and return the maximal number of columns.
Implemented in ABA_OSIIF.
The pure virtual function _nnz() must be defined by the used LP-solver and return the number of nonzero elements of the constraint matrix not including the right hand side and the bounds of the variables.
Implemented in ABA_OSIIF.
The pure virtual function _obj() must be defined by the used LP-solver and return the objective function coefficient of variable i.
Implemented in ABA_OSIIF.
The pure virtual function _lBound() must be defined by the used LP-solver and return the lower bound of variable i.
Implemented in ABA_OSIIF.
The pure virtual function _uBound() must be defined by the used LP-solver and return the upper bound of variable i.
Implemented in ABA_OSIIF.
The pure virtual function _rhs() must be defined by the used LP-solver and return the right hand side of constraint i.
Implemented in ABA_OSIIF.
The pure virtual function _row() must be defined by the used LP-solver and store the i-th row of the problem in the row r.
Implemented in ABA_OSIIF.
The pure virtual function _initialize() must be defined by the used LP-solver and should initialize the LP-solver with.
Implemented in ABA_OSIIF.
This pure virtual function should load a basis into the LP-solver.
Implemented in ABA_OSIIF.
The pure virtual function _primalSimplex() must be defined by the used LP-solver and should call the primal simplex method of the used LP-solver.
Implemented in ABA_OSIIF.
The pure virtual function _dualSimplex() must be defined by the used LP-solver and should call the dual simplex method of the used LP-solver.
Implemented in ABA_OSIIF.
The pure virtual function _barrier() must be defined by the used LP-solver and should call the barrier method of the used LP-solver.
Implemented in ABA_OSIIF.
The pure virtual function _approx() must be defined by the used LP-solver and should call the approximative method of the used LP-solver.
Implemented in ABA_OSIIF.
The pure virtual function _value() must be defined by the used LP-solver and should return the optimum value of the linear program after it has been solved.
Implemented in ABA_OSIIF.
The pure virtual function _xVal() must be defined by the used LP-solver and should return the value of variable i in the LP-solution.
Implemented in ABA_OSIIF.
Implemented in ABA_OSIIF.
The pure virtual function _reco() must be defined by the used LP-solver and should return the reduced cost of variable i.
Implemented in ABA_OSIIF.
The pure virtual function _slack() must be defined by the used LP-solver and should return the value of the slack variable i.
Implemented in ABA_OSIIF.
The pure virtual function _yVal() must be defined by the used LP-solver and should return the value of the dual variable of the constraint i.
Implemented in ABA_OSIIF.
The pure virtual function _lpVarStat() must be defined by the used LP-solver and should return the status of the variable i in the LP-solution.
Implemented in ABA_OSIIF.
The pure virtual function _slackStat() must be defined by the used LP-solver and should return the status of the slack variable i in the LP-solution.
Implemented in ABA_OSIIF.
The pure virtual function _getInfeas() must be defined by the used LP-solver and can be called if the last linear program has been solved with the dual simplex method and is infeasible.
In this case it should compute the infeasible basic variable or constraint and the corresponding row bInvRow of the basis inverse. Either infeasRow or infeasCol is nonnegative. The nonnegative argument is an infeasible row or column, respectively.
0 if it is successful
1 otherwise.
Implemented in ABA_OSIIF.
The pure virtual function _remRows() must be defined by the used LP-solver and should remove the rows with numbers given in the buffer ind from the LP-solver.
Implemented in ABA_OSIIF.
The pure virtual function _addRows() must be defined by the used LP-solver and should add the rows given in the buffer newRows to the LP.
Implemented in ABA_OSIIF.
The pure virtual function _remCols() must be defined by the used LP-solver and should remove the columns with numbers given in vars from the LP.
Implemented in ABA_OSIIF.
The pure virtual function _addCols() must be defined by the used LP-solver and should add the columns newCols to the LP.
Implemented in ABA_OSIIF.
The pure virtual function _changeRhs() must be defined by the used LP-solver and should set the right hand side of the constraint matrix of the LP to newRhs.
Implemented in ABA_OSIIF.
The pure virtual function _changeLBound() must be defined by the used LP-solver and should set the lower bound of variable i to newLb.
Implemented in ABA_OSIIF.
The pure virtual function _changeLBound() must be defined by the used LP-solver and should set the upper bound of variable i to newUb.
Implemented in ABA_OSIIF.
The function pivotSlackVariableIn() pivots the slack variables stored in the buffer rows into the basis.
0 All variables could be pivoted in,
1 otherwise.
Implemented in ABA_OSIIF.
The pure virtual function _rowRealloc() must be defined in the used LP-solver and should reallocate its memory such that up to newSize rows can be handled.
Implemented in ABA_OSIIF.
The pure virtual function _colRealloc() must be defined by the used LP-solver and should reallocate its memory such that up to newSize columns can be handled.
Implemented in ABA_OSIIF.
The function setSimplexIterationLimit() changes the iteration limit of the Simplex algorithm.
0 If the iteration limit could be set,
1 otherwise.
Implemented in ABA_OSIIF.
The function getSimplexIterationLimit() retrieves the value of the iteration limit of the simplex algorithm.
0 If the iteration limit could be get,
1 otherwise.
Implemented in ABA_OSIIF.
Resets the optimization status and the availability statuses of the solution.
The function initPostOpt() must be called after each modification of the linear program. It resets the optimization status and the availability status of the solution.
The output operator writes the objective function, followed by the constraints, the bounds on the columns and the solution values (if available) to an output stream.
Every ten output columns we perform a line break for better readability. This has also the advantage that LP-solvers with an input function requiring a limited length of a line (e.g., Cplex 255 characters) have a higher chance to read a file generated by this output operator.
A reference to the output stream.
A pointer to the corresponding master of the optimization.
Definition at line 644 of file lp.h.
The status of the linear program.
Definition at line 648 of file lp.h.
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.
Definition at line 654 of file lp.h.
Definition at line 655 of file lp.h.
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/.
Definition at line 662 of file lp.h.
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.
Definition at line 668 of file lp.h.
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.
Definition at line 675 of file lp.h.
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.
Definition at line 683 of file lp.h.
The number of optimizations of the linear program.
Definition at line 687 of file lp.h.
Definition at line 688 of file lp.h.
The documentation for this class was generated from the following file: