SimpleController Class Reference
Detailed Description
This controller starts from a given initial temperature and evenly decreases it. 
#include <lemon/simann.h>
List of all members.
|  | 
| 
 Public Member Functions | 
|  | SimpleController (long _max_iter=500000, long _max_no_impr=20000, double _temp=1000.0, double _ann_fact=0.9999) | 
|  | Constructor. 
 | 
| void | acceptEvent () | 
|  | This is called when a neighbouring state gets accepted. 
 | 
| void | improveEvent () | 
|  | This is called when the accepted neighbouring state's cost is less than the best found one's. 
 | 
| void | rejectEvent () | 
|  | This is called when a neighbouring state gets rejected. 
 | 
| bool | next () | 
|  | Decides whether to continue the annealing process or not. Also decreases the temperature. 
 | 
| bool | accept () | 
|  | Decides whether to accept the current solution or not. 
 | 
| virtual | ~SimpleController () | 
|  | Destructor. 
 | 
| 
 Private Attributes | 
| long | max_iter | 
|  | Maximum number of iterations. 
 | 
| long | max_no_impr | 
|  | Maximum number of iterations which do not improve the solution. 
 | 
| double | temp | 
|  | Temperature. 
 | 
| double | ann_fact | 
|  | Annealing factor. 
 | 
Constructor & Destructor Documentation
      
        
          | SimpleController | ( | long | _max_iter = 500000, | 
        
          |  |  | long | _max_no_impr = 20000, | 
        
          |  |  | double | _temp = 1000.0, | 
        
          |  |  | double | _ann_fact = 0.9999 |  | 
        
          |  | ) |  |  |  [inline] | 
      
 
- Parameters:
- 
  
    |  | _max_iter | maximum number of iterations |  |  | _max_no_impr | maximum number of consecutive iterations which do not yield a better solution |  |  | _temp | initial temperature |  |  | _ann_fact | annealing factor |