class is derived from the class LP to implement the linear programming relaxations of a subproblem. We require this class as the ABA_CONSTRAINT/ABA_VARIABLE format of the constraints/variables has to be transformed to the ABA_ROW/ABA_COLUMN format required by the class LP.
#include <lpsub.h>
Inheritance diagram for ABA_LPSUB::
|
The destructor deletes the components of infeasCons_ since they might have been allocated in the constructor and ABA_SUB::initializeLp() deletes after having tried to add variables restoring feasibility immediately ABA_LPSUB. Afterwards the constructor of ABA_LPSUB is called again.
We have to redefine the function lBound(i) since variables may have been eliminated.
We have to redefine the function uBound(i) since variables may have been eliminated.
Since variables might be eliminated we have to add to the solution value of the LP-solver the objective function part of the eliminated variables, to get the right value of value().
We have to redefine the function xVal(i) since variables may have been eliminated.
We have to redefine the function barXVal(i) since variables may have been eliminated.
Is called if the last linear program has been solved with the dual simplex method and is infeasible.
The function initialize() has to be called in the constructor of the class derived from this class and from a class implementing an LP-solver.
Returns true if the variable i is actually eliminated from the LP.
This version of the function initialize() performs like its previous version, but also initializes the basis with the arguments:.
After the elimination of variables the internal variables are again numbered consecutively starting with 0. orig2lp_[i] is the internal number of the variable i. This is -1 if the variable is eliminated.
The constant which has been added to the objective function value due to the elimination of variables.
class is derived from the class LP to implement the linear programming relaxations of a subproblem. We require this class as the ABA_CONSTRAINT/ABA_VARIABLE format of the constraints/variables has to be transformed to the ABA_ROW/ABA_COLUMN format required by the class LP.
Definition at line 57 of file lpsub.h.
The constructor.
The destructor deletes the components of infeasCons_ since they might have been allocated in the constructor and ABA_SUB::initializeLp() deletes after having tried to add variables restoring feasibility immediately ABA_LPSUB. Afterwards the constructor of ABA_LPSUB is called again.
Definition at line 357 of file lpsub.h.
The number of columns which are passed to the LP-solver, i.e., the number of active variables of the subproblem minus the number of eliminated variables.
Definition at line 368 of file lpsub.h.
The number of nonzeros which are currently present in the constraint matrix of the LP-solver.
Definition at line 373 of file lpsub.h.
We have to redefine the function lBound(i) since variables may have been eliminated.
The lower bound of variable i. If a variable is eliminated, we return the value the eliminated variable is fixed or set to.
Reimplemented from ABA_LP.
We have to redefine the function uBound(i) since variables may have been eliminated.
The upper bound of variable i. If a variable is eliminated, we return the value the eliminated variable is fixed or set to.
Reimplemented from ABA_LP.
Since variables might be eliminated we have to add to the solution value of the LP-solver the objective function part of the eliminated variables, to get the right value of value().
The objective function value of the linear program.
Reimplemented from ABA_LP.
Definition at line 378 of file lpsub.h.
We have to redefine the function xVal(i) since variables may have been eliminated.
The x-value of variable i after the solution of the linear program.
Reimplemented from ABA_LP.
We have to redefine the function barXVal(i) since variables may have been eliminated.
The x-value of variable i after the solution of the linear program before crossing over to a basic solution.
Reimplemented from ABA_LP.
We define the reduced costs of eliminated variables as 0.
The reduced cost of variable i.
Reimplemented from ABA_LP.
The status of the variable in the linear program. If the variable i is eliminated, then ABA_LPVARSTAT::Eliminated is returned.
Reimplemented from ABA_LP.
Is called if the last linear program has been solved with the dual simplex method and is infeasible.
In this case it computes the infeasible basic variable or constraint and the corresponding row of the basis inverse.
0 If no error occurs,
1 otherwise.
Reimplemented from ABA_LP.
true If the LP turned out to be infeasible either if the base class LP detected an infeasibility during the solution of the linear program or infeasible constraints have been memorized during the construction of the LP or during the addition of constraints, }
false otherwise.
Reimplemented from ABA_LP.
return A pointer to the buffer holding the infeasible constraints.
Definition at line 383 of file lpsub.h.
Loads a new basis for the linear program.
The function redefines a virtual function of the base class LP. Eliminated variables have to be considered when the basis is loaded.
Reimplemented from ABA_LP.
The function initialize() has to be called in the constructor of the class derived from this class and from a class implementing an LP-solver.
This function will pass the linear program of the associated subproblem to the solver.
Performs the optimization of the linear program with method method.
This function redefines a virtual function of the base class LP.
We have to reimplement optimize() since there might be infeasible constraints. If a linear program turns out to be infeasible but has not been solved with the dual simplex method we solve it again to find a dual feasible basis which can be used to determine inactive variables restoring feasibility. Before the optimization can be performed the infeasible constraints must be removed with the function _initMakeFeas(), then the LP should be deleted and reconstructed. This is done by the function solveLp() in the cutting plane algorithm of the class ABA_SUB.
Reimplemented from ABA_LP.
Removes all constraints listed in the buffer ind from the linear program.
Removes the variables with names given in vars from the linear program.
Adds the constraints newCons to the linear program.
Sets the lower bound of variable i to newLb.
It is not allowed to change the lower bound of an eliminated variable. This will cause a run-time error.
Reimplemented from ABA_LP.
Sets the upper bound of variable i to newUb.
It is not allowed to change the upper bound of an eliminated variable. This will cause a run-time error.
Reimplemented from ABA_LP.
Sets the maximal number of variables to newSize.
Sets the maximal number of constraints to newSize.
Generates the row format of the constraint cons and stores it in rows.
Returns true if the function can be eliminated.
This function may be only applied to variables which are fixed or set! It is sufficient for turning off any variable elimination to return always false by this function.
Returns true if the variable i is actually eliminated from the LP.
This function can give different results than the function eliminate(i) since the condition to eliminate a variable might have become true after the LP has been set up.
Definition at line 362 of file lpsub.h.
Returns the value the variable i to which it is fixed or set to.
The value of an eliminated variable is defined by the bound to which it is fixed or set. There is no reason to distinguish between sub_ and master_ in the switch statement, since both values should be equal.
Returns the value a variable is fixed or set to.
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 from ABA_LP.
This version of the function initialize() performs like its previous version, but also initializes the basis with the arguments:.
Reimplemented from ABA_LP.
Reimplemented from ABA_LP.
Reimplemented from ABA_LP.
Reimplemented from ABA_LP.
Reimplemented from ABA_LP.
Performs a reallocation of the row space of the linear program.
Reimplemented from ABA_LP.
Performs a reallocation of the column space of the linear program.
Reimplemented from ABA_LP.
Definition at line 58 of file lpsub.h.
Definition at line 59 of file lpsub.h.
Definition at line 60 of file lpsub.h.
Definition at line 61 of file lpsub.h.
Definition at line 62 of file lpsub.h.
Definition at line 63 of file lpsub.h.
A pointer to the corresponding subproblem.
Definition at line 327 of file lpsub.h.
After the elimination of variables the internal variables are again numbered consecutively starting with 0. orig2lp_[i] is the internal number of the variable i. This is -1 if the variable is eliminated.
Definition at line 334 of file lpsub.h.
Orignial number of a (non-eliminated) variable.
Definition at line 338 of file lpsub.h.
Buffer storing the infeasible constraints found be the constructor.
Definition at line 342 of file lpsub.h.
The constant which has been added to the objective function value due to the elimination of variables.
Definition at line 347 of file lpsub.h.
The number of original variables of the linear program.
Definition at line 351 of file lpsub.h.
The documentation for this class was generated from the following file: