- Main Page
- Classes
- Files

- Search for |

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

# moTS< M > Class Template Reference

Tabu Search (TS). More...

`#include <moTS.h>`

Inheritance diagram for moTS< M >:

List of all members.

## Public Member Functions
| moTS (moMoveInit< M > &__move_init, moNextMove< M > &__next_move, moMoveIncrEval< M > &__incr_eval, moTabuList< M > &__tabu_list, moAspirCrit< M > &__aspir_crit, moSolContinue< EOT > &__cont, eoEvalFunc< EOT > &__full_eval)
| Constructor of a moTS specifying all the boxes.
| moTS (moMoveExpl< M > &__move_expl, moSolContinue< EOT > &__cont, eoEvalFunc< EOT > &__full_eval)
| Constructor with less parameters.
bool | operator() (EOT &__sol)
| 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_expl
| Neighborhood explorer.
moSolContinue< EOT > & | cont
| Stop criterion.
eoEvalFunc< EOT > & | full_eval
| Full evaluation function.
## Static Private Attributes
static bool | first_time
| Boolean allowing to initialise the ptread_mutex_t in the constructor.
static pthread_mutex_t | mutex
| The lock.

## Detailed Description

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

Tabu Search (TS).

Generic algorithm that describes a tabu search.

Definition at line 30 of file moTS.h.

## Constructor & Destructor Documentation

template<class M>

moTS< M >::moTS | ( | moMoveInit< M > & | __move_init,
|  | moNextMove< M > & | __next_move,
|  | moMoveIncrEval< M > & | __incr_eval,
|  | moTabuList< M > & | __tabu_list,
|  | moAspirCrit< M > & | __aspir_crit,
|  | moSolContinue< EOT > & | __cont,
|  | eoEvalFunc< EOT > & | __full_eval |
| ) |  |  | `[inline]`

Constructor of a moTS specifying all the boxes.

In this constructor, a moTSMoveLoopExpl is instanciated.

Parameters:

  | __move_init | move initialisation
  | __next_move | neighborhood explorer
  | __incr_eval | efficient evaluation
  | __tabu_list | tabu list
  | __aspir_crit | aspiration criterion
  | __cont | stop criterion
  | __full_eval | full evaluation function

Definition at line 59 of file moTS.h.

References moTS< M >::first_time, and moTS< M >::mutex.

template<class M>

moTS< M >::moTS | ( | moMoveExpl< M > & | __move_expl,
|  | moSolContinue< EOT > & | __cont,
|  | eoEvalFunc< EOT > & | __full_eval |
| ) |  |  | `[inline]`

Constructor with less parameters.

The explorer is given in the parameters.

Parameters:

  | __move_expl | the explorer (generally different that a moTSMoveLoopExpl)
  | __cont | stop criterion
  | __full_eval | full evaluation function

Definition at line 81 of file moTS.h.

References moTS< M >::first_time, and moTS< M >::mutex.

## Member Function Documentation

template<class M>

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

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:

  | __sol | a solution to improve.

Returns:
  TRUE.

Definition at line 104 of file moTS.h.

References moTS< M >::cont, moTS< M >::full_eval, moTS< M >::move_expl, and moTS< M >::mutex.

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

- moTS.h