I have a complete undirected graph with labeled edge. is there any toolbox to apply TSP in such graph.

1 visualización (últimos 30 días)
% I have complete undirected graph G(V,E) with labeled edge.
s= [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 5 5 5 5 6 6 6 7 7 8 ];
t= [2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 4 5 6 7 8 9 5 6 7 8 9 6 7 8 9 7 8 9 8 9 9 ];
Weight = [60 70 55 67 69 58 60 64 65 69 55 23 24 13 12 15 16 12 12 11 8 13 12 13 12 4 8 11 10 11 12 15 16 12 12 11]';
Name = {'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' }';
G=graph(s,t,Weight,Name);
I want to convert this into a connected graph which contain only minimum weight in between the nodes.

Respuestas (1)

Bruno Luong
Bruno Luong el 18 de Ag. de 2021
There are several submissions of TSP in file exchanges or if you have optimization toolbox

Categorías

Más información sobre Graph and Network Algorithms en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by