#include <lemon/simann.h>
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. |
AdvancedController | ( | double | _end_time, | |
double | _alpha = 0.2 , |
|||
double | _beta = 0.9 , |
|||
double | _gamma = 1.6 , |
|||
double | _ann_fact = 0.9999 | |||
) | [inline] |
_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 |
virtual double threshold | ( | double | time | ) | [inline, private, virtual] |
time | the elapsed time in seconds |