André Mateus
André Mateus

Reputation: 29

Traveling Salesman (TSP) no return

Does someone know about a implementation of a variation of the TSP algorithm without the need of returning to the start point, but keeping the 'must-pass' requirement (with fixed start and end point)? Thanks in advance! :)

Upvotes: 2

Views: 1746

Answers (1)

Peter Walser
Peter Walser

Reputation: 15696

When using Genetic Algorithms to solve the TSP problem, you can apply this restriction to the Genoms (which usually are realized as arrays containing the visiting sequence of the villages).

  • Spawn the Genoms with a fixed start and end point
  • Make sure the start and end point are not altered on mutation and crossover
  • Whether or not you return to the start point is within the realm of the Fitness Function, which interprets and rates the Fitness (inverse route length) of your Genoms.

This guarantees that any solution produced follows your requirements.

Upvotes: 1

Related Questions