交通平均流量模拟(matlab)
function gaps = gaplength(x, L, ncar);
gaps = zeros(1, ncar);
gaps = x([2:end 1]) - x;
gaps(gaps <= 0) = gaps(gaps <= 0) + L;
function flux = ns(rho, p, L, tmax)
flux = 0;
ncar = round(rho * L);
x = sort(randperm(L, ncar));
vmax = 5;
v = vmax * on
原创
2020-08-03 13:22:59 ·
997 阅读 ·
0 评论