Class: TravellingSalesmanGenerator

TravellingSalesmanGenerator(params)

Class for generating travelling salesman problem instances

Constructor

new TravellingSalesmanGenerator(params)

Class constructor
Parameters:
Name Type Description
params object parameters of the generated instance
Source:

Methods

_hamiltonianPath() → {string}

Generate array for Hamiltonian type of Travelling Salesman problem
Source:
Returns:
empty string, because all nodes are visited
Type
string

_shortestPath() → {string}

Generate array for shortest type of Travelling Salesman problem
Source:
Returns:
nodes to visit
Type
string

generate() → {String}

Generate instance based on parameters
Source:
Returns:
instance of travelling salesman problem coded as String
Type
String