Code covered by the BSD License  

Highlights from
CTMSIM - an interactive freeway traffic macrosimulator

image thumbnail
from CTMSIM - an interactive freeway traffic macrosimulator by Alex Kurzhanskiy
Freeway traffic simulation based on Asymmetric Cell Transmission Model

get_ff_speeds(celldata)
function vf = get_ff_speeds(celldata)
% GET_FF_SPEEDS - extract free-flow speeds from the array
%                 of freeway cell data structures.
%
% Call:   vf = get_ff_speeds(celldata)
%
% Parameter:   celldata - array of freeway cell data structures.
%
% Returns:   vf - vector of free-flow speeds.
%
% Last modified:   10/14/2006.

%
% Alex Kurzhanskiy   <akurzhan@eecs.berkeley.edu>
%

N  = size(celldata, 2);  % number of cells

vf = [];

for i = 1:N
  vf = [vf; (celldata(i).FDfmax/celldata(i).FDrhocrit)];
end

return;

Contact us at files@mathworks.com