基于PSO粒子群优化的TSP问题仿真含GUI界面PSO参数可配置matlab2021a测试运行 function fitness=fitness(x,C,D) m=size(x,1); n=size(C,1); fitness=zeros(m,1); for i=1:m for j=1:n-1 fitness(i)=fitness(i)+D(x(i,j),x(i,j+1)); end fitness(i)=fitness(i)+D(x(i,1),x(i,n)); end