Step2: 简单的传播模拟
全局定义
global {
//模拟设置
float step <- 1 #minutes;
geometry shape <- envelope(square(500 #m));
//初始人群数量
int nb_people <- 500;
//人群速度
float agent_speed <- 5.0 #km/#h;
//感染距离
float infection_distance <- 2.0 #m;
//感染概率
float proba_infection <- 0.05;
//初始感染人数
int nb_infected_init <- 5;
//初始化
init {
create people number: nb_people {
speed <- agent_speed;
}
}
}族群设置
实验设置

Last updated