📄 tspdemo.m
字号:
% allsims.m
% Matlab program to get the simulation results for the different TSP's
% with varying number of cities between 20 and 100 with jumps of 5
clear all
clear global
format compact
Nall = input('Number of cities: '); %[50];
no_gens = 10000;
Area = 100*100;
threshold = 1.1*0.749*sqrt(Area)*sqrt(Nall);
PopSize = input('Number of Parents: ');
for i = 1:length(Nall)
close all
clear global
clear functions
N = Nall(i)
new_threshold = threshold(i)
rand('seed',0);
randn('seed',0);
[xopt, optJ, P, S, xoptAll] = eptsp(PopSize,N,10,no_gens(i),threshold(i),10);
%[xopt, optJ, P, S] = epsatsp(PopSize,N,10,no_gens(i),threshold(i),1);
eval(sprintf('save epsa%g',N));
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -