Police force allocation method and system based on connected graph and improved simulated annealing algorithm

CN117252370BActive Publication Date: 2026-10-27HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311224657.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-21
Publication Date
2026-10-27
Estimated Expiration
2043-09-21

Smart Images

  • Figure CN117252370B_ABST
    Figure CN117252370B_ABST
Patent Text Reader

Abstract

The application discloses a police force distribution method and system based on a connected graph and an improved simulated annealing algorithm. A police force responsibility area division model based on a connected graph is constructed; a depth-first search algorithm is used to determine the connectivity of the responsibility area; a genetic mechanism is introduced to generate a new responsibility area distribution scheme; and an improved simulated annealing algorithm is used to solve and generate an optimal responsibility area distribution scheme. The application divides the police force distribution responsibility area, and the division of the responsibility area is more reasonable, and the distribution of prone points in the area is more uniform, so that the distribution of police resources is more fair and reasonable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of resource allocation technology, specifically relating to a police force allocation method and system based on connected graphs and an improved simulated annealing algorithm. Background Technology

[0002] The development level of an urban transportation system is an important indicator for judging the urbanization level of a city. With the continuous development of my country's economy and society, the urbanization level and population size of cities are constantly increasing, bringing enormous pressure to urban traffic management. The contradiction between the lack of traffic police resources and urban road traffic congestion is intensifying, making the scientific, standardized, and refined management of traffic services a top priority for improving the management level and work efficiency of traffic management departments.

[0003] Currently, police resource allocation primarily relies on manual methods, where personnel allocate resources based on the magnitude of influencing factors in different areas and their own work experience. However, this method lacks a proper analysis of police force ratios. Given limited resources, there is a lack of reliable tools to assess the rationality of current police force ratios in different areas, leading to ineffective resource allocation. Furthermore, when the area of ​​responsibility exceeds a certain limit, manual allocation becomes computationally intensive and may overlook some areas, making it impossible to achieve a completely scientific and rational approach.

[0004] The construction of a modern intelligent management system plays a vital role in traffic duty management. To alleviate the shortage of traffic police resources and to efficiently monitor urban road traffic conditions, an intelligent algorithm is needed to assist in the rational allocation of police resources in a specific area. Summary of the Invention

[0005] To overcome the irrationality of existing manual allocation of police resources, this invention discloses a police resource allocation method and system based on connected graphs and an improved simulated annealing algorithm. Given the average annual number of police incidents and average annual pedestrian traffic at accident-prone locations within the jurisdiction, the actual situation is analyzed to determine the optimization objective and constraints of the model. A corresponding nonlinear programming model is established, and a connected graph model is introduced to ensure the connectivity of the responsibility area. The number of disconnected points during the iteration process is recorded. The mutation probability function is improved through a connectivity factor, and the cooling process of the simulated annealing algorithm is improved for approximate solution, resulting in a responsibility area division model under special conditions.

[0006] To address the problems of the prior art, the technical solution of the present invention includes the following steps:

[0007] In a first aspect, the present invention provides a police force allocation method based on connected graphs and an improved simulated annealing algorithm, characterized in that the method includes the following steps:

[0008] Step (1): Construct a police responsibility area division model based on a connected graph:

[0009] Step (2): Use the depth-first search algorithm to determine the connectivity of the region of responsibility;

[0010] Step (3): Introduce a genetic mechanism to generate a new scheme for the allocation of responsibility areas;

[0011] Step (4): Use the improved simulated annealing algorithm to solve for the optimal responsibility area allocation scheme;

[0012] Secondly, the present invention provides a police force allocation system, comprising:

[0013] The police responsibility zone division module utilizes a police responsibility zone division model based on connected graphs to divide police responsibility zones.

[0014] The responsibility region connectivity identification module uses a depth-first search algorithm to determine the connectivity of the responsibility region.

[0015] The first computational module introduces a genetic mechanism to generate a new scheme for allocating responsibility regions;

[0016] The second calculation module uses an improved simulated annealing algorithm to solve for and generate the optimal responsibility area allocation scheme.

[0017] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the above-described method.

[0018] Fourthly, the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the above-described method.

[0019] The present invention has the following advantages:

[0020] 1. This invention features rapid and efficient iteration, resulting in faster acquisition of optimal responsibility region partitioning solutions.

[0021] (1) This invention introduces a two-sided annealing factor. In the later stage of iteration, the annealing cooling process is adjusted according to the two-sided annealing factor around the relatively stable responsibility region solution, so that the temperature converges faster in the later stage of iteration and the optimal solution is more easily obtained.

[0022] (2) Compared with the prior art, the method of the present invention significantly speeds up the process of dividing responsibility areas and improves the efficiency of police resource allocation.

[0023] 2. Accelerate the acquisition of optimal responsibility region partitioning solutions and reduce the risk of getting stuck in disconnected situations.

[0024] (1) This invention constructs a non-connectivity reduction coefficient, which reduces the annealing probability for various non-connectivity situations and effectively reduces the impact of non-connectivity regions on partitioning. A mutation mechanism is introduced to construct a connectivity factor, and an adaptive mutation probability function is generated based on the individual connectivity factor. This can well preserve the excellent genes of the parent, avoid getting stuck in local non-connectivity during the partitioning process, and make it easier to generate high-quality responsibility region partitioning solutions.

[0025] (2) By dividing the responsibility area through the present invention, the division of responsibility area is more reasonable, the distribution of the prone points in the area is more even, and the allocation of police resources is more fair and reasonable. Attached Figure Description

[0026] Figure 1 This is an overall flowchart of the method of the present invention.

[0027] Figure 2 A flowchart for constructing a new solution for the division of responsibility areas.

[0028] Figure 3 This is a flowchart of the simulated annealing algorithm.

[0029] Figure 4 This refers to the sampling process.

[0030] Figure 5 This is a schematic diagram of the jurisdiction.

[0031] Figure 6 A schematic diagram of the region division results when k=3.

[0032] Figure 7 A schematic diagram of the region division results when k=4.

[0033] Figure 8 This is a comparison chart of experimental results for different algorithms.

[0034] Terminology Explanation

[0035] A connected graph is an undirected graph in which every two vertices are connected by a path. In this invention, it means that every two vulnerable vertices within the same region of responsibility are connected. Specific implementation methods

[0036] The following will further explain, with reference to the accompanying drawings, a police responsibility area allocation strategy based on connected graphs and simulated annealing algorithm provided by the present invention.

[0037] A method for allocating police responsibility zones based on connected graphs and an improved simulated annealing algorithm, such as... Figure 1 Specifically, the following steps are included:

[0038] A police force allocation method based on connected graphs and an improved simulated annealing algorithm, characterized by the following steps:

[0039] Step 1: Construct a police responsibility area division model based on a connected graph;

[0040] Step 1.1: Construct a police responsibility zone division matrix;

[0041] The overall division of the jurisdiction, X, is represented as follows:

[0042]

[0043]

[0044] Where X i =(x i1 ,x i2 ,…,x in ) represents the accident-prone points contained in the i-th responsibility area, x ij This indicates the case where the j-th accident-prone point is assigned to the i-th responsibility area; k is the total number of responsibility areas, and the value of k ranges from (0, n], where n is the total number of accident-prone points;

[0045] Step 1.2: Construct the sum of police reports and average annual pedestrian traffic at accident-prone areas within the responsibility zone; specifically:

[0046] Let the historical average annual number of police incidents (A) and average annual pedestrian traffic (R) at n accident-prone locations be represented as follows:

[0047] A=∑A j (3)

[0048] R = ∑R j (4)

[0049] Among them, A j ,R j (j∈[1,n]) represent the historical police incident data and average annual pedestrian flow of the j-th accident-prone location, respectively;

[0050] The sum of alarm incidents at accident-prone locations included in the i-th responsibility area:

[0051]

[0052] Therefore, the sum of the number of police reports at accident-prone points in the area of ​​responsibility, B A as follows:

[0053] B A = (B A1 B A2 ,…,B AK )=XA (6)

[0054] The sum of the average annual population flow in the i-th responsibility area:

[0055]

[0056] Therefore, the sum of the average annual foot traffic B R as follows:

[0057] B R = (B R1 B R2 ,…,B RK )=XR (8)

[0058] Where A j ,R j (j∈[1,n]) represent the historical police incident data and average annual pedestrian flow of the j-th accident-prone location, respectively;

[0059] Step 1.3: Construct the weighting function;

[0060] Calculate the average annual total number of police incidents in history The value is divided into k equal parts and its overall standard deviation σ A :

[0061]

[0062] Where A i This represents the historical average number of police incidents per year for the i-th responsibility area, where k is the total number of responsibility areas;

[0063] Calculate the average annual foot traffic The value is divided into k equal parts and its overall standard deviation σ R :

[0064]

[0065] Where R i This represents the average annual pedestrian traffic data for the i-th responsibility area;

[0066] The weighting function is:

[0067]

[0068] Where α is the weighting coefficient for the historical average annual number of police incidents, β is the weighting coefficient for the historical average annual pedestrian flow, and S is the final optimized weighting function.

[0069] Step 1.4 Construct constraints;

[0070] (1) Single partitioning constraint

[0071]

[0072] Where x ij This indicates the case where the j-th accident-prone point is assigned to the i-th responsibility area;

[0073] (2) Connectivity constraints of responsibility area

[0074] δ=k (13)

[0075] Where δ represents the number of connected components included in the partitioning method, and k is the number of responsibility regions;

[0076] (3) Minimize responsibility region constraint

[0077]

[0078] (4) Constraints on the division of accident-prone areas

[0079] x ij ∈[0,1],i∈[1,k],j∈[1,n] (15)

[0080] Step 1.5: Construct a police responsibility zone division model:

[0081]

[0082]

[0083] Where A represents the historical annual average number of police incidents at n accident-prone locations; This indicates the historical average annual total number of police incidents. The value is divided into k equal parts; R represents the average annual pedestrian flow at n accident-prone locations; Indicates average annual foot traffic The value is divided into k equal parts; δ represents the number of connected components included in the partitioning method;

[0084] Step 2: Use the depth-first search algorithm to determine the connectivity of the region of responsibility;

[0085] Step 2.1: Construct the accident-prone point marking matrix M;

[0086] Number the accident-prone points on the map, construct an accident-prone point marking matrix M based on the actual locations of the accident-prone points on the map and the relative positional relationships between the accident-prone points; and denote the elements corresponding to the missing accident-prone point positions in matrix M as infinity;

[0087]

[0088] The total number of non-infinite elements in matrix M is n. m ab ∈{1,2,...,k}, a∈[1,m], b∈[1,m], indicating that the corresponding accident-prone point is assigned to the m-th node. ab Each area is a responsibility zone; based on the division of jurisdiction X, if x ij=1, then the accident-prone point numbered j is in element m of M. ab =i;

[0089] Step 2.2: Depth-first search matrix M;

[0090] Step 2.2.1: Initialize matrix M to determine the starting point, and use the starting point as the probe point;

[0091] Step 2.2.2: Starting from the detection point, according to the constraints of the police responsibility area division model, detect whether it is a feasible point in one direction (up, down, left, and right in sequence). A feasible point must satisfy the following conditions: its element value is equal to the element value of the detection point and the point has not been detected. If it is a feasible point, update the feasible point to a detection point. If it is not a feasible point, continue to detect in the next direction. If all detection directions of the detection point are infeasible points, return to the previous detection point and search for the remaining undetected directions of the point. Repeat step 2.2.2 until all search directions of all detected points are either detected points or infeasible points. At this point, it is considered that the current responsibility area has been detected and step 2.3 is executed.

[0092] Step 2.3: Determine the connectivity of the responsibility area

[0093] Determine whether each responsibility area meets the requirements. count i This represents the number of detection points within the i-th responsibility area. If so, the current responsibility area is connected, and step 2.4 is executed; otherwise, the current responsibility area is considered disconnected, and the number of disconnected accident-prone points is calculated according to formula (12):

[0094]

[0095] Where count i Let be the number of connected points explored in the i-th responsibility region;

[0096] Step 2.4: Determine whether all accident-prone points on the map have been traversed. If yes, end the search; otherwise, continue searching for the next responsibility area (initialize another starting point) and execute Step 2.2.

[0097] Step 3: Introduce genetic mechanisms to generate a responsibility region allocation scheme, see... Figure 2 ;

[0098] Step 3.1: Initialize the genetic probability γ and generate a random number rd; if rd ≥ γ, proceed to step 3.2 to generate a new solution; if rd < γ, proceed to step 3.3 to generate a new solution.

[0099] Step 3.2: Generate a new solution X' according to the principle of "reversing the middle or reversing both ends". Randomly generate two numbers a and b in the interval [1,n]; a, b≤n

[0100] Step 3.2.1: When a <b:

[0101] By using the reverse middle principle, keeping the order of column 1 to column a-1 and column b+1 to column n unchanged, and reversing the order of column a to column b, we obtain a new solution X'.

[0102]

[0103] Step 3.2.2: When a ≥ b:

[0104] By reversing the order of both ends, keeping the order of column a to column b unchanged, we reverse the order of column 1 to column b-1 and column a+1 to column n to obtain a new solution X'.

[0105]

[0106] Step 3.3: Update X' using the mutation mechanism

[0107] Step 3.3.1: Introduce the connectivity factor fitness

[0108]

[0109] Where nonpoint represents the number of non-connected points in the partitioning case;

[0110] Step 3.3.2: Construct the mutation probability P m

[0111]

[0112] Where μ is a constant factor between (0,1); P mmax It is the upper limit of the given mutation probability, and fitness is the connectivity factor;

[0113] Step 3.3.3: Perform the mutation operation to update X':

[0114] Randomly generate d∈[0,1];

[0115] When d≤P m Randomly generate a number c∈[1,n], and set X... i Swap any element with a value of 1 in the c-th column with any element with a value of 0 in the c-th column, and update the solution X'.

[0116]

[0117] When d > P m Do not update X';

[0118] Step 4: Use the improved simulated annealing algorithm to generate the optimal responsibility area allocation scheme, see... Figure 3 ;

[0119] Step 4.1: Construct a simulated annealing solution model

[0120] According to the Metropolis criterion, if the weighting function is considered as a particle, the probability that the particle tends to stabilize at temperature T is:

[0121]

[0122] λ=e -τ

[0123] ΔS=S new -S (26)

[0124] Where λ is the non-connectivity reduction coefficient, temperature T is a control parameter, and ΔS is the difference between the weighting function of the new responsibility area division and the previous responsibility area division. new S is the solution for the new responsibility region partitioning, S is the solution for the previous responsibility region partitioning during the iteration process, and τ is the number of non-connected responsibility region partitioning solutions during the process of generating a new solution through local sampling.

[0125] Step 4.2: Initialize maxg, maxstep1, and maxstep2, where maxg represents the descent coefficient, maxstep1 represents the local stability upper limit, and maxstep2 represents the global stability upper limit.

[0126] Step 4.3: Initialization: Iteration count I = 0, annealing temperature T I =T0, where T0 represents the initial temperature and T represents the current annealing temperature. I The global solution X is divided into the next feasible responsibility region. I =X, the best solution for the optimal responsibility region partitioning is X. I The number of times the current global optimal solution is accepted is ψ = 0;

[0127] Step 4.4: Perform annealing sampling, see... Figure 3

[0128] Step 4.4.1: Sampling initialization, set the local sampling iteration number u = 0, and the sampling responsibility area division solution X. 0 (u)=X I The optimal solution for sampling responsibility area partitioning is Best_=Best, the number of consecutive rejections of new solutions is nonrev=0, the number of consecutive acceptances of new solutions is accept_num=0, the number of solutions for partitioning locally sampled non-connected responsibility areas is τ=0, and the number of non-connected accident-prone points is nonpoint=0.

[0129] Step 4.4.2: In the current partition solution X 0 A new solution X' is generated near (u) according to step 3. X' is determined to be connected within the responsibility region through step 2, and the nonpoint is updated using formula (12). If it is connected within the responsibility region, the weight partitioning function value S(X') is calculated according to formula (5). new =S(X'), and then obtain ΔS according to formula (16), update τ=0, and execute step 4.4.3; if the responsibility region is not connected, update the number of solutions for the locally sampled not connected responsibility region τ=τ+1, and repeat step 4.4.2;

[0130] Step 4.4.3: Calculate the annealing stationarity probability P according to Metropolis criterion (15), and randomly generate a random number γ that follows a uniform distribution on the interval [0,1].

[0131] Step 4.4.4: Determine whether to accept the current responsibility region division solution; specifically:

[0132] If P=1, then directly accept the new scheme X' for the responsibility area allocation, update u=u+1, X°(u)=X', Best_=X°(u), accept_num=accept_num+1, nonrev=0, exit sampling, and proceed to step 4.4.6;

[0133] If γ≤P and P is not equal to 1, then accept the new scheme X' for the responsibility area allocation, update u=u+1, X°(u)=X', Best_=X°(u), accept_num=0, exit sampling, and proceed to step 4.4.6;

[0134] If γ > P, then the new scheme X' for assigning responsibility area is not accepted, X°(u+1) = X°(u), update u = u+1, accept_num = 0, nonrev = nonrev+1, and proceed to step 4.4.5;

[0135] Step 4.4.5: If nonrev ≥ maxstep1, go to step 4.4.6; otherwise, go to step 4.4.2.

[0136] Step 4.4.6: Using X I+1 =X 0 (u) represents the current responsibility area division solution;

[0137] Step 4.5: If S(Best)≤S(Best_), then let ψ=ψ+1; otherwise, let Best=Best_, ψ=0;

[0138] Step 4.6: Update

[0139]

[0140] in The two-sided annealing factor is given by maxg, which is the decrease coefficient.

[0141] Step 4.7: Determine whether ψ≥maxstep2 is satisfied. If yes, output the optimal responsibility area division solution Best and allocate police force according to the final responsibility area division solution Best; otherwise, update I=I+1 and go to step 4.3.

[0142] Implementation Cases

[0143] Based on the present invention, relevant parameters are set. For a jurisdiction with n=25 traffic accident-prone points, and the annual average number of police incidents and population of each traffic accident-prone point in the jurisdiction are known, the police responsibility area of ​​this area is divided so that the annual average number of police incidents of traffic accident-prone points in the divided k=3 police responsibility areas is as balanced as possible.

[0144] Following step 1, first construct a responsibility area division and optimization model based on a connected graph. Then, based on the known alarm vectors A of accident-prone points within the jurisdiction and the pedestrian flow R, draw a schematic diagram of the jurisdiction (e.g., Figure 5 The historical average annual total number of police incidents is calculated and divided into k=3 parts. Average population is Tens of thousands of people. Initialize the jurisdictional division matrix X, and calculate the accident-prone points x in each responsibility area. i Then the sum of the number of incidents B in each area of ​​responsibility can be calculated. Ai Traffic volume B Ri Then, S is obtained according to the objective optimization function, the number of connected components δ = 3, and finally a nonlinear programming model is constructed.

[0145] Following step 2, a marker matrix M is established based on the partitioning matrix X and the locations of accident-prone points on the map. Then, a depth-first search algorithm is used to search for the number of identical elements (count) around each element in matrix M. This is used to determine if the constraints are met. If count equals the number of accident-prone areas in the corresponding responsibility area of ​​matrix X, the constraints are satisfied, and the process proceeds to the next part of the algorithm. Otherwise, the number of all disconnected points (nonpoints) is recorded. The partitioning matrix X is then adjusted according to step 3 to generate a new responsibility area partitioning scheme.

[0146] In the process of generating a new solution, the mutation probability γ is first set, and a number rd∈(0,1) is randomly generated. If rd<γ, a new solution X is generated according to the principle of "reversing the middle or reversing both ends". jBy generating random numbers a, b ∈ [1, n], a new solution is generated by reversing the order between or at both ends of a and b. If rd > γ, a mutation mechanism is used. The fitness factor is calculated based on the number of non-connected points (nonpoints), and an upper limit P for the mutation probability is set. mmax =0.8, constant μ=0.15, adjust the mutation probability according to the fitness of the new solution by generating random numbers d∈[0,1], if d≤P m Then perform the mutation operation.

[0147] Finally, the simulated annealing algorithm is used for cooling. The entire process is iterated according to step 4, with the initial temperature T0 = 1200, nonrev = accept_num = 0, and the feasible solution X0 being a randomly generated solution that meets the constraints. Maxstep1 = 15, maxstep2 = 8, and the descent coefficient maxg = 50 are set. In the first iteration, T = T0, and the solution is in the current state X... 0 A new state X is randomly generated near (k). 0 Calculate the corresponding objective function value S(X°), and obtain ΔS=S(X°). 0 )-S(X 0 (k)) Calculate the annealing stationarity probability P, and take a random value γ. If γ < P, accept the new solution and record the number of times the solution remains locally optimal during the annealing process; otherwise, reject the solution and record the number of consecutive locally bad solutions. Finally, determine convergence through maxstep1 and maxstep2.

[0148] Find the optimal partitioning scheme, and finally obtain Total number of police incidents in each responsibility area B A and Sum of squares of differences A =12.67, and total population B R and Sum of squared differences R =1.25, indicating that this division method results in a basically balanced number of incidents in the three responsibility areas, which meets the requirements for responsibility area division. To prove that the algorithm mentioned in this invention has good robustness and applicability, the jurisdiction is divided into responsibility areas with k=4. Figure 6 A schematic diagram of the region division results when k=3. Figure 7 A schematic diagram of the region division results when k=4.

[0149] Find the optimal partitioning scheme, and finally obtain The historical average annual total number of police incidents is divided into k=4 parts. Each responsibility area B A and Sum of squares of differences A =51, B R and Sum of squared differences R =5.03, indicating that this division method makes the number of police incidents in the four responsibility areas basically balanced, which is also a better solution that meets the requirements of responsibility area division.

[0150] To further compare the optimization of this invention for the regional division problem, the simulated annealing algorithm, genetic algorithm, and tabu search algorithm were used to divide the jurisdiction for comparison. The division results are shown in the figure. Compared with the genetic algorithm and tabu search algorithm, the simulated annealing algorithm converges faster and the difference in the total number of alarms in the finally converged area is smaller. The speed is improved by about 37%, and the final result is improved by about 14%. Figure 8 This is a comparison chart of experimental results for different algorithms.

[0151] The experimental results show that the method of the present invention can effectively shorten the calculation time compared with the traditional region division method, and at the same time greatly improve the accuracy and stability of the division.

[0152] The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

[0153] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A police force allocation method based on connected graphs and an improved simulated annealing algorithm, characterized in that... The method includes the following steps: Step (1): Construct a police responsibility area division model based on a connected graph: (1) (2) in This represents the historical annual average number of police incidents at n accident-prone locations; This indicates the historical average annual total number of police incidents. The value divided equally into k parts; This represents the average annual pedestrian flow at n accident-prone locations; Indicates average annual foot traffic The value divided equally into k parts; This indicates the number of connected components included in the partitioning method; This indicates the case where the j-th accident-prone point is assigned to the i-th responsibility area; k is the total number of responsibility areas, and n is the total number of accident-prone points; Step (2): Use the depth-first search algorithm to determine the connectivity of the region of responsibility; Step (3): Introduce a genetic mechanism to generate a new scheme for the allocation of responsibility areas; Step (4): Use the improved simulated annealing algorithm to generate the optimal responsibility area allocation scheme; specifically: Step 4.1: Construct a simulated annealing solution model; Step 4.2: Initialization ,in Represents the decrease coefficient. Represents the upper limit of local stability. Represents the upper limit of global stability; Step 4.3: Initialization: Iteration count I = 0, annealing temperature , Indicates the initial temperature and the current annealing temperature. Global solution for dividing the next feasible responsibility area =X, optimal responsibility area partitioning solution The number of times the current global optimal solution is accepted. ; Step 4.4: Perform annealing sampling; specifically: Step 4.4.1: Sampling initialization, set the number of local sampling iterations. Sampling responsibility area division solution Optimal solution for sampling responsibility area division Number of consecutive times a new solution is not accepted Number of consecutive new solutions accepted Number of solutions for partitioning disconnected responsibility regions by local sampling The number of non-connectivity accident-prone points is nonpoint=0; Step 4.4.2: In the current partition solution A new plan for the allocation of responsibility areas will be generated according to step (3). , After step (2), it is determined whether the responsibility area is connected, and the number of non-connectivity accident-prone points (nonpoints) is updated; if the responsibility area is connected, the weight partitioning function value is calculated. , This allows us to obtain the difference between the weighting function of the new responsibility area division and the previous responsibility area division. ,renew Proceed to step 4.4.3; if the responsibility region is not connected, update the number of locally sampled connected responsibility region partitions. Repeat step 4.4.2; Step 4.4.3: Calculate the annealing stationarity probability according to Metropolis criterion (3). Randomly generate a value in the interval Random numbers that follow a uniform distribution ; (3) Step 4.4.4: Determine whether to accept the current responsibility region division solution; specifically: if Then they will directly accept the new plan for the allocation of responsibility areas. ,update u=u+1, , , , Exit sampling and proceed to step 4.4.6; if and Then accept the new plan for the allocation of responsibility areas. ,update u=u+1, , , Exit sampling and proceed to step 4.4.6; if They will not accept the new plan for allocating responsibility areas. , , update u=u+1, , Proceed to step 4.4.5; Step 4.4.5: If Proceed to step 4.4.6; otherwise, proceed to step 4.4.

2. Step 4.4.6: with Solution for the current responsibility area division; Step 4.5: If , then let Conversely, it is ordered that... , ; Step 4.6: Update ; (4) in As a cooling regulator, The decreasing coefficient; Step 4.7: Determine if the condition is met. If so, output the optimal responsibility region partitioning solution. According to the final division of responsibility areas Allocate police resources; otherwise update. Proceed to step 4.

3.

2. The method according to claim 1, characterized in that... In the police responsibility zone division model, the case where the j-th accident-prone point is assigned to the i-th responsibility zone satisfies the following: (5) Therefore, the overall division of the jurisdiction, X, is represented as follows: (6) in This represents the accident-prone points included in the i-th responsibility area, where i = 1, 2, 3, ..., k; j = 1, 2, 3, ..., n.

3. The method according to claim 1, characterized in that... Step 2 specifically involves: Step 2.1: Construct an accident-prone point marker matrix ; Number the accident-prone points on the map, and construct an accident-prone point marking matrix M based on the actual locations of the accident-prone points on the map and the relative positional relationships between them; And denote the elements corresponding to the missing accident-prone points in matrix M as infinity; (7) Where the total number of non-infinite elements in matrix M is n, and m ≥ ; This indicates that the corresponding accident-prone point is classified into the first category. Each responsibility area; based on the jurisdictional division X, if... Then the accident-prone point numbered j is located in elements in ; Step 2.2: Depth-first search matrix ; Step 2.2.1: In the matrix Initialize and determine the starting point, and use the starting point as the probe point; Step 2.2.2: Starting from the detection point, probe the matrix in one direction of the detection point according to the constraints of the police responsibility area division model formula (11). If a candidate point is a feasible point, it must satisfy the following conditions: its element value is equal to the element value of the probe point and the candidate point has not been probed. If it is a feasible point, it is updated to a probe point. If it is not a feasible point, it continues to probe in the next direction. If all probe directions of the probe point are infeasible points, it returns to the previous probe point and searches for the remaining unprobeaged directions of the probe point. Step 2.2.2 is repeated until all search directions of all probed points are either probed points or infeasible points. At this point, the current area of ​​responsibility is considered to have been probed, and step 2.3 is executed. Step 2.3: Determine the connectivity of the responsibility area Determine whether each responsibility area meets the requirements. , This represents the number of detection points within the i-th responsibility area. If so, the current responsibility area is connected, and step 2.4 is executed; otherwise, the current responsibility area is considered disconnected, and the number of disconnected accident-prone points is calculated according to formula (8): (8) in Let be the number of connected points explored in the i-th responsibility region; Step 2.4: Determine whether all accident-prone points on the map have been traversed. If yes, end the search; otherwise, continue searching for the next area of ​​responsibility and proceed to step 2.

2.

4. The method according to claim 3, characterized in that... Step 3 specifically involves: Step 3.1: Initialize the inheritance probability Generate random numbers ;like If so, proceed to step 3.2 to generate a new solution; if If so, proceed to step 3.3 to generate a new solution; Step 3.2: Generate a new solution by "reversing the middle or reversing both ends". In the interval Two numbers are randomly generated inside. and ; Step 3.2.1: When < : Adopt the reverse middle principle, keeping column 1 to column 2. ,List Arrival The order remains unchanged, but the columns are reversed. Arrival The order yields a new solution. This refers to the new plan for allocating responsibility areas; (9) Step 3.2.2: When ≥ : Adopting the principle of reversing both ends, maintaining the column Arrival The order remains the same, reverse column 1 to column 2. ,List Arrival The order yields a new solution. This refers to the new plan for allocating responsibility areas; (10) Step 3.3: Update using mutation mechanism Step 3.3.1: Introduce connectivity factor (11) in This represents the number of disconnected vertices in the partitioning process. Step 3.3.2: Constructing the mutation probability (12) in It is a constant factor between (0,1); It is the upper limit of the given mutation probability. It is the connectivity factor; Step 3.3.3: Perform mutation operation to update. : Randomly generated ; when Randomly generate a number ,Will Swap any element with a value of 1 in the c-th column with any element with a value of 0 in the c-th column, and update the solution. ; (13) when That would be incorrect. Make an update; 5. The method according to claim 4, characterized in that... Step 4.1 specifically involves: According to the Metropolis criterion, the weighting function is considered as a particle, which is related to temperature. The probability of the time trending towards stability is: (14) (15) in The non-connectivity reduction factor is the temperature. For control parameters, This represents the difference in weighted allocation functions between the new and previous responsibility area divisions. Let S be the solution for the new responsibility region partitioning, and S be the solution for the previous responsibility region partitioning during the iteration process. It represents the number of solutions in the non-connected responsibility region partitioning process during the local sampling to generate new solutions.

6. A police force allocation system implementing the method of any one of claims 1-5, characterized in that... include: The police responsibility zone division module utilizes a police responsibility zone division model based on connected graphs to divide police responsibility zones. The responsibility region connectivity identification module uses a depth-first search algorithm to determine the connectivity of the responsibility region. The first computational module introduces a genetic mechanism to generate a new scheme for allocating responsibility regions; The second calculation module uses an improved simulated annealing algorithm to solve for and generate the optimal responsibility area allocation scheme.

7. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-5.

8. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Electric logistics vehicle scheduling method and system with time window

    CN108764777A

  • Robot walking path planning method based on genetic algorithm and artificial potential field method

    CN111694357A