METSlib  0.6
Public Member Functions | Protected Attributes | List of all members
mets::best_ever_criteria Class Reference

Aspiration criteria implementation. More...

#include <tabu-search.hh>

Inheritance diagram for mets::best_ever_criteria:
Inheritance graph
Collaboration diagram for mets::best_ever_criteria:
Collaboration graph

Public Member Functions

 best_ever_criteria (double min_improvement=1e-6)
 
 best_ever_criteria (aspiration_criteria_chain *next, double min_improvement=1e-6)
 
void reset ()
 A method to reset this aspiration criteria chain to its original state.
 
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...
 
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...
 
- Public Member Functions inherited from mets::aspiration_criteria_chain
 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_chainoperator= (const aspiration_criteria_chain &other)
 purposely not implemented (see Effective C++)
 
virtual ~aspiration_criteria_chain ()
 Virtual destructor.
 

Protected Attributes

gol_type best_m
 
gol_type tolerance_m
 
- Protected Attributes inherited from mets::aspiration_criteria_chain
aspiration_criteria_chainnext_m
 

Detailed Description

Aspiration criteria implementation.

This is one of the best known aspiration criteria ready to be used in your tabu-search implementation.

This aspiration criteria is met when a tabu move would result in a global improvement.

Member Function Documentation

void mets::best_ever_criteria::accept ( const feasible_solution fs,
const move mov,
gol_type  evaluation 
)
inlinevirtual

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
fsThe current working solution (after applying move).
movThe accepted move (the move just made).
Returns
True if the move is to be accepted.

Reimplemented from mets::aspiration_criteria_chain.

bool mets::best_ever_criteria::operator() ( const feasible_solution fs,
const move mov,
gol_type  evaluation 
) const
inlinevirtual

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

Parameters
fsThe current working solution (before applying move).
movThe move to be made (the move that is being evaluated).
Returns
True if the move is to be accepted.

the solution is the solution before applying mov.

Reimplemented from mets::aspiration_criteria_chain.


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

Return to METSlib home page