- Main Page
- Namespaces
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# moSA< M > Class Template Reference

Simulated Annealing (SA). More...

`#include <moSA.h>`

Inheritance diagram for moSA< M >:

List of all members.

## Public Member Functions
| moSA (moRandMove< M > &__move_rand, moMoveIncrEval< M > &__incr_eval, moSolContinue< EOT > &__cont, double __init_temp, moCoolingSchedule &__cool_sched, eoEvalFunc< EOT > &__full_eval)
| SA constructor.
bool | operator() (EOT &__sol)
| function that launches the SA algorithm.
## Private Types
typedef M::EOType | EOT
| Alias for the type.
typedef EOT::Fitness | Fitness
| Alias for the fitness.
## Private Attributes
moRandMove< M > & | move_rand
| A move generator (generally randomly).
moMoveIncrEval< M > & | incr_eval
| A (generally) efficient evaluation function.
moSolContinue< EOT > & | cont
| Stopping criterion before temperature update.
double | init_temp
| Initial temperature.
moCoolingSchedule & | cool_sched
| The cooling schedule.
eoEvalFunc< EOT > & | full_eval
| A full evaluation function.

## Detailed Description

### template<class M>
class moSA< M >

Simulated Annealing (SA).

Class that describes a Simulated Annealing algorithm.

Definition at line 30 of file moSA.h.

## Constructor & Destructor Documentation

template<class M>

moSA< M >::moSA | ( | moRandMove< M > & | __move_rand,
|  | moMoveIncrEval< M > & | __incr_eval,
|  | moSolContinue< EOT > & | __cont,
|  | double | __init_temp,
|  | moCoolingSchedule & | __cool_sched,
|  | eoEvalFunc< EOT > & | __full_eval |
| ) |  |  | `[inline]`

SA constructor.

All the boxes used by a SA need to be given.

Parameters:

  | __move_rand | a move generator (generally randomly).
  | __incr_eval | a (generaly) efficient evaluation function
  | __cont | a stopping criterion.
  | __init_temp | the initial temperature.
  | __cool_sched | a cooling schedule, describes how the temperature is modified.
  | __full_eval | a full evaluation function.

Definition at line 58 of file moSA.h.

## Member Function Documentation

template<class M>

bool moSA< M >::operator() | ( | EOT & | __sol | ) | `[inline]`

function that launches the SA algorithm.

As a moTS or a moHC, the SA can be used for HYBRIDATION in an evolutionary algorithm.

Parameters:

  | __sol | a solution to improve.

Returns:
  TRUE.

Definition at line 80 of file moSA.h.

References moSA< M >::cont, moSA< M >::cool_sched, moSA< M >::full_eval, moSA< M >::incr_eval, moSA< M >::init_temp, and moSA< M >::move_rand.

The documentation for this class was generated from the following file:

- moSA.h