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_max_flows(celldata)
function mf = get_max_flows(celldata)
% GET_MAX_FLOWS - extract maximum flow values from the array
%                 of freeway cell data structures.
%
% Call:   mf = get_max_flows(celldata)
%
% Parameter:   celldata - array of freeway cell data structures.
%
% Returns:   mf - vector of maximal flows.
%
% Last modified:   07/30/2006.

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

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

mf = [];

for i = 1:N
  mf = [mf; celldata(i).FDfmax];
end

return;

Contact us at files@mathworks.com