mets::local_search Class Reference

Local search algorithm. More...

#include <mets.h>

Inherits mets::abstract_search.

Inheritance diagram for mets::local_search:

Inheritance graph
[legend]
Collaboration diagram for mets::local_search:

Collaboration graph
[legend]
List of all members.

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_searchoperator= (const local_search &)
 purposely not implemented (see Effective C++)
virtual void search () throw (no_moves_error)
 This method starts the local search process.

Protected Attributes

bool short_circuit_m

Detailed Description

Local search algorithm.

With customary phase alternation and move manages 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.

Definition at line 636 of file mets.h.


Constructor & Destructor Documentation

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.

Parameters:
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 mest::move_manager used to generate the neighborhood.
short_circuit Wether the search should stop on the first improving move or not.

Definition at line 23 of file local-search.cc.

References mets::abstract_search::step_m.

mets::local_search::local_search ( const local_search  ) 

purposely not implemented (see Effective C++)


Member Function Documentation

local_search& mets::local_search::operator= ( const local_search  ) 

purposely not implemented (see Effective C++)

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.

Definition at line 34 of file local-search.cc.

References mets::move_manager::begin(), mets::abstract_search::best_cost_m, mets::abstract_search::best_solution_m, mets::feasible_solution::cost_function(), mets::abstract_search::current_move_m, mets::move_manager::end(), mets::abstract_search::moves_m, mets::subject< observed_subject >::notify(), mets::move_manager::refresh(), short_circuit_m, and mets::abstract_search::working_solution_m.


The documentation for this class was generated from the following files:
Generated on Tue Nov 21 00:58:34 2006 for METSlib by  doxygen 1.5.1