 |
vrpRouting
0.3
|
Go to the documentation of this file.
36 namespace optimizers {
76 return has({from_vehicle, to_vehicle, order, obj1, obj2}) ||
77 has({to_vehicle, from_vehicle, order, obj1, obj2});
95 return has({from_vehicle, to_vehicle, from_order, to_order, obj1, obj2}) ||
96 has({from_vehicle, to_vehicle, to_order, from_order, obj1, obj2}) ||
97 has({to_vehicle, from_vehicle, from_order, to_order, obj1, obj2}) ||
98 has({to_vehicle, from_vehicle, to_order, from_order, obj1, obj2});
141 log <<
"\nTabuList length: " << list.
size()
142 <<
"\n *><* *** tabu list start *** ";
144 for (
const auto &m : list) log << m <<
' ';
146 log <<
" *** tabu list end ***\n";
std::set< std::string > m_seen_list
the seen 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 > 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::ostream & operator<<(std::ostream &log, const Move &m)
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.
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