function A=runassigntas(n,R,STA,CTA)
%runs the function assigntas 1000 times and takes the best assignment.
m=[];
for i=1:n
rand('state',i);
A=assigntas(R,STA,CTA);
m=[m sum(A(:,3))];
end
[s,i]=min(m);
rand('state',i);
A=assigntas(R,STA,CTA);


