AdvancedController Class Reference


Detailed Description

With this controller you can set the running time of the annealing process in advance. It works the following way: the controller measures a kind of divergence. The divergence is the difference of the average cost of the recently found solutions the cost of the best found one. In case this divergence is greater than a given threshold, then we decrease the annealing factor, that is we cool the system faster. In case the divergence is lower than the threshold, then we increase the temperature. The threshold is a function of the elapsed time which reaches zero at the desired end time. #include <lemon/simann.h>

Inheritance diagram for AdvancedController:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 AdvancedController (double _end_time, double _alpha=0.2, double _beta=0.9, double _gamma=1.6, double _ann_fact=0.9999)
 Constructor.
void init ()
 Does initializations before each run.
void acceptEvent ()
 This is called when a neighbouring state gets accepted.
bool next ()
 Decides whether to continue the annealing process or not.
bool accept ()
 Decides whether to accept the current solution or not.
virtual ~AdvancedController ()
 Destructor.

Private Member Functions

virtual double threshold (double time)
 Calculates the threshold value.

Private Attributes

Timer timer
 Timer class to measure the elapsed time.
double alpha
 Parameter used to calculate the running average.
double beta
 Parameter used to decrease the annealing factor.
double gamma
 Parameter used to increase the temperature.
double end_time
 The time at the end of the algorithm.
double start_time
 The time at the start of the algorithm.
double start_threshold
 Starting threshold.
double avg_cost
 Average cost of recent solutions.
double temp
 Temperature.
double ann_fact
 Annealing factor.
double init_ann_fact
 Initial annealing factor.
bool start
 True when the annealing process has been started.


Constructor & Destructor Documentation

AdvancedController ( double  _end_time,
double  _alpha = 0.2,
double  _beta = 0.9,
double  _gamma = 1.6,
double  _ann_fact = 0.9999 
) [inline]

Parameters:
_end_time running time in seconds
_alpha parameter used to calculate the running average
_beta parameter used to decrease the annealing factor
_gamma parameter used to increase the temperature
_ann_fact initial annealing factor


Member Function Documentation

virtual double threshold ( double  time  )  [inline, private, virtual]

Parameters:
time the elapsed time in seconds


Generated on Thu Jun 4 04:06:40 2009 for LEMON by  doxygen 1.5.9