#include <mets.h>
Inherits mets::abstract_search.
Inheritance diagram for mets::tabu_search:


Public Member Functions | |
| tabu_search (feasible_solution &starting_solution, feasible_solution &best_sol, move_manager &move_manager_inst, tabu_list_chain &tabus, aspiration_criteria_chain &aspiration, termination_criteria_chain &termination) | |
| Creates a tabu Search instance. | |
| virtual | ~tabu_search () |
| void | search () throw (no_moves_error) |
| This method starts the tabu search process. | |
| int | step () const |
| The current step of the algorithm for use of the observers. | |
| const tabu_list_chain & | get_tabu_list () const |
| The tabu list used by this tabu search. | |
| const aspiration_criteria_chain & | get_aspiration_criteria () const |
| The aspiration criteria used by this tabu search. | |
| const termination_criteria_chain & | get_termination_criteria () const |
| The termination criteria used by this tabu search. | |
Static Public Attributes | |
| static const int | ASPIRATION_CRITERIA_MET = 2 |
| We just followed an aspiration criteria. | |
Protected Attributes | |
| tabu_list_chain & | tabu_list_m |
| aspiration_criteria_chain & | aspiration_criteria_m |
| termination_criteria_chain & | termination_criteria_m |
This implements decorator pattern. You can build many different solvers decorating tabu_search class in different ways.
Definition at line 748 of file mets.h.
| mets::tabu_search::tabu_search | ( | feasible_solution & | starting_solution, | |
| feasible_solution & | best_sol, | |||
| move_manager & | move_manager_inst, | |||
| tabu_list_chain & | tabus, | |||
| aspiration_criteria_chain & | aspiration, | |||
| termination_criteria_chain & | termination | |||
| ) |
Creates a tabu Search instance.
| starting_solution | The working solution (this will be modified during search). | |
| best_so_far | A different solution instance used to store the best solution found. | |
| move_manager_inst | A problem specific implementation of the mest::move_manager used to generate the neighborhood. | |
| tabus | The tabu list used to decorate this search instance. | |
| aspiration | The aspiration criteria to use in this tabu search. | |
| termination | The termination criteria used to terminate the search process, this is an extension to the standard Simulated Annealing: you can give a termination criteria that termiantes when temperature reaches 0. |
Definition at line 23 of file tabu-search.cc.
| void mets::tabu_search::search | ( | ) | throw (no_moves_error) [virtual] |
This method starts the tabu search process.
Remember that this is a minimization process.
An exception mets::no_moves_error is risen when no move is possible.
Implements mets::abstract_search.
Definition at line 36 of file tabu-search.cc.
References aspiration_criteria_m, ASPIRATION_CRITERIA_MET, mets::move_manager::begin(), mets::abstract_search::best_cost_m, mets::abstract_search::best_solution_m, mets::abstract_search::current_move_m, mets::move_manager::end(), mets::abstract_search::GLOBAL_IMPROVEMENT, mets::tabu_list_chain::is_tabu(), mets::abstract_search::MOVE_MADE, mets::abstract_search::moves_m, mets::subject< observed_subject >::notify(), mets::move_manager::refresh(), mets::abstract_search::step_m, mets::tabu_list_chain::tabu(), tabu_list_m, termination_criteria_m, and mets::abstract_search::working_solution_m.
| int mets::tabu_search::step | ( | ) | const [inline, virtual] |
The current step of the algorithm for use of the observers.
One of
Reimplemented from mets::abstract_search.
Definition at line 804 of file mets.h.
References mets::abstract_search::step_m.
| const tabu_list_chain& mets::tabu_search::get_tabu_list | ( | ) | const [inline] |
The tabu list used by this tabu search.
Definition at line 811 of file mets.h.
References tabu_list_m.
| const aspiration_criteria_chain& mets::tabu_search::get_aspiration_criteria | ( | ) | const [inline] |
The aspiration criteria used by this tabu search.
Definition at line 815 of file mets.h.
References aspiration_criteria_m.
| const termination_criteria_chain& mets::tabu_search::get_termination_criteria | ( | ) | const [inline] |
The termination criteria used by this tabu search.
Definition at line 819 of file mets.h.
References termination_criteria_m.
const int mets::tabu_search::ASPIRATION_CRITERIA_MET = 2 [static] |
1.5.1