METSlib  0.6
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mets::move_manager Class Referenceabstract

A neighborhood generator. More...

#include <model.hh>

Inheritance diagram for mets::move_manager:
Inheritance graph
Collaboration diagram for mets::move_manager:
Collaboration graph

Public Types

typedef std::deque< const move * >
::iterator 
iterator
 Iterator type to iterate over moves of the neighborhood.
 
typedef std::deque< const move * >
::size_type 
size_type
 Size type.
 

Public Member Functions

 move_manager ()
 Initialize the move manager with an empty list of moves.
 
virtual ~move_manager ()
 Virtual destructor.
 
virtual void refresh (const mets::feasible_solution &s)=0
 Selects a different set of moves at each iteration.
 
iterator begin ()
 Begin iterator of available moves queue.
 
iterator end ()
 End iterator of available moves queue.
 
size_type size () const
 Size of the neighborhood.
 

Protected Member Functions

 move_manager (const move_manager &)
 

Protected Attributes

std::deque< const move * > moves_m
 The moves queue.
 

Detailed Description

A neighborhood generator.

This is a sample implementation of the neighborhood exploration concept. You can still derive from this class and implement the refresh method, but, since version 0.5.x you don't need to.

To implement your own move manager you should simply adhere to the following concept:

provide an iterator, and size_type types, a begin() and end() method returning iterators to a move collection. The switch to a template based move_manager was made so that you can use any iterator type that you want. This allows, between other things, to implement intelligent iterators that dynamically return moves.

The move manager can represent both Variable and Constant Neighborhoods.

To make a constant neighborhood put moves in the moves_m queue in the constructor and implement an empty void refresh(feasible_solution&) method.


The documentation for this class was generated from the following file:

Return to METSlib home page