 |
vrpRouting
0.3
|
Go to the documentation of this file.
28 #ifndef INCLUDE_OPTIMIZERS_TABU_LIST_H_
29 #define INCLUDE_OPTIMIZERS_TABU_LIST_H_
40 namespace optimizers {
98 bool has_seen(
const std::string& candidate);
101 void add_seen(
const std::string& candidate);
125 #endif // INCLUDE_OPTIMIZERS_TABU_LIST_H_
std::set< std::string > m_seen_list
the seen list
const_iterator end() const
Constant iteratori pointing to the last element of the tabu list.
bool has_seen(const std::string &candidate)
Checks to see if a move candidate has already been done before (in the seen list)
bool has_move(const problem::Vehicle_pickDeliver &, const problem::Vehicle_pickDeliver &, const problem::Order &from_order, double obj1, double obj2) const
Checks to see if a "move" move is "tabu" (in the tabu list)
std::deque< Move >::iterator iterator
iterator type that allows modification
friend std::ostream & operator<<(std::ostream &, const TabuList &)
priting function
std::deque< Move > m_tabu_list
the tabu list
size_t max_length() const
returns the maximum length (tabu_length) of the tabu list
The Move class defines moves that are evaluated and set as tabu.
std::deque< Move >::const_iterator const_iterator
iterator type that does not allows modification
void clear()
removes all moves from the tabu list
size_t size() const
returns the current length (number of moves) in the tabu list
bool is_empty() const
returns true if the tabu list is empty
void add_infeasible(const std::string &candidate)
Adds a move candidate to the infeasible list.
bool has(const Move &) const
Checks to see if a (general) move is "tabu" (in the tabu list)
bool has_swap(const problem::Vehicle_pickDeliver &, const problem::Vehicle_pickDeliver &, const problem::Order &, const problem::Order &, double obj1, double obj2) const
Checks to see if a "swap" move is "tabu" (in the tabu list)
void set_max_length(size_t length)
sets the maximum length (tabu_length) of the tabu list
void add_seen(const std::string &candidate)
Adds a move candidate to the seen list.
void add(const Move &m)
Make a move "tabu" by adding it to the tabu list.
size_t m_max_length
the maximum length (tabu_length) of the tabu list
The TabuList class defines the tabu list to be used in optimization.
const_iterator begin() const
Constant iterator pointing to the first element of the tabu list.
bool has_infeasible(const std::string &candidate)
Checks to see if a move candidate is infeasible (in the infeasible list)
std::set< std::string > m_infeasible_list
the infeasible list