#include <tailoff.h>
Inheritance diagram for ABA_TAILOFF:
Public Member Functions | |
ABA_TAILOFF (ABA_MASTER *master) | |
The constructor takes the length of the tailing off history from ABA_MASTER::tailOffNLp(). | |
ABA_TAILOFF (ABA_MASTER *master, int NLp) | |
An alternative constructor takes the length of the tailing off history from the parameter NLp. | |
~ABA_TAILOFF () | |
The destructor. | |
bool | tailOff () const |
int | diff (int nLps, double &d) const |
Can be used to retrieve the difference between the last and a previous LP-solution in percent. | |
Private Member Functions | |
void | update (double value) |
void | reset () |
Private Attributes | |
ABA_MASTER * | master_ |
ABA_RING< double > * | lpHistory_ |
Friends | |
class | ABA_SUB |
ostream & | operator<< (ostream &out, const ABA_TAILOFF &rhs) |
The output operator writes the memorized LP-values on an output stream. |
Definition at line 53 of file tailoff.h.
ABA_TAILOFF::ABA_TAILOFF | ( | ABA_MASTER * | master | ) |
The constructor takes the length of the tailing off history from ABA_MASTER::tailOffNLp().
master | A pointer to the corresponding master of the optimization. |
ABA_TAILOFF::ABA_TAILOFF | ( | ABA_MASTER * | master, | |
int | NLp | |||
) |
An alternative constructor takes the length of the tailing off history from the parameter NLp.
master | A pointer to the corresponding master of the optimization. | |
NLp | The length of the tailing off history. |
ABA_TAILOFF::~ABA_TAILOFF | ( | ) |
The destructor.
bool ABA_TAILOFF::tailOff | ( | ) | const |
Checks if there is a tailing-off effect.
We assume a tailing-off effect if during the last ABA_MASTER::tailOffNLps() iterations of the cutting plane algorithms the dual bound changed at most ABA_MASTER::tailOffPercent() percent.
false otherwise.
int ABA_TAILOFF::diff | ( | int | nLps, | |
double & | d | |||
) | const |
Can be used to retrieve the difference between the last and a previous LP-solution in percent.
1 otherwise.
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. |
void ABA_TAILOFF::update | ( | double | value | ) | [private] |
A new LP-solution value can be stored by calling the function update().
This update should be performed after every solution of an LP in the cutting plane generation phase of the subproblem optimization process.
value | The LP-solution value. |
void ABA_TAILOFF::reset | ( | ) | [private] |
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.
ostream& operator<< | ( | ostream & | out, | |
const ABA_TAILOFF & | rhs | |||
) | [friend] |
The output operator writes the memorized LP-values on an output stream.
out | The output stream. | |
rhs | The tailing-off manager being output. |
ABA_MASTER* ABA_TAILOFF::master_ [private] |
ABA_RING<double>* ABA_TAILOFF::lpHistory_ [private] |