資源簡介
美賽資料元胞自動機模型 是可以用來模擬交通量的一種比較成熟的模型

代碼片段和文件信息
function?[plaza?v?time?departurescount?departurestime]?=?clear_boundary(plaza?v?time)
%
%?clear_boundary??remove?the?cars?of?the?exit?cell
%
%?USAGE:?[plaza?v?time?departurescount?departurestime]?=?clear_boundary(plaza?v?time)
%????????plaza?=?plaza?matrix
%????????????????1?=?car?0?=?empty?-1?=?forbid?-3?=?empty&booth
%????????v?=?velocity?matrix
%????????time?=?time?matrix?to?trace?the?time?that?the?car?cost?to?pass?the?plaza.
%
%?zhou?lvwen:?zhou.lv.wen@gmail.com
departurescount?=?0;
departurestime?=?[];
[ab]?=?size(plaza);
for?i?=?2:b-1
????if?plaza(ai)?>?0
????????departurescount?=?departurescount?+?1;
????????departurestime(departurescount)?=?time(ai);
????????plaza(ai)?=?0;
????????v(ai)?=?0;
????????time(ai)?=?0;
????end
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?-rwxrwxrwx???????790??2011-07-28?22:42??traffic(zhoulvwen)\clear_boundary.m
?-rwxrwxrwx??????1544??2013-11-14?09:08??traffic(zhoulvwen)\create_plaza.m
?-rwxrwxrwx??????2419??2012-03-10?16:22??traffic(zhoulvwen)\main.m
?-rwxrwxrwx??????2663??2013-11-14?09:16??traffic(zhoulvwen)\move_forward.m
?-rwxrwxrwx??????1133??2011-07-29?08:58??traffic(zhoulvwen)\new_cars.m
?-rwxrwxrwx???????874??2011-08-14?16:43??traffic(zhoulvwen)\show_plaza.m
?-rwxrwxrwx??????2009??2011-08-14?17:43??traffic(zhoulvwen)\switch_lanes.m
?drwxrwxrwx?????????0??2013-11-14?20:36??traffic(zhoulvwen)
-----------?---------??----------?-----??----
????????????????11432????????????????????8
評論
共有 條評論