#include <mets.h>
Inheritance diagram for mets::local_search:
With customary phase alternation and move managers generated neighborhood this can be used to do also a Random Restart Local Search, a Greedy Search, an Iterated Local Search and a Variable Neighborhood Search.
Public Member Functions | |
local_search (feasible_solution &starting_point, feasible_solution &best_so_far, move_manager &moveman, bool short_circuit=false) | |
Creates a local search instance. | |
local_search (const local_search &) | |
purposely not implemented (see Effective C++) | |
local_search & | operator= (const local_search &) |
virtual void | search () throw (no_moves_error) |
This method starts the local search process. | |
Protected Attributes | |
bool | short_circuit_m |
mets::local_search::local_search | ( | feasible_solution & | starting_point, | |
feasible_solution & | best_so_far, | |||
move_manager & | moveman, | |||
bool | short_circuit = false | |||
) |
Creates a local search instance.
working | The working solution (this will be modified during search) | |
best_so_far | A different solution instance used to store the best solution found | |
moveman | A problem specific implementation of the mets::move_manager used to generate the neighborhood. | |
short_circuit | Wether the search should stop on the first improving move or not. |
virtual void mets::local_search::search | ( | ) | throw (no_moves_error) [virtual] |
This method starts the local search process.
To have a real local search you should provide an mets::move_manager than enumerates all feasible moves.
Implements mets::abstract_search.
Return to METSlib home page