function [M, t1] = CAPT(s,g,vmax,t0)
assignment = assignHungarian(s,g);
M = [];
%syms t;
for i = 1:length(g)
    dist = sqrt((s(i,1)-g(assignment(i),1))^2 + (s(i,2)-g(assignment(i),2))^2);
end
t1 = max(dist)/vmax;
for i = 1:length(s)
    M{i,1} = [t0;t1];
    M{i,2} = [s(i,:);g(i,:)];
   %M = [M; piecewise((t0<=t) & (t<t1),s(i,:)+(t-t0)/(t1-t0)*(g(i,:)-s(i,:)))];
end
end