Aspiration criteria implementation. More...
#include <tabu-search.hh>
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 (feasible_solution &fs, move &mov, gol_type evaluation) |
This is a callback function from the algorithm that tells us that a move was accepted. | |
bool | operator() (feasible_solution &fs, move &mov, gol_type evaluation) const |
The function that decides if we shoud accept a tabu move. | |
Protected Attributes | |
gol_type | best_m |
gol_type | tolerance_m |
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.
void mets::best_ever_criteria::accept | ( | feasible_solution & | fs, | |
move & | mov, | |||
gol_type | evaluation | |||
) | [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)
fs | The current working solution (after applying move). | |
mov | The accepted move (the move just made). |
Reimplemented from mets::aspiration_criteria_chain.
bool mets::best_ever_criteria::operator() | ( | feasible_solution & | fs, | |
move & | mov, | |||
gol_type | evaluation | |||
) | const [virtual] |
The function that decides if we shoud accept a tabu move.
fs | The current working solution (before applying move). | |
mov | The move to be made (the move that is being evaluated). |
the solution is the solution before applying mov.
Reimplemented from mets::aspiration_criteria_chain.
Return to METSlib home page