Improved social force model parameter tuning and calibrating method, device, equipment and medium
Through the multi-objective particle swarm optimization algorithm, the interactive force parameters in the virtual swarm simulation model are optimized, which solves the problems of low parameter tuning efficiency and difficulty in adapting to scene changes in the existing technology, and realizes efficient and flexible model parameter configuration, which improves simulation accuracy and collision avoidance capabilities.
Patent Information
- Application Number
- CN202411560874.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-29
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-04
AI Technical Summary
In the existing virtual group simulation model, the value range of interactive force-related parameters lacks realistic reference, which makes it difficult to achieve the best simulation effect when the scene changes, and manual tuning efficiency is inefficient, making it difficult to ensure the optimal configuration of parameters.
The multi-objective particle swarm optimization algorithm is used to optimize and improve the interactive force parameters in the social force model by setting virtual group simulation target scenarios and evaluation indicators to ensure the optimal configuration of parameters in different scenarios.
It realizes flexible and efficient tuning of virtual group simulation model parameters, improves the simulation accuracy and collision avoidance capabilities of the model in different scenarios, reduces resource waste, and improves tuning efficiency.
Smart Images

Figure CN119514336A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of virtual group simulation, and in particular to a method and a device for improving parameter tuning and calibration of a social force model. Background Art
[0002] The model parameters of the virtual group simulation model have a certain impact on the motion interaction effect of the virtual group. The parameters of the improved social force model can be divided into two parts according to whether they have actual physical meanings. Parameters such as the radius, expected speed, and neighbor range of the agent have actual physical meanings and can reflect the physical and social attributes of the agent itself. The interaction force related parameters do not have actual physical meanings, and there is no real reference for the value range. Table 1 shows the original parameter settings of the improved social force model. This set of parameters is et al. conducted experiments to fit the model with real crowd data and obtained experimental data. Due to the single experimental scene, these parameters cannot fully reflect the virtual group motion interaction, and when the scene changes, the model using the same set of parameters may not be able to achieve the best simulation effect in the new scene.
[0003] In the application process, the values of these parameters are mostly set based on experience. When the simulation scenario changes, the original parameter group will no longer be applicable to the new scenario, and it is necessary to debug the appropriate parameter configuration through multiple experiments. This manual tuning of model parameters is very inefficient, and it is difficult to ensure that the selected new parameters can maximize the performance of the algorithm. When there are multiple such parameters in the model, the effective range and interaction of these parameters constitute a high-dimensional space. Manually blindly searching such a high-dimensional space will consume a lot of time and resources, and often cannot obtain a satisfactory parameter combination in a short time. Summary of the invention
[0004] The present invention provides an improved social force model parameter tuning and calibration method and device, aiming to achieve flexible and efficient virtual group simulation model parameter tuning to solve the technical problems existing in the above-mentioned background technology.
[0005] In a first aspect, the present invention provides a method for improving parameter tuning and calibration of a social force model, comprising:
[0006] Acquire a virtual group simulation target scenario and an evaluation index determined according to the target scenario;
[0007] Taking the interaction force parameters A, n, n′, γ, λ in the improved social force model as decision variables and the evaluation index as the objective function, setting the parameters of the multi-objective particle swarm optimization algorithm;
[0008] According to the target scenario, setting virtual group simulation experiment parameters;
[0009] Through the virtual swarm simulation experiment of the target scene, the evaluation of particles in the multi-objective particle swarm optimization algorithm is completed, and the calibration values of A, n, n′, γ, and λ in the optimized target scene are obtained.
[0010] Furthermore, the target scene is a virtual group motion interaction scene in a virtual simulation scene.
[0011] Furthermore, the evaluation index takes improving the collision avoidance ability of the virtual group during the motion interaction as the optimization index of the improved social force model, including the motion interaction evaluation index between virtual groups and the global motion interaction evaluation index, specifically the three evaluation indicators of average number of collisions per person AACC, average collision depth AACD and global collision score CS.
[0012] More specifically, the decision variables are represented by an array as Param = {A, n, n′, γ, λ}, which represents the calibration value of the interaction force parameter in the target scenario to be solved; for all particles in the multi-objective particle swarm optimization algorithm, at time t, the position x of particle i in the solution space is i (t) represents a set of specific Param values. After the current position of particle i is evaluated by the objective function, the infeasibility and target value of particle i at the current position are obtained. The target value is represented by an array as cost i (t) = {n1, n2, n3}, where n1, n2, n3 correspond to the result values of particle position evaluation by three evaluation indicators: average collision number AACC, average collision depth AACD and global collision score CS; according to the decision variables and target values, the parameters in the multi-objective particle swarm optimization algorithm are determined and set, including the decision space dimension, the target space dimension, the search range of the decision space, the particle swarm scale, the maximum warehouse scale and the maximum number of iterations.
[0013] Furthermore, the virtual group simulation experiment uses an improved social force model, and the experimental parameters include the agent radius, the perceived neighbor range, the agent's expected rate, and the simulation limit time.
[0014] More specifically, the specific method of completing the evaluation of particles in the multi-objective particle swarm algorithm to obtain the calibration values of A, n, n′, γ, and λ in the optimized target scene is:
[0015] Initialize the particle swarm, warehouse and number of iterations using the multi-objective particle swarm optimization algorithm parameters;
[0016] Take the position x of the particle in the particle group i(t) An improved social force model with interaction force parameters input and virtual group simulation experiment parameters set for the target scene is used to perform a virtual group simulation experiment on the target scene, and an evaluation result of the objective function on the particle at the current position is returned through the simulation experiment. The evaluation result includes the target value array cost i (t) = {n1, n2, n3} and infeasibility;
[0017] According to the target value array and infeasibility of the particles, the particle speed, position, dominance attribute, individual optimal pBest, global optimal gBest, and non-dominated solutions in the multi-objective particle swarm optimization algorithm are updated; the iterative update of the particle swarm and the evaluation of the particles in the particle swarm are completed according to the preset number of iterations, and the optimal non-dominated solution set is output;
[0018] A solution is selected from the optimal non-dominated solution set to calibrate the A, n, n′, γ, and λ parameters in the target scenario.
[0019] Furthermore, the infeasibility of the particle means that in the particle evaluation, when the simulation experiment exceeds the simulation limit time and is still not completed, the simulation program is interrupted and the infeasibility of the particle is assigned a maximum value, indicating that the A, n, n′, γ, λ parameter values represented by the particle position are unavailable.
[0020] In a second aspect, the present invention provides an improved social force model parameter tuning and calibration device, characterized in that it includes:
[0021] An input module, used to obtain a virtual group simulation target scenario and an evaluation index determined according to the target scenario;
[0022] A parameter setting module is used to set the parameters of the multi-objective particle swarm optimization algorithm with the interaction force parameters A, n, n′, γ, λ in the improved social force model as decision variables and the evaluation index as the objective function; and to set the parameters of the virtual group simulation experiment for the target scenario;
[0023] The tuning and calibration module is used to complete the evaluation of particles in the multi-objective particle swarm optimization algorithm through a virtual swarm simulation experiment on the target scene, and obtain the calibration values of A, n, n′, γ, and λ under the optimized target scene.
[0024] In a third aspect, the present application further provides an electronic device, characterized in that it comprises: a processor; and a memory storing a program executable by the processor, and when the program is executed, the processor executes any one of the methods described in the first aspect above.
[0025] In a fourth aspect, the present application further provides a storage medium, which stores a program executable by a processor. When the program is executed, the processor executes the method described in any one of the first aspects above.
[0026] By adopting the above technical solution, the present invention has the following beneficial effects:
[0027] The parameters of the virtual group simulation model determine its simulation effect. Using intelligent optimization algorithms to optimize the parameters of the virtual group simulation model can not only find the best parameter configuration within the limited parameter range with the help of the global search ability of the optimization algorithm to improve the simulation accuracy of the model, but also use the parallel processing ability of the algorithm to reduce resource waste. In the face of different simulation scenarios, it can quickly obtain the corresponding optimal model parameters.
[0028] The present invention takes improving the collision avoidance ability of the virtual group during the motion interaction as the optimization goal of the improved social force model, and comprehensively evaluates the optimization goal from multiple dimensions. The multi-objective particle swarm optimization algorithm is selected, and the algorithm can efficiently realize the selection, combination and switching of multiple parameters and the comprehensive evaluation of different parameters in various dimensions. From the experimental results, it can be seen that the optimal model parameters under different simulation scenarios can be quickly obtained by using the method of the present invention, and the virtual group simulation can be performed using the optimized model parameters, which can improve the motion interaction effect of the virtual group. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A flow chart of a method for optimizing and calibrating parameters of an improved social force model provided by an embodiment of the present invention;
[0031] Figure 2 A schematic diagram of Agent-Agent collision in a virtual group simulation model evaluation method provided by an embodiment of the present invention;
[0032] Figure 3 A flow chart of a multi-objective particle swarm optimization algorithm provided by an embodiment of the present invention;
[0033] Figure 4 A schematic diagram of a particle evaluation process provided by an embodiment of the present invention;
[0034] Figure 5A schematic diagram of virtual group distribution in different scenarios of simulation experiment scenario settings provided by an embodiment of the present invention;
[0035] Figure 6 A schematic diagram showing the comparison of the motion trajectories of a virtual group before and after the optimization of model parameters provided in an embodiment of the present invention;
[0036] Figure 7 A schematic diagram comparing the collision situations of the improved social force model in different scenarios before and after the model parameter optimization provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] The present invention is further explained below in conjunction with specific implementation modes.
[0039] Before describing the embodiments of the present invention in detail, an improved social force model and a multi-objective particle swarm optimization algorithm are first introduced to facilitate understanding of the embodiments of the present invention.
[0040] Improved social force model
[0041] The improved social force model proposed by et al. experimentally verifies the pedestrian interaction behavior in the classical social force model and extracts its behavior rules, making the model more consistent with the pedestrian movement laws in actual scenes. At present, the model has been widely used in virtual group simulation research and has become a basic and effective tool for analyzing and predicting complex group dynamic behaviors.
[0042] The core principle of the improved social force model algorithm is the same as that of the classic social force model, which assumes that pedestrians’ movements are affected by three social forces: self-driving force, repulsive force of other pedestrians, and repulsive force of obstacles such as walls. i , its moving speed V i The influence of social forces is shown in formula (1).
[0043]
[0044] Agent i The internal acceleration term reflects the pedestrian's motivation to move toward the destination at a specific speed. The definition of this part follows the definition of self-drive in the classical social force model:
[0045]
[0046] Indicates that within the relaxation time τ, the Agent i The current speed v i (t) to the expected rate and target direction Close. After experimental fitting, the expected rate is obtained Relaxation time τ = 0.54 ± 0.05 s.
[0047] Wall vs Agent i The repulsive force and Agent i Vertical distance to the wall d w Inversely proportional, it can be expressed as d w Related functions:
[0048]
[0049] Wherein, a and b are parameters, and a=3 and b=0.1 are set.
[0050] f ij :Agent i With Agent j The interaction effect between agents i The influence of the motion state can be used to ij The role of Agent i Along Agent i With Agent j Interaction direction ij The speed change (deceleration in the collision avoidance state), and the speed change along t ij Normal direction n ij The direction of change. It can be expressed as:
[0051] f ij =f v ·t ij +f θ ·n ij (4)
[0052] f v With f θ Describes the ij The deceleration and along n ij direction changes.
[0053] Interaction direction ij Agent i and Agent j The combination of the relative motion direction and the relative position of the two is expressed as:
[0054]
[0055] Among them, λ is the model parameter, v i , v j Respectively represent Agent i and Agent j The speed, e ij Indicates that the Agent i Position P i Point to Agent i Position P j The unit vector of is expressed as:
[0056]
[0057] Definition ij Agent i With Agent j The distance between ij is the vector t ij With vector e ij The angle between v and f θ It can be expressed as a function of d and θ:
[0058]
[0059] in, The symbol for the angle θ, B = γ·||λ·(v i -v j )+e ij ||; A, n, n′, γ, λ are all model parameters, The parameter values obtained by fitting the experimental data are shown in Table 1.
[0060] Table 1 Parameter settings of improved social force model
[0061]
[0062] Substituting formula (7) and (8) into formula (4) and expanding it, we can get Agent i With Agent j The interaction force between ij It is expressed as a function of distance d and angle θ:
[0063]
[0064] By adjusting the model parameters in the formula, virtual groups with different motion interaction characteristics can be realized. Based on this formula, the optimization of the improved social force model will enhance the Agent-Agent motion interaction effect of the improved social force.
[0065] Multi-objective particle swarm optimization algorithm
[0066] Particle Swarm Optimization (PSO) is a swarm intelligence optimization algorithm inspired by the foraging behavior of bird flocks in nature. The algorithm simulates the group cooperation process of bird flocks in foraging, and finds the optimal solution to the problem through information sharing and collaborative search between particles. Each particle in PSO represents a potential solution and has its own speed and position in the solution space. At the beginning, positions and speeds are randomly generated for all particles to complete the initialization of the particle swarm. In each round of evolution iteration, the fitness function of all particles is first evaluated, and the individual optimal solution of each particle and the global optimal solution of the particle swarm are updated according to the evaluation results. The speed and position of the particles are adjusted so that the entire particle swarm evolves in the direction of the global optimal until the termination condition is met. The particle swarm optimization algorithm is simple and easy to implement, with fast convergence speed. It is particularly suitable for solving continuous optimization problems and application scenarios with high requirements on algorithm execution time. However, since the particle swarm optimization algorithm uses a single fitness to represent the value of the optimization objective function during the solution process, it is unable to take into account multiple objective functions. In practical problems, there are often multiple optimization objectives, and there may be conflicts between the objective functions. Therefore, the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm has emerged. Based on the particle swarm optimization algorithm, it solves the multi-objective optimization problem, that is, finds a set of optimal solutions that can achieve a balance between multiple optimization objectives.
[0067] Due to the above advantages of the multi-objective particle swarm optimization algorithm, the multi-objective particle swarm optimization algorithm is selected in the method of the present invention to tune the interaction force parameters of the improved social force model. In order to facilitate the understanding of the method of the present invention, the important concepts and definitions involved in the algorithm are introduced and explained.
[0068] (1) Pareto solution and Pareto frontier
[0069] Pareto solution: In a multi-objective optimization problem, two solutions are given: solution A and solution B. When solution A is better than solution B (or solution A is not inferior to solution B) for all objectives, solution A is said to dominate solution B, and solution A is called a non-dominated solution, also called a Pareto solution.
[0070] Pareto front: describes a solution set that contains all non-dominated solutions in the solution space, that is, the optimal solution to the multi-objective optimization problem. Any solution on the Pareto front cannot be dominated by other solutions on the front.
[0071] (2) Particle Swarm and Warehouse
[0072] Particle swarm: It consists of a group of particles, each of which represents a potential solution in the solution space. Particle swarm is dynamically explored, representing the real-time dynamics of the search process. Each particle has its own speed and position. During the iteration process, it continuously moves in the solution space and updates its position and speed to find the optimal solution to the problem.
[0073] Repository: It is the external archive of MOPSO and plays the role of storing and updating the Pareto front. All non-dominated solutions are stored in the warehouse to guide the particle swarm to search for the optimal solution in future iterations. MOPSO uses the adaptive grid method to maintain the warehouse and introduces a diversity retention mechanism to avoid excessive aggregation of solution sets to ensure that the stored solutions can cover different areas of the target space.
[0074] (3) Individual Optimum and Global Optimum
[0075] Individual best pBest: The best position of each particle in the historical search process. At initialization, the individual best of each particle is the current position of the particle; in each round of iteration, the dominance relationship between the new position of the particle and pBest is determined. If the new position of the particle is better than pBest, the pBest of the particle is updated to the current position of the particle.
[0076] Global Optimum (gBest): The optimal position of all particles in the particle swarm during the historical search process. It is selected from the Pareto front and used to guide the search direction of the particle swarm. After each iteration, a particle is selected from the warehouse using the adaptive grid method and roulette strategy to update gBest.
[0077] Combining the above concepts and definitions, we can summarize the core principle of the MOPSO algorithm: in the iterative process, each particle updates its own speed and position according to the individual optimum and the global optimum, and explores the multi-dimensional solution space; the searched non-dominated solutions are stored in the warehouse, the Pareto front is continuously updated and maintained, and specific algorithm strategies are used to handle constraints and maintain the diversity of solutions, so as to effectively balance multiple objectives. The specific algorithm flow of MOPS0 is as follows:
[0078] (1) Initialization: Generate a particle swarm, randomly assign a position to each particle, set the initial velocity to zero, set pBest to the initial position of the particle; create and fill a warehouse; set the number of iterations t = 1.
[0079] (2) Select gBest: Select particles from the warehouse grid as gBest according to the roulette strategy.
[0080] (3) Update the particle swarm: For each particle in the particle swarm, according to gBest and its own pBest, update the particle velocity according to formula (10), and update the particle position according to formula (11) to obtain the next generation of particles. Where w is the inertia weight, c1 is the individual learning factor, c2 is the group learning factor, and r1, r2∈[0,1] are random numbers.
[0081]
[0082] x i (t+1)=x i (t)+v i (t+1) (11)
[0083] (4) Evaluate the particle swarm: Evaluate the position of each particle in the particle swarm and calculate all the objective function values corresponding to each particle; if the current position of the particle is better than pBest, update pBest to the current position of the particle. Perform non-dominated sorting on the new generation of particle swarms and store all non-dominated solutions in the warehouse.
[0084] (5) Update the warehouse: Update the dominant attributes of the solutions stored in the warehouse and delete the dominant solutions in the warehouse. Determine whether the non-dominated solutions stored in the warehouse exceed the upper limit of the warehouse size. If so, clear the warehouse according to the adaptive grid method and roulette strategy.
[0085] (6) Termination condition: Determine whether the termination condition is met. If so, return the optimal solution and end the program. Otherwise, the number of iterations t = t + 1, and jump to step (2) to continue iterating. The algorithm flow is represented by a flowchart as follows: Figure 2 shown.
[0086] The specific implementation of the scheme of the present invention will be described below with reference to the accompanying drawings.
[0087] The core idea of the method of the present invention is to tune the interaction force parameters in the social force model under different simulation scenarios, so as to effectively improve the simulation effect of the model in diversified application scenarios. How to efficiently and accurately find the optimal parameter configuration of the model under different scenarios is the key technical problem to be solved by the present invention. Figure 1 As shown, the present invention proposes an improved social force model parameter tuning and calibration method, comprising:
[0088] Acquire a virtual group simulation target scenario and an evaluation index determined according to the target scenario;
[0089] Taking the interaction force parameters A, n, n′, γ, λ in the improved social force model as decision variables and the evaluation index as the objective function, setting the parameters of the multi-objective particle swarm optimization algorithm;
[0090] According to the target scenario, setting virtual group simulation experiment parameters;
[0091] Through the virtual swarm simulation experiment of the target scene, the evaluation of particles in the multi-objective particle swarm optimization algorithm is completed, and the calibration values of A, n, n′, γ, and λ in the optimized target scene are obtained.
[0092] The above method uses a multi-objective particle swarm optimization algorithm to tune and calibrate the interaction force parameters of the improved social force model, which can greatly improve the efficiency of parameter tuning. Therefore, it can quickly realize the tuning and calibration of model parameters for different virtual group simulation scenarios and multi-dimensional evaluation indicators, improve the motion interaction effect of model simulation, and enhance user experience.
[0093] The collision avoidance behavior of the virtual group can improve the realism and liveliness of the virtual group, and is an important factor in improving the quality of user experience. In the virtual group simulation model, the force-based model represented by the social force model can better reflect individual characteristics and is suitable for simulating the dynamics of people with social attributes and social relationships, but the collision avoidance effect in the interactive movement of the virtual group is poor. Therefore, in this embodiment, the virtual group movement interaction scene in the virtual simulation scene is selected as the target scene, so as to improve the collision avoidance ability in the virtual group movement interaction process as the optimization index of the improved social force model.
[0094] There is no unified and complete crowd simulation evaluation system for the evaluation of collision avoidance behavior in the process of virtual motion interaction. In view of the performance of collision avoidance ability in the process of virtual group motion interaction, which is the focus of the present invention, the evaluation indicators related to virtual group collision avoidance are mainly considered, including the interaction evaluation indicators between virtual groups and the global motion interaction evaluation indicators, specifically the three evaluation indicators of collision number, collision depth and collision score.
[0095] The number of collisions is an intuitive reflection of the collision avoidance capability of the virtual group simulation model and is an evaluation indicator of the interaction between virtual groups. i With Agent j When the boundaries of i With Agent j A collision occurs, such as Figure 3 As shown. i , r j Agent i With Agent j The radius, P i , P j Agent i With Agent jSince the collision has a certain duration in time, in order to more scientifically count the experimental data, in the present invention, a collision is defined as the time from when the boundaries of the two colliding parties begin to overlap until the two parties completely leave each other's boundaries.
[0096] In this embodiment, the number of collisions is specifically the average number of collisions per person (Average Agent-Agent Collision Count, AACC), which indicates the average number of agent-agent collisions that occur for each agent, and can reflect the collision frequency during the agent-agent motion interaction process, with the unit of times. The specific definition is shown in formula (12).
[0097]
[0098] Where N represents the size of the virtual group, Collisions ij Represents the Agent in the entire simulation process i With Agent j The number of collisions between them.
[0099] Collision depth is one of the commonly used indicators to quantify the severity of collisions and is an indicator for evaluating the interaction between virtual groups. i With Agent j The collision depth between ij The overlapped part of both parties is along the Agent i With Agent j The length of the line connecting the centers of the circles, such as Figure 3 As shown in , the specific calculation formula is as follows:
[0100] depth ij =r i +r j -||P i -P j || (13)
[0101] Unless otherwise specified, the collision depth is defined as the maximum collision depth during a collision.
[0102] In this embodiment, the collision depth is specifically the average collision depth (Average Agent-Agent Collision Depth, AACD), which represents the average maximum collision depth of each Agent-Agent collision each time, and can reflect the severity of the Agent-Agent collision in the spatial dimension. The unit is meter, and the specific calculation formula is as follows:
[0103]
[0104] in Represents Agent i With Agent j The maximum collision depth when the kth collision occurs, The calculation method refers to formula (13).
[0105] The collision score is an evaluation indicator that combines the number of collisions and the collision depth to reflect the global motion interaction performance. It can more comprehensively evaluate the authenticity of virtual group simulation.
[0106] In this embodiment, the collision score (CS) is defined as the sum of the collision depths of all collisions occurring in the entire scene at each time step during the entire simulation process, and then the average of the total number of time rounds and the number of agents in the group. The collision score can reflect the overall collision avoidance effect of the model in terms of time and space dimensions. The lower the collision score, the better the overall collision avoidance performance of the model and the higher the credibility of the global motion interaction. The specific definition of CS is shown in formula (16). Where T represents the time step required for the entire simulation process, Indicates that at the tth time step, Agent i With Agent j The collision depth.
[0107]
[0108] In this embodiment, it should be noted that the collision depth used to calculate the collision score is different from the maximum collision depth used to calculate other evaluation indicators in the previous text. The collision depth here means recording the collision depth corresponding to each time step of a complete collision process, that is, from the beginning to the end of the collision, and does not include the meaning of the maximum value. Therefore, the collision score not only considers the severity of the collision in the spatial dimension, but also considers the impact of the duration of each collision on the global motion interaction from the time dimension.
[0109] In summary, in this embodiment, the target scene is a virtual group motion interaction scene in a virtual simulation scene, and the determined relevant evaluation indicators are three evaluation indicators: average number of collisions per person AACC, average collision depth AACD and global collision score CS. Based on the target scene and the evaluation indicators, the multi-objective particle swarm optimization algorithm and the virtual simulation model are initialized and configured.
[0110] More specifically, when conducting experiments and analyzing results of this embodiment, three representative classic crowd simulation scenes, namely Circle, intersection and stadium evacuation, were selected, and different crowd densities were set as experimental scenes for the virtual group model optimization and comparison experiment in this embodiment.
[0111] In this embodiment, after determining the above target scenarios and multiple evaluation indicators for the target scenarios, the specific technical problem to be solved is how to use an intelligent optimization algorithm to tune the interaction force parameters A, n, n′, γ, λ in the improved social force model, and quickly determine the optimal parameter combination, thereby optimizing the multi-dimensional simulation performance of the virtual group in the above target scenarios and improving the adaptability of the simulation model.
[0112] The method of the present invention optimizes the model parameters based on the improved social force model to achieve the purpose of improving the specific performance of the simulation model in a specific scenario. Since the simulation model has fewer parameters and the parameter range to be searched is smaller, the corresponding model parameter optimization problem belongs to a continuous optimization problem and there are multiple optimization objectives. Therefore, the multi-objective particle swarm optimization algorithm can well meet the needs of the method of the present invention.
[0113] Combined with the principle and implementation process of the multi-objective particle swarm optimization algorithm, the interaction force parameters A, n, n′, γ, λ in the improved social force model are used as decision variables (i.e., the position of the particles) in the multi-objective particle swarm. The quantitative indicators of the number of collisions, collision depth and collision score of the virtual group are used as the objective function of the multi-objective particle swarm optimization algorithm to evaluate the fitness of the particles. The individual optimal solution of each particle and the global optimal solution of the particle swarm are updated according to the evaluation results, and the speed and position of the particles are adjusted.
[0114] In this embodiment, the decision variables are represented by an array as Param = {A, n, n′, γ, λ}, which represents the calibration value of the interaction force parameter in the target scenario to be solved; for all particles in the multi-objective particle swarm optimization algorithm, at time t, the position x of particle i in the solution space is i (t) represents a set of specific Param values. After the current position of particle i is evaluated by the objective function, the infeasibility and target value of particle i at the current position are obtained. The target value is represented by an array as cost i (t) = {n1, n2, n3}, where n1, n2, n3 correspond to the result values of particle position evaluation by three evaluation indicators: average collision number AACC, average collision depth AACD and global collision score CS; according to the decision variables and target values, the parameters in the multi-objective particle swarm optimization algorithm are determined and set, including the decision space dimension, the target space dimension, the search range of the decision space, the particle swarm scale, the maximum warehouse scale and the maximum number of iterations.
[0115] In this embodiment, the interaction force module in the improved social force model is optimized, and the corresponding parameters are used as decision variables of the MOPSO algorithm, which are represented by an array as Param = {A, n, n′, γ, λ}, which represents the problem to be solved, that is, the calibration value of the interaction force parameter in the target scenario; the solution space dimension is 5, and each dimension in the solution space corresponds to all possible values of a decision variable. That is, for all particles in the particle swarm in the multi-objective particle swarm optimization algorithm, at time t, the position x of particle i in the solution space is i (t) is a 5-dimensional array representing a set of specific decision variable values, and the value of each dimension represents the interaction force parameter of the corresponding dimension.
[0116] More specifically, the size of the solution space is determined by the number of decision variables (i.e., the dimension of the solution space) and the search range of the decision variables. Each decision variable in the solution space has a finite search range, corresponding to the numerical range of each interaction force parameter of the improved social force model. The search range of the solution space is defined as two 5-dimensional arrays, namely, the search upper bound and the search upper bound. Specifically, it is expressed as search upper bound = {A max ,n max ,n′ max ,γ max ,λ max} and search lower limit lower_bound = {A min ,n min ,n′ min ,γ min ,λ min}; During the optimization process, all particles search within a given range in each dimension of the solution space to ensure that the optimal solution is within the parameter range.
[0117] In this embodiment, the interaction force parameters of the improved social force model are optimized, with the goal of improving the performance of motion interaction during the virtual group simulation process. The performance of the simulation model is evaluated at three levels: the collision frequency, collision severity, and collision situation of the virtual group during the simulation process. The corresponding three evaluation indicators are AACC, AACD, and CS. In order to directly and effectively optimize the relevant performance of the model to ensure that the optimization goal is consistent with the expected model performance improvement goal, the above three model evaluation indicators are set as the objective function in the optimization method, and the target space dimension is 3, and the value of each dimension represents the value of the corresponding evaluation indicator. For the current position x of particle i i (t), the objective function of the corresponding evaluation index is used to evaluate the position of the particle, and the evaluation result of particle i at the current position is obtained, including infeasibility and target value. The target value is represented by an array as cost i(t) = {n1, n2, n3}, where n1, n2, n3 correspond to the result values of the particle position evaluation of the three evaluation indicators, namely, the average number of collisions per person AACC, the average collision depth AACD and the global collision score CS; the infeasibility of the particle means that in the particle evaluation, when the simulation experiment exceeds the simulation limit time and is still not completed, the simulation program is interrupted and the infeasibility of the particle is assigned a maximum value, indicating that the A, n, n′, γ, λ parameter values represented by the particle position are unavailable.
[0118] In addition to setting the above-mentioned decision space dimension, target space dimension, and search range parameters of the decision space, it is also necessary to determine and set the key parameters of the multi-objective particle swarm optimization algorithm such as the particle swarm scale, the maximum warehouse scale, and the maximum number of iterations according to the decision variables and target values. In this embodiment, the particle swarm scale is set to 100, the maximum warehouse scale is set to 20, and the maximum number of iterations is set to 50.
[0119] In this embodiment, the virtual group simulation experiment uses an improved social force model, and the experimental parameters include the agent radius, the perceived neighbor range, the agent's expected rate, and the simulation limit time.
[0120] In this embodiment, MOPSO is used to tune the parameters of the improved social force model, and the two are linked through particle evaluation. The decision variables of MOPSO (i.e., the positions of particles) are used as the interaction force parameters of the input social force model, and the virtual group simulation is performed through the improved social force model, and the indicators obtained by the simulation are fed back to the particles as the target values.
[0121] More specifically, the particle evaluation process is as follows Figure 4 As shown, the position x of the particle in the particle group i (t) An improved social force model with interaction force parameters input and virtual group simulation experiment parameters set for the target scene is used to perform a virtual group simulation experiment on the target scene, and an evaluation result of the objective function on the particle at the current position is returned through the simulation experiment. The evaluation result includes the target value array cost i (t) = {n1, n2, n3} and infeasibility;
[0122] According to the target value array and infeasibility of the particles, the particle speed, position, dominance attribute, individual optimal pBest, global optimal gBest and non-dominated solutions in the multi-objective particle swarm optimization algorithm are updated; the iterative update of the particle swarm and the evaluation of the particles in the particle swarm are completed according to the preset number of iterations, and the optimal non-dominated solution set is output.
[0123] The pseudo code of the improved social force model optimization method based on the multi-objective particle swarm optimization algorithm is shown in Table 2. Among them, evaluate() is the particle evaluation method, and the overall process is the same as Figure 4 Consistent: The particle position is input as a parameter, and after model simulation, the target value array and infeasibility of the particle at the current position are returned. Infeasibility indicates the degree to which the solution represented by the current position of the particle does not satisfy the constraint conditions. When evaluating the dominance properties of particles in a group, the infeasibility of the particles must be considered first. For particles with too high infeasibility, their target value arrays are no longer evaluated further, but are directly regarded as dominated solutions and not put into the warehouse; for multiple particles with the lowest infeasibility, their target value arrays are non-dominated sorted, and the non-dominated solutions among them are found and filled into the warehouse.
[0124] A solution is selected from the optimal non-dominated solution set to calibrate the A, n, n′, γ, and λ parameters in the target scenario.
[0125] Table 2 Improved social force model optimization method based on MOPSO
[0126]
[0127] By using the multi-objective particle swarm optimization algorithm, we can quickly select, combine and switch multiple parameters within their respective predetermined parameter ranges for specific target scenarios and optimization goals. Through virtual swarm simulation experiments, we can complete a multi-dimensional evaluation of each group of parameter combinations and return the target value of the evaluation result to the multi-objective particle swarm algorithm, thereby completing the rapid combination screening of parameters, determining the optimal parameter combination, and effectively reducing the resource consumption required for model tuning.
[0128] In order to further improve the realism of model simulation and its adaptability to different crowd densities and different simulation scenarios, and to qualitatively and quantitatively illustrate the effectiveness of the method of the present invention in improving the performance of virtual groups in motion interaction, this embodiment uses the classic crowd simulation scenario of virtual group interactive motion as an example to conduct comparative experiments and result analysis.
[0129] In this embodiment, three classic crowd simulation scenarios and different crowd densities are set to optimize the improved social force model under different scenarios. The optimized model parameters are analyzed and compared with the simulation results of the improved social force model under the original default parameters to verify the effectiveness and superiority of the method of the present invention in optimizing the virtual group simulation model.
[0130] Three representative classic crowd simulation scenarios, Circle, intersection and stadium evacuation, are selected as experimental scenarios for the virtual crowd model optimization and comparison experiment in this embodiment. The specific description of the scenarios is as follows:
[0131] (1) Circle scenario: Define a circular boundary with a radius of 15m, and evenly distribute a certain number of agents on the circumference. At the beginning, all agents move from their current positions along the diameter direction toward the other end of the circle. When all agents reach the symmetrical position of the starting point on the circumference, the simulation ends.
[0132] (2) Intersection scenario: The intersection range is x∈[-40m,40m], y∈[-40m,40m], the road width is 10 meters, and the scene area is 1500 square meters. At the beginning, a certain number of agents are evenly and randomly distributed on the upper, lower, left, and right sides of the intersection. All agents move towards the intersection opposite to their own intersection. When all agents reach the end of the intersection opposite to their starting point, the simulation ends.
[0133] (3) Venue evacuation scenario: The venue is a rectangular space with a range of x∈[-15m,15m], y∈[-15m,15m], a scene area of 900 square meters, and an exit with a width of 3 meters in the center of the right side of the venue. At the beginning, a certain number of agents are uniformly and randomly distributed in the venue, and all agents move forward with the exit as the goal. When all agents leave the venue from the exit, the simulation ends.
[0134] For the Circle scenario, the number of agents is set to N = {6, 8, 10, 12, 14, 16}. For the intersection and venue evacuation scenarios, three experimental groups with different crowding levels are set, namely loose, medium, and crowded, according to the per capita area from large to small. The experimental group settings are shown in Table 3. The distribution of agents in different scenarios at the beginning is as follows: Figure 5 shown.
[0135] Table 3 Experimental group settings for different scenarios
[0136]
[0137] Using the virtual group simulation model optimization method provided by the present invention, parameters of the improved social force model are tuned for the Circle scenario and each scenario listed in Table 3. The experimental parameters are set as follows:
[0138] For MOPSO, the decision space dimension is 5, the target space dimension is 3, the decision variable search range is set to [0,5], the particle swarm size is 100, the maximum warehouse size is 20, and the maximum number of iterations is 50.
[0139] Virtual group simulation model: The agent radius is 0.35m, the range of perceived neighbors is 2m, and the expected rate is 1m / s; due to the random position of the agent in the scene, during the optimization process, some solutions may not be able to complete the simulation within a reasonable time range. Set the corresponding simulation time limit timeLimit according to the scene and the size of the virtual group. In each round of particle evaluation, when the simulation time exceeds timeLimit and is still not completed, the program is interrupted and a maximum value is assigned to the particle's infeasibility, so as to avoid the optimization process being stagnant due to the inability of a certain particle representative solution to complete the simulation.
[0140] After optimization using the above method, the interaction force parameters of the improved social force model in each scenario are shown in Tables 4 to 6.
[0141] Table 4 Interaction force parameters after Circle scene optimization
[0142]
[0143] Table 5 Interaction force parameters after optimization of intersection scene
[0144]
[0145] Table 6 Interaction force parameters after optimization of venue evacuation scenario
[0146]
[0147] Simulation Results and Analysis
[0148] (1) Motion trajectory comparison
[0149] The virtual group simulation of the Circle scene is carried out to compare the motion trajectories of the virtual group before and after optimization, as shown in the figure. Figure 6 shown. Figure 6 (a) shows the virtual group movement trajectory generated by the unoptimized improved social force model. The interaction force parameters in the model use the default parameter settings in Table 1; Figure 6 (b) shows the virtual group motion trajectory generated after the improved social force model is optimized. The optimized model uses the corresponding parameter settings in Table 4 according to the number of agents in the scene.
[0150] By comparing the motion trajectories before and after optimization, it can be seen that compared with the unoptimized situation, the virtual group obtained after optimization will adopt a turning strategy in advance when facing an impending collision, and the turning amplitude is larger, so as to avoid the occurrence of a collision. Therefore, the motion trajectory appears as a more obvious "vortex" around the center of the circle.
[0151] Table 7 shows the simulation performance of the improved social force model before and after optimization in the Circle scenario with different numbers of agents. For different numbers of agents, the average number of collisions per agent and the average collision depth during the simulation process, as well as the total time required for the simulation, are counted. From the perspective of collisions, for the Circle scenario, the number of agent collisions and the collision depth of the unoptimized model in the simulation are positively correlated with the number of agents in the scene, while the optimized model can effectively avoid collisions. From the perspective of simulation efficiency, although the virtual group motion trajectory generated by the optimized model is longer than that generated by the unoptimized model, from the perspective of simulation time, the optimized model does not have much additional time overhead. The reason is that the optimized model reduces the occurrence of collisions, the agent movement is smoother, and the speed change is smaller. Therefore, although the optimized agent walks a longer path, the time it takes to reach the end is close to or even shorter than that of the unoptimized case.
[0152] Table 7 Circle scene simulation performance before and after model optimization
[0153]
[0154]
[0155] (2) Comparison of collision conditions
[0156] Virtual group simulations were performed for intersection and venue evacuation scenarios. The optimized improved social force model (using the parameters in Tables 5 and 6 for the corresponding scenarios) was compared with the unoptimized model (using the default parameters in Table 1 for all scenarios). The collision situation during the movement of the virtual group was evaluated using three indicators: the number of collisions per agent, the average collision depth of agents, and the global collision score. The experimental results are as follows: Figure 7 shown.
[0157] Overall, in the face of different simulation scenarios and crowding levels, the optimized improved social force model is generally better than the original model using default parameters in terms of virtual group motion interaction during simulation.
[0158] In terms of collision frequency, Figure 7 (a) and Figure 7 (d) It can be seen that: when the crowd distribution in the scene is relatively loose, the average number of collisions per person in the optimized virtual group is significantly lower than that in the unoptimized case, and almost no collision occurs; as the group density in the scene increases and the average area per person decreases, the collision frequency between agents increases accordingly, but the average number of collisions per person in the optimized model is always lower than that in the unoptimized model.
[0159] The average agent collision depth is used as an indicator to quantitatively evaluate the severity of agent-agent collisions. Figure 7 (b) and Figure 7 (e) It can be seen that when the virtual group in the scene is loosely crowded, the optimization effect is most significant, and the average collision depth of the optimized model is reduced by more than 75% compared with the original model; when the crowding is medium, the optimization has a smaller effect on reducing the collision depth, but it still ensures that the optimized model is better than before optimization. When the virtual group distribution in the scene is crowded, the collision depth of the original model increases significantly, while the optimized model always keeps the collision depth at a low level.
[0160] The collision score is an evaluation of the virtual group motion interaction during the whole simulation process. Figure 7 (c) and Figure 7 (f) It can be seen that for the two scenarios and three levels of congestion, the optimized model has a significant improvement compared with the unoptimized original model, and its collision score is significantly lower than that of the unoptimized model.
[0161] Based on the above analysis, it can be concluded that after optimizing the interaction force parameters of the improved social force model using the method of the present invention, the interactive effect of virtual group motion can be effectively improved: by taking collision avoidance measures in advance and increasing the amplitude of the agent's steering when avoiding collision, the frequency of agent collisions is reduced, the depth of collisions between agents is reduced, and the impact of collision events on virtual group motion is reduced from both time and space dimensions during the simulation process, thereby improving the overall smoothness of virtual group motion and the authenticity of motion interaction.
[0162] In other virtual group simulation scenarios involving the use of an improved social force model, the above-mentioned implementation can also be used to complete the tuning and calibration of the interaction force parameters in the improved social force model, so as to achieve the purpose of improving the virtual group simulation effect. In another embodiment, a user motion-perceived virtual group motion control method calculates the interaction force of the user avatar on the virtual intelligent body based on the improved social force model, thereby optimizing the collision avoidance strategy of the intelligent body, and uses the method of the present invention to tune the interaction force parameters, so that the virtual group presents a motion interaction mode between the virtual intelligent body and the user avatar that is more consistent with the setting of the interaction force.
[0163] The present invention also proposes an improved social force model parameter tuning and calibration device, comprising:
[0164] An input module, used to obtain a virtual group simulation target scenario and an evaluation index determined according to the target scenario;
[0165] The parameter setting module is used to set the parameters of the multi-objective particle swarm optimization algorithm with the interaction force parameters A, n, n′, γ, λ in the improved social force model as decision variables and the evaluation index as the objective function; and to set the virtual group simulation experiment parameters for the virtual group simulation target scenario;
[0166] The tuning and calibration module is used to complete the evaluation of particles in the multi-objective particle swarm optimization algorithm through virtual swarm simulation experiments on virtual swarm simulation target scenes, and obtain the calibration values of A,n,n′,γ,λ under the optimized virtual swarm simulation target scene.
[0167] In another embodiment, it can be implemented by means of a device, which may include a corresponding module for performing each or several steps in the above-mentioned various embodiments. Therefore, each step or several steps of the above-mentioned various embodiments can be performed by a corresponding module, and the electronic device may include one or more modules of these modules. The module can be one or more hardware modules specially configured to perform the corresponding steps, or implemented by a processor configured to perform the corresponding steps, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination.
[0168] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An improved social force model parameter tuning and calibration method, characterized in that: include: Acquire a virtual group simulation target scenario and an evaluation index determined according to the target scenario; Taking the interaction force parameters A, n, n′, γ, λ in the improved social force model as decision variables and the evaluation index as the objective function, setting the parameters of the multi-objective particle swarm optimization algorithm; According to the target scenario, setting virtual group simulation experiment parameters; Through the virtual swarm simulation experiment of the target scene, the evaluation of particles in the multi-objective particle swarm optimization algorithm is completed, and the calibration values of A, n, n′, γ, and λ in the optimized target scene are obtained.
2. The method according to claim 1, characterized in that The target scene is a virtual group motion interaction scene in a virtual simulation scene.
3. The method according to claim 1, characterized in that The evaluation index takes improving the collision avoidance ability of the virtual group during the motion interaction as the optimization index of the improved social force model, including the motion interaction evaluation index between virtual groups and the global motion interaction evaluation index, specifically the three evaluation indicators of average number of collisions per person AACC, average collision depth AACD and global collision score CS.
4. The method according to claim 3, characterized in that The decision variables are represented by an array as Param = {A, n, n′, γ, λ}, which represents the calibration value of the interaction force parameter in the target scenario to be solved; for all particles in the multi-objective particle swarm optimization algorithm, at time t, the position x of particle i in the solution space i (t) represents a set of specific Param values. After the current position of particle i is evaluated by the objective function, the infeasibility and target value of particle i at the current position are obtained. The target value is represented by an array as cost i (t) = {n1, n2, n3}, where n1, n2, n3 correspond to the result values of particle position evaluation by three evaluation indicators: average collision number AACC, average collision depth AACD and global collision score CS; determine and set the parameters of the multi-objective particle swarm optimization algorithm according to the decision variables and target values, including the decision space dimension, target space dimension, search range of the decision space, particle swarm scale, maximum warehouse scale and maximum number of iterations.
5. The method according to claim 4, characterized in that The virtual group simulation experiment uses an improved social force model, and the experimental parameters include the agent radius, the perceived neighbor range, the agent's expected rate and the simulation limit time.
6. The method according to claim 5, characterized in that The specific method of completing the evaluation of particles in the multi-objective particle swarm optimization algorithm and obtaining the calibration values of A, n, n′, γ, and λ in the optimized target scene is: Initialize the particle swarm, warehouse and number of iterations using the multi-objective particle swarm optimization algorithm parameters; Take the position x of the particle in the particle group i (t) An improved social force model with interaction force parameters input and virtual group simulation experiment parameters set for the target scene is used to perform a virtual group simulation experiment on the target scene, and an evaluation result of the objective function on the particle at the current position is returned through the simulation experiment. The evaluation result includes the target value array cost i (t) = {n1, n2, n3} and infeasibility; According to the target value array and infeasibility of the particles, the particle speed, position, dominance attribute, individual optimal pBest, global optimal gBest, and non-dominated solutions in the multi-objective particle swarm optimization algorithm are updated; the iterative update of the particle swarm and the evaluation of the particles in the particle swarm are completed according to the preset number of iterations, and the optimal non-dominated solution set is output; A solution is selected from the optimal non-dominated solution set to calibrate the A, n, n′, γ, and λ parameters in the target scenario.
7. The method according to claim 6, characterized in that The infeasibility of the particle means that in the particle evaluation, when the simulation experiment exceeds the simulation limit time and is still not completed, the simulation program is interrupted and the infeasibility of the particle is assigned a maximum value, indicating that the A, n, n′, γ, λ parameter group represented by the particle position is unavailable.
8. An improved social force model parameter tuning and calibration device, characterized in that: include: An input module, used to obtain a virtual group simulation target scenario and an evaluation index determined according to the target scenario; A parameter setting module is used to set the parameters of the multi-objective particle swarm optimization algorithm with the interaction force parameters A, n, n′, γ, λ in the improved social force model as decision variables and the evaluation index as the objective function; and to set the parameters of the virtual group simulation experiment for the target scenario; The tuning and calibration module is used to complete the evaluation of particles in the multi-objective particle swarm optimization algorithm through a virtual swarm simulation experiment on the target scene, and obtain the calibration values of A, n, n′, γ, and λ under the optimized target scene.
9. An electronic device, characterized in that: include: processor; A memory storing a program executable by the processor, wherein when the program is executed, the processor executes the method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: A program executable by a processor is stored, and when the program is executed, the processor executes the method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Panic crowd escape simulation method
CN104331917A
Learning method of extreme learning machine based on social force model group optimization algorithm
CN107563518A
Tabu search bee colony algorithm based crowd evacuation simulating method and system
CN108388734A
Robot cluster motion control method based on crowd interaction behaviors
CN113485338A
Multi-objective multimodal particle swarm optimization method based on bayesian adaptive resonance
WO2022007376A1