# ParadisEO-MOMovingObjects: moTS< M > Class Template Reference

# moTS< M > Class Template Reference

Tabu Search (TS). More...

`#include <moTS.h>`

Inherits moAlgo< M::EOType >.

List of all members.

## Public Member Functions

| moTS (moMoveInit< M > &_move_initializer, moNextMove< M > &_next_move_generator, moMoveIncrEval< M > &_incremental_evaluation, moTabuList< M > &_tabu_list, moAspirCrit< M > &_aspiration_criterion, moSolContinue< EOT > &_continue, eoEvalFunc< EOT > &_full_evaluation)
| Constructor of a moTS specifying all the boxes.
| moTS (moMoveExpl< M > &_move_explorer, moSolContinue< EOT > &_continue, eoEvalFunc< EOT > &_full_evaluation)
| Constructor with less parameters.
bool | operator() (EOT &_solution)
| Function which launchs the Tabu Search.

## Private Types

typedef M::EOType | EOT
| Alias for the type.
typedef EOT::Fitness | Fitness
| Alias for the fitness.

## Private Attributes

moMoveExpl< M > & | move_explorer
| Neighborhood explorer.
moSolContinue< EOT > & | continu
| Stop criterion.
eoEvalFunc< EOT > & | full_evaluation
| Full evaluation function.

## Detailed Description

### template<class M>
class moTS< M >

Tabu Search (TS).

Generic algorithm that describes a tabu search.

Definition at line 50 of file moTS.h.

## Constructor & Destructor Documentation

template<class M>

moTS< M >::moTS | ( | moMoveInit< M > & | _move_initializer,
|  | moNextMove< M > & | _next_move_generator,
|  | moMoveIncrEval< M > & | _incremental_evaluation,
|  | moTabuList< M > & | _tabu_list,
|  | moAspirCrit< M > & | _aspiration_criterion,
|  | moSolContinue< EOT > & | _continue,
|  | eoEvalFunc< EOT > & | _full_evaluation |
| ) |  |  | `[inline]`

Constructor of a moTS specifying all the boxes.

In this constructor, a moTSMoveLoopExpl is instanciated.

Parameters:

  | _move_initializer | The move initializer.
  | _next_move_generator | The neighbourhood explorer.
  | _incremental_evaluation | The (generally) efficient evaluation.
  | _tabu_list | The tabu list.
  | _aspiration_criterion | An aspiration criterion.
  | _continue | The stopping criterion.
  | _full_evaluation | A full evaluation function.

Definition at line 72 of file moTS.h.

template<class M>

moTS< M >::moTS | ( | moMoveExpl< M > & | _move_explorer,
|  | moSolContinue< EOT > & | _continue,
|  | eoEvalFunc< EOT > & | _full_evaluation |
| ) |  |  | `[inline]`

Constructor with less parameters.

The explorer is given in the parameters.

Parameters:

  | _move_explorer | The explorer (generally different that a moTSMoveLoopExpl).
  | _continue | The stopping criterion.
  | _full_evaluation | A full evaluation function.

Definition at line 89 of file moTS.h.

## Member Function Documentation

template<class M>

bool moTS< M >::operator() | ( | EOT & | _solution | ) | `[inline, virtual]`

Function which launchs the Tabu Search.

Algorithm of the tabu search. As a moSA or a moHC, it can be used for HYBRIDATION in an evolutionary algorithm. For security a lock (pthread_mutex_t) is closed during the algorithm.

Parameters:

  | _solution | a solution to improve.

Returns:
  TRUE.

Implements eoUF< M::EOType &, bool >.

Definition at line 102 of file moTS.h.

References moTS< M >::continu, moTS< M >::full_evaluation, and moTS< M >::move_explorer.

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

- moTS.h