#include <mets.h>
Public Types | |
| typedef std::deque< move * >::iterator | iterator |
| Iterator type to iterate over moves of the neighborhood. | |
| typedef std::deque< 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 (feasible_solution &sol)=0 |
| Called by the various search algorithms before each iteration to update the neighborhood. | |
| virtual iterator | begin () |
| Begin iterator of available moves queue. | |
| virtual iterator | end () |
| End iterator of available moves queue. | |
| virtual size_type | size () const |
| Size of the neighborhood. | |
Protected Attributes | |
| std::deque< move * > | moves_m |
The move manager implements both Variable and Constant Neighborhoods.
To make a constant neighborhood put moves in the moves_m queue in the constructor and implement an empty refresh() method.
To make a variable neighborhood (or to selectively select feasible moves at each iteration) update the moves_m queue in the refresh() method.
Definition at line 295 of file mets.h.
| typedef std::deque<move*>::iterator mets::move_manager::iterator |
| typedef std::deque<move*>::size_type mets::move_manager::size_type |
| mets::move_manager::move_manager | ( | ) | [inline] |
| virtual mets::move_manager::~move_manager | ( | ) | [inline, virtual] |
| virtual void mets::move_manager::refresh | ( | feasible_solution & | sol | ) | [pure virtual] |
Called by the various search algorithms before each iteration to update the neighborhood.
Referenced by mets::tabu_search::search(), mets::simulated_annealing::search(), and mets::local_search::search().
| virtual iterator mets::move_manager::begin | ( | ) | [inline, virtual] |
Begin iterator of available moves queue.
Definition at line 318 of file mets.h.
References moves_m.
Referenced by mets::tabu_search::search(), mets::simulated_annealing::search(), and mets::local_search::search().
| virtual iterator mets::move_manager::end | ( | ) | [inline, virtual] |
End iterator of available moves queue.
Definition at line 322 of file mets.h.
References moves_m.
Referenced by mets::tabu_search::search(), mets::simulated_annealing::search(), and mets::local_search::search().
| virtual size_type mets::move_manager::size | ( | ) | const [inline, virtual] |
1.5.1