Class TabuSearchSolution

Inheritance Relationships

Base Type

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 nodes
  • vehicles: Vector of vehicles
  • distanceMatrix: Matrix containing distance between each pair of nodes
  • n_tabu: Size of tabu list
  • max_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 parameters
  • n_tabu: Size of tabu list
  • max_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 parameters
  • n_tabu: Size of tabu list
  • max_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