% GSA code v1.1.
% Generated by Esmat Rashedi, 2010. 
% "	E. Rashedi, H. Nezamabadi-pour and S. Saryazdi,
%“GSA: A Gravitational Search Algorithm”, Information sciences, vol. 179,
%no. 13, pp. 2232-2248, 2009."
%
%This function updates the velocity and position of agents.
function [X,V]=move(X,a,V)

%movement.
[N,dim]=size(X);
V=rand(N,dim).*V+a; %eq. 11.
X=X+V; %eq. 12.