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

2 次查看(过去 30 天)
% 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.

回答(1 个)

Bruno Luong
Bruno Luong 2021-8-18
There are several submissions of TSP in file exchanges or if you have optimization toolbox

类别

Help CenterFile Exchange 中查找有关 Undirected Graphs 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by