CN110543990A - intelligent watering cart route planning method based on double-layer genetic algorithm - Google Patents

intelligent watering cart route planning method based on double-layer genetic algorithm Download PDF

Info

Publication number
CN110543990A
CN110543990A CN201910836488.4A CN201910836488A CN110543990A CN 110543990 A CN110543990 A CN 110543990A CN 201910836488 A CN201910836488 A CN 201910836488A CN 110543990 A CN110543990 A CN 110543990A
Authority
CN
China
Prior art keywords
chromosome
chromosomes
population
route
service
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
CN201910836488.4A
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.)
Jilin University
Original Assignee
Jilin University
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 Jilin University filed Critical Jilin University
Priority to CN201910836488.4A priority Critical patent/CN110543990A/en
Publication of CN110543990A publication Critical patent/CN110543990A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • 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
    • 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/26Government or public services

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Primary Health Care (AREA)
  • Educational Administration (AREA)
  • Physiology (AREA)
  • Genetics & Genomics (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (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 discloses a watering cart route intelligent planning method based on a double-layer genetic algorithm, which adopts the double-layer genetic algorithm, the outer layer is used for optimizing a service arc and a car yard, and the inner layer is used for optimizing service paths in each car yard, and comprises the following steps: firstly, determining an optimization target and constraint conditions; step two, data preprocessing; step three, initializing a chromosome population; step four, chromosome evolution; step five, local chromosome search; step six, natural selection of chromosomes; step seven, decoding the optimal population; and step eight, reasonably distributing the routes. The invention can shorten the running distance of the sprinkler, reduce the sprinkling cost and improve the sprinkling efficiency.

Description

Intelligent watering cart route planning method based on double-layer genetic algorithm
Technical Field
The invention relates to an intelligent watering cart route planning method, in particular to an intelligent watering cart route planning method based on a double-layer genetic algorithm.
Background
A city is usually equipped with a plurality of watering lorries, is responsible for dust fall and the cleanness of urban area road. The sprinkler needs to sprinkle water 2-3 times every day, sprinkle water about 2-3 hours each time, meet sunny day or special circumstances and still need to increase the number of times of sprinkling to it is good to maintain urban appearance environmental sanitation situation in urban area, ensures urban area air quality. Because the water storage capacity of the watering cart is limited, the watering cart needs to travel to a specific watering point for watering after a period of time, and in order to complete the daily watering task on time, part of the watering carts of the environmental sanitation station can only be connected with fire hydrants to fetch water at each road section in time and nearby. The water intake at the fire hydrant of each road section randomly has serious traffic hidden trouble and influences the smoothness of the road.
The above problems are mainly caused because the operation of the watering cart and the water adding route are manually arranged, no scientific and reasonable arrangement scheme exists, particularly, under the condition that urban roads are complex and a plurality of water adding points exist, a reasonable task distribution scheme is determined, the total driving route of the vehicle is minimized, the manual arrangement is almost impossible to realize, and the waste of manpower and material resources is often caused.
therefore, the method is very important for optimizing the spraying and water adding routes of the sprinkler, the running distance of the sprinkler can be shortened, the spraying cost is reduced, and the spraying efficiency is improved. Saves certain manpower and material resources for sanitation units and obtains certain economic and social benefits.
Disclosure of Invention
the invention aims to solve the technical problem of the prior art and provides an intelligent watering cart route planning method based on a double-layer genetic algorithm.
in order to solve the technical problems, the invention is realized by adopting the following technical scheme:
A watering cart route intelligent planning method based on a double-layer genetic algorithm adopts the double-layer genetic algorithm, the outer layer is used for optimizing a service arc and a car yard, and the inner layer is used for optimizing service paths in each car yard, and the method specifically comprises the following steps:
step one, determining an optimization target and a constraint condition:
In the problem of the spraying route of the sprinkler, a water adding point is regarded as a parking lot, a road is regarded as an edge, and the optimization target is as follows: the general route taken by the sprinkler after the sprinkling requirements of each road are finished is shortest, namely each road needing sprinkling is sprinkled at least once and the total sprinkling route is shortest;
converting into the service of the parking lot to each arc, namely: each arc can be served by a vehicle in any parking lot, but can be served by one vehicle only once, each vehicle returns to the original parking lot after completing a service task, and a proper vehicle service arrangement scheme is required, so that the vehicles in each parking lot can meet the requirements of all arcs, and the total driving distance of the vehicles is shortest;
step two, data preprocessing: urban road data, vehicle parameters, road information and road limit constraint information are collected; numbering all arcs in sequence, and calculating the shortest distance between any two arcs and the corresponding shortest precursor path;
step three, initializing a chromosome population:
1) determining a chromosome coding structure, wherein the chromosome adopts natural number coding to the service arcs and ensures that any one service arc only appears in one chromosome;
Outer chromosome coding mechanism: the chromosomes adopt an integer coding mechanism of arc numbering, numbered service arcs are distributed to each parking lot nearby according to the shortest distance to form an outer-layer chromosome population, repeated service arcs cannot occur between any two chromosomes, and several chromosomes exist in several parking lots;
the inner chromosome coding mechanism: the inner layer chromosome adopts an integer coding mechanism, and the gene position in the chromosome represents the number of the arc to be served in one path;
2) According to the chromosome coding scheme, a multi-population mechanism is adopted, and each population represents a solution of the problem; wherein a population is composed of a plurality of chromosomes, one chromosome representing a portion of a solution, all chromosomes in the population collectively representing a complete solution to the problem;
3) initializing a chromosome population;
Step four, chromosome evolution: two parent chromosomes P1 and P2 are picked out in a random selection mode to serve as operators in a genetic algorithm, and cross operation is carried out by exchanging gene information of the two chromosomes, inheriting the original excellent mode and recombining to form more excellent chromosomes;
Step five, chromosome local search: firstly, feasibility judgment is carried out on two offspring chromosomes, namely whether the load capacity of a vehicle is exceeded or not, and if the feasibility is met, local search operation is respectively carried out on the two offspring chromosomes;
step six, natural selection of chromosomes:
if the sum of the path lengths represented by the two child chromosomes is smaller than the sum of the path lengths represented by the two parent chromosomes, namely the adaptive value of the child chromosomes is superior to that of the parent chromosomes, replacing the two parent chromosomes with the two child chromosomes, otherwise, not replacing;
After the natural selection is completed, the internal evolution of each population is completed, the respective adaptive value of each population can be obtained, whether the iteration condition is met or not is judged, and if the iteration condition is met, the next step is carried out;
And seventhly, decoding the optimal population: the calculated optimal population represents an operation route required by the sprinkler, and a vehicle operation driving route can be obtained by decoding all chromosomes in the population;
step eight, reasonably distributing routes: and after the decoding work is finished, distributing all driving routes to the vehicles in the area.
Compared with the prior art, the invention has the beneficial effects that:
1. by optimizing the route of the sprinkler, a sanitation unit can save certain manpower and material resources and obtain certain economic and social benefits;
2. the fuel can be saved, the material consumption can be reduced, and the work efficiency can be improved;
3. the most reasonable task allocation scheme can be determined, all specified roads are guaranteed to be sprayed under various objective conditions, and the total driving distance of each vehicle is shortest.
drawings
Fig. 1 is an algorithm operation flow chart of the intelligent sprinkler route planning method based on a double-layer genetic algorithm.
Detailed Description
the technical scheme of the invention is described in detail in the following with reference to the attached drawings:
in recent years, research on VRP (virtual routing protocol) is quite mature at home and abroad, rich results are obtained on the research of various VRPs, and the adopted solutions are various and can be divided into two categories, namely an accurate algorithm (bit-mouth integer programming, branch delimitation and the like) and a heuristic algorithm (taboo search, a genetic algorithm, an ant colony algorithm and the like).
the genetic algorithm is an optimization technology abstracted from a biological evolution process and based on natural selection and a biological genetic mechanism, approaches the optimal solution of a problem by means of a natural random algorithm, and has good global search capability. The genetic algorithm encodes the problem parameters in a certain form, the encoded bit string is called a chromosome, and then an appropriate evolution operator is designed for the genetic algorithm and a new population of chromosomes which is more adaptive to the environment is generated. And continuously reproducing and evolving, and finally converging to a group of individuals most suitable for the environment to obtain the optimal solution of the problem.
as shown in fig. 1, the intelligent watering cart route planning method based on the double-layer genetic algorithm adopts the double-layer genetic algorithm, the outer layer is used for optimizing a service arc and a yard, and the inner layer is used for optimizing service paths in each yard, and specifically comprises the following steps:
1. Determining optimization objectives and constraints
in the problem of the sprinkling route of the sprinkling truck, one watering point is regarded as a parking lot, the roads are regarded as one side, the optimization target is that the total route taken by the sprinkling truck after the sprinkling requirement of each road is completed is shortest, namely each road to be sprinkled is sprinkled at least once and the total sprinkling route is shortest, and the target can be described as follows:
the length of the road to be sprayed is the sum of the lengths of all roads to be sprayed, the value is a fixed value, and wo is the sum of the lengths of the roads to be repeatedly walked in the driving process. Obviously, to achieve the shortest overall route, it is critical to optimize the sequence of watering roads to minimize the value of wo, which depends on the sequence of watering routes.
The service converted into the parking lot for each arc is that each arc can be serviced by vehicles in any parking lot, but can be serviced only once by one vehicle, each vehicle returns to the original parking lot after completing the service task, and a proper vehicle service arrangement scheme is required, so that the vehicles in each parking lot can meet the requirements of all arcs, the total driving distance of the vehicles is shortest, and the constraint conditions are as follows:
0≤T≤ε (i=1,2,…,K) (3)
where K is the number of vehicles, Q is the vehicle capacity, Ti represents the ith route, load (Ti) represents the total demand of each route, | Ti | represents the number of service arcs included in the route, | (Tij) represents the demand of the jth service arc in the ith route, cost (Ti) represents the travel distance of the ith route, w (Tij) represents the travel distance of the jth service arc, D (Tij, Ti, j +1) represents the shortest distance between the end point of the jth service arc and the start point of the jth +1 service arc, equation (3) represents that the sum of the number of arcs serviced by each vehicle does not exceed the total number of service arcs epsilon, and equations (4) and (5) define that all service arcs are serviced and are serviced only once.
in addition, before optimization, the constraint condition of the actual problem of the sprinkler needs to be considered. Urban watering roads are generally wide arterial roads, and watering lorries generally spray both sides of the roads respectively, so that each side needs to be converted into two arcs in opposite directions, and in addition, the following special conditions need to be considered: 1. the water storage tonnage of the watering lorries is different; 2. the spraying road widths are different, namely the water spraying amount required by each road is different, and the water requirement of important main roads and congested main roads is high; 3. the vehicle can only turn left or right at some fork road, and some narrow roads can only pass through in one way; 4. some roads are only sprayed on one side due to time pressure or roadblocks.
in addition, according to actual conditions, the sizes of the water spraying nozzles of different vehicles are different, and the water spraying amount is deviated. Based on this, in the practical problem treatment, the water sprinkling amount required by each water sprinkling road cannot be directly determined, but a sprinkling coefficient alpha (the value range is generally 0-3) is set, so that the water requirement of important main roads and congested main roads is large, and the value is large; for non-sprinkler roads this value is 0 to distinguish it from sprinkler roads. The length of the road and the spraying coefficient jointly determine the unilateral spraying amount L of the road so as to determine the spraying driving distance in the one-time driving process from full water to full water of each vehicle, namely the effective spraying distance Capacity of the vehicle.
2. data and preprocessing
the data required are mainly: 1. urban road data including all road sections requiring watering (service sides) and roads not requiring watering but allowing vehicles to travel (non-service sides), the length of the road sections, the amount of watering required, and the like; 2. various parameters of the vehicle comprise the number of the vehicle, the load capacity, the water storage capacity, the spraying distance, the sprinkling speed per hour, the non-sprinkling speed per hour, the operation area and the like; 3. the related information of each road comprises road name, length, spraying coefficient, whether slope is available or not, whether bilateral simultaneous spraying is available or not and the like; 4. and limiting and restricting road running and turning.
simplifying the actual watering road network diagram according to road limits and spraying distances:
1) Ordinary watering road:
Each side is correspondingly represented as two directional arcs with opposite directions and same spraying distance;
2) when the watering road is a slope:
Each side correspondingly represents two directional arcs with the same direction and spraying distance;
3) both sides spray simultaneously:
Each edge represents a directional arc, which is a doubling of the spray distance, respectively;
4) in the case of special operation:
each side is correspondingly represented as a directional arc;
and numbering all arcs in sequence, and calculating by using an improved Dijkstra method to obtain the shortest distance between any two arcs and the corresponding shortest precursor path.
3. initializing chromosome populations
determining the coding structure of the chromosome:
The chromosome adopts natural number coding to the service arc, and each gene position in a chromosome is filled with the service arc number in the path represented by the chromosome. The algorithm ensures that any one service arc occurs in only one chromosome. The driving cost (cost) (ti) of each route is obtained by the formula (2), and 1/cost (ti) is used as the adaptive value of the corresponding chromosome, namely, the higher the value is, the higher the survival probability of the chromosome in the evolution is. According to equation (1), the algorithm determines the feasibility of the corresponding chromosome by determining whether the load (Ti) value of the path is greater than the spray distance D (Tij, Ti, j +1) of the service vehicle, if so, the chromosome is not feasible.
The general genetic algorithm only optimizes the father chromosome, and the optimization effect is poor, so the method adopts a double-layer genetic algorithm, namely, the outer layer chromosome and the inner layer chromosome are optimized to obtain a better optimization result.
For the outer chromosomes there are the following coding mechanisms:
Chromosomes employ an arc-numbered integer coding scheme. And distributing the numbered service arcs to each parking lot nearby according to the shortest distance to form an outer chromosome population, wherein repeated service arcs cannot appear between any two chromosomes, and several parking lots (water adding points) have several chromosomes. Chromosomes represent only the optimal combination of arcs and yards, and do not represent paths, such as chromosome [1(2,17,9) ], indicating that arcs numbered 2,17,9 are temporally divided into yard 1.
there is a coding mechanism for the inner chromosomes:
the inner layer chromosome adopts an integer coding mechanism, and the gene position in the chromosome represents the number of the arcs to be served in one path, for example, chromosome (2,7,1,11) represents that one path sequentially serves the arcs with the numbers of 2,7,1,11 in the current solution. Obviously, the length of a chromosome depends on the number of service arcs in the path corresponding to that chromosome, and no duplicate service arcs occur between any two chromosomes.
The length of the chromosome is not fixedly limited, but the gene composition of the chromosome needs to meet the effective spraying distance Capacity constraint of the service vehicle corresponding to the chromosome, namely the sum of the spraying distances of all required arcs in the chromosome cannot exceed the effective spraying distance of the service vehicle, so that the chromosome has feasibility, namely the feasibility of a corresponding driving route is ensured; and the adaptive value, i.e. the fitness evaluation, is carried out on the population in the natural selection process, and the size of the adaptive value of the population determines the superiority and inferiority of the population, i.e. determines the quality of the expressed solution.
according to the chromosomal coding scheme, a multi-population mechanism is employed, each population representing a solution to the problem. Wherein a population is composed of a plurality of chromosomes, one chromosome representing a portion of a solution, all chromosomes in the population collectively representing a complete solution to the problem. The specific number of chromosomes is determined during population initialization. The population has determined cross probability Pm and mutation probability Pc, and chromosomes in the population perform cross operation and mutation operation according to the corresponding probabilities.
initializing chromosome population:
Step 1: and randomly generating the cross probability Pc and the variation probability Pm of the population according to the set cross probability range and the set variation probability range.
step 2: randomly generating N permutations of natural numbers that are not repeated from 1 to N { a1, a2, …, aN } represents one permutation of the required arc numbers. Arranging all vehicles according to the effective spraying distance values from large to small to generate a corresponding number of empty chromosomes, and correspondingly assigning the attribute Capacity of the empty chromosomes.
And step 3: arc elements are filled into each chromosome in turn, subject to feasibility constraints for the chromosome. If all the chromosomes are filled and arc elements still remain, new chromosomes continue to be generated to fill the elements until all required arcs are filled. The added new chromosome Capacity attribute values are determined according to the principle of equilibrium, namely, the quantity ratio of all chromosomes classified according to the Capacity attribute values is ensured to correspond to the quantity ratio of various types of vehicles as much as possible.
And 4, step 4: and finally, adding another empty chromosome to the population, wherein the value of the Capacity property is determined according to the principle of equilibrium. At this point, the initialization work for one population is completed.
and repeating the above processes to sequentially finish the initialization work of the M populations according to the set population quantity M.
in the initialization, the tasks of the vehicles are sequentially distributed according to the sequence of the effective spraying distance values from large to small, so that more water spraying tasks can be completed by the vehicles with large distance values in the one-time driving process, and the number of times of returning and adding water is relatively small, so that the use amount of the vehicles, the number of driving paths and the mileage can be reduced as much as possible; in addition, the balance principle is adopted for the Capacity attribute value of the newly added chromosome, so that the number of the operation driving routes of each vehicle is consistent with the number of each type of vehicle, and the uniform workload distribution of each vehicle is ensured as much as possible; the purpose of adding a null chromosome is to achieve dynamic variation of chromosome number through crossover operations in evolution.
4. evolution of chromosomes:
the algorithm has no comparability to the adaptive value of chromosomes due to the special design of the chromosome, so that the algorithm selects two parent chromosomes P1 and P2 as the most important operators in the genetic algorithm by adopting the simplest random selection mode, and the cross operation inherits the original excellent mode by exchanging the gene information of the two chromosomes, and is recombined to form more excellent chromosomes so as to achieve the purpose of evolution. In order to enhance the evolutionary capability of the algorithm and avoid the defect of weak optimization caused by single intersection, the algorithm adopts three operators of shift, transposition and common intersection to replace an intersection operator in the traditional genetic algorithm, and the operators are all executed with the probability of 80% in the evolutionary process.
1) And (3) carrying out norposition, wherein for parent chromosomes P1 and P2, any continuous m positions (m is not more than the length of P1) are selected from P1 and inserted before a position of P2, if P1 is empty, continuous m positions are selected from P2 and inserted into P1 to form two filial chromosomes which are not empty, and if m is exactly equal to the length of P1, an empty filial chromosome is formed.
2) transposition, namely selecting continuous n bits (n is not more than the minimum value of the lengths of P1 and P2) from P1 and P2 respectively for interchange to form two offspring chromosomes.
3) And (2) common crossing, namely selecting a single-point crossing, namely randomly selecting a certain position for P1 and P2 as a crossing starting point respectively, and exchanging the parts of the positions to form two non-empty daughter chromosomes, wherein if the P1 or the P2 is an empty chromosome, the crossed daughter chromosomes are not empty.
5. Chromosome local search
Firstly, feasibility judgment is carried out on two offspring chromosomes, namely whether the carrying capacity of the vehicle is exceeded or not, if not, the two offspring chromosomes are discarded, the chromosomes are continuously selected for evolution operation, and if the two offspring chromosomes are feasible, local search operation is respectively carried out on the two offspring chromosomes. In order to accelerate the optimization process of the algorithm and enhance the optimizing capability, the concept of local optimizing of chromosomes in a certain neighborhood is adopted, and the relative optimal ordering of all gene positions of the offspring chromosomes is searched for in a certain spatial range.
The following four operations are performed in order with full probability for each pair of service arcs (u, v) represented by chromosome loci:
1) If u and v are two arcs with the same end point but opposite direction, checking whether the chromosome adaptation value is increased after u and v are exchanged, if so, exchanging, otherwise, exiting.
2) Checking whether moving u to v increases chromosome fitness, swapping if it increases, otherwise exiting.
3) if there are more than 2 arcs between u and v, check if the chromosome fitness increases after arranging all genes between u and v in reverse order, if it increases, reverse, otherwise exit.
4) if u and v are adjacent, it is checked whether the chromosome fitness value is increased after moving a series of arcs (u, x) (x is an arc between u and v) to v, if so, the crossover, otherwise, the exit is performed.
6. natural selection of chromosomes
The natural selection of the chromosomes is derived from a major-minor-major rule of the biological world, whether the chromosomes of the offspring are optimized compared with those of the parent chromosomes is judged, old poor chromosomes are eliminated by the new excellent chromosomes, and the population is updated to continuously approach the optimal solution of the problem. The judgment method is that if the sum of the path lengths represented by the two sub chromosomes is less than the sum of the path lengths of the two parent chromosomes, namely the adaptive value of the sub chromosomes is superior to that of the parent chromosomes, the two parent chromosomes are replaced by the two sub chromosomes, otherwise, the two sub chromosomes are not replaced, the number of the empty chromosomes in the population is possibly changed after natural selection, and only one empty chromosome is ensured by an increase and deletion mode.
after the natural selection is finished, the internal evolution of each population is finished, the respective adaptive value of each population can be obtained, and whether the iteration condition is met or not is judged, namely 1) the evolution iteration frequency reaches the maximum value set by the algorithm; 2) continuous optimization-free iteration times exceed a maximum limit value, if the continuous optimization-free iteration times do not exceed the maximum limit value, according to the size of an adaptive value, executing survival rules including disadvantaged seed immobility, young seed protection and superior seed retention on all populations, and continuing to evolve; and if so, decoding the optimal population.
7. decoding of optimal populations
The optimal population obtained by calculation represents the operation route required by the sprinkler, and the vehicle operation driving route can be obtained by decoding all chromosomes in the population.
step 1, acquiring a series of points between the shortest paths of each pair of adjacent genes of chromosomes in a population according to the obtained arc shortest distance matrix and the corresponding precursor matrix;
Step 2, respectively obtaining the shortest paths from the first point to the corresponding parking lot and from the last point to the corresponding parking lot according to the belonged areas to form a closed driving route, namely an operation route of a certain vehicle in the final operation scheme;
Step 3, if all chromosomes are decoded, the whole process is ended; otherwise, the next chromosome is decoded, and the step 1 is carried out
8. Rational distribution of routes
after the decoding work is finished, only the operation driving route is obtained, and all the driving routes need to be distributed to the vehicles in the area to form the final operation scheme. According to the actual working principle, the working time of all vehicles is ensured to be balanced as much as possible. The algorithm comprises the following steps:
Step 1, taking k vehicles of a certain vehicle type as k sets, sequencing all routes of the vehicle type from large to small according to working time, and sequentially putting the front k routes into the k sets respectively.
and 2, classifying the first route in the unallocated routes into the kth set.
And 3, reordering the k sets from large to small according to the working time.
step 4, if an unallocated route still exists, turning to step 2; otherwise the algorithm ends.

Claims (7)

1. the intelligent watering cart route planning method based on the double-layer genetic algorithm is characterized in that the double-layer genetic algorithm is adopted, the outer layer is used for optimizing a service arc and a car yard, and the inner layer is used for optimizing service paths in each car yard, and the intelligent watering cart route planning method specifically comprises the following steps:
Step one, determining an optimization target and a constraint condition:
In the problem of the spraying route of the sprinkler, a water adding point is regarded as a parking lot, a road is regarded as an edge, and the optimization target is as follows: the general route taken by the sprinkler after the sprinkling requirements of each road are finished is shortest, namely each road needing sprinkling is sprinkled at least once and the total sprinkling route is shortest;
Converting into the service of the parking lot to each arc, namely: each arc can be served by a vehicle in any parking lot, but can be served by one vehicle only once, each vehicle returns to the original parking lot after completing a service task, and a proper vehicle service arrangement scheme is required, so that the vehicles in each parking lot can meet the requirements of all arcs, and the total driving distance of the vehicles is shortest;
Step two, data preprocessing:
urban road data, vehicle parameters, road information and road limit constraint information are collected; numbering all arcs in sequence, and calculating the shortest distance between any two arcs and the corresponding shortest precursor path;
Step three, initializing a chromosome population:
1) determining a chromosome coding structure, wherein the chromosome adopts natural number coding to the service arcs and ensures that any one service arc only appears in one chromosome;
outer chromosome coding mechanism: the chromosomes adopt an integer coding mechanism of arc numbering, numbered service arcs are distributed to each parking lot nearby according to the shortest distance to form an outer-layer chromosome population, repeated service arcs cannot occur between any two chromosomes, and several chromosomes exist in several parking lots;
The inner chromosome coding mechanism: the inner layer chromosome adopts an integer coding mechanism, and the gene position in the chromosome represents the number of the arc to be served in one path;
2) According to the chromosome coding scheme, a multi-population mechanism is adopted, and each population represents a solution of the problem; wherein a population is composed of a plurality of chromosomes, one chromosome representing a portion of a solution, all chromosomes in the population collectively representing a complete solution to the problem;
3) Initializing a chromosome population;
step four, chromosome evolution:
Two parent chromosomes P1 and P2 are picked out in a random selection mode to serve as operators in a genetic algorithm, and cross operation is carried out by exchanging gene information of the two chromosomes, inheriting the original excellent mode and recombining to form more excellent chromosomes;
Step five, chromosome local search:
firstly, feasibility judgment is carried out on two offspring chromosomes, namely whether the load capacity of a vehicle is exceeded or not, and if the feasibility is met, local search operation is respectively carried out on the two offspring chromosomes;
step six, natural selection of chromosomes:
if the sum of the path lengths represented by the two child chromosomes is smaller than the sum of the path lengths represented by the two parent chromosomes, namely the adaptive value of the child chromosomes is superior to that of the parent chromosomes, replacing the two parent chromosomes with the two child chromosomes, otherwise, not replacing;
After the natural selection is completed, the internal evolution of each population is completed, the respective adaptive value of each population can be obtained, whether the iteration condition is met or not is judged, and if the iteration condition is met, the next step is carried out;
and seventhly, decoding the optimal population:
the calculated optimal population represents an operation route required by the sprinkler, and a vehicle operation driving route can be obtained by decoding all chromosomes in the population;
Step eight, reasonably distributing routes:
And after the decoding work is finished, distributing all driving routes to the vehicles in the area.
2. the intelligent sprinkler route planning method based on the double-layer genetic algorithm according to claim 1, wherein the first step of determining the optimization objective and the constraint condition specifically comprises:
The optimization objective is described as:
wherein, the sum of the lengths of all roads needing to be sprayed with water is a fixed value; wo is the sum of the lengths of roads which need to be repeatedly walked in the driving process;
the constraints are as follows:
0≤T≤ε (i=1,2,...,K) (3)
in the formula, K is the number of vehicles, Q is the vehicle capacity, Ti represents the ith route, load (Ti) represents the total demand of each route, | Ti | represents the number of service arcs included in the route, | (Tij) represents the demand of the jth service arc in the ith route, cost (Ti) is the travel distance of the ith route, w (Tij) represents the travel distance of the jth service arc, and D (Tij, Ti, j +1) represents the shortest distance from the terminal point of the jth service arc to the starting point of the jth +1 service arc.
3. The intelligent watering cart route planning method based on the double-layer genetic algorithm according to claim 1, wherein initializing chromosome populations specifically comprises:
step 1, randomly generating a cross probability Pc and a variation probability Pm of a population according to a set cross probability range and a set variation probability range;
step 2, randomly generating N non-repetitive natural number arrangements { a1, a 2., aN } between 1 and N to represent aN arrangement of the required arc numbers, and arranging all vehicles according to effective spraying distance values of the vehicles from large to small to generate a corresponding number of empty chromosomes;
step 3, filling arc elements into each chromosome in sequence under the condition of satisfying the feasibility constraint condition of the chromosome;
And 4, adding another empty chromosome to the population, and finishing the initialization work of one population.
4. the intelligent watering cart route planning method based on the double-layer genetic algorithm according to claim 1, wherein the step of four-chromosome evolution specifically comprises the following steps:
1) Position shifting: for parent chromosomes P1 and P2, any consecutive m bits are selected from P1, m is not more than the length of P1, and is inserted before P2; if P1 is empty chromosome, then selecting continuous m-bit insertion from P2 into P1 to form two non-empty offspring chromosomes; if m is exactly equal to the length of P1, there is an empty daughter chromosome;
2) transposition: selecting successive n interchanges from P1 and P2, respectively, n being not more than the minimum of the lengths of P1 and P2, to form two offspring chromosomes;
3) and (3) common crossing: selecting single-point crossing, namely randomly selecting a certain position from P1 and P2 as a crossing starting point respectively, and exchanging the rear parts of the positions to form two non-empty daughter chromosomes; if P1 or P2 is empty, none of the offspring chromosomes is empty after crossing.
5. the intelligent sprinkler route planning method based on the double-layer genetic algorithm as claimed in claim 1, wherein the step five chromosome local search adopts a local optimization method for chromosomes in a certain neighborhood to search the relative optimal ordering of all gene positions of the offspring chromosomes in a certain spatial range,
The following four operations are performed in order with full probability for each pair of service arcs (u, v) represented by chromosome loci:
1) If u and v are two arcs with the same end point but opposite directions, checking whether the chromosome adaptation value is increased after u and v are exchanged, if so, exchanging, and if not, exiting;
2) Checking whether shifting u to v increases chromosome fitness, if so, swapping, otherwise, exiting;
3) if the number of arcs between u and v is more than 2, checking whether the chromosome adaptation value is increased after all genes between u and v are arranged in a reverse order, if so, reversing, otherwise, exiting;
4) if u and v are adjacent, it is checked whether the chromosome fitness value is increased after moving a series of arcs (u, x) (x is an arc between u and v) to v, if so, the crossover, otherwise, the exit is performed.
6. the intelligent watering cart route planning method based on the double-layer genetic algorithm according to claim 1, wherein the seven-optimal population decoding specifically comprises the following steps:
step 1, acquiring a series of points between the shortest paths of each pair of adjacent genes of chromosomes in a population according to the obtained arc shortest distance matrix and the corresponding precursor matrix;
Step 2, respectively obtaining the shortest paths from the first point to the corresponding parking lot and from the last point to the corresponding parking lot according to the belonged areas to form a closed driving route, namely an operation route of a certain vehicle in the final operation scheme;
step 3, if all chromosomes are decoded, the whole process is ended; otherwise, the next chromosome is decoded continuously, and the step 1 is carried out.
7. the intelligent sprinkler route planning method based on the double-layer genetic algorithm as claimed in claim 1, wherein the eight route distribution steps comprise the following specific steps:
step 1, taking k vehicles of a certain vehicle type as k sets, sequencing all routes of the vehicle type from large to small according to working time, and sequentially putting the front k routes into the k sets respectively;
Step 2, a first route in the unallocated routes is classified into a kth set;
step 3, reordering the k sets according to the working time from big to small;
step 4, if an unallocated route still exists, turning to step 2; otherwise the algorithm ends.
CN201910836488.4A 2019-09-05 2019-09-05 intelligent watering cart route planning method based on double-layer genetic algorithm Pending CN110543990A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910836488.4A CN110543990A (en) 2019-09-05 2019-09-05 intelligent watering cart route planning method based on double-layer genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910836488.4A CN110543990A (en) 2019-09-05 2019-09-05 intelligent watering cart route planning method based on double-layer genetic algorithm

Publications (1)

Publication Number Publication Date
CN110543990A true CN110543990A (en) 2019-12-06

Family

ID=68712581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910836488.4A Pending CN110543990A (en) 2019-09-05 2019-09-05 intelligent watering cart route planning method based on double-layer genetic algorithm

Country Status (1)

Country Link
CN (1) CN110543990A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183853A (en) * 2020-09-27 2021-01-05 上海聚联建设发展有限公司 Engineering vehicle transportation management method and system
CN113191567A (en) * 2021-05-21 2021-07-30 南京林业大学 Multi-forest-area air route scheduling planning method based on double-layer fusion intelligent algorithm
CN117252395A (en) * 2023-11-10 2023-12-19 南京信息工程大学 Double-chromosome genetic algorithm-based multi-logistics vehicle scheduling method with service constraint

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096006A (en) * 2015-08-24 2015-11-25 国网天津市电力公司 Method for optimizing a routing of an intelligent ammeter distributing vehicle
CN105930914A (en) * 2016-04-01 2016-09-07 东南大学 City bus optimal charging structure charge determination method based on origin-destination distance
CN106610652A (en) * 2015-12-22 2017-05-03 四川用联信息技术有限公司 Genetic algorithm using improved coding method to solve distributed flexible job shop scheduling problem
CN107239858A (en) * 2017-06-01 2017-10-10 大连好突出科技有限公司 Service path planing method, device and electronic equipment
CN108510227A (en) * 2018-03-23 2018-09-07 东华大学 A kind of real-time planning system of vehicle-mounted logistics distribution based on machine learning
CN110119839A (en) * 2019-04-24 2019-08-13 华南理工大学 A kind of Urban Road Traffic Accidents emergency management and rescue paths planning method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096006A (en) * 2015-08-24 2015-11-25 国网天津市电力公司 Method for optimizing a routing of an intelligent ammeter distributing vehicle
CN106610652A (en) * 2015-12-22 2017-05-03 四川用联信息技术有限公司 Genetic algorithm using improved coding method to solve distributed flexible job shop scheduling problem
CN105930914A (en) * 2016-04-01 2016-09-07 东南大学 City bus optimal charging structure charge determination method based on origin-destination distance
CN107239858A (en) * 2017-06-01 2017-10-10 大连好突出科技有限公司 Service path planing method, device and electronic equipment
CN108510227A (en) * 2018-03-23 2018-09-07 东华大学 A kind of real-time planning system of vehicle-mounted logistics distribution based on machine learning
CN110119839A (en) * 2019-04-24 2019-08-13 华南理工大学 A kind of Urban Road Traffic Accidents emergency management and rescue paths planning method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱征宇: "洒水车作业路线规划的复杂CARP问题求解", 《计算机应用》 *
闵海涛: "道路清扫车上装作业机构智能化控制发展趋势", 《专用汽车》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183853A (en) * 2020-09-27 2021-01-05 上海聚联建设发展有限公司 Engineering vehicle transportation management method and system
CN112183853B (en) * 2020-09-27 2022-06-03 上海聚联建设发展有限公司 Engineering vehicle transportation management method and system
CN113191567A (en) * 2021-05-21 2021-07-30 南京林业大学 Multi-forest-area air route scheduling planning method based on double-layer fusion intelligent algorithm
CN117252395A (en) * 2023-11-10 2023-12-19 南京信息工程大学 Double-chromosome genetic algorithm-based multi-logistics vehicle scheduling method with service constraint
CN117252395B (en) * 2023-11-10 2024-02-06 南京信息工程大学 Double-chromosome genetic algorithm-based multi-logistics vehicle scheduling method with service constraint

Similar Documents

Publication Publication Date Title
CN110543990A (en) intelligent watering cart route planning method based on double-layer genetic algorithm
CN105070042B (en) A kind of modeling method of traffic forecast
CN107220731A (en) A kind of logistics distribution paths planning method
CN103324982B (en) A kind of paths planning method based on genetic algorithm
CN108764555A (en) A kind of shared bicycle based on Hadoop parks a site selecting method
CN101853294B (en) Multi-mode multi-standard path search method based on genetic algorithm
CN107464005A (en) Expanded path planning method for vehicle reservation
CN106682769A (en) Method and apparatus for realizing product vehicle route
CN106600147A (en) Resolvable task oriented task assigning method and apparatus for multiple unmanned aerial vehicles
CN112132312B (en) Path planning method based on evolutionary multi-objective multi-task optimization
CN108417031A (en) A kind of intelligent parking berth reservation policy optimization method based on Agent emulation
CN105938572A (en) Interference-prevention-based multi-automatic-guided-vehicle path planning method for logistics storage system
CN108597246A (en) A method of Path selection real time problems are solved to avoid local congestion
CN109764882A (en) A kind of multiple target vehicle path planning method based on adaptive local search chain
CN109377048A (en) A kind of comprehensive traffic network hub node selection method
CN110097218A (en) Unmanned commodity distribution method and system under changing environment when a kind of
CN110084382A (en) A kind of power distribution network maintenance vehicle dispatching method and system
CN107832957A (en) A kind of public lease bicycle dispatching method based on the handling of polymorphic type bicycle
CN111445094B (en) Express vehicle path optimization method and system based on time requirement
CN115907258A (en) GVRTW-MDHV optimal scheduling method based on environment and cost consideration view angle
CN107705004A (en) A kind of Station in City site selecting method
CN115576343A (en) Multi-target vehicle path optimization method combining unmanned aerial vehicle distribution
CN111898824A (en) Same-city logistics multipoint distribution path planning method
CN117172080A (en) EV charging station planning method considering user travel difference and charging decision preference
CN114880819B (en) Space optimization method based on town node importance degree and traffic area bit line research

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191206