CN118114887A - Prediction method and device for crowd flow of evacuation channel - Google Patents

Prediction method and device for crowd flow of evacuation channel Download PDF

Info

Publication number
CN118114887A
CN118114887A CN202410524045.2A CN202410524045A CN118114887A CN 118114887 A CN118114887 A CN 118114887A CN 202410524045 A CN202410524045 A CN 202410524045A CN 118114887 A CN118114887 A CN 118114887A
Authority
CN
China
Prior art keywords
crowd
toxic gas
crayfish
information
neural network
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.)
Pending
Application number
CN202410524045.2A
Other languages
Chinese (zh)
Inventor
马浩
杨晓霞
邵闯
吴继成
黄帅
邢艳召
雷琴
荣正官
曲大义
张永亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao University of Technology
China Railway Construction Electrification Bureau Group Co Ltd
Third Engineering Co Ltd of China Railway Construction Electrification Bureau Group Co Ltd
Operation Management Co Ltd of China Railway Construction Electrification Bureau Group Co Ltd
National Institute of Natural Hazards
Original Assignee
Qingdao University of Technology
China Railway Construction Electrification Bureau Group Co Ltd
Third Engineering Co Ltd of China Railway Construction Electrification Bureau Group Co Ltd
Operation Management Co Ltd of China Railway Construction Electrification Bureau Group Co Ltd
National Institute of Natural Hazards
Filing date
Publication date
Application filed by Qingdao University of Technology, China Railway Construction Electrification Bureau Group Co Ltd, Third Engineering Co Ltd of China Railway Construction Electrification Bureau Group Co Ltd, Operation Management Co Ltd of China Railway Construction Electrification Bureau Group Co Ltd, National Institute of Natural Hazards filed Critical Qingdao University of Technology
Publication of CN118114887A publication Critical patent/CN118114887A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a method and a device for predicting crowd flow of an evacuation channel, and relates to the technical field of computers. One embodiment of the method comprises the following steps: acquiring environment information, toxic gas information and crowd information of a target long and large tunnel; inputting the acquired environmental information, toxic gas information and crowd information into a pre-constructed estimation model of crowd outflow of a long and large tunnel in a toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environmental information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel; and determining the output of the estimation model as crowd outflow of the target long and large tunnel in the toxic gas leakage scene. The embodiment provides a prediction method for crowd flow of the evacuation channel, which provides a basis for crowd evacuation in a toxic gas leakage scene, thereby ensuring the safety of the crowd in the long tunnel in the toxic gas leakage scene.

Description

Prediction method and device for crowd flow of evacuation channel
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for predicting crowd flow of an evacuation channel.
Background
Tunnel systems are increasingly evolving as an important component of urban traffic and infrastructure, however, their complexity and specificity create a range of potential safety hazards. Toxic gas leakage, as an emergency, can pose a serious threat to tunnel users and the surrounding environment. At present, although some methods for estimating crowd outflow in a toxic gas leakage scene exist, a series of challenges still exist in application in special situations such as long tunnels and the like.
A long tunnel typically has a long aisle length, a complex structure, and multiple exits, which increases the complexity of emergency evacuation. The prior art, when considering these special properties, may not provide accurate estimates of crowd outflow, thereby affecting the efficiency of emergency evacuation. With the increasing number of tunnel systems, especially in the case where a large number of constructors are involved in the construction of subway tunnels, high-speed rail tunnels, highway tunnels, etc., it becomes critical to accurately estimate the outflow of people in a toxic gas leakage scene.
Therefore, the limitation of the prior art and the special properties of the long tunnel together drive the need for a new method for estimating the outflow of people in the toxic gas leakage scene which is more suitable for the environment of the long tunnel. An innovative technology is provided to improve the emergency evacuation efficiency in the tunnel system, and the method has important practical significance for guaranteeing the safe operation of the tunnel system.
By estimating the outflow of tunnel population in the toxic gas leakage scene, a decision maker can more accurately know the influence range and degree of toxic gas leakage accidents, so that a more scientific and effective evacuation scheme and emergency measures are formulated. This helps to reduce casualties and property loss, and to improve the scientificity and accuracy of decisions.
Disclosure of Invention
The embodiment of the application provides a method and a device for predicting crowd flow of an evacuation channel.
In a first aspect, some embodiments of the present application provide a method for predicting crowd flow in an evacuation channel, which is characterized by comprising: acquiring environment information, toxic gas information and crowd information of a target long and large tunnel; inputting the acquired environmental information, toxic gas information and crowd information into a pre-constructed estimation model of crowd outflow of a long and large tunnel in a toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environmental information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel; and determining the output of the estimation model as crowd outflow of the target long and large tunnel in the toxic gas leakage scene.
In some embodiments, the dataset used to construct the estimation model is obtained by: establishing a simulation model of the target long and large tunnel and a toxic gas evolution model; obtaining toxic gas evolution parameters based on the toxic gas evolution model; calculating the motion speed of a simulation object in the simulation model according to the toxic gas evolution parameter; and adding the simulation object into the simulation model to simulate, so as to obtain the data set.
In some embodiments, the environmental information includes wind speed, the toxic gas information includes toxic gas concentration and a toxic gas risk coefficient, the risk coefficient characterizes a risk level of toxic gas corresponding to a dangerous chemical, and the crowd information includes a movement speed of a crowd under normal conditions; the calculating the motion speed of the simulation object in the simulation model according to the toxic gas evolution parameter comprises the following steps: calculating the motion speed of a simulation object in the simulation model through the following formula:
wherein v is the motion speed of the crowd, w represents the wind speed, c represents the concentration of toxic gas, c 0 represents the background concentration when no toxic gas leaks, v 0 represents the motion speed of the crowd under normal conditions, e is the natural base number, k represents the resistance coefficient suffered by the crowd in the motion process, g represents the toxic gas risk coefficient, and g 0 represents the reference risk coefficient.
The outflow of people from the tunnel, i.e. the number of people passing through the tunnel outlet cross section per unit time and per unit width
And setting the motion speed of the simulation object in the simulation model according to a formula calculation result, and simulating the motion condition of the crowd in the toxic gas leakage scene to obtain the data set.
In some embodiments, the step of constructing the estimation model comprises: determining the number of nodes of an input layer and the number of nodes of an output layer of the neural network according to the number of the input features and the number of the output features; defining the number of hidden layer layers to be 1 according to the Kolmogorov theorem, and determining the number of hidden layer nodes according to the following formula:
Wherein n 1 is the number of hidden layer nodes, n is the number of input layer nodes, m is the number of output layer nodes, and a is a constant; and establishing a BP neural network, determining a neuron activation function and configuring network parameters.
In some embodiments, the establishing the BP neural network, determining the neuron activation function, configuring the network parameters, comprises: the activation function used by each layer of the BP neural network is determined as follows:
Wherein tansig functions are hyperbolic tangent functions, x represents the value input to the activation function, e is a natural base, and purelin functions are linear functions; setting a neural network forward propagation formula:
Wherein x i is an input variable, y is an output variable, u is the output of the hidden layer neuron, f is the mapping relation of the activation function, v ij is the weight of the ith input variable and the jth hidden layer neuron, To hide layer/>First/>Threshold of individual neurons.
In some embodiments, the step of constructing the estimation model further comprises: optimizing the BP neural network based on a crayfish optimization algorithm, wherein the method comprises the following steps of:
Initializing a population: in the crayfish optimization algorithm, the weight and threshold of the BP neural network are represented as individuals. A population is initialized, each individual representing the weight and threshold of a BP neural network.
Calculating the fitness: for each individual, the training data is trained using a BP neural network and its fitness is calculated. The fitness is a root mean square error function of the estimated model output value and the true value.
Selection operation: and selecting individuals to perform crossing and mutation operations according to the fitness function. This is similar to the foraging, competing and sunstroke behavior of crayfish, helping to find better weight and threshold combinations.
Updating the neural network parameters: and updating the weight and the threshold of the neural network according to the result of the crayfish optimization algorithm.
Iterative training: repeating the steps, and iteratively training the neural network and optimizing parameters until a preset stopping condition is reached.
And training and verifying the optimized BP neural network according to training samples and verification samples for constructing the data set division of the estimation model to obtain the estimation model.
In some embodiments, the optimization of the BP neural network based on the crayfish optimization algorithm includes an initialization phase of the crayfish optimization algorithm, the initialization phase including the steps of: setting parameters of a crayfish optimization algorithm, determining population quantity and setting maximum iteration times; obtaining boundary information and dimensions of a corresponding test function; defining a fitness function as a root mean square error of an estimated model output value and a true value; initializing a population based on the boundary information:
wherein, Is the initial population position,/>Is population number,/>Is the population dimension,/>Is the position of individual i in the j dimension, calculated as follows:
Wherein, therein Represents the lower bound of the j-th dimension,/>Represents the upper bound of the j-th dimension,/>Is a random number.
In some embodiments, the optimization of the BP neural network based on the crayfish optimization algorithm includes an optimization phase of the crayfish optimization algorithm in which each crayfish is a 1 xdim matrix, each column matrix representing a set of weights and thresholds Hou Xuanjie of the neural network, the optimization phase comprising the steps of: the ambient temperature of the crayfish was determined according to the following formula:
wherein, Representing the temperature of the environment in which the crayfish is located; when/> > 30,/>< 0.5, The crayfish optimization algorithm enters a sunstroke phase, in which the crayfish optimization algorithm is based on the cave location (/ >)) And crayfish position (/ >)) Obtaining a new location/>The location update formula is:
wherein, Representing the current iteration number,/>Representing the next generation iteration number,/>Is a decreasing curve, and the formula is: Wherein/> Represents the maximum iteration number, the position of the cave/>The definition is as follows: Wherein/> Representing the optimal position obtained so far by the number of iterations,/>Representing the optimal position of the current population; when/>> 30,/>When 0.5 is not less than, the crayfish optimization algorithm enters a competition phase in which two crayfish will compete for a cavity according to the following formula, according to the cavity location (/ >)) And the position of two lobsters (/ >),/>) Obtain a new position/>
Wherein,A random individual of crayfish is represented by the formula:
When (when) At < 30, the crayfish optimization algorithm enters the foraging stage, in which food intake/>The formula is as follows:
wherein, Is the most suitable temperature for crayfish,/>And/>Is used for controlling the intake of crayfish at different temperatures,Representing a natural exponential function; food size/>The formula is as follows:
wherein, Is a food factor representing the largest food, with a value of constant 3,/>Representing the fitness value of the ith crayfish,/>A fitness value representing a food location; if/>Then according to the formula: The food is chopped and a new position is obtained according to the following formula:
wherein, ,/>Is a cosine function,/>Is a sinusoidal function; if/>The new position is obtained according to the following formula:
Evaluating the population and determining whether to exit the period, if the population does not reach the optimal fitness, continuing to perform iterative computation of the optimization stage; and if the population reaches the optimal fitness, finishing iteration, and assigning the optimal solution obtained by the crayfish optimization algorithm to the weight and the threshold of the BP neural network to obtain the optimized BP neural network.
In some embodiments, the input features of the estimation model are determined based on the steps of: creating a long tunnel model and a physical model describing the evolution process of toxic gas in a simulation platform; setting alternative parameters in the simulation platform; solving the physical model by using a solver of the simulation platform; and analyzing the solving result by using the visualization tool provided by the simulation platform, and extracting main parameters affecting crowd movement from the alternative parameters as input features.
In a second aspect, some embodiments of the present application provide a device for predicting crowd flow in an evacuation channel, which is characterized by comprising: the acquisition unit is configured to acquire environment information, toxic gas information and crowd information of the target long and large tunnel; the estimation unit is configured to input the acquired environment information, toxic gas information and crowd information into an estimation model of crowd outflow of the long and large tunnel under a pre-constructed toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environment information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel; and the determining unit is configured to determine the output of the estimation model as the crowd outflow volume of the target long and large tunnel in the toxic gas leakage scene.
In some embodiments, the apparatus further comprises a simulation unit configured to obtain a dataset from which the estimation model is built by: establishing a simulation model of the target long and large tunnel and a toxic gas evolution model; obtaining toxic gas evolution parameters based on the toxic gas evolution model; calculating the motion speed of a simulation object in the simulation model according to the toxic gas evolution parameter; and adding the simulation object into the simulation model to simulate, so as to obtain the data set.
In some embodiments, the environmental information includes wind speed, the toxic gas information includes toxic gas concentration and a toxic gas risk coefficient, the risk coefficient characterizes a risk level of toxic gas corresponding to a dangerous chemical, and the crowd information includes a movement speed of a crowd under normal conditions; the simulation unit is further configured to: calculating the motion speed of a simulation object in the simulation model through the following formula:
wherein v is the motion speed of the crowd, w represents the wind speed, c represents the concentration of toxic gas, c 0 represents the background concentration when no toxic gas leaks, v 0 represents the motion speed of the crowd under normal conditions, e is the natural base number, k represents the resistance coefficient suffered by the crowd in the motion process, g represents the toxic gas risk coefficient, and g 0 represents the reference risk coefficient.
The tunnel crowd outflow, i.e. the number of people passing at the tunnel exit cross section per unit time and per unit width.
And setting the motion speed of the simulation object in the simulation model according to a formula calculation result, and simulating the motion condition of the crowd in the toxic gas leakage scene to obtain the data set.
In some embodiments, the apparatus further comprises a construction unit configured to construct the estimation model by: determining the number of nodes of an input layer and the number of nodes of an output layer of the neural network according to the number of the input features and the number of the output features; defining the number of hidden layer layers to be 1 according to the Kolmogorov theorem, and determining the number of hidden layer nodes according to the following formula:
Wherein n 1 is the number of hidden layer nodes, n is the number of input layer nodes, m is the number of output layer nodes, and a is a constant; and establishing a BP neural network, determining a neuron activation function and configuring network parameters.
In some embodiments, the building unit is further configured to: the activation function used by each layer of the BP neural network is determined as follows:
Wherein tansig functions are hyperbolic tangent functions, x represents the value input to the activation function, e is a natural base, and purelin functions are linear functions; setting a neural network forward propagation formula:
Wherein x i is an input variable, y is an output variable, u is the output of the hidden layer neuron, f is the mapping relation of the activation function, v ij is the weight of the ith input variable and the jth hidden layer neuron, To hide layer/>First/>Threshold of individual neurons.
In some embodiments, the building unit is further configured to: optimizing the BP neural network based on a crayfish optimization algorithm, wherein the method comprises the following steps of:
Initializing a population: in the crayfish optimization algorithm, the weight and threshold of the BP neural network are represented as individuals. A population is initialized, each individual representing the weight and threshold of a BP neural network.
Calculating the fitness: for each individual, the training data is trained using a BP neural network and its fitness is calculated. The fitness is a root mean square error function of the estimated model output value and the true value.
Selection operation: and selecting individuals to perform crossing and mutation operations according to the fitness function. This is similar to the foraging, competing and sunstroke behavior of crayfish, helping to find better weight and threshold combinations.
Updating the neural network parameters: and updating the weight and the threshold of the neural network according to the result of the crayfish optimization algorithm.
Iterative training: repeating the steps, and iteratively training the neural network and optimizing parameters until a preset stopping condition is reached.
And training and verifying the optimized BP neural network according to training samples and verification samples for constructing the data set division of the estimation model to obtain the estimation model.
In some embodiments, the construction unit is further configured to perform an initialization phase of the crayfish optimization algorithm, the initialization phase comprising the steps of: setting parameters of a crayfish optimization algorithm, determining population quantity and setting maximum iteration times; obtaining boundary information and dimensions of a corresponding test function; defining a fitness function as a root mean square error of an estimated model output value and a true value; initializing a population based on the boundary information:
wherein, Is the initial population position,/>Is population number,/>Is the population dimension,/>Is the position of individual i in the j dimension, calculated as follows:
Wherein, therein Represents the lower bound of the j-th dimension,/>Represents the upper bound of the j-th dimension,/>Is a random number.
In some embodiments, the construction unit is further configured to perform an optimization phase of a crayfish optimization algorithm in which each crayfish is a1 xdim matrix, each column matrix representing a set of weights and thresholds Hou Xuanjie of the neural network, the optimization phase comprising the steps of: the ambient temperature of the crayfish was determined according to the following formula:
wherein, Representing the temperature of the environment in which the crayfish is located; when/> > 30,/>< 0.5, The crayfish optimization algorithm enters a sunstroke phase, in which the crayfish optimization algorithm is based on the cave location (/ >)) And crayfish position (/ >)) Obtaining a new location/>The location update formula is:
wherein, Representing the current iteration number,/>Representing the next generation iteration number,/>Is a decreasing curve, and the formula is: Wherein/> Represents the maximum iteration number, the position of the cave/>The definition is as follows: Wherein/> Representing the optimal position obtained so far by the number of iterations,/>Representing the optimal position of the current population; when/>> 30,/>When 0.5 is not less than, the crayfish optimization algorithm enters a competition phase in which two crayfish will compete for a cavity according to the following formula, according to the cavity location (/ >)) And the position of two lobsters (/ >),/>) Obtain a new position/>
Wherein,A random individual of crayfish is represented by the formula:
When (when) At < 30, the crayfish optimization algorithm enters the foraging stage, in which food intake/>The formula is as follows:
wherein, Is the most suitable temperature for crayfish,/>And/>Is used for controlling the intake of crayfish at different temperatures,Representing a natural exponential function; food size/>The formula is as follows:
wherein, Is a food factor representing the largest food, with a value of constant 3,/>Representing the fitness value of the ith crayfish,/>A fitness value representing a food location; if/>Then according to the formula: The food is chopped and a new position is obtained according to the following formula:
wherein, ,/>Is a cosine function,/>Is a sinusoidal function; if/>The new position is obtained according to the following formula:
Evaluating the population and determining whether to exit the period, if the population does not reach the optimal fitness, continuing to perform iterative computation of the optimization stage; and if the population reaches the optimal fitness, finishing iteration, and assigning the optimal solution obtained by the crayfish optimization algorithm to the weight and the threshold of the BP neural network to obtain the optimized BP neural network.
In some embodiments, the input features of the estimation model are determined based on the steps of: creating a long tunnel model and a physical model describing the evolution process of toxic gas in a simulation platform; setting alternative parameters in the simulation platform; solving the physical model by using a solver of the simulation platform; and analyzing the solving result by using the visualization tool provided by the simulation platform, and extracting main parameters affecting crowd movement from the alternative parameters as input features.
In a third aspect, some embodiments of the present application provide an apparatus comprising: one or more processors; and a storage device having one or more programs stored thereon, which when executed by the one or more processors cause the one or more processors to implement the method as described in the first aspect.
In a fourth aspect, some embodiments of the application provide a computer readable medium having stored thereon a computer program which when executed by a processor implements a method as described in the first aspect.
The method and the device for predicting the crowd flow of the evacuation channel provided by the embodiment of the application are used for acquiring the environmental information, the toxic gas information and the crowd information of the long and large target tunnel; inputting the acquired environmental information, toxic gas information and crowd information into a pre-constructed estimation model of crowd outflow of a long and large tunnel in a toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environmental information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel; the output of the estimation model is determined to be the crowd outflow of the target long and large tunnel in the toxic gas leakage scene, so that the prediction method of the crowd flow of the evacuation channel is provided, and the basis is provided for crowd evacuation in the toxic gas leakage scene, so that the safety of the crowd in the long and large tunnel in the toxic gas leakage scene is ensured.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which embodiments of the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a method of predicting evacuation channel crowd flow in accordance with the present application;
FIG. 3 is a flow chart of an estimation method in an application scenario according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a crayfish optimization algorithm in one application scenario of an embodiment of the present application;
FIG. 5 is a schematic diagram of a long tunnel simulation model established in an application scenario of an embodiment of the present application;
FIG. 6 is a diagram of a long tunnel simulation model with simulated individuals in an application scenario of an embodiment of the present application;
FIG. 7 is a schematic diagram illustrating the construction of an embodiment of a prediction apparatus for evacuation channel crowd flow according to the present application;
Fig. 8 is a schematic diagram of a computer system suitable for use in implementing some embodiments of the application.
Detailed Description
In order to make the person skilled in the art better understand the estimation method, the estimation of the outflow volume of the crowd in the long and large tunnel in the toxic gas leakage scene is clearly described below with reference to the specific implementation method and the attached drawings. It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the invention. 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 invention belongs.
It should be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations. Furthermore, the terms "first," "second," and "third," and the like in the description of the application and in the claims, are used for distinguishing between descriptions and not necessarily for indicating or implying relative importance. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
Fig. 1 shows an exemplary system architecture 100 of an embodiment of a method of predicting evacuation channel crowd flow or a device for predicting evacuation channel crowd flow to which the present application may be applied.
As shown in fig. 1, system architecture 100 may include terminal device 101, terminal device 102, terminal device 103, network 104, and server 105. The network 104 is a medium used to provide communication links between the terminal device 101, the terminal device 102, the terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal device 101, the terminal device 102, the terminal device 103, to receive or send messages or the like. Various client applications, such as a data processing class application, a simulation modeling class application, and the like, may be installed on the terminal device 101, the terminal device 102, and the terminal device 103.
The terminal device 101, the terminal device 102, and the terminal device 103 may be hardware or software. When terminal device 101, terminal device 102, and terminal device 103 are hardware, they may be various electronic devices with a display screen, including but not limited to smartphones, tablets, laptop and desktop computers, and the like. When the terminal apparatus 101, the terminal apparatus 102, and the terminal apparatus 103 are software, they can be installed in the above-listed electronic apparatuses. Which may be implemented as a plurality of software or software modules, or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, for example, a background server providing support for applications installed on the terminal device 101, the terminal device 102, and the terminal device 103, and the server 105 may acquire environmental information, toxic gas information, and crowd information of a target long and large tunnel; inputting the acquired environmental information, toxic gas information and crowd information into a pre-constructed estimation model of crowd outflow of a long and large tunnel in a toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environmental information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel; and determining the output of the estimation model as crowd outflow of the target long and large tunnel in the toxic gas leakage scene.
It should be noted that, the method for predicting the crowd flow of the evacuation channel provided by the embodiment of the present application may be performed by the server 105, or may be performed by the terminal device 101, the terminal device 102, or the terminal device 103, and accordingly, the device for predicting the crowd flow of the evacuation channel may be provided in the server 105, or may be provided in the terminal device 101, the terminal device 102, or the terminal device 103.
The server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (e.g., to provide distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method of predicting evacuation channel crowd flow in accordance with the present application is shown. The method for predicting the crowd flow of the evacuation channel comprises the following steps:
step 201, acquiring environment information, toxic gas information and crowd information of a target long and large tunnel.
In this embodiment, an execution body (e.g., a server or a terminal shown in fig. 1) of the evacuation channel crowd flow prediction method may first obtain environmental information, crowd information, and toxic gas information of a target long and large tunnel. The target long tunnel can be any tunnel of which the outflow amount of the long tunnel crowd is to be estimated in the toxic gas leakage scene, such as a railway tunnel and a highway tunnel. The environmental information may include information affecting the diffusion of toxic gases in the environment of the growing tunnel, such as temperature, humidity, air quality, air pressure, air circulation rate, the presence or absence of adsorbates, etc. The environmental information may be obtained by meteorological data, sensing devices, or field surveys. The crowd information may include information affecting crowd movement speed, such as crowd movement speed or crowd type under normal conditions, crowd age, crowd health, and the like. Crowd information can be obtained by analyzing video monitoring data, and can also be obtained by means of questionnaires, field surveys and the like. The toxic gas information may include information that affects toxic gas diffusion or the health condition of the population, thereby affecting the moving speed of the population, such as the type of toxic gas, the risk coefficient of toxic gas, whether there is a pungent smell, whether it is dissolved in water, and the like. The toxic gas information can be obtained through sensing equipment or can be obtained through field investigation.
Step 202, inputting the acquired environmental information, toxic gas information and crowd information into a pre-constructed estimation model of crowd outflow of a long and large tunnel under a toxic gas leakage scene.
In this embodiment, the estimation model is used to characterize the correspondence between the environment information, the toxic gas information, and the crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel. The initial model may be trained by training samples to obtain an evacuator number estimation model. The training sample can be obtained by simulation through simulation software, can be obtained through history evacuation data of a long tunnel, and can also be obtained through experiments. The initial estimation model can be established based on a support vector regression model, a neural network model or other deep learning models, and can be further optimized by algorithms such as a carnivorous plant algorithm, an ant colony algorithm, a particle swarm optimization algorithm and the like to obtain the estimation model.
In some alternative implementations of the present embodiment, the dataset used to construct the estimation model is obtained by: establishing a simulation model of a target long and large tunnel and a toxic gas evolution model; obtaining toxic gas evolution parameters based on a toxic gas evolution model; calculating the motion speed of the simulation object in the simulation model according to the toxic gas evolution parameters; and adding the simulation object into the simulation model for simulation to obtain a data set.
In the implementation mode, simulation software based on system dynamics, discrete events and multi-agent modeling can be adopted to combine with a crowd movement speed formula under the condition of toxic gas leakage, so that simulation of the crowd movement state of a long and large tunnel under the condition of various toxic gas leakage is realized, a large amount of data in each scene can be obtained in a short time to serve as a data set of an estimation model, and the efficiency of model construction is improved.
In some optional implementations of the present embodiment, the environmental information includes wind speed, the toxic gas information includes toxic gas concentration and toxic gas risk coefficient, the risk coefficient represents a risk degree of toxic gas corresponding to a dangerous chemical, as an example, according to a toxic degree of the dangerous chemical to a human body, the toxic chemical may be classified into high toxicity, toxic and low toxicity levels, and the crowd information includes a movement speed of a crowd under normal conditions; and calculating the motion speed of the simulation object in the simulation model according to the toxic gas evolution parameter, comprising: calculating the motion speed of the simulation object in the simulation model by the following formula:
Wherein v is the motion speed of the crowd, w represents the wind speed, c represents the concentration of toxic gas, c 0 represents the background concentration when no toxic gas leaks, v 0 represents the motion speed of the crowd under normal conditions, e is the natural base number, k represents the resistance coefficient suffered by the crowd in the motion process, g represents the toxic gas risk coefficient, and g 0 represents the reference risk coefficient. The risk factor of toxic gases can be generally determined based on the toxicity, volatility, stability, etc. characteristics of the chemical species and can be derived based on known toxicological data. The reference risk coefficient may be a risk coefficient of a reference toxic gas used in an experiment or simulation, and when the motion speed of the simulation object is calculated in the case of leakage of other toxic gases, the risk coefficient of the other toxic gases may be compared with the reference risk coefficient to estimate the motion speed of the simulation object.
In some alternative implementations of the present embodiment, the step of constructing the estimation model includes: determining the number of nodes of an input layer and the number of nodes of an output layer of the neural network according to the number of the input features and the number of the output features; defining the number of hidden layer layers to be 1 according to the Kolmogorov theorem, and determining the number of hidden layer nodes according to the following formula:
Wherein n 1 is the number of hidden layer nodes, n is the number of input layer nodes, m is the number of output layer nodes, and a is a constant; and establishing a BP neural network, determining a neuron activation function and configuring network parameters. BP neural network (Backpropagation Neural Network) is a common artificial neural network model, which can be used to solve various problems including classification, regression, pattern recognition, etc., and thus has wide application in various applications, and it can adapt to different data patterns and characteristics by training, and thus is suitable for complex nonlinear problems.
In some optional implementations of the present embodiment, establishing a BP neural network, determining a neuron activation function, configuring network parameters, includes: the activation function used by each layer of the BP neural network is determined as follows:
/>
Wherein tansig functions are hyperbolic tangent functions, x represents the value input to the activation function, e is a natural base, and purelin functions are linear functions; setting a neural network forward propagation formula:
Wherein x i is an input variable, y is an output variable, u is the output of the hidden layer neuron, f is the mapping relation of the activation function, v ij is the weight of the ith input variable and the jth hidden layer neuron, To hide layer/>First/>Threshold of individual neurons.
In some optional implementations of the present embodiment, the step of constructing the estimation model further includes: optimizing the BP neural network based on a crayfish optimization algorithm (Crayfish Optimization Algorithm, COA for short); and training and verifying the optimized BP neural network according to training samples and verification samples for constructing the data set division of the estimation model to obtain the estimation model. From the mathematical perspective, the traditional BP neural network is an optimization method of local search, and the weight of the network is gradually adjusted along the direction of local improvement, so that the algorithm is trapped into a local extremum, and the weight converges to a local minimum point, thereby causing network training failure. In addition, the BP neural network is very sensitive to the initial network weight, the network is initialized by different weights, and the network tends to be converged on different local minima, so that the initial weight and threshold iterative optimization in the BP neural network model can be carried out by adopting a crayfish optimization algorithm, and the neural network is optimized. The crayfish optimization algorithm is a heuristic optimization algorithm, proposed by Jia Heming et al in 2023. The basic principle of the algorithm is to simulate the foraging, summer heat prevention and competition behavior of the crayfish. Through these actions, the algorithm can efficiently conduct global and local searches in the solution space to find the optimal solution of the problem.
In some optional implementations of this embodiment, optimizing the BP neural network based on the crayfish optimization algorithm includes an initialization phase of the crayfish optimization algorithm, the initialization phase including the steps of: setting parameters of a crayfish optimization algorithm, determining population quantity and setting maximum iteration times; obtaining boundary information and dimensions of a corresponding test function; defining a fitness function as a root mean square error of an estimated model output value and a true value; initializing a population based on the boundary information:
wherein, Is the initial population position,/>Is population number,/>Is the population dimension,/>Is the position of individual i in the j dimension, calculated as follows:
Wherein, therein Represents the lower bound of the j-th dimension,/>Represents the upper bound of the j-th dimension,/>Is a random number.
In some alternative implementations of this embodiment, the optimization of the BP neural network based on the crayfish optimization algorithm includes an optimization stage of the crayfish optimization algorithm in which each crayfish is a 1 xdim matrix, each column matrix representing a set of weights and thresholds Hou Xuanjie of the neural network, the optimization stage comprising the steps of: the ambient temperature of the crayfish was determined according to the following formula:
wherein, Representing the temperature of the environment in which the crayfish is located; when/> > 30,/>When the temperature is less than 0.5, the crayfish optimizing algorithm enters a summer-heat prevention stage, and in the summer-heat prevention stage, the crayfish optimizing algorithm is used for optimizing the crayfish according to the position of the cave (/ >)) And crayfish position (/ >)) Obtaining a new location/>The location update formula is:
wherein, Representing the current iteration number,/>Representing the next generation iteration number,/>Is a decreasing curve, and the formula is: Wherein/> Represents the maximum iteration number, the position of the cave/>The definition is as follows: Wherein/> Representing the optimal position obtained so far by the number of iterations,/>Representing the optimal position of the current population; when/>> 30,/>When the ratio is more than or equal to 0.5, the crayfish optimization algorithm enters a competition stage, wherein two crayfishes compete for a cave according to the following formula and according to the position of the cave (/ >)) And the positions of two lobsters,/>) Obtain a new position/>
Wherein,A random individual of crayfish is represented by the formula:
When (when) When the food intake is less than or equal to 30, the crayfish optimization algorithm enters a foraging stage, and food intake/>The formula is as follows:
wherein, Is the most suitable temperature for crayfish,/>And/>Is used for controlling the intake of crayfish at different temperatures,Representing a natural exponential function; food size/>The formula is as follows:
wherein, Is a food factor representing the largest food, with a value of constant 3,/>Representing the fitness value of the ith crayfish,/>A fitness value representing a food location; if/>Then according to the formula: The food is chopped and a new position is obtained according to the following formula:
wherein, ,/>Is a cosine function,/>Is a sinusoidal function; if/>The new position is obtained according to the following formula:
/>
Evaluating the population and determining whether to exit the period, if the population does not reach the optimal fitness, continuing to perform iterative computation of the optimization stage; if the population reaches the optimal fitness, iteration is completed, and an optimal solution obtained by the crayfish optimization algorithm is assigned to a weight and a threshold of the BP neural network to obtain the BP neural network after optimization.
In the implementation mode, the BP neural network optimized by the crayfish algorithm is utilized for estimating the outflow volume of the crowd in the long and large tunnel in the toxic gas leakage scene, and the estimation speed and the estimation precision are high. And the weight and the threshold of the BP neural network are optimized by using a crayfish optimization algorithm, so that the estimation accuracy of the model is improved. The crayfish optimization algorithm searches for an optimal solution in a solution space by simulating the summer-heat prevention, competition and foraging behaviors of crayfish. The method has the advantages of high searching speed, strong searching capability and capability of effectively balancing global searching and local searching. By applying the crayfish optimization algorithm to the weight and threshold optimization of the BP neural network, the optimal weight and threshold combination can be found, so that the estimation accuracy of the model is improved.
In some alternative implementations of the present embodiment, the input features of the estimation model are determined based on the steps of: creating a long tunnel model and a physical model describing the evolution process of toxic gas in a simulation platform; setting alternative parameters in a simulation platform; solving the physical model by using a solver of the simulation platform; and analyzing the solving result by using a visualization tool provided by the simulation platform, and extracting main parameters affecting crowd movement from the alternative parameters as input features. The alternative parameters may include temperature, humidity, air quality, air pressure, air circulation speed of the growing tunnel, whether adsorbate is present, toxic gas type, toxic gas risk coefficient, whether there is a pungent smell, whether it is dissolved in water, etc. to affect toxic gas diffusion or crowd health, thus affecting crowd movement speed.
And 203, determining the output of the estimation model as the crowd outflow volume of the target long and large tunnel in the toxic gas leakage scene.
In this embodiment, the crowd-out of the target long tunnel may be used to determine the upper capacity limit of the long tunnel, for example, ninety percent of the crowd-out of the long tunnel in the toxic gas leakage scene in the preset period may be determined as the upper capacity limit of the long tunnel.
The method provided by the embodiment of the application obtains the environmental information, the toxic gas information and the crowd information of the target long and large tunnel; inputting the acquired environmental information, toxic gas information and crowd information into a pre-constructed estimation model of crowd outflow of a long and large tunnel in a toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environmental information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel; the output of the estimation model is determined to be the crowd outflow of the target long and large tunnel in the toxic gas leakage scene, so that the prediction method of the crowd flow of the evacuation channel is provided, and the basis is provided for crowd evacuation in the toxic gas leakage scene, so that the safety of the crowd in the long and large tunnel in the toxic gas leakage scene is ensured.
With continued reference to fig. 3, fig. 3 shows a flowchart of an estimation method in an application scenario according to an embodiment of the present application, including the following steps:
step 1: and establishing a long and large tunnel simulation model by Anylogic software.
The large tunnel is various in types, and fig. 5 shows a simulation model of a horizontal evacuation large tunnel, wherein a large tunnel entrance of the established large tunnel simulation model can be set as a node, and the movement state of people in a toxic gas leakage scene can be simulated by changing the speed of the people entering the node. AnyLogic software can efficiently process large-scale simulation scenes, and can simulate behaviors and interactions of a large number of people in a short time, so that more accurate evacuation strategy evaluation is provided. AnyLogic software can truly simulate the behaviors and decisions of the crowd, and consider the behaviors of the crowd such as moving speed, density, obstacle avoidance and the like, so that the credibility and accuracy of the simulation are improved. Furthermore AnyLogic provides a variety of modeling approaches, such as system dynamics, discrete events, and agent-based modeling, that can be flexibly combined and applied to accommodate different evacuation scenarios and requirements. The software also has a powerful visual function, can intuitively display evacuation processes and results, and is convenient to analyze and read. In addition, a long tunnel entrance of the established long tunnel simulation model can be set as a node, and the movement state of people in a toxic gas leakage scene can be simulated by changing the speed of the people entering the node.
Step 2: and establishing a toxic gas evolution model of the long and large tunnel by using OpenFOAM software to obtain main parameters affecting the movement of people.
Step 2 may comprise the steps of:
Step 2-1, creating a model: a long tunnel model is created in OpenFOAM that includes the main features of the long tunnel, such as entrances, exits, walls, and other necessary parts. Modeling may be performed using a CAD tool of OpenFOAM, or importing models from other CAD software;
Step 2-2, defining a physical model: in OpenFOAM, a physical model is set to describe the evolution process of toxic gas;
step 2-3, setting boundary conditions: in OpenFOAM, boundary conditions of the model are set, including parameters such as gas velocity, pressure, etc. of the inlet and outlet, and characteristics of walls and other obstacles;
Step 2-4, solving a model: the model is solved using an OpenFOAM solver. After the solution is completed, the distribution condition of toxic gas in the long and large tunnel and other related parameters can be obtained;
Step 2-5, analysis results: results were analyzed using the visualization tool provided by OpenFOAM. And extracting main parameters affecting the movement of the crowd, namely the concentration of toxic gas, the wind speed and the type of dangerous chemicals according to the analysis result.
OpenFOAM is a powerful computational fluid dynamics software which can accurately simulate the propagation process of toxic gases in a long tunnel. By the software, factors such as a long and large tunnel structure, airflow dynamics and the like can be considered, and main parameters affecting the movement of people, such as poison gas concentration, wind speed and the like, can be obtained. According to the parameters, the motion speed of the crowd in the toxic gas leakage scene is obtained according to a motion speed formula of the defined crowd in the corresponding scene, the speed of the personnel is controlled by setting speed parameters in the simulated individual attribute according to the obtained speed in AnyLogic software, the crowd evacuation behavior of the long and large tunnel in the toxic gas leakage scene is simulated, highly accurate input is provided for an estimation model, the follow-up estimation can reflect the actual scene more, and a solid foundation is provided for making a scientific and effective emergency plan.
And 3, calculating the movement speed of the crowd in the corresponding scene according to the toxic gas evolution parameters, and setting the attribute of the simulated individual.
Specifically, the motion speed of the crowd corresponding to the scene can be calculated by using the parameters obtained in the step 2, and the speed is defined as follows:
wherein, Is the movement speed of crowd,/>Representing wind speed,/>Representing the concentration of toxic gases,/>Indicating the background concentration without toxic gas leakage, which can be regarded as a safety threshold or air cleanliness level,/>Representing the initial speed of the crowd,/>Is a natural base number,/>Representing the resistance coefficient of the crowd in the movement process,/>Representing the coefficients of different hazardous chemicals,/>The reference toxic gas type coefficient is indicated, namely the toxic gas type coefficient corresponding to the movement speed of the crowd when no toxic gas leaks.
The speed obtained by the formula can be assigned to the speed attribute of the simulation individual in the model established in the step 1, so that the crowd motion simulation in the toxic gas leakage scene is realized.
Step 4: and (3) putting the simulation individuals into the simulation model constructed in the step (1), and simulating various scenes to obtain an input and output data set.
Specifically, as shown in fig. 6, in the simulation, an analog individual can be put into a simulation scene, the movement speed of the crowd in different toxic gas leakage scenes is obtained according to the speed formula in the step 3 by changing the wind speed, the toxic gas concentration and the dangerous chemical coefficient for a plurality of times, the speed attribute of the analog individual is set for a plurality of times to simulate, the outflow data of the crowd in a large tunnel in a large number of different toxic gas leakage scenes is obtained, the wind speed, the toxic gas concentration, the dangerous chemical coefficient and the movement speed of the crowd in different toxic gas leakage scenes are recorded as input characteristics, the outflow of the crowd in the large tunnel is recorded as output characteristics, and the input-output data set is obtained.
Step 5: dividing the data set into a training set and a verification set, and constructing a large tunnel crowd outflow estimation model under a toxic gas leakage scene.
In step 5, the estimation model of the outflow volume of the crowd in the long tunnel in the toxic gas leakage scene is a BP neural network regression estimation model, and the construction steps comprise:
step 5-1: data preprocessing, namely dividing training samples and verification samples according to the data set;
Step 5-2: determining the number of nodes of an input layer and the number of nodes of an output layer of the neural network according to the number of the input features and the number of the output features;
Step 5-3: the hidden layer number is defined to be 1 according to the Kelmogorov theorem, and the hidden layer number is defined to be 1 according to an empirical formula Determining the number of hidden layer nodes, wherein: /(I)Is the number of hidden layer nodes, n is the number of input layer nodes, m is the number of output layer nodes, and a is a constant;
step 5-4: and establishing a BP neural network, determining a neuron activation function and configuring network parameters.
Step 5-4 may comprise:
① Determining the activation function used by each layer of BP neural network as And/>Wherein tansig function is hyperbolic tangent function,/>Representing the value input to the activation function,/>Is a natural base, purelin functions are linear functions;
② Setting a neural network forward propagation formula Wherein/>For inputting variables,/>For output variables,/>To hide the output of layer neurons,/>To activate the mapping relation of the function,/>For/>Input variables and/>Weights of neurons of the hidden layer,/>To hide layer/>First/>Threshold of individual neurons.
Step 6: optimizing the estimation model by using a crayfish optimization algorithm, training the optimized estimation model by using the training set in the step 5, and performing parameter adjustment on the model after training by using the verification set to obtain the estimation model for estimating the outflow of the crowd in the long and large tunnel under the toxic gas leakage scene.
Referring to fig. 4, the crayfish optimization algorithm simulates the foraging, sunstroke prevention and competition behaviors of crayfish, and obtains the optimal weight and threshold of the BP neural network through iterative calculation. The parameters of the BP neural network are optimized by selecting the crayfish algorithm, so that the advantages of global optimization, robustness, high efficiency and adaptation to nonlinear optimization problems can be provided, and the performance and generalization capability of the neural network can be improved.
Step 6 may include:
Step 6-1: setting parameters of a crayfish algorithm, determining population quantity and setting maximum iteration times, and obtaining boundary information and dimensions of a corresponding test function;
step 6-2: defining a fitness function as a root mean square error of an estimated model output value and a true value;
step 6-3: initializing a population based on the boundary information:
wherein, Is the initial population position,/>Is population number,/>Is the population dimension,/>Is the position of individual i in the j dimension, calculated as follows:
wherein, Represents the lower bound of the j-th dimension,/>Represents the upper bound of the j-th dimension,/>Is a random number. /(I)
In the multidimensional optimization problem, each crayfish is a1 xdim matrix, and each column matrix represents a solution to the problem, and in the optimization process, a set of weights and thresholds Hou Xuanjie of the neural network are represented.
Step 6-4: according to the formula: defining the ambient temperature of the crayfish, letting the COA enter different phases, wherein: /(I) Representing the temperature of the environment in which the crayfish is located.
Step 6-5: a summer-heat prevention stage and a competition stage.
When (when) > 30,/>And when the temperature is less than 0.5, the COA enters a summer-heat prevention stage. At this time, the COA is based on the cave location (/ >)) And crayfish position (/ >)) Obtaining a new location/>. The updated formula is:
wherein, Representing the current iteration number,/>Representing the next generation of iterations. /(I)Is a decreasing curve, and the formula is: Wherein/> Representing the maximum number of iterations. Cave location/>The definition is as follows: /(I)Wherein/>Representing the optimal position obtained so far by the number of iterations,/>Representing the optimal location of the current population.
When (when)> 30,/>And when the COA is more than or equal to 0.5, the COA enters a competition stage. At this point, both crayfish will follow the formula: Competing for the cave. Wherein/> Representing a random individual of the crayfish,. According to the cave location (/ >)) And the position of two lobsters (/ >),/>) Obtain a new position/>
Step 6-6: and (5) foraging.
When (when)When the consumption is less than or equal to 30, the COA enters the foraging stage, and the food intake/>And food size/>The formula is as follows:
wherein, Refers to the temperature most suitable for crayfish,/>And/>Is used for controlling the intake of crayfish at different temperatures,Representing a natural exponential function.
Wherein,Is a food factor representing the largest food, with a value of constant 3,/>Representing the fitness value of the ith crayfish,/>A fitness value representing the location of the food.
If it isThen according to the formula: /(I)Chopping the food according to the formula: a new position is obtained.
Wherein:,/> Is a cosine function,/> Is a sinusoidal function.
If it isThen according to the formula: /(I)A new position is obtained.
Step 6-7: the population is evaluated and a determination is made as to whether to exit the cycle. And if the population does not reach the optimal fitness, returning to the step 6-4, and continuing to perform iterative computation.
Step 6-8: the iteration is completed, and the optimal adaptation value is outputAnd corresponding optimal solution/>
Step 6-9: and assigning the optimal solution obtained by the COA to the weight and the threshold of the estimation model to obtain the optimized COA-BP neural network estimation model.
Step 6-10: training and verifying the optimized neural network by utilizing the data set divided in the step 5 to obtain the long and large tunnel crowd outflow estimation model under the toxic gas leakage scene.
Step 7: and (3) inputting data set verification sample data of wind speed, toxic gas concentration, dangerous chemical coefficient and crowd movement speed into the crowd outflow estimation model of the long tunnel in the toxic gas leakage scene obtained in the step (6) to obtain an estimated value of the crowd outflow in the corresponding scene, and calculating root mean square error of the estimated value and the true value to evaluate the effectiveness of the crowd outflow estimation model of the long tunnel in the toxic gas leakage scene.
With further reference to fig. 7, as an implementation of the method shown in the foregoing drawings, the present application provides an embodiment of a device for predicting crowd flow in an evacuation channel, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device may be specifically applied to various electronic devices.
As shown in fig. 7, the prediction apparatus 700 for crowd flow in an evacuation channel according to the present embodiment includes: an acquisition unit 701, an estimation unit 702, and a determination unit 703. The acquisition unit is configured to acquire environment information, toxic gas information and crowd information of the target long and large tunnel; the estimation unit is configured to input the acquired environment information, toxic gas information and crowd information into an estimation model of crowd outflow of the long and large tunnel under a pre-constructed toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environment information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel; and the determining unit is configured to determine the output of the estimation model as the crowd outflow volume of the target long and large tunnel in the toxic gas leakage scene.
In this embodiment, the specific processing of the obtaining unit 701, the estimating unit 702, and the determining unit 703 of the predicting device 700 for the evacuation channel crowd flow may refer to step 201, step 202, and step 203 in the corresponding embodiment of fig. 2.
In some optional implementations of the present embodiment, the apparatus further comprises a simulation unit configured to obtain a dataset from which the estimation model is constructed by: establishing a simulation model of a target long and large tunnel and a toxic gas evolution model; obtaining toxic gas evolution parameters based on a toxic gas evolution model; calculating the motion speed of the simulation object in the simulation model according to the toxic gas evolution parameters; and adding the simulation object into the simulation model for simulation to obtain a data set.
In some optional implementations of this embodiment, the environmental information includes wind speed, the toxic gas information includes toxic gas concentration and a toxic gas risk coefficient, the risk coefficient characterizes a risk degree of toxic gas corresponding to a dangerous chemical, and the crowd information includes a movement speed of a crowd under normal conditions; and a simulation unit further configured to: calculating the motion speed of the simulation object in the simulation model by the following formula:
wherein v is the motion speed of the crowd, w represents the wind speed, c represents the concentration of toxic gas, c 0 represents the background concentration when no toxic gas leaks, v 0 represents the motion speed of the crowd under normal conditions, e is the natural base number, k represents the resistance coefficient suffered by the crowd in the motion process, g represents the toxic gas risk coefficient, and g 0 represents the reference risk coefficient.
In some optional implementations of the present embodiment, the apparatus further comprises a construction unit configured to construct the estimation model by: determining the number of nodes of an input layer and the number of nodes of an output layer of the neural network according to the number of the input features and the number of the output features; defining the number of hidden layer layers to be 1 according to the Kolmogorov theorem, and determining the number of hidden layer nodes according to the following formula:
Wherein n 1 is the number of hidden layer nodes, n is the number of input layer nodes, m is the number of output layer nodes, and a is a constant; and establishing a BP neural network, determining a neuron activation function and configuring network parameters.
In some optional implementations of the present embodiment, the building unit is further configured to: the activation function used by each layer of the BP neural network is determined as follows:
/>
Wherein tansig functions are hyperbolic tangent functions, x represents the value input to the activation function, e is a natural base, and purelin functions are linear functions; setting a neural network forward propagation formula:
Wherein x i is input variable, y is output variable, u is output of hidden layer neuron, f is mapping relation of activation function, v ij is weight of ith input variable and jth hidden layer neuron, and is hidden layer First/>Threshold of individual neurons.
In some optional implementations of the present embodiment, the building unit is further configured to: optimizing a BP neural network based on a crayfish optimization algorithm; and training and verifying the optimized BP neural network according to training samples and verification samples for constructing the data set division of the estimation model to obtain the estimation model.
In some alternative implementations of the present embodiment, the construction unit is further configured to perform an initialization phase of the crayfish optimization algorithm, the initialization phase comprising the steps of: setting parameters of a crayfish optimization algorithm, determining population quantity and setting maximum iteration times; obtaining boundary information and dimensions of a corresponding test function; defining a fitness function as a root mean square error of an estimated model output value and a true value; initializing a population based on the boundary information:
wherein, Is the initial population position,/>Is population number,/>Is the population dimension,/>Is the position of individual i in the j dimension, calculated as follows:
Wherein, therein Represents the lower bound of the j-th dimension,/>Represents the upper bound of the j-th dimension,/>Is a random number.
In some alternative implementations of the present embodiment, the construction unit is further configured to perform an optimization phase of the crayfish optimization algorithm, in which each crayfish is a1 xdim matrix, each column matrix representing a set of weights and thresholds Hou Xuanjie of the neural network, the optimization phase comprising the steps of: the ambient temperature of the crayfish was determined according to the following formula:
wherein, Representing the temperature of the environment in which the crayfish is located; when/> > 30,/>When the temperature is less than 0.5, the crayfish optimizing algorithm enters a summer-heat prevention stage, and in the summer-heat prevention stage, the crayfish optimizing algorithm is used for optimizing the crayfish according to the position of the cave (/ >)) And crayfish position (/ >)) Obtaining a new location/>The location update formula is:
wherein, Representing the current iteration number,/>Representing the next generation iteration number,/>Is a decreasing curve, and the formula is: /(I)Wherein/>Represents the maximum iteration number, the position of the cave/>The definition is as follows: Wherein/> Representing the optimal position obtained so far by the number of iterations,/>Representing the optimal position of the current population; when/>> 30,/>When the ratio is more than or equal to 0.5, the crayfish optimization algorithm enters a competition stage, wherein two crayfishes compete for a cave according to the following formula and according to the position of the cave (/ >)) And the positions of two lobsters,/>) Obtain a new position/>
Wherein,A random individual of crayfish is represented by the formula:
When (when) When the food intake is less than or equal to 30, the crayfish optimization algorithm enters a foraging stage, and food intake/>The formula is as follows:
wherein, Is the most suitable temperature for crayfish,/>And/>Is used for controlling the intake of crayfish at different temperatures,Representing a natural exponential function; food size/>The formula is as follows:
wherein, Is a food factor representing the largest food, with a value of constant 3,/>Representing the fitness value of the ith crayfish,/>A fitness value representing a food location; if/>Then according to the formula: The food is chopped and a new position is obtained according to the following formula:
wherein, ,/>Is a cosine function,/>Is a sinusoidal function; if/>The new position is obtained according to the following formula:
Evaluating the population and determining whether to exit the period, if the population does not reach the optimal fitness, continuing to perform iterative computation of the optimization stage; if the population reaches the optimal fitness, iteration is completed, and an optimal solution obtained by the crayfish optimization algorithm is assigned to a weight and a threshold of the BP neural network to obtain the BP neural network after optimization.
In some alternative implementations of the present embodiment, the input features of the estimation model are determined based on the steps of: creating a long tunnel model and a physical model describing the evolution process of toxic gas in a simulation platform; setting alternative parameters in a simulation platform; solving the physical model by using a solver of the simulation platform; and analyzing the solving result by using a visualization tool provided by the simulation platform, and extracting main parameters affecting crowd movement from the alternative parameters as input features.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing a server or terminal of an embodiment of the present application. The server or terminal illustrated in fig. 8 is merely an example, and should not be construed as limiting the functionality and scope of use of the embodiments of the present application.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components may be connected to the I/O interface 805: including an input portion 806 such as a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the method of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 801. It should be noted that the computer readable medium according to the present application may be a computer readable signal medium or a computer readable medium, or any combination of the two. The computer readable medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the C-language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented in software or in hardware. The described units may also be provided in a processor, for example, described as: a processor includes an acquisition unit, an estimation unit, and a determination unit. The names of these units do not constitute a limitation on the unit itself in some cases, and for example, the acquisition unit may also be described as "a unit configured to acquire environmental information, toxic gas information, and crowd information of a target long and large tunnel".
As another aspect, the present application also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring environment information, toxic gas information and crowd information of a target long and large tunnel; inputting the acquired environmental information, toxic gas information and crowd information into a pre-constructed estimation model of crowd outflow of a long and large tunnel in a toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environmental information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel; and determining the output of the estimation model as crowd outflow of the target long and large tunnel in the toxic gas leakage scene.
The above description is only illustrative of the preferred embodiments of the present application and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the application referred to in the present application is not limited to the specific combinations of the technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the inventive concept described above. Such as the above-mentioned features and the technical features disclosed in the present application (but not limited to) having similar functions are replaced with each other.

Claims (10)

1. The method for predicting the crowd flow of the evacuation channel is characterized by comprising the following steps:
Acquiring environment information, toxic gas information and crowd information of a target long and large tunnel;
Inputting the acquired environmental information, toxic gas information and crowd information into a pre-constructed estimation model of crowd outflow of a long and large tunnel in a toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environmental information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel;
and determining the output of the estimation model as crowd outflow of the target long and large tunnel in the toxic gas leakage scene.
2. The method according to claim 1, characterized in that the dataset for constructing the estimation model is obtained by:
establishing a simulation model of the target long and large tunnel and a toxic gas evolution model;
Obtaining toxic gas evolution parameters based on the toxic gas evolution model;
calculating the motion speed of a simulation object in the simulation model according to the toxic gas evolution parameter;
and adding the simulation object into the simulation model to simulate, so as to obtain the data set.
3. The method of claim 2, wherein the environmental information comprises wind speed, the toxic gas information comprises toxic gas concentration and a toxic gas risk coefficient, the risk coefficient characterizes a risk level of toxic gas corresponding to dangerous chemicals, and the crowd information comprises a movement speed of a crowd under normal conditions; the calculating the motion speed of the simulation object in the simulation model according to the toxic gas evolution parameter comprises the following steps:
Calculating the motion speed of a simulation object in the simulation model through the following formula:
Wherein v is the motion speed of the crowd, w represents the wind speed, c represents the concentration of toxic gas, c 0 represents the background concentration when no toxic gas leaks, v 0 represents the motion speed of the crowd under normal conditions, e is a natural base number, k represents the resistance coefficient suffered by the crowd in the motion process, g represents the toxic gas risk coefficient, and g 0 represents the reference risk coefficient;
the outflow of the tunnel crowd, namely the number of people passing through the cross section of the tunnel outlet in unit time and unit width;
and setting the motion speed of the simulation object in the simulation model according to a formula calculation result, and simulating the motion condition of the crowd in the toxic gas leakage scene to obtain the data set.
4. The method of claim 1, wherein the step of constructing the estimation model comprises:
Determining the number of nodes of an input layer and the number of nodes of an output layer of the neural network according to the number of the input features and the number of the output features;
Defining the number of hidden layer layers to be 1 according to the Kolmogorov theorem, and determining the number of hidden layer nodes according to the following formula:
Wherein n 1 is the number of hidden layer nodes, n is the number of input layer nodes, m is the number of output layer nodes, and a is a constant;
and establishing a BP neural network, determining a neuron activation function and configuring network parameters.
5. The method of claim 4, wherein establishing a BP neural network, determining a neuron activation function, and configuring network parameters comprises:
the activation function used by each layer of the BP neural network is determined as follows:
Wherein tansig functions are hyperbolic tangent functions, x represents the value input to the activation function, e is a natural base, and purelin functions are linear functions;
Setting a neural network forward propagation formula:
Wherein x i is an input variable, y is an output variable, u is the output of the hidden layer neuron, f is the mapping relation of the activation function, v ij is the weight of the ith input variable and the jth hidden layer neuron, To hide layer/>First/>Threshold of individual neurons,/>For the j-th neuron to y-connected weight,/>To hide the output of layer neurons,/>And the offset is y, and m is the number of hidden layers.
6. The method of claim 5, wherein the step of constructing the estimation model further comprises:
optimizing the BP neural network based on a crayfish optimization algorithm, wherein the method comprises the following steps of:
initializing a population: in the crayfish optimization algorithm, the weight and the threshold value of the BP neural network are expressed as individuals, a population is initialized, and each individual represents the weight and the threshold value of the BP neural network;
calculating the fitness: for each individual, training the training data by using a BP neural network, and calculating the fitness of the training data, wherein the fitness is a root mean square error function of an estimated model output value and a true value;
selection operation: according to the fitness function, selecting individuals to perform crossing and mutation operations, which are similar to foraging, competition and sunstroke prevention actions of crayfish, and helping to find better weight and threshold combination;
updating the neural network parameters: updating the weight and the threshold of the neural network according to the result of the crayfish optimization algorithm;
Iterative training: repeating the steps, and iteratively performing training and parameter optimization of the neural network until a preset stopping condition is reached;
and training and verifying the optimized BP neural network according to training samples and verification samples for constructing the data set division of the estimation model to obtain the estimation model.
7. The method of claim 6, wherein the optimizing the BP neural network based on the crayfish optimization algorithm comprises an initialization phase of the crayfish optimization algorithm, the initialization phase comprising the steps of:
setting parameters of a crayfish optimization algorithm, determining population quantity and setting maximum iteration times;
obtaining boundary information and dimensions of a corresponding test function;
Defining a fitness function as a root mean square error of an estimated model output value and a true value;
initializing a population based on the boundary information:
wherein, Is the initial population position,/>Is population number,/>Is the population dimension,/>Is the position of individual i in the j dimension, calculated as follows:
Wherein, therein Represents the lower bound of the j-th dimension,/>Represents the upper bound of the j-th dimension,/>Is a random number.
8. The method of claim 7, wherein the optimization of the BP neural network based on a crayfish optimization algorithm includes an optimization phase of the crayfish optimization algorithm in which each crayfish is a1 xdim matrix, each column matrix representing a set of weights and thresholds for the neural network Hou Xuanjie, the optimization phase comprising the steps of:
The ambient temperature of the crayfish was determined according to the following formula:
wherein, Representing the temperature of the environment in which the crayfish is located;
When (when) > 30,/>< 0.5, The crayfish optimization algorithm enters a sunstroke phase, in which the crayfish optimization algorithm is based on the cave location (/ >)) And crayfish position (/ >)) Obtaining a new location/>The location update formula is:
wherein, Representing the current iteration number,/>Representing the next generation iteration number,/>Is a decreasing curve, and the formula is: Wherein/> Represents the maximum iteration number, the position of the cave/>The definition is as follows: Wherein/> Representing the optimal position obtained so far by the number of iterations,/>Representing the optimal position of the current population;
When (when) > 30,/>When 0.5 is not less than, the crayfish optimization algorithm enters a competition phase in which two crayfish will compete for a cavity according to the following formula, according to the cavity location (/ >)) And the position of two lobsters (/ >),/>) Obtain a new position/>
Wherein,A random individual of crayfish is represented by the formula:
When (when) At < 30, the crayfish optimization algorithm enters the foraging stage, in which food intake/>The formula is as follows:
wherein, Is the most suitable temperature for crayfish,/>And/>Is used for controlling the intake of crayfish at different temperatures,/>Representing a natural exponential function;
food size The formula is as follows:
wherein, Is a food factor representing the largest food, with a value of constant 3,/>Representing the fitness value of the ith crayfish,/>A fitness value representing a food location;
If it is Then according to the formula: /(I)The food is chopped and a new position is obtained according to the following formula:
wherein, ,/>Is a cosine function,/>Is a sinusoidal function;
If it is The new position is obtained according to the following formula:
Evaluating the population and determining whether to exit the period, if the population does not reach the optimal fitness, continuing to perform iterative computation of the optimization stage;
and if the population reaches the optimal fitness, finishing iteration, and assigning the optimal solution obtained by the crayfish optimization algorithm to the weight and the threshold of the BP neural network to obtain the optimized BP neural network.
9. The method of claim 1, wherein the input features of the estimation model are determined based on:
creating a long tunnel model and a physical model describing the evolution process of toxic gas in a simulation platform;
Setting alternative parameters in the simulation platform;
Solving the physical model by using a solver of the simulation platform;
And analyzing the solving result by using the visualization tool provided by the simulation platform, and extracting main parameters affecting crowd movement from the alternative parameters as input features.
10. A predictive device for crowd flow in an evacuation channel, comprising:
the acquisition unit is configured to acquire environment information, toxic gas information and crowd information of the target long and large tunnel;
the estimation unit is configured to input the acquired environment information, toxic gas information and crowd information into an estimation model of crowd outflow of the long and large tunnel under a pre-constructed toxic gas leakage scene, wherein the estimation model is used for representing the corresponding relation between the environment information, the toxic gas information and crowd information of the long and large tunnel and the crowd outflow of the long and large tunnel;
and the determining unit is configured to determine the output of the estimation model as the crowd outflow volume of the target long and large tunnel in the toxic gas leakage scene.
CN202410524045.2A 2024-04-29 Prediction method and device for crowd flow of evacuation channel Pending CN118114887A (en)

Publications (1)

Publication Number Publication Date
CN118114887A true CN118114887A (en) 2024-05-31

Family

ID=

Similar Documents

Publication Publication Date Title
US20210383041A1 (en) In-situ thermodynamic model training
Khajavi et al. Predicting the carbon dioxide emission caused by road transport using a Random Forest (RF) model combined by Meta-Heuristic Algorithms
Jiang et al. Prediction of house price based on the back propagation neural network in the keras deep learning framework
Ajdari et al. An adaptive exploration-exploitation algorithm for constructing metamodels in random simulation using a novel sequential experimental design
Jalalkamali Using of hybrid fuzzy models to predict spatiotemporal groundwater quality parameters
JP6749282B2 (en) Human flow rate prediction device, human flow rate prediction method, and human flow rate prediction program
CN112632351B (en) Classification model training method, classification method, device and equipment
Singh et al. Early-stage design support combining machine learning and building information modelling
CN114021501A (en) Fire temperature field reconstruction method, system, computer equipment, medium and terminal
Benedini Water quality models for rivers and streams. State of the art and future perspectives
US8670782B2 (en) Systems and methods for analyzing spatiotemporally ambiguous events
Prado et al. Bayesian additive regression trees with model trees
WO2017071369A1 (en) Method and device for predicting user unsubscription
Tian et al. Fast and self-learning indoor airflow simulation based on in situ adaptive tabulation
CN115964668A (en) Heat supply monitoring analysis method, device, equipment and medium based on big data
Robati et al. Inflation rate modeling: Adaptive neuro-fuzzy inference system approach and particle swarm optimization algorithm (ANFIS-PSO)
CN116684330A (en) Traffic prediction method, device, equipment and storage medium based on artificial intelligence
Zhang et al. Integration of neural network and fuzzy logic decision making compared with bilayered neural network in the simulation of daily dew point temperature
Signer et al. Simulating animal space use from fitted integrated Step‐Selection Functions (iSSF)
Ling et al. Predicting the temperature dynamics of scaled model and real-world IoT-enabled smart homes
JPWO2019069865A1 (en) Parameter estimation system, parameter estimation method and parameter estimation program
Hart et al. Accuracy and power analysis of social networks built from count data
CN118114887A (en) Prediction method and device for crowd flow of evacuation channel
Shrestha et al. Encapsulation of parametric uncertainty statistics by various predictive machine learning models: MLUE method
CN114925938A (en) Electric energy meter running state prediction method and device based on self-adaptive SVM model

Legal Events

Date Code Title Description
PB01 Publication