当前位置:文档之家› 基于元胞自动机的交通流建模与应用(英文)

基于元胞自动机的交通流建模与应用(英文)

基于元胞自动机的交通流建模与应用(英文)
基于元胞自动机的交通流建模与应用(英文)

Research on Traffic Flow Modeling and Simulation Based on

Cellular Automaton

Abstract:Intelligent transportation system(ITS) improves the situation of transportation systems by managing advanced technologies such as telecommunication, network, automatic control and traffic engineering to, thus establishing an intelligent, secure, convenient, efficient, comfortable and environmental protection transportation system. Traffic flow modeling is one of the most important parts of ITS. ITS can be categorized as microscopic modeling and macroscopic modeling. Microscopic traffic models such as cellular automaton (CA) models and hybrid traffic models arisen in recent years have optential values in application.

Key word: CA Traffic flow modelling Bicycle

I Introduction of Cellular Automaton

The conception of cellular automaton(CA) was firstly put forward by V on Nenmann in the 1950s, it was mainly applied in modelling the function of self-duplication of biosystem. It was paid widely attention to after the confliction of life was put forward by Conway in 1970. After that, CA was applied to various field. Because a simple model type like this could duplicate complex phenomena or dynamically demonstrate

phenomena of attraction, self organization and chaos conveniently.That’s the reason why CA was widely used in modeling diverse physical systems and natural phenomena, such as fluld flow, galaxy formation, snowslide, traffic flow calculation, concurrent computation , earthquake etc. Nowadays, the merits of making use of CA to modeling the physical process is that it can leave out the process using differential equations as transition, and performing nolinear physical phenomenon directly through making rules. In these practical applications, CA model uncovers macroscopic behavior naturally happened through simple microscopic partial rules. It’s an ideal physical model for studying temporal-spatial discrete, and considered the most effective implement in terms of researching complex system.

CA model is made up of 4 parts basically: cell, lattice, neighbor and rule.Its ordinary features are summarized as follows:

Temporal discrete isometry, it means the deduction of system is proceeding according to a uniformly-spaced discrete time distribution, the time step dt usually sets time unit 1.

Spatial discrete homogeneity, it reflects that variations of each cell obey the same rule, and the way of distribution of each cell is identical.

Status discrete finite, it means the status of CA can only be taken finite discrete values.

Calculation synchronously and concurrently. Considering the

forming and variation of CA as calculating or disposing of data or information, it will show up that disposing process of CA is synchronous and concurrent, which means it is adapted to concurrent calculation especially.

Renew rules partially. The current status of each cell can only be affected by ones of its neighborhood. In terms of information transmission, the velocity of it in CA is finite.

Infinite dimension variables. In a dynamic system, the number of variables is often transformed into dimension. Status of each cell is considered as a variable, so a CA model contains infinite cells is regarded as a type of infinite dimension dynamic system.

The features above are just some ordinary features of CA models. In practical application, builders of models often extent their CA models more or less, breaking through the limitations above to forming various extended CA models. That’s why the field of CA model application is widely. But every extention to CA should keep its ordinary feature , especially the feature of renew rules partially.

In the 1990s, with the demand of traffic flow simulation and the development of intelligent transportation, people attempted to apply the theory of cellular automaton in physics to the field of transportation, so cellular automaton models of traffic flow arised.

The merits of traffic flow CA models are: (1) models are

uncomplicated, it can be realized on a computer easily. When modeling, divide the road into several cells with a length of L, a cell corresponds to one car or several cars, or several cells correspond to one car. The status of each cell is empty or the velocity of cars that it contains, every car is motivated by a set of rules simultaneously. These rules consist of moving rules and traffic rules that moving vehicle should obey, random rules that contains driving behavior, interference of circumstance. (2)It is capable of recurring various complicated phenomena of transportation, indicating features of traffic flow. In the modeling process, through inspecting the transformation of status of cells, people can acquire the velocity, displacement and headway of every car at any moment which describe microscopic features of traffic flow , with parameters of average velocity, density, flowrate that describe macroscopic features of traffic flow at the same time.

1.1 Single Lane CA model

N-S model is a simplified one-dimensional CA model, it was put forward by German bachelors Nagel and Schreckenberg in 1992. it is a minimal one-dimensional CA traffic flow model for describing freeway traffic flow. Each path of it is essential for modeling diverse features practical traffic flow. It provides basic rules for more complicated situation or urban traffic rules.

The model use a one-dimensional lattice to indicate a single lane, in

other words, divide the researching single lane into n parts (cells) with the length of L. each situation in the lattice corresponds to a cell, and each situation is either empty or containing a car. Defining the length of cell, L as headway when traffic jamming; the velocity of cars range from 0 to vmax, vmax=5 times the length of cell per second; time step can be supposed to the reaction time of drivers, sets 1s in common; there are 7 types of status in each situation, namely empty, the velocity of situation is 0,1,2,3,4 and 5. In the N-S model, the status of all cars are variable simultaneously according to 4 rules listed as follows:

Rules of Acceleration : if v(t)≤vmax, then v(t+l)=min(vmax,v(t)+l).

Rules of Deceleration : if v(t)>gap, then v(t+1)=gap.

Rules of Ramdom : in the probability of P,

v(t+1)=max(v(t+1)-1,0).

Vehicle Movement: x(t+1)=x(t)+v(t+1).

The gap in the rules stands for the empty space between current car and former one. X stands for car’s situation. Because t=1s, vt=v. In this model, Rule of Acceleration reflects that driver accelerates the car to max velocity gradually; Rule of Deceleration reflects driver decelerates the car in order to avoid colliding with former car; Rule of Random indicates the uncertainty of driver’s action. In N-S model, the probability of random deceleration is a critical parameter, when P=0, N-S model is a deterministic traffic CA.

From the consequence of modeling, N-S model reflects the macroscopic features of vehicle’s movement well, which represents as follows: (1) it present the phenomenon of start-to-stop waves, which means in a time space diagram, the process that traffic flow varies from free in low density to crowded in high density gradually can be acquired distinctly, indicating a scene that vehicle’s movement is like a wave spreading in the queue vividly. (2) flow-density curve can be obtained from modeling, which is extremely similar with practical consequence, revealing two statuses of traffic flow------ status of crowded and status of uncrowded.

N-S Model has two types of boundary condition. One is periodic boundary, the other is the open boundary. Periodic boundary condition is an idealized analysis method of CA model. It means the origination and destination are connected, which is fit for analysis of metastable status when density is stable.Since it takes the form of concurrent update, no exactly analytic solutions can be acquired. But periodic boundary can obtain approximate analytic solutions through simulation, Providing a powerful verification platform for problem analysis. In recent years, this periodic boundary pattern has achieved great success in analysing N-S model and its extentions. The open boundary signifies when a car put in or put off the road, it should accord with certain probability distribution. The open boundary is more fit for practical situation, especially in the

aspect of freeway ramp control where traffic engineers concern.

N-S model is the simplist type of one-dimensional CA model of traffic flow, 4 rules only turn out the most foundamental characteristic of traffic flow. On the basis of it, people do more kinds of improvement and revision, expect they can reflect the characteristics of traffic flow more accurately.

1.2 multiple lanes CA model

The main measurement to expand a single lane model to a multiple lane model is to set up traffic lane changing rules, many scholars have made contributions in this aspect. Among them, because of the different situation of lanes, such as the difference between fast and slow lane, the double driveway model is divided into symmetric lane model and asymmetric lane model. In addition, depending on the difference of the vehicle, such as there are two or more different maximum speed vehicles, can also be divided into two kinds of model, symmetric and asymmetric. Generally, the update steps of double driveway model are divided into two steps: first step, according to the rules of lane changing changes lanes synchronously; The second step, using single lane model update vehicle location simultaneously. Drivers have two main lane changing demand motivation: one is another lane can drive cars more convenient and gain greater speed; Second is where the vehicle is driving

to a turnning demanding corner, producing motivation of lane changing, and satisfying the safety conditions at the same time. In 1996, Rickert proposed vehicles are allowed to change the way if they fulfill follwing 4 rules:

(1)gap(i)

(2)gap0(i)>l0,

(3)gap0,back(i) l0,back,

(4)rand()

Among them, the gap (i) and gap0(i) correspond to the shorter distance of the vehicle(i) in the current lane to former one in another lane or the vehicle in front of the driveway l; Gap0,back (i) for the minimal distance between the vehicle i and the latter one in another lane;

l,l0,l0,back are all consts represent distance; The rand () is the random number between 0 and 1, the Pc stands for lane changing probability.

1.3 network CA model

In 1992, 0. Biliam, arjun iddleton and D.L evine uses cellular automata to design a simple two-dimensional cellular automata model (BML model) to simulate the urban network traffic flow phenomenon and research the traffic jam problem. Simulation results showed that when the vehicle density was greater than a critical value, the block would happen. BML model is simple and intuitive. In this model, an NxN square

lattice, N is the length of lattice, each lattice can have a north-south traffic, or have a east-west traffic,or nothing. In every odd time step, north-south vehicle can drive forward a lattice; In every even number of time steps, east-west vehicle can go forward a lattice; If just in front of one vehicle ,there’s another vehicle in lattice ,then it have to wait in place, the car can't driving forward. In this way, each lattice point is the equivalent of intersection signal control.

However BML model has very big disparity with the actual traffic conditions , mainly displays in:

(1) the abstract and simplification of the BML model to the transportation network is unreasonable, it only has intersections in the network diagram, there is no road;

(2) the BML model simplifies the traffic movement in two directions, without considering steering movement, leading to large difference with the actual situation.

In 1999, Chowdhu cut and Schadschneider put forward a more realistic two-dimensional CA traffic flow model, which is use D cellular stands for each section of the street, the street can utilize Nasch model to stimulate, and distance between two adjacent intersection D-1

cell-length, as shown in figure below.

At each intersection set red and green Light, when one direction is accessible, another direction is in prohibition, with period T change. Vehicles moving forward until the cell was dominated by other vehicles ahead or meet the crossing when the red light is on. The parallel update rules are as follows:

1) acceleration: vn to min(vn +1,vmax);

2) deceleration: set dn is the nth Car's front spacing, sn is the distance between it and the location of the traffic lights ahead, Specific points two situations:

Lights for the nth car is red vn to min(vn, dn-1 ,sn-1);

(2) when the signal for the nth car is green, make the remaining time that light turned red t, there are following three conditions: If dn

If dn>Sn and min(vn,dn-1)*t>sn, then vn ->min(vn,dn-1);

if dn>Sn and min(Vn,dn-1)*t

then vn to min(vn, sn-1);

Namely the speed of the vehicle depends on whether it can through

the intersection before the red light is on;

3) randomization.Vn tends to max(Vn-1,0) in the probability of p;

4) location update . east to vehicles: Xn = Xn+.vn; North of the vehicle; Yn = Yn +.vn.

At an initialization time, N→and N↑vehicles are randomly placed in the model, according to the rules above for parallel refreshing. From free flow phase to crowding phase ,the transformation point of density c * (D), with the model parameters, it p, vmax, T the relationship among them has not yet fully cleared. From computer simulation data cannot prove that it has nothing to do with these parameters, inducing of blockage of dynamic randomness is consistent with the BML model, the block that self-organization leads to is basically the same with BML model.However, the average speed of the model changes over time, and in the liquid phase as the density. deceleration probability p, road length D, the change of the signal period T is closer to reality than the BML model.

The model can also be improved in the following aspects: (l) multiple lanes; (2)set realistic vehicle steering rules at the intersection : (3) set different types of lights, including green wave band.

II. Bicycle traffic flow stimulation and application

2.1 bicycle traffic flow characteristics and the bicycle characteristics

The characteristics of bicycle traffic flow and motor traffic were significantly different. There are two kinds of bicycle driving state: the state of motion and stop. Its characteristics are summarized below: (l) the track of bicycles is different from motor vehicle, often as a serpentine movement.when parking, the vehicle weave in and out with each other, lane utilization ratio is very high.

(2) bikes go with crowds. Unlike closed environment of motor vehicles, bicycle is in an open environment, cyclists often in droves, chat to each other. This is different from the characteristics of each vehicles as an independent body. This feature can cause great influence on traffic capacity.

(3) the maximum speed of the bicycle isn’t up to the speed limit of way, because bicycle traffic flow belongs to the low-speed flow, the vast majority of lanes have no speed limit. The maximum speed of the bicycle depends on the physical limit, cyclists in comparison to the elderly, young cyclists maximum velocity is much larger.

(4) the bicycle lanes and the barrier between the lanes of traffic also have great impact on bicycle traffic flow, there is no isolation facilities of bicycle lanes, cyclists tend to be far away from motor vehicle road bike ride, this leads to these lanes that most close to the roadway is not make full use ,which affects the traffic flow.

According to the literatures, the bicycle traffic characteristics are

summarized as follows:

(l) bicycle 1.9m length and 0.6 m wide. Each bike lane width 0.8 m, and each side with 0.25 m security clearance. Actual bike lane width is (0.5 +B) m, B for the number of bicycle lane.

(2) if there are isolation facilities in non-motor vehicle lanes , ordinary bicycles can make a maximum theoretical speed of 28.74km per hour when no interference, namely free velocity of about 8 m/s.

(3) for each road swing range of bicycle is 0.2 m.

(4) the bicycle usually get its maximum density before parking line in the intersection, the average parking density is 0.54 veh/m2; In 205, in 20 seconds after the green light is on, the maximum parking density is 0.63 veh/m2.

(5) the average response time of bicycle is around 1 second.

(6) carrying separation zone, under the condition of single bicycle traffic capacity for roughly: short sections of bicycle traffic capacity can reach 2100 veh/M. Long road capacity is 1680 veh/M. Near the intersection and road traffic capacity is 1000 a 1200 veh/M. A based on parameter definition.

2.2 preparation of bicycle traffic flow modelling

2.2.1 the size of cellular

The size of cellular decided by bicycle’s maximal parking density

and the physical size of bicycle. According to interactive literature, the bicycle’s maximal parking density is 0.63 per square meter, in other words, average occupation of one bicycle is 1/0.63=1.59 square meter. The maximal overall size of general bicycle is: 1.9 meter long,0.6 meter

wide, 2.5 meter high when cycling. The generally occupying area is 4~10 square meter when cycling. So, we define the size of bicycle cellular as a rectangle which length is 2 meter and the wide is 0.8 meter, in this way, the area of cellular is 1.6 square meter.Conforming to the maximum density of parking.

2.2.2 Speed

We assuming that the longitudinal speed is V, and the Longitudinal theoretical maximum speed is 28.74 kilometer per hour≈ 8

V=4. We assuming that meter per second=the length of four cellular, so max

the transverse velocity is ,V,which is limited by the adjacent cellular.

Stipulating the maximum are 2 cellulars.

2.2.3 the state space of cellular

The dimension of cellular is set by length and width of bicycle. For instance, when the wide of a lane is 3.5 meter,in other words ,there are 3.5-0.5=3 lanes, so ,the width of cellular grid is set as three width of cellular. If the length of lane is 1000 meter, so that the length of cellular is set as 500 length of cellular. We define the boundary conditions of grid as the Openness to make it more adjacent to the physical truth.

2.2.4 the status of cellular

The position of cellular is repressed by two-dimension coordinate, A(i,j), as shown in the figure. There are six possible status of cellular,

A(i,j)={-1,0,1,2,3,4},

representing: when A(i,j)=1, the cellular is vacant, when A(i,j)=v,v contained in{0,1,2,3,4},representing the cellular is occupied by bicycle,and the speed is v.

picture 2-1

2.2.5 the neighbourhood of the cellular

The diagram 2-1 is the neighborhood of the cellular.The brunet cellular is the current cellular.We define the neighborhood cellular is the peripheral light-colored part. Corresponding to the four lengths of cellular of longitudinal maximal speed and two width of cellular of transverse maximal speed. Considering that in fact, the pendulum range of bicycle is

not so dramatic,so ,when the forward speed is 1,the transverse maximal speed is 1,too. When the forward speed is 2, the transverse maximal speed is 2,too. In other words , the transverse speed is smaller than longitudinal speed.

2.2.6 The updated rule of model

We assuming the current position of cellular is A(i,j), A (i,j)≥0, so that this cellular is occupied by a bicycle which has a longitudinal speed of V(t). We assuming that the 1d 、2d 、3d are the longitudinal distance headway of current cellular and non-empty bicycle straight ahead ,front-left and front-right.We assuming that the 1s 、2s are the transverse distance headway of current cellular and non-empty bicycle right and left.The evolution rules of current cellular is:

Step1: Longitudinal acceleration

},1)(min{

)1(max V t V t V n n +=+ Step2:Longitudinal deceleration

We assuming d=max{1d ,2d ,3d },so that

}1),1(min{

)1(-+=+d t V t V n n When there are 2 or more equal among the 1d ,2d ,3d , we chose the one by

probability. Generally,the probability of 1d ,2d and 3d are 2/3,1/3 and 1/3.

Step3:Transverse speed

We assuming s=max{1s ,2s },

If 0)1(=+t V n then 0)1(,=+t V n

else if 1)1(=+t V n then

if d=1d then 0)1(,=+t V n ;

if (d=2d &1s ≥1)or(d=3d &2s ≥1) then 1)1(,=+t V n

else if )1(+t V n ≥2, then

If d=1d then 0)1(,=+t V n ;

If(d=2d &01=s ) then 0)1(,=+t V n ;

If(d=2d &1s =1) then 1)1(,-=+t V n ;

If(d=2d &1s ≥2) then 1)1(,-=+t V n 或 -2 (1/2 and 1/2);

If(d=

3d &1s =0) then ;0)1(,=+t V n If(d=

3d &1s =1) then ;1)1(,=+t V n if(d=3d &1s ≥2) then 1)1(,=+t V n 或2;(1/2 and 1/2);

Step4:Random moderation of longitudinal speed

We assuming the probability of random moderation is p,so

If rand()

)1(-+=+t V t V n n Step5: Update of position

)1()()1(++=+t V t x t x n n n ;

)1()()1(,++=+t V t y t y n n n ;

N is the longitudinal position of cellular, t is time

The original model not considering the relationship between the longitudinal speed and transverse speed, there will be a longitudinal velocity is 0 when there is still a horizontal speed. In this case, Bicycle can occur the action that lateral thrust deep into. It can improve the utilization rate of the lane. But it will not happen in the actual situation. It would cause an apparently high of Capacity simulation in the original model.It can be seen from the above improved model that bicycle transverse velocity is not independent, but change according to longitudinal velocity changes. When longitudinal velocity is zero,bicycle will still,and the transverse velocity is zero, too.Besides, as a result of the limitation of bicycle driving characteristics,in the process of driving,the Angle of the transverse speed of the bicycle generally will not be too big.So the transverse speed won’t be larger than the longitudinal speed in the model.The model compared with the existing models,more detailed depict the bike driving characteristics, and the habit of cyclists. Overcoming many insufficient of the original model , and it has a greater improvement.

2.3 the validation of Model accuracy

To test and verify the accuracy of the model, we simulated an experiment.

1.The simulation principle:

The path of the simulation is made up of two-dimensional cellular. Taking each cell L is 2 m long, and 0.8 m wide.Taking the lane length is 2000m,One-way two-lane.In other words,the cell lane length is 1000 cellular,and the width is 3 cellular.We assuming the number of vehicles

on the road is N, the speed of those vehicles is ,V , so that the average

speed is ∑==N V V 1i i

平,then the density of the vehicle this moment is

ρ=21000???W L N

.In the simulation, each data points that are involved in the initial operation after 1100 steps take 1100 steps under the condition of average.we can ensure the vehicle driving under the same density.To make the flow corresponds to the actual possible capacity of the link capacity to design.Simulation taking open boundary condition, the vehicle road sections and out of their respective accord with certain probability distribution.Simulation program randomly generated initial density of roads, every simulation cycle in the left border will produce vehicles.The right boundary is assumed open completely, all the bicycles that can reach the right border can be out of road.

2.The results of simulation and analysis

Figure 2-2a expressed under the condition of different initial density, the speed-and-density’s curve.We can know that when the average density of very small on the road, the average speed of vehicles are around 29km/h.In line with expectations of four cellular theoretical maximum.The average velocity fell sharply since density is about

0.1,This shows that the density of road are larger than the critical point of completely freedom.It beginning to affect the speed,and with the increase of vehicle density, average speed gradually reduced.With open boundary conditions,the right boundary are completely open.Therefore the traffic flow at the end of road can always out of road.So regardless of the initial density is how high, vehicle can always proceed slowly.The simulation results show that if close the right boundary,section average speed tends

交通流中的NaSch模型及MATLAB代码元胞自动机完整

元胞自动机NaSch模型及其MATLAB代码 作业要求 根据前面的介绍,对NaSch模型编程并进行数值模拟: ●模型参数取值:Lroad=1000,p=,Vmax=5。 ●边界条件:周期性边界。 ●数据统计:扔掉前50000个时间步,对后50000个时间步进行统计,需给出的 结果。 ●基本图(流量-密度关系):需整个密度范围内的。 ●时空图(横坐标为空间,纵坐标为时间,密度和文献中时空图保持一致, 画 500个时间步即可)。 ●指出NaSch模型的创新之处,找出NaSch模型的不足,并给出自己的改进思 路。 ●? 流量计算方法: 密度=车辆数/路长; 流量flux=density×V_ave。 在道路的某处设置虚拟探测计算统计时间T内通过的车辆数N; 流量flux=N/T。 ●? 在计算过程中可都使用无量纲的变量。 1、NaSch模型的介绍 作为对184号规则的推广,Nagel和Schreckberg在1992年提出了一个模拟车辆交通的元胞自动机模型,即NaSch模型(也有人称它为NaSch模型)。 ●时间、空间和车辆速度都被整数离散化。

● 道路被划分为等距离的离散的格子,即元胞。 ● 每个元胞或者是空的,或者被一辆车所占据。 ● 车辆的速度可以在(0~Vmax )之间取值。 2、NaSch 模型运行规则 在时刻t 到时刻t+1的过程中按照下面的规则进行更新: (1)加速:),1min(max v v v n n +→ 规则(1)反映了司机倾向于以尽可能大的速度行驶的特点。 (2)减速:),min(n n n d v v → 规则(2)确保车辆不会与前车发生碰撞。 (3)随机慢化: 以随机概率p 进行慢化,令:)0, 1-min(n n v v → 规则(3)引入随机慢化来体现驾驶员的行为差异,这样既可以反映随机加速行为,又可以反映减速过程中的过度反应行为。这一规则也是堵塞自发产生的至关重要因素。 (4)位置更新:n n n v x v +→ ,车辆按照更新后的速度向前运动。 其中n v ,n x 分别表示第n 辆车位置和速度;l (l ≥1)为车辆长度;11--=+n n n x x d 表示n 车和前车n+1之间空的元胞数;p 表示随机慢化概率;max v 为最大速度。 3、NaSch 模型实例 根据题目要求,模型参数取值:L=1000,p=,Vmax=5,用matlab 软件进行编程,扔掉前11000个时间步,统计了之后500个时间步数据,得到如下基本图和时空图。 程序简介 初始化:在路段上,随机分配200个车辆,且随机速度为1-5之间。 图是程序的运行图,图中,白色表示有车,黑色是元胞。

元胞自动机(CA)代码及应用

元胞自动机(CA)代码及应用 引言 元胞自动机(CA)是一种用来仿真局部规则和局部联系的方法。典型的元胞自动机是定义在网格上的,每一个点上的网格代表一个元胞与一种有限的状态。变化规则适用于每一个元胞并且同时进行。典型的变化规则,决定于元胞的状态,以及其(4或8 )邻居的状态。元胞自动机已被应用于物理模拟,生物模拟等领域。本文就一些有趣的规则,考虑如何编写有效的MATLAB的程序来实现这些元胞自动机。 MATLAB的编程考虑 元胞自动机需要考虑到下列因素,下面分别说明如何用MATLAB实现这些部分。并以Conway的生命游戏机的程序为例,说明怎样实现一个元胞自动机。 ●矩阵和图像可以相互转化,所以矩阵的显示是可以真接实现的。如果矩阵 cells的所有元素只包含两种状态且矩阵Z含有零,那么用image函数来显示cat命令建的RGB图像,并且能够返回句柄。 imh = image(cat(3,cells,z,z)); set(imh, 'erasemode', 'none') axis equal axis tight ●矩阵和图像可以相互转化,所以初始条件可以是矩阵,也可以是图形。以下 代码生成一个零矩阵,初始化元胞状态为零,然后使得中心十字形的元胞状态= 1。 z = zeros(n,n); cells = z; cells(n/2,.25*n:.75*n) = 1; cells(.25*n:.75*n,n/2) = 1; ●Matlab的代码应尽量简洁以减小运算量。以下程序计算了最近邻居总和,并 按照CA规则进行了计算。本段Matlab代码非常灵活的表示了相邻邻居。 x = 2:n-1; y = 2:n-1; sum(x,y) = cells(x,y-1) + cells(x,y+1) + ... cells(x-1, y) + cells(x+1,y) + ... cells(x-1,y-1) + cells(x-1,y+1) + ... cells(x+1,y-1) + cells(x+1,y+1); cells = (sum==3) | (sum==2 & cells); ●加入一个简单的图形用户界面是很容易的。在下面这个例子中,应用了三个 按钮和一个文本框。三个按钮,作用分别是运行,停止,程序退出按钮。文框是用来显示的仿真运算的次数。 %build the GUI %define the plot button plotbutton=uicontrol('style','pushbutton',...

基于元胞自动机模型的城市历史文化街区的仿真

文章编号: 1673 9965(2009)01 079 05 基于元胞自动机模型的城市历史文化街区的仿真* 杨大伟1,2,黄薇3,段汉明4 (1.西安工业大学建筑工程系,西安710032;2.西安建筑科技大学建筑学院,西安710055; 3.陕西师范大学历史文化学院,西安710061; 4.西北大学城市与资源学系,西安710069) 摘 要: 为了探讨当前城市规划中远期预测的科学性和准确性问题,将自组织理论与元胞自动机模型结合,在一定的时空区域,构建了一个城市增长仿真模型.将元胞自动机模型应用于西安市最具历史文化特色的区域中,形成自下而上的规划模型.元胞自动机模型对于西安回民区的空间发展城市历史文化特色街区的模拟具有一定的原真性和时效性,在时空中能反应当前的空间格局.元胞自动机在城市规划的预测中具有图式与范式结合的特点,在中长期的预测中形成符合城市规划发展战略的空间格局. 关键词: 元胞自动机;自组织;历史文化特色街区;空间演化 中图号: T U984 文献标志码: A 自组织理论是当前城市复杂性研究的主要研究方向之一.自组织是相对他组织而言,即自我、本身自主地组织化、有机化,意味着一种自动的、自发性的行为,一种自下而上、由内至外的发展方式.其主要涵义可以简单概括:在大多数情况下,作用于系统的外部力量并不能直接对系统的行为产生作用,而是作为一种诱因,即引入序参量引发系统内部发生相变,系统通过这一系列的变化自发地组织起来,最终大量微观个体的随机过程表现出宏观有序的现象[1]. 20世纪40年代U lam提出元胞自动机模型(Cellular Autom at o n M odel,CA),V on N eu m ann将其用于研究自复制系统的逻辑特性,且很快用于研究自组织系统的演变过程,其中对城市系统自组织过程的模拟是焦点问题[2 9]. CA是定义在一个具有离散状态的单元(细胞)组成的离散空间上,按一定的局部规则在离散时间维演化的动力学系统.一个CA模型通常包括单元、状态、邻近范围和转换规则4要素[9],单元是其最小单位,而状态则是单元的主要属性.根据转换规则,单元可以从一个状态转换为另外一个状态,转换规则通过多重控制函数来实现. 自组织理论的提出,对于解释相对封闭,具有自身演化规律的复杂适应系统中的复杂现象和问题具有重要意义和应用前景.而CA 自下而上的研究思路,强大的复杂计算功能、固有的并行计算能力、高度动态特征以及具有空间概念等特征,使其在模拟空间复杂系统的时空演变方面具有很强的能力,在城市学研究中具有天然优势[9 15].本文将自组织理论引入CA模型,并将该模型首次应用于西安回民区这一复杂的相对独立的历史街区中,就是为了得出其在自组织的作用下,未来20年空间发展的变化模型,为城市规划的制定做出科学的预测.下面对西安回民区做一简单介绍. 西安回民区位于西安旧城中心的中西地段,东接西安历史文化遗产钟楼和北大街,西接洒金桥,南到西大街,北到莲湖路,面积约为93.4公顷,人口约为77600人,在此居住的居民中有43.6%以 第29卷第1期 西 安 工 业 大 学 学 报 V o l.29No.1 2009年02月 Jo urnal o f Xi!an T echnolo g ical U niver sity Feb.2009 *收稿日期:2008 06 04 基金资助:国家自然科学基金(50678149) 作者简介:杨大伟(1981 ),男,西安工业大学助教,西安建筑科技大学博士研究生,主要研究方向为城市空间复杂性. E mail:yangdaw ei@https://www.doczj.com/doc/d1512341.html,.

CA元胞自动机优化模型原代码

CA优化模型原代码: M=load(‘d:\ca\jlwm’) N=load(‘d:\ca\jlwn.asc’) lindishy=load(‘d:\ca\ldfj3.asc’) caodishy=load(‘d:\ca\cdfj3.asc’) gengdishy=load(‘d:\ca\htfj3.asc’) [m,n]=size(M); Xr=[1 1 -1 1 1 1 -1 -1 1 1;1 1 1 1 -1 -1 1 1 1 -1;-1 1 1 1 -1 -1 -1 1 -1 -1;1 1 1 1 1 1 -1 1 1 I; l -1 -1 1 1 -1 -1 -1 1 1;1 -1 -1 1 -1 1 -1 1 -1 -1;-1 1 -1 -1 -1 -1 1 -1 -1 -1;-1 1 1 1 -1 1 -1 1 -1 -1;1 1 -1 1 1 -1 -1 -1 1 1;1 -1 -1 1 1 -1 -1 -1 1 1]; caodi=0;lindi=0;gengdi=0; for i=1:m forj=l:n if M(i,j)==4 caodi=caodi+1; elseif M(i,j)==3 lindi=lindi+1; elseif M(i,j)==2 gengdi=gengdi+1; end end end for i=1:m for j=1:n if M(i,j)==4 if lindishy(i,j)>gengdishy(i,j) if lindishy(i,j)>caodishy(i,j) z=0; for P=max(1,i-1):min(i+1,m) for q=max(j-1,1):min(j+1,n) if (M(p,q)~=0)&&xr(M(p,q),3)==-1 z=1; end end end if z== 0 caodi=eaodi-1; M(i,j)=3; lindi=lindi+1; end elseif lindishy(i,j)==caodishy(i,j) caoditemp=0; linditemp=0; gengditemp=0;

交通流元胞自动机模型综述

第23卷 第1期2006年1月 公 路 交 通 科 技 Journal of Highway and Transportation Research and Development Vol .23 No .1 Jan .2006 文章编号:1002-0268(2006)01-0110-05 收稿日期:2004-09-27 作者简介:郑英力(1971-),女,福建宁德人,讲师,研究方向为交通控制与仿真.(z hengyl71@s ina .com ) 交通流元胞自动机模型综述 郑英力,翟润平,马社强 (中国人民公安大学 交通管理工程系,北京 102623) 摘要:随着交通流模拟的需要及智能交通系统的发展,出现了基于元胞自动机理论的交通流模型。交通流元胞自动机模型由一系列车辆运动应遵守的运动规则和交通规则组成,并且包含驾驶行为、外界干扰等随机变化规则。文章介绍了交通流元胞自动机模型的产生与发展,总结和评述了国内外各种元胞自动机模型,并对元胞自动机模型的发展提出展望。 关键词:元胞自动机;交通流;微观模拟;模型中图分类号:U491.1+23 文献标识码:A Survey of Cellular Automata Model of Traffic Flow ZH ENG Ying -li ,ZH AI Run -p ing ,MA She -q iang (Department of Traffic Management Engineering ,Chinese People 's Public Security University ,Beijing 102623,China )Abstract :With the increas ing demand of traffic flow si mulation and the development of ITS research ,the traffic flow model based on cellular automata has been developed .Cellular automata model of traffic flow incorporates a series of vehicle movement rules and traffic regulations .Meanwhile ,the model works under some stochastic rules takin g into consideration of drivers 'behaviors and ambient interfer -ences .This paper introduces the establishment and development of cellular automata model of traffic flow ,su mmarizes and comments on different kinds of typical cellular automata models of traffic flow ,and furthermore ,presents a new perspective for further stud y of the model . Key words :Cellular automata ;Traffic flow ;Microscopic simulation ;Model 0 引言 交通流理论是运用物理学和数学定律来描述交通特性的理论。经典的交通流模型主要有概率统计模 型、车辆跟驰模型、流体动力学模型、车辆排队模型等 [1] 。20世纪90年代,随着交通流模拟的需要及智 能交通系统的发展,人们开始尝试将物理学中的元胞自动机(Cellular Automata ,简称CA )理论应用到交通领域,出现了交通流元胞自动机模型。 交通流C A 模型的主要优点是:(1)模型简单,特别易于在计算机上实现。在建立模型时,将路段分 为若干个长度为L 的元胞,一个元胞对应一辆或几辆汽车,或是几个元胞对应一辆汽车,每个元胞的状态或空或是其容纳车辆的速度,每辆车都同时按照所建立的规则运动。这些规则由车辆运动应遵守的运动规则和交通规则组成,并且包含驾驶行为、外界干扰等随机变化规则。(2)能够再现各种复杂的交通现象,反映交通流特性。在模拟过程中人们通过考察元胞状态的变化,不仅可以得到每一辆车在任意时刻的速度、位移以及车头时距等参数,描述交通流的微观特性,还可以得到平均速度、密度、流量等参数,呈现交通流的宏观特性。

元胞自动机NaSch模型及其MATLAB代码

元胞自动机N a S c h模型 及其M A T L A B代码 This manuscript was revised by the office on December 22, 2012

元胞自动机N a S c h模型及其M A T L A B代码 作业要求 根据前面的介绍,对NaSch模型编程并进行数值模拟: 模型参数取值:Lroad=1000,p=0.3,Vmax=5。 边界条件:周期性边界。 数据统计:扔掉前50000个时间步,对后50000个时间步进行统计,需给出的结果。 基本图(流量-密度关系):需整个密度范围内的。 时空图(横坐标为空间,纵坐标为时间,密度和文献中时空图保持一致,画500个时间步即可)。 指出NaSch模型的创新之处,找出NaSch模型的不足,并给出自己的改进思路。 流量计算方法: 密度=车辆数/路长; 流量flux=density×V_ave。 在道路的某处设置虚拟探测计算统计时间T内通过的车辆数N; 流量flux=N/T。 在计算过程中可都使用无量纲的变量。 1、NaSch模型的介绍 作为对184号规则的推广,Nagel和Schreckberg在1992年提出了一个模拟车辆交通的元胞自动机模型,即NaSch模型(也有人称它为NaSch模型)。 时间、空间和车辆速度都被整数离散化。道路被划分为等距离的离散的格子,即元胞。 每个元胞或者是空的,或者被一辆车所占据。 车辆的速度可以在(0~Vmax)之间取值。 2、NaSch模型运行规则 在时刻t到时刻t+1的过程中按照下面的规则进行更新: (1)加速:vnmin(vn1,vmax) 规则(1)反映了司机倾向于以尽可能大的速度行驶的特点。 (2)减速:vnmin(vn,dn) 规则(2)确保车辆不会与前车发生碰撞。 (3)随机慢化:以随机概率p进行慢化,令:vnmin(vn-1,0) 规则(3)引入随机慢化来体现驾驶员的行为差异,这样既可以反映随机加速行为,又可以反映减速过程中的过度反应行为。这一规则也是堵塞自发产生的至关重要因素。 (4)位置更新:vnxnvn,车辆按照更新后的速度向前运动。其中vn,xn分别表示第n辆车位置和速度;l(l≥1)为车辆长度; p表示随机慢化概率;dnxn1xn1表示n车和前车n+1之间空的元胞数; vmax为最大速度。 3、NaSch模型实例

元胞自动机参考文献

[1] Zhou W H, Lee J, Li G L, et al. Embedding Game of Life into a Simple Asynchronous Cellular Automaton[C]. Computing and Networking (CANDAR), 2014 Second International Symposium on IEEE, 2014: 503-506. [2]Tian J, Treiber M, Zhu C, et al. Cellular Automaton Model with Non-hypothetical Congested Steady State Reproducing the Three-Phase Traffic Flow Theory[M]. Cellular Automata. Springer International Publishing, 2014: 610-619. [3]Delivorias S, Hatzikirou H, Penaloza R, et al. Detecting Emergent Phenomena in Cellular Automata Using Temporal Description Logics[M]. Cellular Automata. Springer International Publishing, 2014: 357-366. [4] D'Ariano G M, Mosco N, Perinotti P, et al. Path-integral solution of the one-dimensional Dirac quantum cellular automaton[J]. Physics Letters A, 2014, 378(43): 3165-3168. [5] Bisio A, D’Ariano G M, Tosini A. Quantum field as a quantum cellular automaton: The Dirac free evolution in one dimension[J]. Annals of Physics, 2015, 354: 244-264. [6] Masuda T, Nishinari K, Schadschneider A. Cellular Automaton Approach to Arching in Two-Dimensional Granular Media[M]. Cellular Automata. Springer International Publishing, 2014: 310-319. [7] Takada K, Namiki T. on Limit Set of Two-Dimensional Two-State Linear Cellular Automaton Rules[C]. Computing and Networking (CANDAR), 2014 Second International Symposium on. IEEE, 2014: 470-475. [8] Al-Mamun M A, Srisukkham W, Fall C, et al. A cellular automaton model for hypoxia effects on tumour growth dynamics[C].Software, Knowledge, Information Management and Applications (SKIMA), 2014 8th International Conference on. IEEE, 2014: 1-8. [9] Hu M L, Sun J. Sudden change of geometric quantum discord in finite temperature reservoirs[J]. Annals of Physics, 2015, 354: 265-273. [10] Bure? M, Siegl P. Hydrogen atom in space with a compactified extra dimension and potential defined by Gauss’ law [J]. Annals of Physics, 2015, 354: 316-327. [11] Terrier V. Recognition of linear-slender context-free languages by real time one-way cellular automata[C]. AUTOMATA 2015. 2015, 9099: 251-262. [12] Fuentes M L, Klimchuk J A. Two-dimensional cellular automaton model for the evolution of active region coronal plasmas[J]. The Astrophysical Journal, 2015, 799(2): 128. [13] Tucker G E, Hobley D E J, Hutton E, et al. CellLab-CTS 2015: a Python library for continuous-time stochastic cellular automaton modeling using Landlab[J]. Geoscientific Model Development Discussions, 2015, 8: 9507-9552.

元胞自动机方法及其在材料介观模拟中的应用

https://www.doczj.com/doc/d1512341.html, 1 元胞自动机方法及其在材料介观模拟中的应用 何燕,张立文,牛静 大连理工大学材料系(116023)  E-mail : commat @https://www.doczj.com/doc/d1512341.html,   摘 要:元胞自动机(CA)是复杂体系的一种理想化模型,适合于处理难以用数学公式定量描 述的复杂动态物理体系问题,如材料的组织演变等。本文概述了元胞自动机方法的基本思想 及原理,介绍了CA的基本组成及特征,综述了CA方法在材料介观模拟研究中的应用。研究表 明CA法在对金属凝固结晶、再结晶、及相变现象等材料介观尺度的组织模拟中表现出特有的 优越性。  关键词:元胞自动机,组织演变,介观模拟,动态再结晶 1. 引 言  自20世纪计算机问世以来,用计算机建立模型来模拟材料行为的方法在材料设计中的 应用越来越广泛,此方法既可节省大量的人力物力和实验资金,又能为实验提供巨大的灵活 性和方便性,因而已经引起了各界科学家的高度重视和极大兴趣。计算机对材料行为的模拟 主要有三个方面:材料微观行为、介观行为和宏观行为的模拟。材料的微观行为是指在电子、原子尺度上的材料行为,如模拟离子实(原子)体系行为,在这方面主要应用分子动力学、分子力学等理论方法;材料的介观行为是指材料显微组织结构的转变,包括金属凝固结晶、再结晶及相变过程,在这方面的模拟主要应用Monte Carlo(MC)方法和Cellular Automata(CA)方法;材料的宏观行为主要指材料加工方面,如材料加工中的塑性变形,应力 应变场及温度场的变化等,在这方面的模拟工作主要应用大型有限元软件Marc, Ansys等。大量实验研究表明,材料的微观组织结构决定了其宏观行为及特征。因此,对材料介观行为 的模拟显得尤为重要。传统的数学建模方法是建立描述体系行为的偏微分方程,它依赖于对 体系的成熟定量理论,而对大多数体系来说这种理论是缺乏的;从微观入手的Monte Carlo 方法主要依赖于体系内部自由能的计算,由于其运算量大,需要大量的数据,运算速度慢,为模拟工作带来了诸多不便;而CA方法则另辟蹊径,通过直接考察体系的局部相互作用, 再借助计算机模拟这种作用导致的总体行为,从而得到其组态变化,并体现出宏观上的金属 性能。由于CA的结构简单,便于计算,允许考虑数量极大的元胞,并且在空间和时间的尺 度上都不受限制,出于以上特点,元胞自动机方法已经受到越来越多研究工作者的青睐。本 文概述了元胞自动机方法的基本思想及原理,介绍了CA的基本组成及特征,对CA法在模拟 介观组织行为方面的应用进行了综述。

关于元胞自动机在交通流理论方面的应用

关于元胞自动机在交通流理论方面的应用 一.概念阐述 1. 元胞自动机 定义:一种利用简单编码与仿细胞繁殖机制的非数值算法空间分析模式。 不同于一般的动力学模型,元胞自动机不是由严格定义的物理方程或函数确定,而是用一系列模型构造的规则构成。凡是满足这些规则的模型都可以算作是元胞自动机模型。因此,元胞自动机是一类模型的总称,或者说是一个方法框架。其特点是时间、空间、状态都离散,每个变量只取有限多个状态,且其状态改变的规则在时间和空间上都是局部的。 2. 交通流理论 定义:是运用数学和物理学的定义来描述交通流特性的一门边缘科学。 它以分析的方法阐述交通现象及其机理,探讨人和车在单独或成列运行中 的动态规律及人流或车流流量、流速和密度之间的变化关系,以求在交通规划、设计和管理中达到协调和提高各种交通设施使用效果的目的。 二.正文 1. 初等元胞自动机: 元胞自动机应用广泛,利用元胞自动机模拟交通流是可行的,比如说利用初等 元胞自动机来模拟交通流,首先要建立元胞自动机模型,建立如下: 考虑有等长的L 个格子的线段 每一个格子i 都有两种状态0和1,在t 时刻i 格子的状态记为:X i t 任意一个格子的下一时刻状态与其当前及前后的格子状态有关,故: 记:X i t+1=F(X i-1t ,X i t ,X i+1t ) 因为t 时刻格子的状态决定了t+1时刻的格子状态,故F 总共有256种定制规 则,为了满足交通规则的需要,我们在这里定制一种称为184的交通流模型。 首个格子与末尾的格子相连,整个线段构成环状。 184交通流模型:每个元胞只有在前进方向的元胞邻居状态无车辆时才前进一 个元胞(位移),即前面有车就不能走。那么对应八种邻居为: 111 110 101 100 ↓ ↓ ↓ ↓ 1 0 1 1 011 010 001 000 ↓ ↓ ↓ ↓ 1 10111000——184

基于元胞自动机原理的微观交通仿真模型

2005年5月重庆大学学报(自然科学版)May2005第28卷第5期Journal of Chongqing University(Natural Science Editi on)Vol.28 No.5 文章编号:1000-582X(2005)05-0086-04 基于元胞自动机原理的微观交通仿真模型3 孙 跃,余 嘉,胡友强,莫智锋 (重庆大学自动化学院,重庆 400030) 摘 要:描述了一种对高速路上的交通流仿真和预测的模型。该模型应用了元胞自动机原理对复杂的交通行为进行建模。这种基于元胞自动机的方法是将模拟的道路量离散为均匀的格子,时间也采用离散量,并采用有限的数字集。同时,在每个时间步长,每个格子通过车辆跟新算法来变换状态,车辆根据自定义的规则确定移动格子的数量。该方法使得在计算机上进行仿真运算更为可行。同时建立了跟车模型、车道变换的超车模型,并根据流程对新建的VP算法绘出时空图。提出了一个设想:将具备自学习的神经网络和仿真系统相结合,再根据安装在高速路上的传感器所获得的统计数据,系统能对几分钟以后的交通状态进行预测。 关键词:元胞自动机;交通仿真;数学模型 中图分类号:TP15;TP391.9文献标识码:A 1 元胞自动机 生物体的发育过程本质上是单细胞的自我复制过程,50年代初,计算机创始人著名数学家冯?诺依曼(Von Neu mann)曾希望通过特定的程序在计算机上实现类似于生物体发育中细胞的自我复制[1],为了避免当时电子管计算机技术的限制,提出了一个简单的模式。把一个长方形平面分成若干个网格,每一个格点表示一个细胞或系统的基元,它们的状态赋值为0或1,在网格中用空格或实格表示,在事先设定的规则下,细胞或基元的演化就用网格中的空格与实格的变动来描述。这样的模型就是元胞自动机(cellular aut omata)。 80年代,元胞自动机以其简单的模型方便地复制出复杂的现象或动态演化过程中的吸引子、自组织和混沌现象而引起了物理学家、计算机科学家对元胞自动机模型的极大兴趣[1]。一般来说,复杂系统由许多基本单元组成,当这些子系统或基元相互作用时,主要是邻近基元之间的相互作用,一个基元的状态演化受周围少数几个基元状态的影响。在相应的空间尺度上,基元间的相互作用往往是比较简单的确定性过程。用元胞自动机来模拟一个复杂系统时,时间被分成一系列离散的瞬间,空间被分成一种规则的格子,每个格子在简单情况下可取0或1状态,复杂一些的情况可以取多值。在每一个时间间隔,网格中的格点按照一定的规则同步地更新它的状态,这个规则由所模拟的实际系统的真实物理机制来确定。格点状态的更新由其自身和四周邻近格点在前一时刻的状态共同决定。不同的格子形状、不同的状态集和不同的操作规则将构成不同的元胞自动机。由于格子之间在空间关系不同,元胞自动机模型分为一维、二维、多维模型。在一维模型中,是把直线分成相等的许多等分,分别代表元胞或基元;二维模型是把平面分成许多正方形或六边形网格;三维是把空间划分出许多立体网格。一维模型是最简单的,也是最适合描述交通流在公路上的状态。 2 基于元胞自动机的交通仿真模型的优点目前,交通模型主要分为3类: 1)流体模型(Hydr odyna m ic Model),在宏观上,以流体的方式来描述交通状态; 2)跟车模型(Car-f oll owing Model),在微观上,描述单一车辆运动行为而建立的运动模型; 3)元胞自动机模型(Cellular Aut omat on),在微观 3收稿日期:2005-01-04 基金项目:重庆市自然科学基金项目(6972) 作者简介:孙跃(1960-),浙江温州人,重庆大学教授,博士,研究方向:微观交通仿真、电力电子技术、运动控制技术及系统。

基于元胞自动机的土地资源节约利用模拟

第24卷 第5期 自 然 资 源 学 报V ol 24N o 5 2009年5月J OURNAL OF NATURAL RESOURCES M ay ,2009 收稿日期:2008-08-22;修订日期:2008-12-02。 基金项目:国家自然科学基金重点资助项目(40830532);国家自然科学基金资助项目(40801236);国家杰出青年基金资助项目(40525002);国家高技术研究发展计划资助项目(2006AA12Z206)。 作者简介:杨青生(1974-),男,青海乐都人,讲师,博士,主要研究遥感与地理信息模型及应用。E m ai :l qs y ang2002@https://www.doczj.com/doc/d1512341.html, 基于元胞自动机的土地资源节约利用模拟 杨青生1,2 (1 广东商学院资源环境学院,广州510230;2 中山大学地理科学与规划学院,广州510275) 摘要:为模拟节约土地资源的城市可持续发展形态,以珠江三角洲城市快速发展的东莞市为 例,运用元胞自动机(C A )、地理信息系统(G IS)和遥感(RS)从历史数据中建立城市空间扩展的 C A,将土地资源节约利用程度与城市用地空间聚集程度相结合,在评价城市用地空间聚集程度 的基础上,通过不断增加离市中心距离权重和离公路距离权重,调整CA 的参数,模拟节约土地 资源,城市用地在空间上紧凑布局的城市形态,并以调整参数的模型(离市中心距离权重为 -0 006,离公路权重为-0 024)模拟结果为基础,分析了实现城市用地空间上紧凑发展,土地 资源节约利用的政策:到2010年,东莞市离市中心27k m 范围内的适宜地区可规定为鼓励城市 发展区,27~34k m 范围内的适宜地区可规定为限制性城市发展区,其它地区为非城市发展区。 关 键 词:土地资源;节约利用;紧凑;元胞自动机 中图分类号:F301 24;P208 文献标识码:A 文章编号:1000-3037(2009)05-0753-10 1 引言 元胞自动机(C ellular Auto m ata ,简称CA )具有强大的空间运算能力,可以有效地模拟复杂的动态系统。近年来,CA 已被越来越多地运用在城市模拟中,取得了许多有意义的研究成果[1~3]。CA 可以模拟虚拟城市,验证城市发展的相关理论,也可以模拟真实城市的发展, 如W u 等模拟了广州市的城市扩展 [4];黎夏和叶嘉安模拟了东莞市的城市扩张[5]。同时,用CA 可以模拟未来的城市规划景观,如黎夏等模拟了珠江三角洲地区城市不同发展条件下的规划景观[6,7]。这些研究表明,C A 能模拟出与实际城市非常接近的特征,可以由此预测未来城市的发展及土地利用变化,为城市和土地利用规划提供决策依据。 CA 的特点是通过一些简单的局部转换规则,模拟出全局的、复杂的空间模式。为了模拟城市,除了运用CA 的局部转换规则外,还要在转换规则中引入影响城市扩展的区域变量和全局变量。转换规则中的这些变量对应着很多参数,这些参数值反映了不同变量对模型的 贡献 程度。研究表明,这些参数值对模拟的结果影响很大。目前,C A 主要通过多准则判断(MCE ) [8]、层次分析法(AH P)[9]和主成分分析[10]、自适应模型[11]、人工神经网络模型 [5]、决策树[12]等方法确定模型的参数值。笔者也采用粗集[13]、支持向量机[14]、贝叶斯分类[15]、空间动态转换规则[16]等方法研究了非线性、动态转换规则模拟城市发展。目前,采用CA 模拟虚拟城市系统和真实城市系统已经非常成熟,模型的精度也越来越高,而模拟可

基于元胞自动机模型的沙堆稳定模型建立

基于元胞自动机模型的沙堆稳定模型建立 摘要: 世界上任何一个有休闲海滩的地方,似乎都有人在海边建沙堡。不可避免地,海浪的流入和涨潮侵蚀了沙堡。然而,并非所有沙坑对波浪和潮汐的反应都是一 样的。本文旨在通过建立数学模型来建立更稳定的沙堡。 为了保持沙堡基础在波浪和潮汐作用下的稳定性,从结构力学和流体力学的 知识出发,有必要尽可能减轻水流对地基的影响,减少地基砂的损失,保证地基 的稳定。受鱼流线的启发,基座是由四分之一椭圆曲线和旋转180°的抛物线组成 的半旋转结构。建立了半旋转体D0的最大半径、四分之一椭圆的半长轴LE、抛 物线的水平投影长度LR、地基的总长度L和冲击力与地基体积的比值之间的函数 关系。采用最优模型求解地基的最小冲击力与体积比D0= 0.22L,LE=0.63L,LR= 0.37 L,是最佳的三维砂土地基模型。 利用元胞自动机模拟砂土地基的形成过程,对砂地基模型进行优化,以两个 砂桩的塌陷间隔长度为指标,测量砂桩基础的稳定性;从而确定了雨作用下沙基 基础最稳定的三维形状。 关键词:流线结构、元胞自动机模型 一、问题分析 我们针对海浪和潮汐对沙堆基础的影响分析中,我们主要考虑了来自侧向的 水流冲击力对基础的影响,此时保持沙堆基础稳定性的一大主要因素是沙堆水平 方向上的粘接力,如果将沙堆基础视为一个整体,那么基础整体与沙滩的水平向 摩擦力保持了沙堆基础的稳定性。而雨水对于沙堆的作用力主要表现垂直方向上 的冲击力,如果将沙堆基础视为一个整体,那么沙滩对沙堆垂直向上方向的支持 力作为保持沙堆基础稳定性的主要因素。由受力结构分析,第一问所建立的模型 为流线型结构,对雨水垂直向下的的作用有一定缓解作用,但显然不是抵抗雨水 的最优结构。 我们对上述模型进行优化,假设沙堆基础受到每一滴雨水的性质相同,那么 基础结构仍为半旋体结构,为了方便分析我们对沙堆基础的侧面进行分析。 二、模型建立 我们这里使用元胞自动机对沙堆模型进行模拟,从上至下掉落的沙粒将使沙 堆不断堆积,当达到一定的临界高度后沙堆即发生崩塌,我们认为崩塌后的沙堆 基础本身是一个比较稳定的结构,而两次崩塌之间的时间间隔的长度也就代表了 沙堆基础的稳定型结构。 假设元胞个体的堆积和崩塌的最微小的运动都发生在一个 4×4 的单元块内,每次将一个 4×4 的元胞块做统一处理。这个小单元的划分方式是:在每个周期,单元 区域分别向右和向下移动一格,在所有周期中循环这一过程,得到两次崩塌时间 间隔最长的模型。 我们假设雨水的性质都是相同的,因此抵抗雨水的最优沙基模型应为上述最稳定 模型绕中心竖轴旋转过后所形成的三维图形。 三、模型分析: 利用元胞自动机模拟砂堡基础的形成过程,计算两个坍塌时间,确定最稳定 的砂基模型。根据以上分析,我们将该模式的优缺点总结如下: 优点:根据相关公式和规律对问题进行了仿真分析,证明了模型的有效性;利用MATLAB软件对砂桩模型进行仿真,生动地展示了砂桩的形成过程;模型通过合

元胞自动机在城市土地利用规划中的应用

元胞自动机在城市土地利用规划中的应用 一.研究背景及进展 1.1城市土地利用研究背景和进展 随着中国社会主义市场经济体制的不断完善,计划导向的土地利用规划也逐步向社会主义市场经济体制下的土地利用规划转变。借鉴国际上市场经济国家土地利用规划的经验,建立具有中国特色的土地利用规划体系成为必然。对国际上土地利用规划的对比研究有以下主要观点: 美国的土地利用规划更多采用公众参与的方法,参与者包括房屋所有人、社会活动家、房地产开发商、联邦和州政府、规划委员会以及民选官员包括城市议会会员。同时,美国基于可持续发展的土地利用规划设计了保护生态环境、维持生态平衡、注重新技术的应用、提高土地利用效率和控制人口增长的一系列政策。 联合国粮食与农业组织(FAO)的土地利用规划指南强调土地利用规划作为最佳土地利用的选择,是以土地评价为基础的,而且不仅包括自然的适宜性评价,也包括经济效益的评价和环境效应的检验,这是编制规划方案和方案选择的科学基础。 英国规划的体系由国家级规划、区域性规划、郡级规划、区级规划组成。国家级规划叫规划政策指南,提出全国性的土地利用方针政策,以白皮文件的形式下发。地区规划又叫区域规划指南,通过召开区域协调会议制定。郡级规划也叫结构规划,由每一个郡级的规划机关在土地测量基础上,与相关委员会协商后提出本郡土地利用的方针、政策及发展的框架结构。区级规划也叫地方规划,是一种详细的发展和实施规划。 科学发展观对土地利用规划的科学性提出了较高的要求,土地利用规划的应用基础研究尤为重要。从2002年国土资源部启动12个县级规划试点工作,2003年又启动14个地(市)级规划修编试点,2004年土地利用规划修编的重新开始,到2005年关于土地利用规划前期研究工作的国办[32]文的颁布,新一轮土地利用规划稳步开展。相应的土地利用规划相关研究也日益深入,但与城市规划相比,与作为中国空间规划重要组成部分的地位要求还有一定差距。但这些研究的广泛开展标志着中国土地利用规划逐渐走上了新的轨道,是提高中国土地利用规划科学性的重要基础。 城市总体规划和土地利用规划同属空间规划,受空间规划理论和方法的指导。从发展历程而言,两者都经历了开发、发展、控制和保护的不同阶段,或者是物质规划、生态规划、社会规划、文化规划等不同的阶段;就指导理论而言,更具有大体一致的内容;而就实体理论而言,由于规划具体内容的不同而有所差别。但在具体的技术和方法上,都是针对空间问题进行分析、预测和布局的,因而具有相似的方法。两个规划在理论和方法上的一致成为未来两个规划走向一体化的基础[1]。 1.2元胞自动机的研究背景及进展 元胞自动机即Cellular Automata,称作单元自动机,简称CA。起源于20世纪40年代,“现代计算机之父”冯.诺伊曼设计可自我复制的自动机时,参照了生物现象的自繁殖原理,提出了元胞自动机的概念和模型。它是一时间和空间都离散的动力系统,散步在规则格网中的每一元胞取有限的离散状态,遵循同样的作用规则,依据确定的局部规则同步更新,大量元胞通过简单的相互作用而构成动态系统的演化,不同于一般的动力学模型,元胞自动机不

基于元胞自动机模型的行人排队行为模拟

第9卷第3期2009年6月 交通运输系统工程与信息 Journa l of T ransporta ti on Syste m s Eng i neering and Infor m ation T echno logy V o l 9N o 3 June 2009 文章编号:1009 6744(2009)03 0140 06 系统工程理论与方法 基于元胞自动机模型的行人排队行为模拟 廖明军1,2,孙 剑*2,王凯英1 (1.北华大学交通建筑工程学院,吉林132013;2.同济大学交通运输工程学院,上海201804) 摘要: 排队行为模型是常态下行人交通仿真系统模型的基础.本文利用排队论、有限 状态自动机原理以及元胞自动机模型对排队系统进行建模.排队行为模型以邻居方向 与目标方向间的修正夹角作为主要因子构造了元胞自动机模型的转移概念率函数.利 用C#对行人排队行为模型进行实现,并构造了两个不同数量的售票服务台的仿真场 景.从仿真动画来看,该模型逼真地模拟行人的排队活动;从不同场景的队长与时间关 系曲线可以看出,增加一个售票服务台明显可以减少队列长度,排队系统性能得到改 善.由此说明该模型具有模拟行人排队行为的能力. 关键词: 行人仿真;排队行为;元胞自动机模型;修正夹角 中图分类号: U491文献标志码: A Si m ulation of Queui ng Behavi or Based on Cellular Auto m ataM odel LI A O M i n g jun1,2,SUN Jian2,WANG K ai ying1 (1.T ra ffic and Construction Eng i neeri ng Co ll ege of Be i hua U nivers it y,Jili n132013,Ch i na; 2.Schoo l o f T ransportation Eng i nee ri ng,T ong jiU n i versity,Shangha i201804,Ch i na) A bstrac t: Q ueu i ng behav ior m ode l i s the basis o f pedestrian tra ffic si m u lati on syste m i n no r m al situati on. T he pape r mode l s queue syste m usi ng queu i ng theo ry,finite sta te m achi ne princi p le,and ce ll u lar au t om ata m ode.l The queuing behav ior mode l takesm od ifi ed i nc l uded ang le bet ween goa l directi on and ne i ghbor d i rec ti on as t he m a i n factors o f transiti on probab ili ty function.Then the queu i ng behav i or m ode l i s i m ple m ented w it h object or i ented prog ra m l anguag e C#.Two si m u l a ti on scenar i os are establi shed w it h different amoun t of ti cket sa l es w i ndow.The an i m a ti on of si m ulati on s how s t hat the queui ng m ode l effecti ve l y si m ulates queue ac ti v iti es.F ro m the re lati onship be t w een queue leng t h and ti m e,i t can be found tha t t he l eng th of queue can be decrease by addi ng ticket sa l es po i nt,and t he pe rf o r m ance o f queue syste m can a lso be i m proved,w hich de m onstrates that the m odel can be used to si m u l a te the pedestr i an queu i ng behav i o r. K ey word s: pedestrian s i m u l a tion;queu i ng behav i o r;ce ll u l a r auto m a t on mode;l m odifi ed i ncluded ang le CLC nu m ber: U491Docum en t code: A 收稿日期:2008 10 09 修回日期:2009 02 11 录用日期:2009 03 31 基金项目:同济大学青年优秀人才培养行动计划(2007K J027);上海市自然科学基金(07ZR14120);吉林教育厅 十一五规划重点项目(2007-122). 作者简介:廖明军(1974-),男,湖南邵东人,博士生. *通讯作者:sun jian@126.co m

相关主题
文本预览
相关文档 最新文档