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_jam_densities(celldata)
function dj = get_jam_densities(celldata)
% GET_JAM_DENSITIES - extract jam density values from the array
%                     of freeway cell data structures.
%
% Call:   dj = get_jam_densities(celldata)
%
% Parameter:   celldata - array of freeway cell data structures.
%
% Returns:   dj - vector of jam densities.
%
% Last modified:   07/30/2006.

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

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

dj = [];

for i = 1:N
  dj = [dj; celldata(i).FDrhojam];
end

return;

Contact us at files@mathworks.com