Tsp.create_random_instance

static Tsp.create_random_instance(n, low=0, high=100, seed=None)[ソース]

Create a random instance of the traveling salesman problem

パラメータ:
  • n (int) – the number of nodes.

  • low (int) – The minimum value for the coordinate of a node.

  • high (int) – The maximum value for the coordinate of a node.

  • seed (int | None) – the seed for the random coordinates.

戻り値:

A Tsp instance created from the input information

戻り値の型:

Tsp