METSlib 0.6

- Main Page
- Modules
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
mets::aspiration_criteria_chain Class Reference
Tabu Search

Function object expressing an aspiration criteria. More...

`#include <tabu-search.hh>`

Inheritance diagram for mets::aspiration_criteria_chain:
Collaboration diagram for mets::aspiration_criteria_chain:

## Public Member Functions
| aspiration_criteria_chain (aspiration_criteria_chain *next=0)
| Constructor. More...
| aspiration_criteria_chain (const aspiration_criteria_chain &other)
| purposely not implemented (see Effective C++)
aspiration_criteria_chain & | operator= (const aspiration_criteria_chain &other)
| purposely not implemented (see Effective C++)
virtual | ~aspiration_criteria_chain ()
| Virtual destructor.
virtual void | reset ()
| A method to reset this aspiration criteria chain to its original state.
virtual void | accept (const feasible_solution &fs, const move &mov, gol_type evaluation)
| This is a callback function from the algorithm that tells us that a move was accepted. More...
virtual bool | operator() (const feasible_solution &fs, const move &mov, gol_type evaluation) const
| The function that decides if we shoud accept a tabu move. More...

## Protected Attributes
aspiration_criteria_chain * | next_m

## Detailed Description

Function object expressing an aspiration criteria.

An aspiration criteria is a criteria used to override the tabu list. When the aspiration criteria is met a move is made even if it's in the tabu-list

Aspiration critera can be chained so a criteria can decorate another criteria

## Constructor & Destructor Documentation

mets::aspiration_criteria_chain::aspiration_criteria_chain | ( | aspiration_criteria_chain * | next = `0` | ) |
| inline explicit

Constructor.

Parameters

  next | Optional next criteria in the chain.

## Member Function Documentation

void mets::aspiration_criteria_chain::accept | ( | const feasible_solution & | fs,
|  | const move & | mov,
|  | gol_type | evaluation
| ) |  |
| inline virtual

This is a callback function from the algorithm that tells us that a move was accepted.

You can use this function to update the aspiration criteria based on the current search status. (e.g. record the best cost for a best ever criteria)

Parameters

  fs | The current working solution (after applying move).
  mov | The accepted move (the move just made).

Returns
  True if the move is to be accepted.

Reimplemented in mets::best_ever_criteria.

bool mets::aspiration_criteria_chain::operator() | ( | const feasible_solution & | fs,
|  | const move & | mov,
|  | gol_type | evaluation
| ) |  | const
| inline virtual

The function that decides if we shoud accept a tabu move.

Parameters

  fs | The current working solution (before applying move).
  mov | The move to be made (the move that is being evaluated).

Returns
  True if the move is to be accepted.

Reimplemented in mets::best_ever_criteria.

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

- metslib/tabu-search.hh

Return to METSlib home page