CN117114216A - School bus line arrangement method and device - Google Patents

School bus line arrangement method and device Download PDF

Info

Publication number
CN117114216A
CN117114216A CN202310906178.1A CN202310906178A CN117114216A CN 117114216 A CN117114216 A CN 117114216A CN 202310906178 A CN202310906178 A CN 202310906178A CN 117114216 A CN117114216 A CN 117114216A
Authority
CN
China
Prior art keywords
path
pheromone matrix
pheromone
school bus
matrix
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
CN202310906178.1A
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.)
Yutong Bus Co Ltd
Original Assignee
Yutong Bus Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Yutong Bus Co Ltd filed Critical Yutong Bus Co Ltd
Priority to CN202310906178.1A priority Critical patent/CN117114216A/en
Publication of CN117114216A publication Critical patent/CN117114216A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • General Physics & Mathematics (AREA)
  • Educational Administration (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Educational Technology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Primary Health Care (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention belongs to the technical field of path planning, and particularly relates to a school bus line arrangement method and device. The method mainly comprises the following steps: and providing a mixed heuristic algorithm of an ant colony algorithm and a large neighborhood search algorithm, firstly adopting the ant colony algorithm to conduct school bus path planning to obtain a path planning result of each individual, selecting the individual with the shortest path mileage as an optimal individual, and then adopting the large neighborhood search algorithm to conduct path optimization on the optimal individual, wherein the finally obtained path planning result is a school bus line planning result. The method avoids the single algorithm to be trapped into local optimum, improves the effect obviously compared with the single algorithm, and effectively reduces the road mileage of the school bus.

Description

School bus line arrangement method and device
Technical Field
The invention belongs to the technical field of path planning, and particularly relates to a school bus line arrangement method and device.
Background
In recent years, with the development of social economy and the acceleration of urban process, the safety problem of students in middle and primary schools and kindergarten has become a social problem, and many parents have extremely worry about the safety problem, and the problem of school bus paths is a combination optimization problem of reasonably planning school bus lines, sending students from a bus taking station to a school (or from the school to the bus taking station) and achieving specific targets under the condition of meeting established constraints. The school bus path planning is a very complex work and relates to various factors such as road conditions of school areas, students, schools, school buses and the like. Through carrying out reasonable optimization to the school bus route, can obtain reasonable school bus route, can shorten school bus mileage, shorten the time that the school bus was travelled, reduce school bus quantity, reduce cost, and can alleviate traffic pressure and accord with practical application's demand more. Therefore, the method has important significance in integrally planning the school bus path.
At present, research on school bus path problems at home and abroad mainly aims at optimizing a driving route according to the condition that a station is already determined, and the existing solution method mainly aims at accurate solution, heuristic solution and meta heuristic solution. Research into accurate algorithms began earlier, but as the scale of research questions increased, their research was limited. Only relatively small-scale problems can use accurate algorithms to obtain the optimal solution. When the data size is large, an optimal value cannot be obtained using an accurate algorithm. However, since the problem of the school bus path is an NP-hard problem, the optimization algorithm is limited in practical application, and thus most researches are focused on constructing higher quality heuristic algorithms.
In addition, there are many enterprises, schools, institutions such as the here and there, etc. in studying the route planning problem of school bus, solve the technical problem through purchasing the software and hardware; the school bus path planning application scene is relatively clear and fixed, and each enterprise and mechanism improves and innovates at a certain point, but has the following problems: aiming at small-scale motorcades, the problem of large-scale lines cannot be solved well; the algorithms for the current vehicle route problem are many, such as ant colony algorithm, particle swarm algorithm, etc., but the single algorithm has defects, specifically: the research scene is too single, for example, the method is only suitable for a single vehicle, the vehicle types must be identical, and the like; the research target is single, such as shortest mileage, shortest time, least number of vehicles and the like; and a situation that a single algorithm falls into local optimization occurs, so that an optimal path planning result is not obtained finally.
Disclosure of Invention
The invention aims to provide a school bus line arrangement method and device, which are used for solving the problem that an optimal path planning result cannot be obtained due to the fact that a single algorithm is easy to sink into local optimization in the prior art.
In order to solve the technical problems, the invention provides a school bus line arrangement method, which comprises the following steps:
1) Initializing an ant colony population and a pheromone matrix, wherein one ant colony individual in the population comprises a plurality of ants, and the number of the ants is equal to the number of the determined school buses;
2) Carrying out path planning by adopting an ant colony algorithm to obtain a path planning result of each individual, wherein the path planning result of one individual needs to cover all sites, selecting an individual with the shortest path as an optimal individual, updating the historical optimal individual when the path of the current optimal individual is shorter than that of the historical optimal individual, and updating the pheromone matrix according to the planning result;
3) Setting the optimal path corresponding to the optimal individual obtained in the step 2) as an initial path, carrying out path optimization by adopting a large neighborhood search algorithm, updating the pheromone matrix after the optimization, judging whether the iteration termination condition is met, and if not, re-executing the step 2) until the iteration termination condition is met, wherein the final path planning result is a school bus line arrangement result.
The beneficial effects are as follows: and providing a mixed heuristic algorithm of an ant colony algorithm and a large neighborhood search algorithm, firstly adopting the ant colony algorithm to carry out school bus path planning, selecting an individual with the shortest path mileage as an optimal individual, and then adopting the large neighborhood search algorithm to carry out path optimization on the optimal individual, wherein the finally obtained path planning result is a school bus line arrangement result. The mixed algorithm avoids the single ant colony algorithm from falling into local optimum, and compared with the single algorithm, the effect is obviously improved; the mixing algorithm is suitable for fusing complex scenes of different vehicle numbers, vehicle type mixing, larger site numbers and starting points and ending points, solves a plurality of problems simultaneously, improves the application range of the algorithm, can realize line planning under the complex scenes, and reduces the driving mileage of the school bus.
Further, when the pheromone matrix is updated in the step 3), the pheromone matrix is required to be determined first, and then the non-correction pheromone matrix is randomly selected according to the set probability, or any one of the following mechanisms is randomly selected to correct the determined pheromone matrix:
mechanism 1: processing the determined pheromone matrix to obtain a new pheromone matrix, introducing a mutation coefficient when the maximum value of a certain row in the new pheromone matrix is larger than a first set value, and mutating the row of the pheromone when the mutation coefficient is smaller than the first set value in a manner of adding a random vector, so as to obtain a mutated pheromone matrix; finding the minimum value in the maximum value of each row of the mutated pheromone matrix, if the minimum value is larger than a second set value, introducing an intrusion coefficient, and updating the pheromone matrix in a way of adding a random matrix when the intrusion coefficient is smaller than the second set value;
mechanism 2: processing the determined pheromone matrix to obtain a new pheromone matrix, orderly grading the new pheromone matrix, and for the second-stage and the pheromone matrix above the second-stage, randomly executing the following operations on the stage of the pheromone matrix with set probability: the level pheromone matrix is mutated, replaced by the average value of the level pheromone matrix or kept unchanged.
The beneficial effects are as follows: the exploring capability of the ant colony algorithm is improved, the algorithm is effectively prevented from being premature, and the pheromone matrix obtained after the optimization of the large neighborhood algorithm is a better solution.
Further, when the pheromone matrix is updated in step 2), only a plurality of individuals with shorter mileage are selected to update the pheromone matrix or the historic optimal individuals are allowed to participate in each round of the pheromone matrix updating.
The beneficial effects are as follows: the pheromone matrix obtained by the ant colony algorithm is compared and updated to the most proper optimal path, so that the updating efficiency and reliability are improved.
Further, in the process of planning a path of one individual by adopting the ant colony algorithm in the step 2), the available vehicles are selected randomly in a vehicle sequence mode or in a random mode according to the set probability.
The beneficial effects are as follows: and a strategy of collaborative operation is provided for each individual, each vehicle is selected more flexibly, and the route planning selectivity is improved.
Further, in step 1), the number of school buses is determined based on the principle that the total capacity of the school buses is larger than the total amount of students.
The beneficial effects are as follows: the problem that students cannot sit on the school bus due to full loading of the school bus is avoided, and each student can sit on the school bus.
Further, when the ant colony algorithm is adopted to carry out path planning in the step 2), if the condition that the continuous path planning fails for many times occurs, the number of the school buses is adjusted, and the step 2) is re-executed according to the adjusted number of the school buses.
The beneficial effects are as follows: the problem that the initial minimum number of vehicles cannot meet the path planning is avoided.
Further, in the step 3), a large neighborhood search algorithm is adopted to perform path optimization, and the designed destructive operators comprise random destructive operators and worst destructive operators; the random destruction operator is as follows: randomly deleting N sites in the initial path; the worst destructive operator is: and attempting to delete each site one by one, calculating the path mileage change after deletion, and finding N sites with the largest influence for deletion.
The beneficial effects are as follows: different destructive operators are selected for destruction, so that the later repair paths have diversity, and more better new paths can be repaired.
Further, in the step 3), a large neighborhood search algorithm is adopted to perform path optimization, and the designed repair operators comprise a random repair operator and a greedy repair operator; the random repair operator is as follows: randomly inserting the deleted sites on the destroyed initial path; the greedy repair operator is as follows: and (3) attempting to insert the deleted sites into each gap of the damaged path, calculating the mileage change of the inserted path, and finding N sites with the smallest influence for insertion.
The beneficial effects are as follows: and selecting different repair operators to repair, avoiding sinking into local optimum in path planning, and planning a more optimal path.
Further, in step 1), a chaotic mapping method is adopted to initialize the pheromone matrix, and the calculation formula is as follows:
Z ij (t+1)=μZ ij (t)[1-Z ij (t)]
wherein t is the iteration time step, for any t, Z ij (t) between 0 and 1, Z ij (t+1) and Z ij (t) representing the pheromone matrix of the current iteration and the next iteration respectively; i represents the current station; j represents the next station; μ is a randomly adjustable parameter between 0 and 4, where the value of μ is chosen to be 4.
The beneficial effects are as follows: the ergodic property of chaos initialization is utilized to ensure the diversity of the initial pheromone matrix.
In order to solve the technical problems, the invention also provides a school bus line arrangement device which comprises a memory and a processor, wherein the processor is used for executing computer program instructions stored in the memory to realize the school bus line arrangement method described above, and can achieve the same beneficial effects as the method.
Drawings
FIG. 1 is a specific flow chart of a school bus route arrangement method of the invention;
FIG. 2 is a block diagram of a school bus route arrangement method of the present invention;
FIG. 3 is a diagram of the internal loop framework of the adaptive large neighborhood search algorithm of the present invention;
FIG. 4 is a diagram of the different route plans of the start and end points of 50 sites according to the present invention;
fig. 5 is a diagram of the same route layout of the start and end points of 50 sites according to the present invention.
Detailed Description
The basic idea of the invention is as follows: and (3) planning a path by adopting an ant colony algorithm according to basic rules and path planning requirements by using a multi-objective fusion optimizing method, optimizing the path by adopting a large neighborhood searching algorithm, and outputting the optimal path of each vehicle, the number of students of each vehicle and the total mileage of all vehicles after multiple iterations.
The invention will be described in detail below with reference to the drawings and examples of methods.
Method embodiment:
the embodiment of the school bus line arrangement method of the invention is shown in fig. 1 as a specific flow chart, and in fig. 2 as a frame chart, the specific process is as follows:
step one, initializing a pheromone matrix.
The chaos mapping is introduced to initialize the pheromone matrix, the ergodic property of the chaos initialization ensures the diversity of the initial pheromone, so that ants can quickly select a path with a better state, and the convergence rate is improved. The calculation formula is as follows:
Z ij (t+1)=μZ ij (t)[1-Z ij (t)]
wherein t is the iteration time step, for any t, Z ij (t) between 0 and 1, z_ij (t+1) and z_ij (t) represent the pheromone matrix of the current iteration and the next iteration, respectively, i represents the current station, j represents the next station, μ is a randomly adjustable parameter, between 0 and 4, where the value of μ is chosen to be 4.
And step two, obtaining the minimum number of vehicles based on the basic rule that the total capacity of the school bus is larger than the total amount of students.
Step three, combining the initializing pheromone in the step one and obtaining the minimum number of vehicles in the step two, and carrying out multi-vehicle ant colony algorithm planning paths, wherein the method specifically comprises the following steps:
1) Generating an initial ant colony population, wherein the population size is 200, each individual contains a plurality of ants, and the number of the ants is equal to the number of vehicles determined in the step two.
2) For each individual in the ant colony, initializing a station list, setting a starting point and a finishing point to be unreachable, enabling other stations to be reachable, and taking the current station of all vehicles as the starting point.
3) For each individual, a sequential strategy is employed with a 90% probability, the available vehicle-performed tasks are selected in vehicle order, and a random strategy is employed with a 10% probability.
4) Calculating state transition probabilities from the pheromone matrix and the distance matrix between stations, i.e. from the current station to the other stations
The probability of reachable sites is calculated as follows:
wherein,representing the state transition probability and representing the probability that the kth ant selects site j at site i; allowed represents an alternative site; τ ij Representing pheromones persisted between sites ij; alpha represents a pheromone heuristic factor and controls pheromone tau ij The greater the influence degree on the path selection, the more dependent the value is on the pheromone, and the exploratory property is reduced; the smaller the value is, the smaller the range of ant colony search is, and the ant colony search is easy to fall into local optimum; d, d ij Representing the distance between sites ij; η (eta) ij Representing visibility between sites ij, reflecting the heuristic level from site i to site j, taking d generally ij Is the reciprocal of (2); beta represents the expected value heuristic factor and controls eta ij The influence degree of visibility, the magnitude of which reflects the strength of factors such as priori nature, certainty and the like in road search; ρ represents the volatilization coefficient of the pheromone, and affects the volatilization speed of the pheromone; 1- ρ represents the pheromone residual coefficient; (1- ρ) τ ij Representing the residual pheromone +.>A pheromone newly added in the round; k represents the kth ant.
5) The roulette strategy is adopted to select the next station, and the selected probability of each individual is proportional to the evaluation value (namely, the probability obtained in the last step). The probability that a certain reachable site is finally selected is obtained through calculation, and the calculation formula of the roulette is as follows:
wherein N represents the number of reachable sites; f (x) represents the probability obtained in the previous step; p (x) represents the probability that a certain reachable station is finally selected.
6) Updating the position of the vehicle to be the selected station with the highest probability obtained in the previous step, and recording the passed path of the vehicle; updating the unselected sites as unreachable sites.
7) Repeating the steps 3) to 6).
And fourthly, performing ant colony task analysis to obtain an optimal path corresponding to the optimal individual.
After 200 individuals of the ant colony complete path planning, counting the total mileage and total capacity of each individual, sorting the 200 individuals according to the capacity from big to small and the mileage from small to big, selecting the optimal individual, namely the individual with the shortest mileage, and if the optimal individual is better than the historical optimal individual, updating the historical optimal individual into the selected optimal individual. And updating the pheromone matrix according to the ant colony algorithm result, wherein the updating formula is as follows:
testing is carried out on different scale data sets, as shown in fig. 4 and 5, wherein t represents the moment, namely the number of iteration rounds; ρ represents the pheromone residual rate, which in this example is 0.36;
Δτ ij representing the concentration of the pheromone newly added in the t+1st round of iteration; m represents the number of ant individuals participating in updating the pheromone in the iteration of t+1 round;the calculation formula of the contribution of the kth ant to the pheromone in the iteration of t+1 is as follows:
wherein Q is a constant, and the value of Q is 1000 in the method; l (L) k Representing the total mileage corresponding to the kth ant.
When updating the pheromone matrix, the following two strategies are adopted, specifically:
strategy 1, based on a ranked ant system, i.e. first ranking 200 individuals from small to large in mileage, only selects the first 10 ants to participate in pheromone updating.
Strategy 2, elite ant system, allows the history optimal ants to participate in updating pheromones every round.
And fifthly, taking the optimal individual of the ant colony algorithm as an initial value, and adopting a self-adaptive large neighborhood search algorithm to perform line optimization.
The large neighborhood searching algorithm is used for reconstructing the path according to a certain rule by destroying the initial path, and updating the initial path and repeating iteration if the reconstructed path is better than the initial path; the method comprises an inner loop and an outer loop, wherein the inner loop is shown in figure 3 outside the continuous optimization acceptance strategy. The method comprises the following specific steps:
1) The optimal ant initialization history of the ant colony algorithm is used for optimizing, the current state is used for setting a threshold value and an initial path, wherein the threshold value is set to be the total mileage of the optimal ant multiplied by 0.2 and recorded as T.
2) The destruction operator and repair operator are designed, and 4 operators are designed in this embodiment:
random destruction operator: randomly deleting N nodes of the initial path;
worst destruction operator: attempting to delete each node one by one, calculating the mileage change after deletion, and finding out N nodes with the largest influence for deletion;
random repair operator: randomly inserting the deleted nodes into the destroyed initial path, and noticing that overload cannot be carried out;
greedy repair operator: attempting to insert the deleted nodes into each gap of the damaged path, calculating the mileage change after insertion, and finding out N nodes with the least influence for insertion;
and initializing the scores and the selection times of the four operators, wherein the initial scores are all 0, and the initial selection times are all 0.
3) Selecting a group of destructive operators and repair operators by adopting a roulette strategy based on the operator scores, executing the destructive operators and the repair operators on the basis of the initial path, setting the destructive rate to be 20%, and recording the selected times of the corresponding destructive operators and repair operators.
4) Receiving policy design, if the path obtained through the step 3) is better than the current path, updating the current path, if the path is better than the historical optimal path, updating the historical optimal path, and simultaneously recording the scores of the corresponding operators, wherein each operator obtains 10 scores; if the current path is not superior to the current path but the difference is smaller than T, updating the current path, and simultaneously recording the scores of the corresponding operators, wherein each operator obtains 5 scores.
5) Updating the threshold T, and updating the pattern t=t×0.9.
6) Repeating the above 2) to 5).
7) Updating the operator score, the update formula is as follows:
testing on different scale data sets as shown in fig. 4 and 5, wherein h represents an operator; w (h) represents the score of the corresponding operator; ρ represents the score decay; s represents a new score; u represents the number of new increases.
8) The inner loop ends, the threshold T is updated again, and 1) to 7) above are repeated).
Step six, updating the pheromone matrix according to the output result of the large neighborhood search algorithm, wherein the updating method is the same in step four, and on the basis, in order to improve the exploring capability of the ant colony algorithm and avoid premature, the following two complementary processing mechanisms are adopted:
mechanism 1: introducing mutation and invasion operators, and calculating the following steps:
1.1 Calculating the concentration of the pheromones, dividing each element of the pheromone matrix by the sum of the corresponding rows to obtain a new pheromone matrix.
1.2 Taking the maximum value of each row of the pheromone matrix, and if the maximum value is larger than 0.85, introducing a mutation coefficient; if the mutation coefficient is smaller than 0.1, the line of pheromone matrix is mutated in the following way: plus a random vector times 0.01.
1.3 Calculating the concentration of the matrix, finding the minimum value in the maximum value of each row, and introducing an intrusion coefficient if the minimum value is larger than 0.5; if the intrusion coefficient is smaller than 0.3, updating the whole pheromone matrix by the following updating modes: plus a random matrix multiplied by 0.1.
Mechanism 2: the dynamic grading talent selection mechanism is provided, and the specific steps are as follows:
2.1 Dividing each element of the pheromone matrix by the sum of the corresponding rows to obtain a new pheromone matrix.
2.2 Providing a dynamic grading talent selection mechanism, orderly grading the pheromone matrix, taking the minimum value and the maximum value of the pheromone at the grading boundary, increasing the grading level with the increase of iteration times, carrying out iteration based on a mechanism 1.1 and a mechanism 1.2, and carrying out iteration when the mutation and invasion conditions of the mechanisms 1.1 and 1.2 are met, wherein the dynamic grading can ensure that the fewer members of each grade are in the later stage, and the elite grade is highlighted.
2.3 For each level after classification, the following operations are performed:
a) The first stage performs the worst, does not process, in principle represents a discard, but still has the opportunity to be selected.
b) Starting from the second stage, mutating the stage pheromone with a probability of 0.1, in the embodiment, adopting out-of-order mutation, replacing the stage pheromone with the average value thereof with a probability of 0.8, and equally representing the same stage opportunity and keeping the probability of 0.1 unchanged;
c) As the level increases, the concentration of pheromones is increased for each level, more resources are allocated for representing important cultivation, and the higher the level is, the more resources are allocated; at the same time, random numbers of 0-1 are introduced to attenuate the allocated resources, which represents different individuals with different capacities of accepting the resources.
The pheromone processing mechanism adopts mechanism 1 with a probability of 0.1, adopts mechanism 2 with a probability of 0.3, and remains unchanged with a probability of 0.6
And seventhly, repeating the third step to the sixth step until the iteration termination condition is met. In order to balance the calculation time and the calculation effect, the iteration times are tested as an adaptive strategy for taking log of the number of stations.
And step eight, outputting the optimal path of each vehicle, the number of students loaded on each vehicle and the total mileage of all vehicles.
When the ant colony algorithm is adopted to carry out path planning in the embodiment, the route planning failure based on the large-area algorithm may be caused by the reduced selectivity of the route planning when the number of vehicles is small, and if the subsequent continuous planning fails for 3 times, the minimum number of vehicles is automatically adjusted to be increased by 1. The school bus route arrangement method is used for testing on different scale data sets respectively, as shown in fig. 4 and 5.
According to the embodiment, a mixed algorithm of the ant colony algorithm and the large neighborhood search algorithm is adopted, so that the single ant colony algorithm is prevented from being trapped into local optimum, and compared with the single algorithm, the effect is remarkably improved; the mixing algorithm is suitable for fusing complex scenes of different vehicle numbers, vehicle type mixing, larger site numbers and starting points and ending points, solves a plurality of target problems simultaneously, improves the application range of the algorithm, can realize route planning under the complex scenes, and reduces the driving mileage of the school bus.
Device example:
an embodiment of a school bus route arrangement according to the present invention includes a memory and a processor for executing computer program instructions stored in the memory to implement a school bus route arrangement method described in the method embodiment of the present invention. The processor may be a processing device such as a programmable logic device FPGA. The memory may be various types of memories for storing information by using electric energy, such as RAM, ROM, etc., and may be other types of memories.

Claims (10)

1. The school bus line arrangement method is characterized by comprising the following steps of:
1) Initializing an ant colony population and a pheromone matrix, wherein one ant colony individual in the population comprises a plurality of ants, and the number of the ants is equal to the number of the determined school buses;
2) Carrying out school bus path planning by adopting an ant colony algorithm to obtain a path planning result of each individual, covering all sites by the path planning result of one individual, selecting an individual with the shortest path mileage as an optimal individual, updating a historical optimal individual when the path mileage of the current optimal individual is shorter than that of the historical optimal individual, and updating a pheromone matrix according to the planning result;
3) Setting the optimal path corresponding to the optimal individual obtained in the step 2) as an initial path, carrying out path optimization by adopting a large neighborhood search algorithm, updating the pheromone matrix after the optimization, judging whether the iteration termination condition is met, and if not, re-executing the step 2) until the iteration termination condition is met, wherein the final path planning result is a school bus line arrangement result.
2. The method according to claim 1, wherein in step 3), when the pheromone matrix is updated, the pheromone matrix is determined first, and then the non-corrected pheromone matrix is selected randomly according to a set probability, or the determined pheromone matrix is corrected by selecting any one of the following mechanisms randomly:
mechanism 1: processing the determined pheromone matrix to obtain a new pheromone matrix, introducing a mutation coefficient when the maximum value of a certain row in the new pheromone matrix is larger than a first set value, and mutating the row of the pheromone when the mutation coefficient is smaller than the first set value in a manner of adding a random vector, so as to obtain a mutated pheromone matrix; finding the minimum value in the maximum value of each row of the mutated pheromone matrix, if the minimum value is larger than a second set value, introducing an intrusion coefficient, and updating the pheromone matrix in a way of adding a random matrix when the intrusion coefficient is smaller than the second set value;
mechanism 2: processing the determined pheromone matrix to obtain a new pheromone matrix, orderly grading the new pheromone matrix, and for the second-stage and the pheromone matrix above the second-stage, randomly executing the following operations on the stage of the pheromone matrix with set probability: the level pheromone matrix is mutated, replaced by the average value of the level pheromone matrix or kept unchanged.
3. The school bus route arrangement method according to claim 1, wherein when the pheromone matrix is updated in step 2), only a plurality of individuals with shorter mileage are selected for the pheromone matrix update or the history-optimal individuals are allowed to participate in each round of the pheromone matrix update.
4. The method according to claim 1, wherein in the course of planning a path of one of the individuals using the ant colony algorithm in step 2), the available vehicles are selected in a vehicle sequential manner or in a random manner according to a set probability.
5. The school bus routing method according to claim 1, wherein the number of school buses in step 1) is determined based on the principle that the total capacity of the school buses is larger than the total amount of students.
6. The method according to claim 1, wherein when the ant colony algorithm is adopted to perform the path planning in the step 2), if the continuous path planning fails for multiple times, the number of the school buses is adjusted, and the step 2) is performed again according to the adjusted number of the school buses.
7. The school bus line arrangement method according to claim 1, wherein in the step 3) of performing path optimization by using a large neighborhood search algorithm, the designed destructive operators include a random destructive operator and a worst destructive operator; the random destruction operator is as follows: randomly deleting N sites in the initial path; the worst destructive operator is: and attempting to delete each site one by one, calculating the path mileage change after deletion, and finding N sites with the largest influence for deletion.
8. The school bus line arrangement method according to claim 1, wherein in the step 3) of performing path optimization by using a large neighborhood search algorithm, the designed repair operators comprise a random repair operator and a greedy repair operator; the random repair operator is as follows: randomly inserting the deleted sites on the destroyed initial path; the greedy repair operator is as follows: and (3) attempting to insert the deleted sites into each gap of the damaged path, calculating the mileage change of the inserted path, and finding N sites with the smallest influence for insertion.
9. The method for arranging the school bus lines according to claim 1, wherein in the step 1), a chaotic mapping method is adopted to initialize a pheromone matrix, and a calculation formula is as follows:
Z ij (t+1)=μZ ij (t)[1-Z ij (t)]
wherein t is the iteration time step, for any t, Z ij (t) between 0 and 1, Z ij (t+1) and Z ij (t) representing the pheromone matrix of the current iteration and the next iteration respectively; i represents the current station; j represents the next station; μ is a randomly adjustable parameter between 0 and 4, where the value of μ is chosen to be 4.
10. A school bus routing means comprising a memory and a processor for executing computer program instructions stored in the memory to implement the school bus routing method of any of claims 1-9.
CN202310906178.1A 2023-07-18 2023-07-18 School bus line arrangement method and device Pending CN117114216A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310906178.1A CN117114216A (en) 2023-07-18 2023-07-18 School bus line arrangement method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310906178.1A CN117114216A (en) 2023-07-18 2023-07-18 School bus line arrangement method and device

Publications (1)

Publication Number Publication Date
CN117114216A true CN117114216A (en) 2023-11-24

Family

ID=88802903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310906178.1A Pending CN117114216A (en) 2023-07-18 2023-07-18 School bus line arrangement method and device

Country Status (1)

Country Link
CN (1) CN117114216A (en)

Similar Documents

Publication Publication Date Title
Mohammed et al. Using genetic algorithm in implementing capacitated vehicle routing problem
CN113485429B (en) Route optimization method and device for air-ground cooperative traffic inspection
CN110657816A (en) Vehicle path problem planning method with hard time window based on firework algorithm
CN109299142A (en) A kind of convolutional neural networks search structure method and system based on evolution algorithm
CN108388958A (en) A kind of method and device of two-dimensional attitude maneuvering satellite mission planning technical research
CN106650074B (en) digital microfluidic chip catastrophic failure testing method based on genetic ant colony fusion algorithm
US20060003823A1 (en) Dynamic player groups for interest management in multi-character virtual environments
Chica et al. Multiobjective memetic algorithms for time and space assembly line balancing
CN109039428B (en) Relay satellite single-address antenna scheduling random search method based on conflict resolution
CN111445008A (en) Knowledge distillation-based neural network searching method and system
CN113570112B (en) Optimization algorithm for solving vehicle path problem with time window considering cooperation
CN110276488A (en) A kind of vehicle routing optimization method based on matrix in block form and fuzzy haulage time
De Giovanni et al. An adaptive genetic algorithm for large-size open stack problems
CN111553509A (en) Rail transit route selection evaluation and cost optimization method aiming at geological environment risks
CN117114216A (en) School bus line arrangement method and device
Zhou et al. A novel mission planning method for UAVs’ course of action
CN114118600A (en) Route planning method for urban garbage collection
CN115270377A (en) Multi-cable optimal path planning method based on improved ant colony algorithm
CN114021914A (en) Unmanned aerial vehicle cluster flight control method and device
CN109101643A (en) The building of data information table, anti-pseudo- point global registration method, apparatus and robot
Huang et al. Path planning for UAV reconnoitring in complex environment based on improved visibility graph and genetic algorithm
CN116820110B (en) Ecological environment monitoring task planning method and device based on intelligent optimization algorithm
CN117455348A (en) Route planning method with uncertainty vehicle distribution task
CN110674997B (en) Mixed site selection system based on Hub storage
CN113657650B (en) Vehicle-machine collaborative path optimization method and device for rapid investigation after earthquake disaster

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination