Tailing off manager. More...
#include <ogdf/lib/abacus/tailoff.h>
Public Member Functions | |
TailOff (Master *master) | |
The constructor takes the length of the tailing off history from Master::tailOffNLp(). More... | |
TailOff (Master *master, int NLp) | |
An alternative constructor takes the length of the tailing off history from the parameter NLp. More... | |
~TailOff () | |
The destructor. More... | |
int | diff (int nLps, double &d) const |
Can be used to retrieve the difference between the last and a previous LP-solution in percent. More... | |
virtual bool | tailOff () const |
Checks whether there is a tailing-off effect. More... | |
Public Member Functions inherited from abacus::AbacusRoot | |
virtual | ~AbacusRoot () |
The destructor. More... | |
Protected Member Functions | |
void | reset () |
Clears the solution history. More... | |
void | update (double value) |
A new LP-solution value can be stored by calling the function update(). More... | |
Protected Attributes | |
AbaRing< double > * | lpHistory_ |
The LP-values considered in the tailing off analysis. More... | |
Master * | master_ |
A pointer to the corresponding master of the optimization. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const TailOff &rhs) |
The output operator. More... | |
class | Sub |
Additional Inherited Members | |
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... | |
Tailing off manager.
During the cutting plane phase of the optimization of a single subproblem it can be quite often observed that during the first iterations a significant decrease of the optimum value of the LP occurs, yet, this decrease becomes smaller and smaller in later iterations. This effect is called tailing off (see M. Padberg, G. Rinaldi, A branch-and-cut algorithm for the resolution of large-scale symmetric traveling salesman problems, SIAM Review 33, pp. 60-100). Experimental results show that it might be better to branch, although violated constraints can still be generated, than to continue the cutting plane phase.
This class stores the history of the values of the last LP-solutions and implements all functions to control this tailing-off effect. The parameters are taken from the associated master.
|
inline |
The constructor takes the length of the tailing off history from Master::tailOffNLp().
master | A pointer to the corresponding master of the optimization. |
|
inline |
int abacus::TailOff::diff | ( | int | nLps, |
double & | d | ||
) | const |
Can be used to retrieve the difference between the last and a previous LP-solution in percent.
nLps | The number of LPs before the last solved linear program with which the last solved LP-value should be compared. |
d | Contains the absolute difference bewteen the value of the last solved linear program and the value of the linear program solved nLps before in percent relative to the older value. |
|
inlineprotected |
Clears the solution history.
This function should be called if variables are added, because normally the solution value of the LP-relaxation gets worse after the addition of variables. Such a change could falsely indicate a tailing-off effect if the history of LP-values is not reset.
|
virtual |
Checks whether there is a tailing-off effect.
We assume a tailing-off effect if during the last Master::tailOffNLps() iterations of the cutting plane algorithms the dual bound changed at most Master::tailOffPercent() percent.
|
inlineprotected |
|
friend |
The output operator.
Writes the memorized LP-values on an output stream.
out | The output stream. |
rhs | The tailing-off manager being output. |
|
protected |
|
protected |