Class LocalSearchIntraSolution

Inheritance Relationships

Base Type

Class Documentation

class LocalSearchIntraSolution : public Solution

Public Functions

LocalSearchIntraSolution(const std::vector<Node> &nodes, const std::vector<Vehicle> &vehicles, const std::vector<std::vector<double>> &distanceMatrix)

Constructor.

Constructor for initial setup of problem, and solution using Local Search applied to the routes of each of the vehicles separately

Return
No return parameter
Parameters
  • nodes: Vector of nodes
  • vehicles: Vector of vehicles
  • distanceMatrix: Matrix containing distance between each pair of nodes

LocalSearchIntraSolution(const Problem &p)

Constructor.

Constructor for initial setup of problem, and solution using Local Search applied to the routes of each of the vehicles separately

Return
No return parameter
Parameters
  • p: Instance of Problem class defining the problem parameters

LocalSearchIntraSolution(const Solution &s)

Constructor.

Constructor for initial setup of problem, and solution using Local Search applied to the routes of each of the vehicles separately

Return
No return parameter
Parameters
  • s: Instance of Solution class containing a valid solution and problem parameters

void Solve()

Function called to solve the given problem using a local search algorithm.

Generates random iniitial solutions. Applies selected algorithm. Prints cost of best solution, and its validity.

Return
void