CN107704667A - Simulate crowd movement's emulation mode, the device and system of sociability - Google Patents
Simulate crowd movement's emulation mode, the device and system of sociability Download PDFInfo
- Publication number
- CN107704667A CN107704667A CN201710854185.6A CN201710854185A CN107704667A CN 107704667 A CN107704667 A CN 107704667A CN 201710854185 A CN201710854185 A CN 201710854185A CN 107704667 A CN107704667 A CN 107704667A
- Authority
- CN
- China
- Prior art keywords
- individual
- sociability
- speed
- change value
- velocity
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000033001 locomotion Effects 0.000 title claims abstract description 66
- 238000000034 method Methods 0.000 claims description 29
- 230000001133 acceleration Effects 0.000 claims description 7
- 230000000694 effects Effects 0.000 claims description 3
- 238000005259 measurement Methods 0.000 claims 2
- 238000004088 simulation Methods 0.000 description 34
- 238000009877 rendering Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 5
- 230000007423 decrease Effects 0.000 description 4
- 230000006399 behavior Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 2
- 230000002238 attenuated effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/20—3D [Three Dimensional] animation
- G06T13/40—3D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种模拟集群性的人群运动仿真方法、装置和系统。The invention relates to a crowd movement simulation method, device and system for simulating clusters.
背景技术Background technique
大型公共场所突发事件频发,如何快速、安全的疏散人群是安全领域研究的热点问题。人群运动仿真在指导人群疏散、制定紧急预案、场景设计、以及影视娱乐等方面具有广泛的应用。目前,群体模拟仿真的大部分集中在如何进行大规模人群的碰撞避免、以及如何提高仿真效率方面,忽略了人群运动的社会性特征的建模,如集群性等。尽管基于视频的方法从真实视频中提取群体个体运动行为,但无法描述整个群体的整体运动形态。集群性是群体运动中普遍存在的社会性特征,表现为个体集结成群,导致个体意志逐渐消失并且遵从集群意志的行为,群体内部呈现出自组织、自协调又相互融合、运动一致的特性。因此,如何仿真集群性成为群体运动行为仿真的研究热点。With frequent emergencies in large public places, how to quickly and safely evacuate crowds is a hot issue in the field of security research. Crowd motion simulation has a wide range of applications in guiding crowd evacuation, formulating emergency plans, scene design, and film and television entertainment. At present, most of the crowd simulations focus on how to avoid large-scale crowd collisions and how to improve the simulation efficiency, ignoring the modeling of social characteristics of crowd movement, such as clustering. Although video-based methods extract group individual movement behaviors from real videos, they cannot describe the overall movement morphology of the entire group. Collectiveness is a common social feature in group movements. It is characterized by the gathering of individuals into groups, which leads to the gradual disappearance of individual will and the behavior of obeying the will of the group. The group shows the characteristics of self-organization, self-coordination, mutual integration and consistent movement. Therefore, how to simulate swarming has become a research hotspot in group motion behavior simulation.
发明内容Contents of the invention
本发明为了解决上述问题,提出了一种模拟集群性的人群运动仿真方法,构建了模拟集群性的人群运动框架,建立了人群运动的集群性模型,并将其与人群运动耦合,得到了一种可以模拟集群性人群运动的仿真方法。In order to solve the above problems, the present invention proposes a crowd movement simulation method for simulating crowd movement, builds a crowd movement simulation framework for crowd movement, establishes a crowd movement crowd movement model, and couples it with crowd movement to obtain a A simulation method that can simulate the movement of crowds.
为了实现上述目的,本发明采用如下方案:In order to achieve the above object, the present invention adopts following scheme:
一种模拟集群性的人群运动仿真方法,包括:A crowd movement simulation method for simulating swarms, comprising:
设置场景信息,在场景信息的无障碍区域随机设置个体,生成个体信息,所述个体信息包括个体的位置坐标、个体的速度方向和速度值;Setting scene information, randomly setting individuals in the barrier-free area of the scene information, and generating individual information, the individual information includes the position coordinates of the individual, the speed direction and speed value of the individual;
设置代表集群集中度的集群性影响因子,根据集群性影响因子和个体信息计算每一个体的集群性方向改变值;Set the cluster impact factor representing the cluster concentration, and calculate the cluster direction change value of each individual according to the cluster impact factor and individual information;
将所述个体的集群性方向改变值与个体的速度方向进行矢量合并,得到更新后的个体速度方向,根据所述更新后的个体速度方向以及个体位置坐标、速度值生成人群运动仿真。Combining the cluster direction change value of the individual with the velocity direction of the individual to obtain an updated individual velocity direction, and generating a crowd motion simulation according to the updated individual velocity direction, individual position coordinates, and velocity values.
进一步的,根据集群性影响因子和个体信息计算每一个体的集群性方向改变值包括:Further, calculating the cluster direction change value of each individual according to the cluster impact factor and individual information includes:
首先计算个体与邻接个体之间的第一集群性方向改变值,根据个体之间的传播效应,由第一集群性方向改变值得到个体与次邻接个体之间的第二集群性方向改变值,反复迭代直到得到个体与边界个体之间的第N集群性方向改变值,计算所述N个集群性方向改变值的期望,得到个体的集群性方向改变值。First, calculate the first clustering direction change value between the individual and adjacent individuals, and according to the propagation effect between individuals, obtain the second clustering direction change value between the individual and the second adjacent individual from the first clustering direction change value, Repeat iteratively until the Nth clustering direction change value between the individual and the boundary individual is obtained, calculate the expectation of the N clustering direction change values, and obtain the clustering direction change value of the individual.
进一步的,计算个体与邻接个体之间的第一集群性方向改变值包括:Further, calculating the first cluster direction change value between an individual and an adjacent individual includes:
设定以单位距离为半径的圆区域,所述圆区域内包括唯一的中心个体和若干邻接个体,计算所有邻接个体与中心个体之间的速度方向矢量差,获得上述速度方向矢量差在圆区域内所有个体上的期望,将所述期望与集群性影响因子作乘,得到第一集群性方向改变值。Set a circular area with a unit distance as the radius, the circular area includes the only central individual and several adjacent individuals, calculate the velocity direction vector difference between all adjacent individuals and the central individual, and obtain the above velocity direction vector difference in the circular area The expectation on all individuals in the group is multiplied by the clustering impact factor to obtain the first clustering direction change value.
进一步的,计算个体与次邻接个体之间的第二集群性方向改变值包括:Further, calculating the second cluster direction change value between the individual and the next adjacent individual includes:
设定以2倍单位距离为半径的圆区域,所述圆区域内包括唯一的中心个体、若干邻接个体和若干次邻接个体,计算所有邻接个体与中心个体之间的第一速度方向矢量差,所有次邻接个体与每一邻接个体之间的第二速度方向矢量差,第一速度方向矢量差与第二速度方向矢量差相加得到第三速度方向矢量差,用于代表所有次邻接个体与中心个体的速度方向矢量差,获得第三速度方向矢量差在圆区域内所有个体上的期望,将所述期望与集群性影响因子作乘,得到第二集群性方向改变值。Set a circular area with a radius of 2 times the unit distance, the circular area includes the only central individual, several adjacent individuals and several adjacent individuals, and calculate the first velocity direction vector difference between all adjacent individuals and the central individual, The second velocity and direction vector difference between all secondary adjacent individuals and each adjacent individual, the first velocity and direction vector difference and the second velocity and direction vector difference are added to obtain the third velocity and direction vector difference, which is used to represent all secondary adjacent individuals and The velocity and direction vector difference of the center individual is used to obtain the expectation of the third velocity and direction vector difference on all individuals in the circle area, and the expectation is multiplied by the clustering influence factor to obtain the second clustering direction change value.
上述技术方案中的集群性影响因子随着个体间距离的增大而减小,用于表示集群集中度随着个体间距离增大而逐渐下降。The cluster impact factor in the above technical solution decreases with the increase of the distance between individuals, which is used to indicate that the cluster concentration gradually decreases with the increase of the distance between individuals.
进一步的,所述速度值采用如下方式获得:Further, the speed value is obtained in the following manner:
设置期望速度、最大速度和最大加速度,利用最大速度和最大加速度计算个体所有候选速度,将期望速度与所有候选速度进行比较,得到最佳速度作为速度值。Set the desired speed, maximum speed and maximum acceleration, use the maximum speed and maximum acceleration to calculate all candidate speeds of the individual, compare the desired speed with all candidate speeds, and obtain the best speed as the speed value.
进一步的,将期望速度与所有候选速度进行比较,得到最佳速度作为速度值包括:Further, compare the expected speed with all candidate speeds, and obtain the best speed as the speed value including:
设置每一个体的期望碰撞时间,并为所述期望碰撞时间设置用户自定义的权重值,根据用户自定义的权重值下的个体的期望碰撞时间和个体期望速度,得到个体的惩罚度量,根据个体惩罚度量的最小值确定最佳速度。Set the expected collision time of each individual, and set a user-defined weight value for the expected collision time, and obtain the individual penalty metric according to the individual expected collision time and individual expected speed under the user-defined weight value, according to The minimum value of the individual penalty metric determines the optimal speed.
在上述的技术方案中,可以设置时间步长,每一时间步长内更新一次个体速度方向、个体位置坐标和速度值,生成动画帧,由每一动画帧组成人群运动仿真。In the above technical solution, the time step can be set, and the individual velocity direction, individual position coordinates and velocity value are updated once in each time step to generate an animation frame, and each animation frame forms a crowd motion simulation.
本发明还提出了一种存储装置,存储有多条指令,所述指令由处理器加载并执行以下处理:The present invention also proposes a storage device, which stores a plurality of instructions, and the instructions are loaded by the processor and perform the following processing:
设置场景信息,在场景信息的无障碍区域随机设置个体,生成个体信息,所述个体信息包括个体的位置坐标、个体的速度方向和速度值;Setting scene information, randomly setting individuals in the barrier-free area of the scene information, and generating individual information, the individual information includes the position coordinates of the individual, the speed direction and speed value of the individual;
设置代表集群集中度的集群性影响因子,根据集群性影响因子和个体信息计算每一个体的集群性方向改变值;Set the cluster impact factor representing the cluster concentration, and calculate the cluster direction change value of each individual according to the cluster impact factor and individual information;
将所述个体的集群性方向改变值与个体的速度方向进行矢量合并,得到更新后的个体速度方向,根据所述更新后的个体速度方向以及个体位置坐标、速度值生成人群运动仿真。Combining the cluster direction change value of the individual with the velocity direction of the individual to obtain an updated individual velocity direction, and generating a crowd motion simulation according to the updated individual velocity direction, individual position coordinates, and velocity values.
本发明又提出了一种模拟集群性的人群运动仿真系统,包括显示器,用于显示仿真动画;处理器,用于实现各指令;以及存储装置,用于存储多条指令,所述指令由处理器加载并执行以下处理:The present invention also proposes a crowd movement simulation system for simulating clusters, which includes a display for displaying simulation animations; a processor for realizing each instruction; and a storage device for storing multiple instructions, and the instructions are processed by loader and perform the following processing:
设置场景信息,在场景信息的无障碍区域随机设置个体,生成个体信息,所述个体信息包括个体的位置坐标、个体的速度方向和速度值;Setting scene information, randomly setting individuals in the barrier-free area of the scene information, and generating individual information, the individual information includes the position coordinates of the individual, the speed direction and speed value of the individual;
设置代表集群集中度的集群性影响因子,根据集群性影响因子和个体信息计算每一个体的集群性方向改变值;Set the cluster impact factor representing the cluster concentration, and calculate the cluster direction change value of each individual according to the cluster impact factor and individual information;
将所述个体的集群性方向改变值与个体的速度方向进行矢量合并,得到更新后的个体速度方向,根据所述更新后的个体速度方向以及个体位置坐标、速度值生成人群运动仿真。Combining the cluster direction change value of the individual with the velocity direction of the individual to obtain an updated individual velocity direction, and generating a crowd motion simulation according to the updated individual velocity direction, individual position coordinates, and velocity values.
本发明的有益效果:Beneficial effects of the present invention:
本发明提出了一种模拟人群运动集群性的仿真方法和系统,本发明将真实人群运动过程中的集群特性融入人群运动仿真中,构建了模拟集群性的人群运动框架:建立人群运动的集群性模型,并将其与人群运动耦合,最后通过真实感渲染对仿真结果进行渲染输出。该方法能够更加真实的进行人群运动的仿真,体现出群体运动过程中的集群特性,增强了人群仿真结果的真实感。The present invention proposes a simulation method and system for simulating crowd movement clustering. The present invention incorporates the crowd movement simulation of real crowd movement into the crowd movement simulation, and constructs a crowd movement framework for simulating crowd movement: establishing crowd movement clustering model, and couple it with crowd movement, and finally render and output the simulation results through realistic rendering. The method can more realistically simulate crowd movement, reflect the cluster characteristics in the process of group movement, and enhance the reality of crowd simulation results.
附图说明Description of drawings
图1为本发明简化的流程图。Figure 1 is a simplified flow chart of the present invention.
具体实施方式:Detailed ways:
下面结合附图与实施例对本发明作进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
应该指出,以下详细说明都是例示性的,旨在对本申请提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本申请所属技术领域的普通技术人员通常理解的相同含义。It should be pointed out that the following detailed description is exemplary and intended to provide further explanation to the present application. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本申请的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terminology used here is only for describing specific implementations, and is not intended to limit the exemplary implementations according to the present application. As used herein, unless the context clearly dictates otherwise, the singular is intended to include the plural, and it should also be understood that when the terms "comprising" and/or "comprising" are used in this specification, they mean There are features, steps, operations, means, components and/or combinations thereof.
如图1所示,本发明的一种典型实施例是一种模拟集群性的人群运动仿真方法,主要包括以下步骤:As shown in Figure 1, a typical embodiment of the present invention is a crowd movement simulation method for simulating clusters, which mainly includes the following steps:
首先初始化场景信息,然后构建集群性人群运动模型;将集群性人群运动模型与个体信息进行结合,更新个体信息,生成人群运动仿真,得到具有真实感渲染的仿真模拟。First initialize the scene information, and then construct the crowd movement model; combine the crowd movement model with individual information, update the individual information, generate crowd movement simulation, and obtain a simulation with realistic rendering.
对于初始化场景信息,主要包括对场景信息初始化和个体信息初始化。For initializing scene information, it mainly includes initializing scene information and individual information.
对场景障碍物的位置信息进行初始化,表示出障碍物的位置坐标。其次,根据障碍物信息画出对场景语义进行初始化,画出场景的Roadmap图。本专利使用Roadmap来近似描述场景语义信息,通过Roadmap图将场景中没有障碍物的区域表示成图(Graph)结构,用于描述绕过障碍物的拓扑图。该拓扑图由顶点和边组成G=(V,E),其中,V表示顶点的集合,该Roadmap顶点是场景内避开障碍物生成的随机坐标点;E表示Roadmap边的集合,本专利任意两个距离为l且连线不经过障碍物的随机点连接成为Roadmap边,表示为e(v1,v2)∈E,顶点v1和顶点v2是边e的两个端点。Initialize the position information of the obstacle in the scene, and indicate the position coordinates of the obstacle. Secondly, according to the obstacle information, the semantics of the scene are initialized, and the Roadmap of the scene is drawn. This patent uses Roadmap to approximate the semantic information of the scene, and expresses the area without obstacles in the scene as a graph (Graph) structure through the Roadmap graph, which is used to describe the topological graph that bypasses obstacles. This topological graph is made up of vertices and edges G=(V, E), wherein, V represents the set of vertices, and this Roadmap vertex is the random coordinate point that avoids obstacle generation in the scene; E represents the set of Roadmap edges, and this patent is arbitrary Two random points with a distance of l and no obstacles are connected to form a roadmap edge, expressed as e(v 1 ,v 2 )∈E, and vertex v 1 and vertex v 2 are the two endpoints of edge e.
个体信息包括个体速度方向、个体位置坐标和个体的速度值,个体位置坐标是在场景范围内避开障碍物随机生成个体的位置坐标。Individual information includes individual velocity direction, individual position coordinates, and individual velocity values. Individual position coordinates are randomly generated individual position coordinates within the scope of the scene while avoiding obstacles.
然后根据集群性影响因子和个体信息计算每一个体的集群性方向改变值:Then calculate the cluster direction change value of each individual according to the cluster impact factor and individual information:
首先计算个体与邻接个体之间的第一集群性方向改变值,根据个体之间的传播效应,由第一集群性方向改变值得到个体与次邻接个体之间的第二集群性方向改变值,反复迭代直到得到个体与边界个体之间的第N集群性方向改变值,计算所述N个集群性方向改变值的期望,得到个体的集群性方向改变值。First, calculate the first clustering direction change value between the individual and adjacent individuals, and according to the propagation effect between individuals, obtain the second clustering direction change value between the individual and the second adjacent individual from the first clustering direction change value, Repeat iteratively until the Nth clustering direction change value between the individual and the boundary individual is obtained, calculate the expectation of the N clustering direction change values, and obtain the clustering direction change value of the individual.
第一集群性方向改变值通过设定以单位距离为半径的圆区域,圆区域内包括唯一的中心个体和若干邻接个体,计算所有邻接个体与中心个体之间的速度方向矢量差,获得上述速度方向矢量差在圆区域内所有个体上的期望,将期望与集群性影响因子作乘,得到第一集群性方向改变值。The first cluster direction change value is obtained by setting a circular area with a unit distance as the radius, which includes the only central individual and several adjacent individuals, and calculates the velocity direction vector difference between all adjacent individuals and the central individual to obtain the above velocity The direction vector difference is the expectation of all individuals in the circle area, and the expectation is multiplied by the clustering influence factor to obtain the first clustering direction change value.
然后计算个体与次邻接个体之间的第二集群性方向改变值:设定以2倍单位距离为半径的圆区域,圆区域内包括唯一的中心个体、若干邻接个体和若干次邻接个体,计算所有邻接个体与中心个体之间的第一速度方向矢量差,所有次邻接个体与每一邻接个体之间的第二速度方向矢量差,第一速度方向矢量差与第二速度方向矢量差相加得到第三速度方向矢量差,用于代表所有次邻接个体与中心个体的速度方向矢量差,获得第三速度方向矢量差在圆区域内所有个体上的期望,将所述期望与集群性影响因子作乘,得到第二集群性方向改变值。Then calculate the second clustering direction change value between the individual and the sub-adjacent individuals: set a circle area with a radius of 2 times the unit distance, the circle area includes the only central individual, several adjacent individuals and several adjacent individuals, calculate The first velocity direction vector difference between all adjacent individuals and the center individual, the second velocity direction vector difference between all secondary adjacent individuals and each adjacent individual, the first velocity direction vector difference and the second velocity direction vector difference Obtain the third velocity and direction vector difference, which is used to represent the velocity and direction vector difference between all secondary adjacent individuals and the central individual, obtain the expectation of the third velocity and direction vector difference on all individuals in the circle area, and combine the expectation and the clustering influence factor Multiply to get the second clustering direction change value.
在本实施例中,可以按照如下步骤实现:In this embodiment, it can be implemented according to the following steps:
第一步:在不同的场景中,人群运动呈现不同的集群能力。本申请定义集群性影响因子z并对其初始化,其取值设置在(0,1)内,结合实际场景,调整z值控制人群的集群现象使其与真实运动相符。Step 1: In different scenarios, crowd motion exhibits different clustering abilities. This application defines and initializes the clustering factor z. Its value is set within (0,1). Combined with the actual scene, adjust the z value to control the clustering phenomenon of the crowd so that it matches the real movement.
第二步:定义一个邻接距离L,用于描述周围其他个体与中心个体的关系。对于任意个体i,将以i所在位置为圆心、以距离d为半径的圆形区域定义为i的邻域,在邻域内获取i的邻居集合NL(i)(L=1),在邻域范围内的邻居个体与i的邻接距离为L=1。Step 2: Define an adjacency distance L, which is used to describe the relationship between other surrounding individuals and the central individual. For any individual i, the circular area with the location of i as the center and the distance d as the radius is defined as the neighborhood of i, and the neighbor set N L (i) (L=1) of i is obtained in the neighborhood. The adjacency distance between neighbor individuals and i within the domain range is L=1.
第三步:定义速度方向改变值x,根据公式(1)计算当邻接距离L=1时,邻居个体j∈NL(i)对i的速度方向的影响值。Step 3: Define the speed direction change value x, and calculate the influence value of the neighbor individual j∈N L (i) on the speed direction of i when the adjacency distance L=1 according to formula (1).
第四步:当个体k不是i的邻居时,本专利定义其与i可通过邻居个体间的传递呈间接相关,其邻居距离为i到k的传递过程中经过的个体数,L>1。用NL(i)(L>1)表示与个体i间邻接距离为L的所有个体的集合。由于集群性在传递过程中会有所衰减,且综合考虑逐层传递的复杂度,因此本专利设置传递的最大邻接距离为L=5,认为当L>5时,个体对中心的i个体的影响为0。计算所有L≤5时的L距离的邻居集合NL(i)。Step 4: When individual k is not a neighbor of i, this patent defines that it is indirectly related to the transmission of i through neighboring individuals, and its neighbor distance is the number of individuals passed during the transmission process from i to k, L>1. Let N L (i) (L>1) represent the set of all individuals whose adjacency distance from individual i is L. Since the clustering will be attenuated during the transmission process, and considering the complexity of layer-by-layer transmission, this patent sets the maximum adjacency distance of transmission as L=5. It is considered that when L>5, the individual to the i individual in the center Impact is 0. Calculate the neighbor set N L (i) of L distance for all L≤5.
第五步:当1<L≤5时,根据公式(2)计算间接影响的集群方向改变值 Step 5: When 1<L≤5, calculate the cluster direction change value of the indirect influence according to the formula (2)
第六步:综合所有L距离邻居个体对中心个体i的影响,根据公式(3)计算出最终的i的速度方向改变值xi。Step 6: Integrating the influence of all L-distance neighbor individuals on the central individual i, calculate the final velocity direction change value x i of i according to formula (3).
过程3:人群运动计算,在这一过程中将集群性加入人群运动计算,控制人群的整体运动形态。Process 3: Crowd motion calculation. In this process, clustering is added to the crowd motion calculation to control the overall motion form of the crowd.
其中,集群性影响因子可以设置为随着个体间距离的增大而减小,用于表示集群集中度随着个体间距离增大而逐渐下降,更加体现了真实感渲染。Among them, the cluster impact factor can be set to decrease with the increase of the distance between individuals, which is used to indicate that the cluster concentration gradually decreases with the increase of the distance between individuals, which more reflects the realistic rendering.
上述实施例中的速度值采用如下具体的计算方法:The speed value in the above embodiment adopts the following specific calculation method:
对所有个体的Vpref、ω、Vmax和amax进行初始化,其中,Vpref是个体的期望速度,Vmax是个体的最大速度,amax是个体的最大加速度,ω表示用户自定义权重,用于衡量个体的最优候选速度。Initialize V pref , ω, V max and a max of all individuals, where V pref is the expected speed of the individual, V max is the maximum speed of the individual, a max is the maximum acceleration of the individual, ω represents the user-defined weight, Used to measure the best candidate speed for an individual.
1)利用最大速度Vmax和最大加速度amax根据公式(4)求出个体的候选速度集Vcand。1) Use the maximum velocity V max and the maximum acceleration a max to calculate the individual candidate velocity set V cand according to formula (4).
其中,Vi表示个体i的当前速度,表示个体i的第j个候选速度,表示个体i的第j个候选速度的大小,表示候选速度相对于当前速度的变化值的大小,t表示时间步,表示单位时间内最大速度变化值。在公式中,候选速度的大小受最大速度Vmax和最大加速度amax的制约。因此,应大于0且小于最大速度值Vmax,且其速度变化值也应小于 Among them, V i represents the current velocity of individual i, Indicates the jth candidate velocity of individual i, Indicates the size of the jth candidate velocity of individual i, Indicates the size of the change value of the candidate speed relative to the current speed, t represents the time step, Indicates the maximum speed change value per unit time. In the formula, the magnitude of the candidate velocity is constrained by the maximum velocity V max and the maximum acceleration a max . therefore, It should be greater than 0 and less than the maximum speed value V max , and its speed change value should also be less than
(2)根据过程二中计算得到的个体i速度方向的改变值xi来计算新的期望速度方向Dpref (2) Calculate the new expected velocity direction D pref according to the change value x i of individual i velocity direction calculated in process two
(3)根据公式(5)更新期望速度方向(3) Update the desired speed direction according to formula (5)
(4)利用期望速度Vpref根据公式(6)更新下一时刻的新速度vt+1。(4) Utilize the desired speed V pref to update the new speed v t+1 at the next moment according to formula (6).
其中,penalty是惩罚因子,ω是用户自定义权重,表示期望碰撞时间,表示期望速度与候选速度间的变化量。在此步骤中,我们选择使得惩罚因子penalty最小的候选速度作为下一时刻的新速度vt+1。Among them, penalty is the penalty factor, ω is the user-defined weight, is the expected collision time, Indicates the amount of change between the desired speed and the candidate speed. In this step, we choose the candidate speed that minimizes the penalty factor as the new velocity v t+1 at the next instant.
判断个体是否到达目标,如果个体没有到达目标,则返回第二步,继续计算下一时刻新速度;否则,个体到达目标,停止运动。Determine whether the individual has reached the target. If the individual does not reach the target, return to the second step and continue to calculate the new speed at the next moment; otherwise, the individual reaches the target and stops moving.
本发明可以设置以固定时间为间隔的时间步,在每一时间步内更新个体信息,生成动画帧,由动画帧生成人群运动计算结果,再结合真实感渲染技术,将人群运动计算结果进行渲染得到人群疏散仿真动画。The present invention can set time steps with fixed time intervals, update individual information in each time step, generate animation frames, generate crowd movement calculation results from animation frames, and then combine realistic rendering technology to render crowd movement calculation results Get crowd evacuation simulation animation.
本发明提出了一种模拟人群运动集群性的仿真方法,该方法将真实人群运动过程中的集群特性融入人群运动仿真中。为了实现该方法,本发明构建了模拟集群性的人群运动框架:建立人群运动的集群性模型,并将其与人群运动耦合,最后通过真实感渲染对仿真结果进行渲染输出。该方法能够更加真实的进行人群运动的仿真,体现出群体运动过程中的集群特性,增强了人群仿真结果的真实感。The invention proposes a simulation method for simulating crowd movement clustering, which integrates the cluster characteristics in the real crowd movement process into the crowd movement simulation. In order to realize the method, the present invention builds a framework for simulating crowd movement: establishes a crowd movement model, couples it with crowd movement, and finally renders and outputs the simulation results through realistic rendering. The method can more realistically simulate crowd movement, reflect the cluster characteristics in the process of group movement, and enhance the reality of crowd simulation results.
为了实现上述方法,本发明还提出了一种存储装置,存储有多条指令,所述指令由处理器加载并执行以下处理:In order to realize the above method, the present invention also proposes a storage device, which stores a plurality of instructions, and the instructions are loaded by the processor and perform the following processing:
设置场景信息,在场景信息的无障碍区域随机设置个体,生成个体信息,所述个体信息包括个体的位置坐标、个体的速度方向和速度值;Setting scene information, randomly setting individuals in the barrier-free area of the scene information, and generating individual information, the individual information includes the position coordinates of the individual, the speed direction and speed value of the individual;
设置代表集群集中度的集群性影响因子,根据集群性影响因子和个体信息计算每一个体的集群性方向改变值;Set the cluster impact factor representing the cluster concentration, and calculate the cluster direction change value of each individual according to the cluster impact factor and individual information;
将所述个体的集群性方向改变值与个体的速度方向进行矢量合并,得到更新后的个体速度方向,根据所述更新后的个体速度方向以及个体位置坐标、速度值生成人群运动仿真。Combining the cluster direction change value of the individual with the velocity direction of the individual to obtain an updated individual velocity direction, and generating a crowd motion simulation according to the updated individual velocity direction, individual position coordinates, and velocity values.
在具体应用过程中,还包括有与处理器相连的本显示器,可以显示仿真动画,采用艺术渲染组件,对人群运动仿真进行真实感渲染。In the specific application process, it also includes a display connected to the processor, which can display simulation animations, and uses artistic rendering components to perform realistic rendering of crowd motion simulation.
本发明构建了模拟集群性的人群运动框架:建立人群运动的集群性模型,并将其与人群运动耦合,最后通过真实感渲染对仿真结果进行渲染输出。该方法能够更加真实的进行人群运动的仿真,体现出群体运动过程中的集群特性,增强了人群仿真结果的真实感。The present invention builds a crowd movement simulation framework: establishes a crowd movement crowd model, couples it with the crowd movement, and finally renders and outputs the simulation results through realistic rendering. The method can more realistically simulate crowd movement, reflect the cluster characteristics in the process of group movement, and enhance the reality of crowd simulation results.
上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。Although the specific implementation of the present invention has been described above in conjunction with the accompanying drawings, it does not limit the protection scope of the present invention. Those skilled in the art should understand that on the basis of the technical solution of the present invention, those skilled in the art do not need to pay creative work Various modifications or variations that can be made are still within the protection scope of the present invention.
Claims (10)
- A kind of 1. crowd movement's emulation mode for simulating sociability, it is characterised in that including:Scene set information, individual is randomly provided in the clear area of scene information, generates individual information, the individual information The velocity attitude and velocity amplitude of position coordinates including individual, individual;The sociability factor of influence of presenting set cluster moderate is set, each is calculated according to sociability factor of influence and individual information The sociability direction change value of body;The individual sociability direction change value is carried out into vector with the velocity attitude of individual to merge, the individual after being updated Velocity attitude, according to the individual speed direction after the renewal and individual position coordinates, velocity amplitude generation crowd movement's emulation.
- 2. according to the method for claim 1, it is characterised in that calculated according to sociability factor of influence and individual information each The sociability direction change value of individual includes:The first sociability direction change value between individual and adjacent individual is calculated first, according to the propagation effect between individual, Changed by the first sociability direction and be worth to individual the second sociability direction change value between secondary adjacent individual, iterated Until obtaining the N sociabilities direction change value between individual and border individual, N number of sociability direction change value is calculated It is expected, obtain the sociability direction change value of individual.
- 3. according to the method for claim 2, it is characterised in that calculate the first sociability side between individual and adjacent individual Include to change value:The circle region using unit distance as radius is set, includes the individual and some adjoining in unique center in the round region Body, the velocity attitude phasor difference between all of its neighbor individual and center individual is calculated, obtains above-mentioned velocity attitude phasor difference in circle Expectation in region on all individuals, the expectation is made to multiply with sociability factor of influence, obtains the change of the first sociability direction Value.
- 4. according to the method for claim 2, it is characterised in that calculate individual the second sociability between secondary adjacent individual Direction change value includes:Set the circle region using 2 times of unit distances as radius, include that unique center is individual, some adjoinings in the round region Body and several times adjacent individual, the First Speed direction vector calculated between all of its neighbor individual and center individual is poor, Suo Youci The adjacent individual second speed direction vector between each adjacent individual is poor, First Speed direction vector difference and second speed side It is added to obtain that third speed direction vector is poor to phasor difference, for representing the velocity attitudes of all adjacent individuals and centers individual Phasor difference, expectation of the third speed direction vector difference in circle region on all individuals is obtained, by the expectation and sociability shadow Ring the factor to make to multiply, obtain the second sociability direction change value.
- 5. according to the method any one of claim 1-4, it is characterised in that the sociability factor of influence is with individual Between distance increase and reduce, for represent cluster concentration degree between individual distance increase and be gradually reduced.
- 6. according to the method for claim 1, it is characterised in that the velocity amplitude obtains in the following way:Desired speed, maximal rate and peak acceleration are set, and calculating individual ownership using maximal rate and peak acceleration waits Select speed, it would be desirable to which speed obtains optimum speed as velocity amplitude compared with all candidate's speed.
- 7. according to the method for claim 6, it is characterised in that by desired speed compared with all candidate's speed, obtain Include to optimum speed as velocity amplitude:Each individual expectation collision time is set, and user-defined weighted value, root are set for the expectation collision time According to the individual expectation collision time under user-defined weighted value and individual desired speed, the punishment measurement of individual is obtained, Optimum speed is determined according to the minimum value of individual punishment measurement.
- 8. according to the method any one of claim 1-7, it is characterised in that set time step, each time step Individual speed direction of interior renewal, individual position coordinates and velocity amplitude, generate animation frame, and crowd's fortune is formed by each animation frame Dynamic emulation.
- 9. a kind of storage device, it is characterised in that be stored with a plurality of instruction, the instruction is loaded by processor and performed following Reason:Scene set information, individual is randomly provided in the clear area of scene information, generates individual information, the individual information The velocity attitude and velocity amplitude of position coordinates including individual, individual;The sociability factor of influence of presenting set cluster moderate is set, each is calculated according to sociability factor of influence and individual information The sociability direction change value of body;The individual sociability direction change value is carried out into vector with the velocity attitude of individual to merge, the individual after being updated Velocity attitude, according to the individual speed direction after the renewal and individual position coordinates, velocity amplitude generation crowd movement's emulation.
- 10. a kind of crowd movement's analogue system for simulating sociability, it is characterised in that including display, for showing that emulation is dynamic Draw;Processor, for realizing each instruction;And storage device, for storing a plurality of instruction, the instruction is loaded simultaneously by processor Perform following handle:Scene set information, individual is randomly provided in the clear area of scene information, generates individual information, the individual information The velocity attitude and velocity amplitude of position coordinates including individual, individual;The sociability factor of influence of presenting set cluster moderate is set, each is calculated according to sociability factor of influence and individual information The sociability direction change value of body;The individual sociability direction change value is carried out into vector with the velocity attitude of individual to merge, the individual after being updated Velocity attitude, according to the individual speed direction after the renewal and individual position coordinates, velocity amplitude generation crowd movement's emulation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710854185.6A CN107704667B (en) | 2017-09-20 | 2017-09-20 | Method, device and system for simulating crowd movement in a cluster |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710854185.6A CN107704667B (en) | 2017-09-20 | 2017-09-20 | Method, device and system for simulating crowd movement in a cluster |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107704667A true CN107704667A (en) | 2018-02-16 |
CN107704667B CN107704667B (en) | 2021-01-08 |
Family
ID=61173059
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710854185.6A Active CN107704667B (en) | 2017-09-20 | 2017-09-20 | Method, device and system for simulating crowd movement in a cluster |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107704667B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110956684A (en) * | 2019-11-27 | 2020-04-03 | 山东师范大学 | Crowd movement evacuation simulation method and system based on residual network |
CN111165395A (en) * | 2020-01-08 | 2020-05-19 | 清华大学 | An experimental approach to model crowd flow using zebrafish |
CN112016660A (en) * | 2020-07-03 | 2020-12-01 | 浙江大学 | A three-dimensional cluster behavior simulation method driven by physical force and data |
CN112001937B (en) * | 2020-09-07 | 2023-05-23 | 中国人民解放军国防科技大学 | Group chase and escape method and device based on visual field perception |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040059548A1 (en) * | 2002-09-09 | 2004-03-25 | Marios Kagarlis | Method of simulating movement of an autonomous entity through an environment |
CN101714185A (en) * | 2009-12-22 | 2010-05-26 | 中国建筑科学研究院建筑防火研究所 | Automatic simulation method for building disaster evacuation |
CN104008562A (en) * | 2014-06-06 | 2014-08-27 | 东南大学 | User-oriented planned virtual crowd simulation framework |
CN104732014A (en) * | 2015-02-26 | 2015-06-24 | 北京交通大学 | Hierarchical crowd simulation method and system used for complex scene |
US9159152B1 (en) * | 2011-07-18 | 2015-10-13 | Motion Reality, Inc. | Mapping between a capture volume and a virtual world in a motion capture simulation environment |
CN107016358A (en) * | 2017-03-24 | 2017-08-04 | 上海电力学院 | Intermediate density scene microcommunity real-time detection method |
-
2017
- 2017-09-20 CN CN201710854185.6A patent/CN107704667B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040059548A1 (en) * | 2002-09-09 | 2004-03-25 | Marios Kagarlis | Method of simulating movement of an autonomous entity through an environment |
CN101714185A (en) * | 2009-12-22 | 2010-05-26 | 中国建筑科学研究院建筑防火研究所 | Automatic simulation method for building disaster evacuation |
US9159152B1 (en) * | 2011-07-18 | 2015-10-13 | Motion Reality, Inc. | Mapping between a capture volume and a virtual world in a motion capture simulation environment |
CN104008562A (en) * | 2014-06-06 | 2014-08-27 | 东南大学 | User-oriented planned virtual crowd simulation framework |
CN104732014A (en) * | 2015-02-26 | 2015-06-24 | 北京交通大学 | Hierarchical crowd simulation method and system used for complex scene |
CN107016358A (en) * | 2017-03-24 | 2017-08-04 | 上海电力学院 | Intermediate density scene microcommunity real-time detection method |
Non-Patent Citations (2)
Title |
---|
BOLEI ZHOU ET AL: "Measuring Crowd Collectiveness", 《 IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》 * |
胡清梅: "大型公共建筑环境中人群拥挤机理及群集行为特性的研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110956684A (en) * | 2019-11-27 | 2020-04-03 | 山东师范大学 | Crowd movement evacuation simulation method and system based on residual network |
CN111165395A (en) * | 2020-01-08 | 2020-05-19 | 清华大学 | An experimental approach to model crowd flow using zebrafish |
CN112016660A (en) * | 2020-07-03 | 2020-12-01 | 浙江大学 | A three-dimensional cluster behavior simulation method driven by physical force and data |
CN112016660B (en) * | 2020-07-03 | 2023-11-14 | 浙江大学 | Physical force and data combined driving three-dimensional cluster behavior simulation method |
CN112001937B (en) * | 2020-09-07 | 2023-05-23 | 中国人民解放军国防科技大学 | Group chase and escape method and device based on visual field perception |
Also Published As
Publication number | Publication date |
---|---|
CN107704667B (en) | 2021-01-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109101694B (en) | A kind of the crowd behaviour emulation mode and system of the guidance of safe escape mark | |
CN103679264B (en) | Crowd evacuation paths planning method based on artificial fish-swarm algorithm | |
CN107480320B (en) | Crowd evacuation simulation method and system based on topological map and visual influence | |
US11514638B2 (en) | 3D asset generation from 2D images | |
CN107704667A (en) | Simulate crowd movement's emulation mode, the device and system of sociability | |
CN107665269B (en) | Simulation method and device for rapid crowd evacuation based on geographic information | |
US11238667B2 (en) | Modification of animated characters | |
CN106780707B (en) | The method and apparatus of global illumination in simulated scenario | |
CN102254346A (en) | Method for detecting augmented reality virtual-real collision based on cloud computing | |
CN106204701A (en) | A kind of rendering intent based on light probe interpolation dynamic calculation indirect reference Gao Guang | |
CN101344969A (en) | A Fuzzy Control Method for Generating Group Animation | |
CN112562050A (en) | Virtual object wind animation generation method and device, storage medium and terminal | |
US20250037345A1 (en) | Synchronous character display | |
CN106530375A (en) | Personalized emotional contagion population animation generation method | |
CN105976306A (en) | Energy consumption-error budget-based real-time drawing method | |
Lee et al. | Visualization of deep reinforcement autonomous aerial mobility learning simulations | |
San-ao | Application of Maya in film 3D animation design | |
US20240161377A1 (en) | Physics-based simulation of human characters in motion | |
CN103236072B (en) | A kind of winged insect group analogy method based on noise perception | |
US12190427B2 (en) | Hidden surface removal for layered clothing for an avatar body | |
CN103886636A (en) | Real-time smoke rendering algorithm based on ray cast stepping compensation | |
US12073511B2 (en) | Simulation of rigid bodies | |
US20250061685A1 (en) | Automatic extraction of salient objects in virtual environments for object modification and transmission | |
Yang | Architectural Roaming Animation Based on VR Technology | |
CN116597092A (en) | Three-dimensional modeling method based on deep learning algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |