#include <tabu-search.hh>
Inheritance diagram for mets::aspiration_criteria_chain:


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
Public Member Functions | |
| aspiration_criteria_chain (aspiration_criteria_chain *next=0) | |
| Constructor. | |
| 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 (feasible_solution &fs, move &mov, gol_type evaluation) |
| This is a callback function from the algorithm that tells us that a move was accepted. | |
| virtual bool | operator() (feasible_solution &fs, move &mov, gol_type evaluation) const |
| The function that decides if we shoud accept a tabu move. | |
Protected Attributes | |
| aspiration_criteria_chain * | next_m |
| mets::aspiration_criteria_chain::aspiration_criteria_chain | ( | aspiration_criteria_chain * | next = 0 |
) | [inline, explicit] |
Constructor.
| next | Optional next criteria in the chain. |
| void mets::aspiration_criteria_chain::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 in mets::best_ever_criteria.
| bool mets::aspiration_criteria_chain::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). |
Reimplemented in mets::best_ever_criteria.
Return to METSlib home page