EasyLocal++ Documentation


 
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

easylocal::SimulatedAnnealing Class Template Reference

#include <EasyLocal.h>

Inheritance diagram for easylocal::SimulatedAnnealing

Inheritance graph
[legend]
Collaboration diagram for easylocal::SimulatedAnnealing:

Collaboration graph
[legend]
List of all members.

Public Methods

Protected Methods

Protected Attributes


Detailed Description

template<class Input, class State, class Move> class easylocal::SimulatedAnnealing

The Simulated annealing runner relies on a probabilistic local search technique whose name comes from the fact that it simulates the cooling of a collection of hot vibrating atoms.

At each iteration a candidate move is generated at random, and it is always accepted if it is an improving move. Instead, if the move is a worsening one, the new solution is accepted with time decreasing probability.

Definition at line 739 of file EasyLocal.h.


Constructor & Destructor Documentation

template<class Input, class State, class Move>
easylocal::SimulatedAnnealing< Input, State, Move >::SimulatedAnnealing<Input, State, Move> ( StateManager< Input, State > * s,
NeighborhoodExplorer< Input, State, Move > * ne,
Input * in = NULL ) [protected]
 

Constructs a simulated annealing runner by linking it to a state manager, a neighborhood explorer, and an input object.

Parameters:
s   a pointer to a compatible state manager
ne   a pointer to a compatible neighborhood explorer
in   a poiter to an input object

Definition at line 1443 of file EasyLocalTemplates.cpp.


Member Function Documentation

template<class Input, class State, class Move>
bool easylocal::SimulatedAnnealing< Input, State, Move >::AcceptableMove ( ) [protected, virtual]
 

A move is surely accepted if it improves the cost function or with exponentially decreasing probability if it is a worsening one.

Reimplemented from easylocal::MoveRunner.

Definition at line 1554 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SimulatedAnnealing< Input, State, Move >::InitializeRun ( ) [protected, virtual]
 

Initializes the run by invoking the companion superclass method, and setting the temperature to the start value.

Reimplemented from easylocal::MoveRunner.

Definition at line 1469 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SimulatedAnnealing< Input, State, Move >::Print ( std::ostream & os = std::cout ) const [virtual]
 

Outputs some simulated annealing statistics on a given output stream.

Parameters:
os   the output stream

Reimplemented from easylocal::MoveRunner.

Definition at line 1516 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SimulatedAnnealing< Input, State, Move >::ReadParameters ( ) [virtual]
 

Reads the simulated annealing parameters from the standard input.

Reimplemented from easylocal::Runner.

Definition at line 1453 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SimulatedAnnealing< Input, State, Move >::SelectMove ( ) [protected, virtual]
 

A move is randomly picked.

Reimplemented from easylocal::MoveRunner.

Definition at line 1490 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SimulatedAnnealing< Input, State, Move >::SetParameters ( const ParameterBox & pb ) [virtual]
 

Sets the simulated annealing parameters, passed through a parameter box.

Parameters:
pb   the object containing the parameter setting for the algorithm

Reimplemented from easylocal::MoveRunner.

Definition at line 1502 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
bool easylocal::SimulatedAnnealing< Input, State, Move >::StopCriterion ( ) [protected, virtual]
 

The search stops when a low temperature has reached.

Reimplemented from easylocal::MoveRunner.

Definition at line 1535 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SimulatedAnnealing< Input, State, Move >::TerminateRun ( ) [protected, virtual]
 

Stores the current state as best state (it is obviously a local minimum).

Reimplemented from easylocal::MoveRunner.

Definition at line 1480 of file EasyLocalTemplates.cpp.

template<class Input, class State, class Move>
void easylocal::SimulatedAnnealing< Input, State, Move >::UpdateIterationCounter ( ) [protected, virtual]
 

At regular steps, the temperature is decreased multiplying it by a cooling rate.

Reimplemented from easylocal::MoveRunner.

Definition at line 1543 of file EasyLocalTemplates.cpp.


Member Data Documentation

template<class Input, class State, class Move>
double easylocal::SimulatedAnnealing<Input, State, Move>::cooling_rate [protected]
 

The cooling rate of the temperature (temperature = temperature * cooling_rate at regular intervals).

Definition at line 759 of file EasyLocal.h.

template<class Input, class State, class Move>
double easylocal::SimulatedAnnealing<Input, State, Move>::min_temperature [protected]
 

The minimum temperature allowed before stopping the search.

Definition at line 757 of file EasyLocal.h.

template<class Input, class State, class Move>
unsigned int easylocal::SimulatedAnnealing<Input, State, Move>::neighbor_sample [protected]
 

The Number of moves tested at each temperature.

Definition at line 762 of file EasyLocal.h.

template<class Input, class State, class Move>
double easylocal::SimulatedAnnealing<Input, State, Move>::start_temperature [protected]
 

The starting temperature.

Definition at line 756 of file EasyLocal.h.

template<class Input, class State, class Move>
double easylocal::SimulatedAnnealing<Input, State, Move>::temperature [protected]
 

The current temperature.

Definition at line 755 of file EasyLocal.h.


The documentation for this class was generated from the following files:
 
Go to: the Main Page of the documentation.