• 大小: 76KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-06-18
  • 语言: Matlab
  • 标签: 人员疏散  代码  

资源简介

基于元胞自动机的人员疏散模型研究,可以改变人数、出口大小,出口位置分布,火灾扩散速度等参数,人员移动速度,4邻域或8邻域模式。并有GUI界面和动图展示,美观形象。

资源截图

代码片段和文件信息

function [Dst_S]=Dststspread(Dst_SZAMrowcolp)
%Dst_S灾害因素矩阵;p扩散概率;1
Dst_S1=Dst_S;
[I1 I2]=find(Dst_S==1);
for i=1:length(I1)
    a=[I1(i)I2(i)-1;I1(i)I2(i)+1;...
        I1(i)-1I2(i);I1(i)+1I2(i);...
        I1(i)+1I2(i)-1;I1(i)+1I2(i)+1;...
        I1(i)-1I2(i)-1;I1(i)-1I2(i)+1];
    %     b=ones(81);
    for j=1:8
        if a(j1)>0&&a(j1)<=row&&a(j2)>0&&a(j2)<=col&&ZAM(a(j1)a(j2))==0
            if rand                Dst_S1(a(j1)a(j2))=1;
            end
        end
    end
end
% for i=1:row
%     for j=1:col
%         if Dst_S(ij)==1||
[I1 I2]=find(Dst_S==1);
for i=1:length(I1)
     a=[I1(i)I2(i)-1;I1(i)I2(i)+1;...
        I1(i)-1I2(i);I1(i)+1I2(i);...
        I1(i)+1I2(i)-1;I1(i)+1I2(i)+1;...
        I1(i)-1I2(i)-1;I1(i)-1I2(i)+1;...
        I1(i)+2I2(i)-2;I1(i)+2I2(i)-1;I1(i)+2I2(i);I1(i)+2I2(i)+1;I1(i)+2I2(i)+2;...
        I1(i)-2I2(i)-2;I1(i)-2I2(i)-1;I1(i)-2I2(i);I1(i)-2I2(i)+1;I1(i)-2I2(i)+2;...
        I1(i)-1I2(i)-2;I1(i)-1I2(i)-1;I1(i)-1I2(i);I1(i)-1I2(i)+1;...
        I1(i)+1I2(i)-2;I1(i)+1I2(i)-1;I1(i)+1I2(i);I1(i)+1I2(i)+1];
    for j=1:8
        if a(j1)>0&&a(j1)<=row&&a(j2)>0&&a(j2)<=col
        Dst_S1(a(j1)a(j2))=max(0.5 Dst_S1(a(j1)a(j2)));
        end
    end
    for j=9:24
        if a(j1)>0&&a(j1)<=row&&a(j2)>0&&a(j2)<=col
        Dst_S1(a(j1)a(j2))=max(0.4 Dst_S1(a(j1)a(j2)));
        end
    end
end
Dst_S=Dst_S1;






 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-05-30 09:36  黄敏凯人员疏散\
     文件        1500  2020-04-22 23:16  黄敏凯人员疏散\Dststspread.m
     文件        2681  2020-05-27 13:35  黄敏凯人员疏散\PopSn.m
     文件        3110  2020-04-22 22:23  黄敏凯人员疏散\PopSn_konghuang.m
     文件        2532  2020-04-17 23:33  黄敏凯人员疏散\PopSn_mangmu.m
     文件        2786  2020-04-22 22:23  黄敏凯人员疏散\PopSn_suiji.m
     文件         994  2020-04-22 22:14  黄敏凯人员疏散\ShuSanDieDai.m
     文件       66196  2020-05-29 14:17  黄敏凯人员疏散\renyuanshusan.fig
     文件       39696  2020-05-29 19:11  黄敏凯人员疏散\renyuanshusan.m

评论

共有 条评论