Class TabuSearchSolution¶
- Defined in File tabu_search.hpp
Inheritance Relationships¶
Base Type¶
public Solution
(Class Solution)
Class Documentation¶
-
class
TabuSearchSolution
: public Solution¶ Public Functions
-
TabuSearchSolution
(const std::vector<Node> &nodes, const std::vector<Vehicle> &vehicles, const std::vector<std::vector<double>> &distanceMatrix, const int n_tabu = 50, const int max_it = 500)¶ Constructor.
Constructor for initial setup of problem, and solution using Tabu Search Algorithm
- Return
- No return parameter
- Parameters
nodes
: Vector of nodesvehicles
: Vector of vehiclesdistanceMatrix
: Matrix containing distance between each pair of nodesn_tabu
: Size of tabu listmax_it
: Number of iterations of search
-
TabuSearchSolution
(const Problem &p, const int n_tabu = 50, const int max_it = 500)¶ Constructor.
Constructor for initial setup of problem, and solution using Tabu Search Algorithm
- Return
- No return parameter
- Parameters
p
: Instance of Problem class defining the problem parametersn_tabu
: Size of tabu listmax_it
: Number of iterations of search
-
TabuSearchSolution
(const Solution &s, const int n_tabu = 50, const int max_it = 500)¶ Constructor.
Constructor for initial setup of problem, and solution using Tabu Search Algorithm
- Return
- No return parameter
- Parameters
s
: Instance of Solution class containing a valid solution and problem parametersn_tabu
: Size of tabu listmax_it
: Number of iterations of search
-
void
Solve
()¶ Function called to solve the given problem using a tabu search algorithm.
Generates random iniitial solutions. Applies selected algorithm. Prints cost of best solution, and its validity.
- Return
- void
-