METSlib  0.6
Public Member Functions | List of all members
mets::mana_move Class Referenceabstract

A Mana Move is a move that can be automatically made tabu by the mets::simple_tabu_list. More...

#include <model.hh>

Inheritance diagram for mets::mana_move:
Inheritance graph
Collaboration diagram for mets::mana_move:
Collaboration graph

Public Member Functions

virtual mana_moveopposite_of () const
 Create and return a new move that is the reverse of this one. More...
 
virtual bool operator== (const mana_move &other) const =0
 Tell if this move equals another w.r.t. the tabu list management (for mets::simple_tabu_list)
 
- Public Member Functions inherited from mets::move
virtual gol_type evaluate (const feasible_solution &sol) const =0
 Evaluate the cost after the move. More...
 
virtual void apply (feasible_solution &sol) const =0
 Operates this move on sol. More...
 
- Public Member Functions inherited from mets::clonable
virtual clonableclone () const =0
 
- Public Member Functions inherited from mets::hashable
virtual size_t hash () const =0
 

Detailed Description

A Mana Move is a move that can be automatically made tabu by the mets::simple_tabu_list.

If you implement this class you can use the mets::simple_tabu_list as a ready to use tabu list.

You must implement a clone() method, provide an hash funciton and provide a operator==() method that is responsible to find if a move is equal to another.

NOTE: If the desired behaviour is to declare tabu the opposite of the last made move you can achieve that behavioud override the opposite_of() method as well.

Member Function Documentation

virtual mana_move* mets::mana_move::opposite_of ( ) const
inlinevirtual

Create and return a new move that is the reverse of this one.

By default this just calls "clone". If this method is not overridden the mets::simple_tabu_list declares tabu the last made move. Reimplementing this method it is possibile to actually declare as tabu the opposite of the last made move (if we moved a to b we can declare tabu moving b to a).


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

Return to METSlib home page