Professional Documents
Culture Documents
Q = 100;
alpha = 1;
% The relative importance of the trail.
beta = 3;
% The relative importance of the visibility.
rho = 0.1;
% (1-rho) Trail Evaporation.
n = handles.Dim;
% 1<=i<=n; Numbers os Nodes.
m = n;
% Numbers of Ants equal to Numbers of Nodes.
% Algortihm Parameters.
Param = struct('m',m,'Q',Q,'alpha',alpha,'beta',beta,'rho',rho);
Default = {num2str(m); num2str(Q); num2str(alpha); num2str(beta);...
num2str(rho)};
Help = { ...
'm = Total number of ants.'
'Q = Constant related to the quantity of trail laid by ants.';
'alpha = The relative importance of the trail.';
'beta = The relative importance of the visibility.';
'rho = Trail persistence.';
};
if handles.Value >= 2,
elitist = 5;
% Elitist Ant System Strategy.
Param.elitist = elitist;
Default{end+1} = num2str(elitist);
Help{end+1} = 'elitist = Elitist Strategy';
end,
return,
end,
m
= Swarm.m;
alpha = Swarm.alpha;
beta = Swarm.beta;
rho
= Swarm.rho;
Q
= Swarm.Q;
n
= handles.Dim;
PS
= handles.NodeCoord(:,2:end);
if isfield(Swarm,'elistist'),
elitist = Swarm.elitist;
GA
= Swarm.GA;
else
elitist = 0;
GA
= 0;
end,
Symmetric = 1;
tabu = zeros(n,m);
L_ent
= sum(d_ent(AUX1+(tabu-1)*n));
+...
Q/L_e(k);
if (Symmetric),
tao_elitist(tabu_e(:,k)+(AUX0'-1)*n) = tao_elitist(tabu_e(:,k)+...
(AUX0'-1)*n)+Q/L_e(k);
end,
end,
end,