CN110689174A - Personnel route planning method and device based on public transport - Google Patents
Personnel route planning method and device based on public transport Download PDFInfo
- Publication number
- CN110689174A CN110689174A CN201910870544.6A CN201910870544A CN110689174A CN 110689174 A CN110689174 A CN 110689174A CN 201910870544 A CN201910870544 A CN 201910870544A CN 110689174 A CN110689174 A CN 110689174A
- Authority
- CN
- China
- Prior art keywords
- route
- public transportation
- planning
- information
- initial
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 59
- 230000002068 genetic effect Effects 0.000 claims abstract description 23
- 230000008569 process Effects 0.000 claims abstract description 19
- 210000000349 chromosome Anatomy 0.000 claims description 42
- 230000006870 function Effects 0.000 claims description 9
- 230000003044 adaptive effect Effects 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 abstract description 15
- 230000007547 defect Effects 0.000 abstract description 3
- 230000000694 effects Effects 0.000 abstract description 3
- 230000035772 mutation Effects 0.000 description 7
- 108090000623 proteins and genes Proteins 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000011156 evaluation Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000006073 displacement reaction Methods 0.000 description 3
- 230000003203 everyday effect Effects 0.000 description 3
- 238000004804 winding Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000008303 genetic mechanism Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/26—Government or public services
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Human Resources & Organizations (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- Economics (AREA)
- Biophysics (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Marketing (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- General Business, Economics & Management (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Development Economics (AREA)
- General Health & Medical Sciences (AREA)
- Operations Research (AREA)
- Primary Health Care (AREA)
- Educational Administration (AREA)
- Quality & Reliability (AREA)
- Entrepreneurship & Innovation (AREA)
- Game Theory and Decision Science (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 personnel route planning method and a device based on public transport. The method comprises the steps of obtaining travel information of personnel, obtaining a plurality of pieces of public transportation route information meeting the travel information based on the route information of public transportation, obtaining an initial planned route from the plurality of pieces of public transportation route information according to a saving algorithm, generating a large number of initial populations from all the obtained initial planned routes, and iterating by combining a genetic algorithm to obtain an optimal planned route. The method overcomes the defects of low route planning efficiency, high calculation cost, poor planning result effect or lack of flexibility based on manual experience in the prior art, can intelligently realize route planning, has low algorithm complexity and high operation efficiency, can perform parallel extended calculation, and can process large batch of data. The method can be widely applied to the field of route planning.
Description
Technical Field
The invention relates to the field of route planning, in particular to a personnel route planning method and a personnel route planning device based on public transport.
Background
The planning of public transportation travel routes according to business requirements belongs to the NP-hard problem, with the increasing complexity, the traditional methods such as a manual experience method, a linear planning method, a dynamic planning method and the like can not gradually meet the requirements of the problems, the traditional methods are high in calculation accuracy, all feasible solutions of the problems can be listed, the optimal solution can be determined, the calculation amount is very large, and only some very simple small-scale route winding displacement planning path problems can be solved. Therefore, other methods are necessary to solve the existing route planning problem, along with the rapid development of computers, the heuristic algorithm has great advantages in solving the problems, and particularly, the group intelligent algorithm is widely applied to solving the route planning problem and the like. Most of the existing intelligent algorithms can rapidly solve route winding displacement planning, and compared with manual scheduling, the intelligent algorithm has obvious advantages. However, each intelligent algorithm has its own disadvantages, and only a single intelligent algorithm is used to solve the route winding displacement planning problem, which is easy to fall into local optimization, cannot find an approximate optimal solution, takes a long time for iterative solution, and is not in line with real-time calculation required every day. Therefore, a public transport staff-based route planning method which can intelligently schedule a route and has low algorithm complexity and high operation efficiency needs to be provided.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art. Therefore, the invention aims to provide a public transport personnel-based route planning method which can intelligently schedule a route and has low algorithm complexity and high operation efficiency.
The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a method for planning a staff route based on public transportation, comprising:
acquiring travel information of a person, wherein the travel information comprises: starting address, target address, departure time and service time window;
acquiring a plurality of pieces of public transportation route information satisfying the travel information based on route information of public transportation, the public transportation route information including: route time, route distance, and specific traffic mode;
obtaining an initial planned route from the public transportation route information according to a saving algorithm;
and generating a large number of initial populations from all the obtained initial planning routes, and carrying out iteration by combining a genetic algorithm to obtain an optimal planning route.
Further, map latitude and longitude inquiry is carried out, and whether the starting address and the target address accord with real coordinate information or not is judged.
Further, the obtaining of an initial planned route from the plurality of pieces of public transportation route information according to the economizing algorithm specifically includes:
and selecting the station closest to the initial address, evaluating other stations by using a saving algorithm to judge whether the stations are selected or not until an iteration condition is reached, and forming the initial planned route by all the selected stations according to a time sequence.
Further, all the initial planned routes are arranged in a random order, each arrangement mode is used as a chromosome, and a plurality of chromosomes form the initial population.
Further, the fitness evaluation function of the genetic algorithm is represented as:
wherein,fi(T) is the fitness value of chromosome i in the population of the T generation, ziAnd (T) is an objective function value of the chromosome i in the population of the T generation, namely the transportation total cost corresponding to the chromosome i.
Further, the saving algorithm and the genetic algorithm realize an operation process under a spark architecture based on a Hadoop distributed cluster.
In a second aspect, the present invention further provides a public transportation-based staff route planning device, including:
the trip information acquisition module: the system is used for acquiring travel information of each person, and the travel information comprises: starting address, target address, departure time and service time window;
an original route obtaining module: for acquiring a plurality of pieces of public transportation route information satisfying the travel information based on route information of public transportation, the public transportation route information including: route time, route distance, and specific traffic mode;
an initial planned route obtaining module: the system comprises a plurality of pieces of public transportation route information, a route planning unit and a route planning unit, wherein the public transportation route information is used for acquiring an initial planned route from a plurality of pieces of public transportation route information corresponding to each person according to an economizing algorithm;
the module for obtaining the optimal planning route comprises: and generating a large number of initial populations from all the obtained initial planning routes, and combining a genetic algorithm to iterate to obtain the optimal planning route.
And further, the system also comprises a map longitude and latitude query module which is used for judging whether the starting address and the target address accord with real coordinate information.
In a third aspect, the present invention provides a public transportation-based staff route planning device, comprising:
at least one processor, and a memory communicatively coupled to the at least one processor;
wherein the processor is adapted to perform the method of any of the first aspects by invoking a computer program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any of the first aspects.
The invention has the beneficial effects that:
according to the method, the trip information of personnel is acquired, the information of a plurality of public transportation routes meeting the trip information is acquired based on the route information of public transportation, an initial planned route is acquired from the information of the plurality of public transportation routes according to a saving algorithm, a large number of initial populations are generated from all the acquired initial planned routes, and iteration is performed by combining a genetic algorithm to obtain the optimal planned route. The method overcomes the defects of low route planning efficiency, high calculation cost, poor planning result effect or lack of flexibility based on manual experience in the prior art, can intelligently realize route planning, has low algorithm complexity and high operation efficiency, can perform parallel extended calculation, and can process large batch of data. The method can be widely applied to the field of route planning.
Drawings
FIG. 1 is a flow chart of an implementation of an embodiment of a method for mass transit based personnel route planning in accordance with the present invention;
FIG. 2 is a schematic diagram of a saving algorithm in accordance with an embodiment of the method for mass transit based staff route planning of the present invention;
FIG. 3 is a schematic overall flow chart of the genetic algorithm of an embodiment of the public transportation-based staff route planning method of the present invention;
fig. 4 is a block diagram of an embodiment of the public transportation-based staff route planning device according to the present invention.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The first embodiment is as follows:
one scenario of the present embodiment is represented as follows: a certain number of operators need to go to a plurality of destination addresses with different positions from a starting address to do business, the destination addresses are dynamically changed every day, the selected traffic mode is public traffic, each destination address has a specified business time window, namely a service time range, therefore, the operators need to go to the destination addresses in the specified business time window to do business, in addition, the maximum number of the service destination addresses of each operator every day can be assumed, and an optimal planning route is provided by planning the route of the scene, so that the time spent by all the operators on the road is as small as possible.
Fig. 1 is a flowchart illustrating an implementation of a method for planning a route of a person based on public transportation according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
s1: and acquiring the travel information of the personnel. In this embodiment, the travel information includes: start address, destination address, departure time, business time window.
Wherein, the starting address and the target address are both expressed as latitude and longitude information, so this embodiment further includes: and inquiring the longitude and latitude of the map, judging whether the initial address and the target address accord with the real coordinate information, eliminating or correcting the information which does not accord with the real coordinate information, and numbering the longitude and latitude of all coordinate positions so as to facilitate subsequent calculation.
S2: acquiring a plurality of pieces of public transportation route information satisfying the travel information based on the route information of public transportation, the public transportation route information including: route time, route distance, and specific traffic mode.
And acquiring public transportation route information, and generating a plurality of pieces of public transportation route information meeting the travel information in the step S1, wherein the travel requirements are only met, whether the public transportation route is an optimal route or not is not required to be considered, and peak routes which run at the peak time are eliminated.
S3: obtaining an initial planned route from a plurality of pieces of public transport route information according to a saving algorithm;
s4: and generating a large number of initial populations from all the obtained initial planning routes, and carrying out iteration by combining a genetic algorithm to obtain an optimal planning route.
In the specific step S3, the core idea of the saving algorithm is to sequentially merge two route loops into one loop, that is, to select a station closest to the start address, evaluate other stations with the saving algorithm to determine whether to serve as a selected station until an iteration condition is reached, and form an initial planned route with all the selected stations according to a time sequence.
As shown in fig. 2, for the schematic diagram of the principle of the saving algorithm in this embodiment, assuming that there are 3 sites, which are denoted as O, i and j, in conjunction with fig. 2, the route distance constraint is denoted as:
S(Oi+Oj+ij)<S(Oi)+S(iO)+S(Oj)+S(jO) (1)
wherein S represents the mileage cost, and it is checked whether the time/distance cost before the saving algorithm is adopted is lower than the time/distance cost after the saving algorithm is adopted.
In some scenarios, the traffic time window limit indicates a backward recursion from the time point of arrival at the current site, and if the time of arrival at the destination site is not within the traffic time window, the current site is reached by the rest time of the current site, while ensuring that the departure time is not within the traffic time window of the previous site.
In this embodiment, by obtaining the obtained bus route information between coordinates of all stations, obtaining a station with the shortest time corresponding to the starting address as the starting station according to the information and by combining the travel information, and optimizing all the next stations from the starting station by using the saving algorithm, that is, obtaining the predicted time from the station to the next station and the predicted time from the starting station to the next station for comparison, stations with larger time differences conform to the saving principle, and obtaining a plurality of initial planned routes through multiple cycles until the limiting condition is reached.
Because a single algorithm is easy to fall into local optimum, an optimum solution cannot be found, and the time spent on iterative solution is very long, the embodiment combines the saving algorithm and the genetic algorithm, and provides a better initial population for the genetic algorithm by using the saving algorithm, so that the times of calculation iteration can be reduced when the genetic algorithm is used, and the calculation time can be shortened.
In step S4, the Genetic Algorithm (Genetic Algorithm) is a calculation model of the biological evolution process that simulates natural selection and Genetic mechanism of darwinian biological evolution theory, and is a method for searching for an optimal solution by simulating the natural evolution process.
In this embodiment, all the initial planned routes obtained in step S3 are arranged in a random order, each arrangement is used as a chromosome, a plurality of chromosomes form an initial population, and an optimal planned route is obtained by iteration in combination with a genetic algorithm, where the chromosome composition includes an initial planned route in which coordinates of each station in the initial planned route are sequentially encoded, and the routes are encoded with special symbols to generate a complete gene individual, and the chromosomes are copied and expanded to form a population, and each chromosome can obtain an adaptive value of the chromosome through an adaptive evaluation function, that is, a shortest time value. And crossing any two chromosomes in the initial population to obtain a next generation chromosome, if the adaptive value of the next generation chromosome is smaller than that of the parent, reserving, copying the less valuable chromosome in the parent, and sequentially carrying out inheritance for one generation until an individual with the most suitable adaptive value is obtained as an optimal planning route.
The steps for generating the initial population are as follows:
an initial population is generally formed in a random mode, so that the initial population is uniformly distributed in the whole solution space to the greatest extent possible, the local optimum is jumped out to a certain extent, and a solution with the highest fitness is selected from feasible solutions generated continuously for ten times as an initial optimum solution.
As shown in fig. 3, which is an overall flowchart of the genetic algorithm of this embodiment, the genetic algorithm shown in fig. 3 includes obtaining an initialization population, performing fitness detection on the initialization population, performing selection, intersection, and mutation operations on the population subjected to fitness monitoring, determining whether the population meets a termination condition, if the population does not meet the termination condition, performing the fitness detection again, and repeating the selection, intersection, and mutation operations, if the termination condition is met, performing the termination operation, where the termination condition is a preset number of iterations, where the fitness detection refers to reserving according to a larger solution of an fitness evaluation function, and the fitness evaluation function is expressed as:
wherein f isi(T) is the fitness value of chromosome i in the population of the T generation, zi(T) is an objective function value of the chromosome i in the population of the T generation, namely the transportation total cost corresponding to the chromosome i, fiThe greater the value of (T), the closer the route corresponding to chromosome i is to the optimally planned route.
When selecting, the current population size is set as N, wherein the adaptive value of the chromosome j is fiThen j is selected with probability PsjExpressed as:
wherein the probability PsjReflecting the proportion of the fitness value of the chromosome in the sum of the fitness values of the chromosomes of the whole population, the probability that the chromosome is selected is higher the fitness of the chromosome is, and vice versa.
The crossover process is described as follows:
1) the crossover operator acts on the designated population, any parent chromosome (parent 1) is selected from chromosomes of each pair of parents, and 2 crossover points are selected at will;
2) the gene between these 2 intersections was taken out and designated as T;
3) taking out the gene at the intersection point of the chromosome (parent 2) of the other parent and the parent 1, and inserting the gene into the vacancy of the parent 1 according to the sequence of the gene in the parent 2 to obtain a child 1;
4) the chromosome taken out of the parent 1 is added to the vacancy in the parent 2 according to the position of the chromosome in the parent 1, and then the offspring 2 is obtained.
Currently, a PMX-like method is generally adopted, and it is assumed that there are two parents A, B, and the crossing position is "|":
A=1 2||4 5 7 6||3 8 9
B=2 1||5 4 3 7||8 6 9
wherein A and B represent chromosomes, numbers 1 to 9 represent daughters, the 4567 sequence in A is firstly assigned to the first 4 positions of daughter A1, then the elements in B are compared with 4567 one by one, if the elements are the same, the elements are not used, if the elements are different, the sequences are placed at the subsequent positions of daughter A1, thereby obtaining daughter A1 of 457621389, and the daughter B1 of 543712689 can be obtained by the same method. The two chromosomes crossed in this step are derived from the two chromosomes generated in the previous step, and two new daughters are generated as parents for the next mutation operation according to the PMX-like method.
The probability of mutation is small, so that the mutation operation only plays an auxiliary role in the genetic algorithm. And carrying out chromosome variation on each generation of population according to the variation probability Pm. In this case, a mutation strategy for exchanging two gene values is applied to chromosomes, that is, a random multiple-permutation method is applied to determine whether two new chromosomes generated in the previous step are mutated or not according to a certain mutation probability Pm. For example, there is a chromosome C of 125473698, and two designated crossover positions are randomly generated, 3 rd and 7 th, and then element 3, element 5 and element 7, 6 are swapped to obtain a new chromosome 126473598.
Further, if considering the route distance constraint and the traffic time window limit, a route cut is needed when they cannot be met at the same time, i.e. a new route is opened.
In addition, because the data volume processed in the embodiment is large, the spark architecture based on the Hadoop distributed cluster is selected to realize the operation process, and the operation efficiency is improved.
The Hadoop is a distributed computing platform, can run an application program for processing mass data, and comprises two core modules, a distributed storage module HDFS and a distributed computing module MapReduce. The HDFS, i.e., Hadoop distributed file System, is an open source System, and is an extensible file storage and transfer System capable of facing large-scale data usage, and a file System allowing files to be shared on multiple hosts through a network, so that multiple users on multiple machines can share files and storage spaces, and access the files through the network, as if accessing a local disk from the perspective of a user, and even if some nodes in the System are offline, the System can continue to operate without data loss as a whole.
It is divided into two parts: the Name Node and Date Node, the Name Node manages the Data Node in the cluster, when the client sends the request, the Name Node can appoint which Data Node to store to according to the situation, but it does not store the real Data. An HDFS cluster is composed of a Name Node and a certain number of Data nodes, wherein the Name Node is a central server and is responsible for managing the Name space of a file system and the access of a client to files. A cluster Data Node typically runs a Data Node process from a Node and is responsible for managing the storage on the Node where it is located.
From the inside, a file is actually divided into one or more Data blocks, the Data blocks are stored on a group of DataNodes, the Name Node executes the Name space operation of the file system, such as opening, closing, renaming the file or the directory, and is responsible for determining the mapping of the Data blocks to specific Data Node nodes, the Data Node is responsible for processing the read/write request of the client of the file system, and the Data blocks are created, deleted and copied under the unified scheduling of the Name Node, so that the Data cluster system is efficient.
Further, in the embodiment, a Spark architecture is selected to implement the operation process, Spark is a big data processing framework built around speed, usability and complex analysis, and Spark is used for managing the requirement of big data processing of various data sets and data sources (batch data or real-time streaming data) with different properties (text data, chart data, and the like). The Spark architecture adopts a Master-Slave model in distributed computing, wherein the Master is a node which contains a Master process in a corresponding cluster, the Slave is a node which contains a Worker process in the cluster, the Master is used as a controller of the whole cluster and is responsible for normal operation of the whole cluster, the Worker is equivalent to a computing node and is used for receiving a main node command and carrying out state report, and the Executor is responsible for executing tasks; the Client is used as a Client of the user and is responsible for submitting the application, and the Driver is responsible for controlling the execution of one application.
After Spark cluster deployment, a Master process and a Worker process need to be respectively started at a Master node and a slave node to control the whole cluster, and a Driver and a Worker play two important roles in the execution process of Spark application. The Driver program is the starting point of application logic execution and is responsible for scheduling of jobs, namely the distribution of Task tasks, and a plurality of Workers are used for managing computing nodes and creating executors to process tasks in parallel. In the execution stage, the Driver serializes files and jar depended by the Task and transmits the serialized files and jar to a corresponding Worker machine, and the Executor processes tasks of corresponding data partitions.
The Spark has various and flexible operation modes, and when deployed on a single machine, the Spark can be operated in a local mode or a pseudo-distributed mode, and when deployed in a distributed Cluster manner, a plurality of operation modes can be selected, which depends on the actual demand condition of the Cluster.
In YARN-Cluster mode, when a user submits an application to YARN, YARN runs the application in two phases: the first stage is that the Driver of Spark is used as an applicationMaster to start in the YARN cluster first; the second phase is that an application program is created by an ApplicationMaster, then the application program applies for resources from a ResourceManager, an execution is started to run the Task, and the whole running process of the Task is monitored until the running is finished.
In this embodiment, Spark itself does not provide a distributed file system, so Spark analysis mostly depends on a Hadoop distributed file system HDFS, MapReduce and Spark of Hadoop can both perform data calculation, and Spark is faster and provides more abundant functions compared with MapReduce. Therefore, the embodiment adopts a Hadoop storage module HDFS and a spare calculation module.
The embodiment overcomes the defects of low route planning efficiency, high calculation cost, poor planning result effect or lack of flexibility based on manual experience in the prior art, can intelligently realize route planning, has low algorithm complexity and high operation efficiency, can perform parallel extended calculation, and can process large batch of data.
Example two:
the present embodiment provides a public transportation based staff route planning device, configured to execute the method according to the first embodiment, as shown in fig. 4, which is a structural block diagram of the public transportation based staff route planning device according to the present embodiment, and includes:
the get travel information module 100: the method is used for acquiring the travel information of each person, and the travel information comprises the following steps: starting address, target address, departure time and service time window;
get original route module 200: for acquiring a plurality of pieces of public transportation route information satisfying travel information based on route information of public transportation, the public transportation route information including: route time, route distance, and specific traffic mode;
the get initial planned route module 300: the system comprises a plurality of pieces of public transportation route information, a route planning unit and a route planning unit, wherein the public transportation route information is used for acquiring an initial planned route from a plurality of pieces of public transportation route information corresponding to each person according to an economizing algorithm;
the get optimal planned route module 400: and generating a large number of initial populations from all the obtained initial planning routes, and combining a genetic algorithm to iterate to obtain the optimal planning route.
Further, the map latitude and longitude inquiry module 500 is further included for judging whether the starting address and the target address conform to the real coordinate information.
In addition, the invention also provides a personnel route planning device based on public transport, which comprises:
at least one processor, and a memory communicatively coupled to the at least one processor;
wherein the processor is configured to perform the method according to embodiment one by calling the computer program stored in the memory.
In addition, the present invention also provides a computer-readable storage medium, which stores computer-executable instructions for causing a computer to perform the method according to the first embodiment.
According to the method, the trip information of the personnel is acquired, the information of a plurality of public transportation routes meeting the trip information is acquired based on the route information of public transportation, an initial planned route is acquired from the information of the plurality of public transportation routes according to a saving algorithm, a large number of initial populations are generated from all the acquired initial planned routes, iteration is performed by combining a genetic algorithm to obtain an optimal planned route, and the method can be widely applied to the field of route planning.
The above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same, although the present invention is described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.
Claims (10)
1. A method for mass transit based personnel route planning, comprising:
acquiring travel information of a person, wherein the travel information comprises: starting address, target address, departure time and service time window;
acquiring a plurality of pieces of public transportation route information satisfying the travel information based on route information of public transportation, the public transportation route information including: route time, route distance, and specific traffic mode;
obtaining an initial planned route from the public transportation route information according to a saving algorithm;
and generating a large number of initial populations from all the obtained initial planning routes, and carrying out iteration by combining a genetic algorithm to obtain an optimal planning route.
2. The method of claim 1, further comprising performing a map latitude and longitude query to determine whether the start address and the target address conform to real coordinate information.
3. The method as claimed in claim 1, wherein the obtaining of an initial planned route from the plurality of pieces of public transportation route information according to a saving algorithm is specifically:
and selecting the station closest to the initial address, evaluating other stations by using a saving algorithm to judge whether the stations are selected or not until an iteration condition is reached, and forming the initial planned route by all the selected stations according to a time sequence.
4. A method for mass transit based personnel route planning according to claim 1 wherein all initially planned routes are ranked in a random order, each ranking being taken as a chromosome, a plurality of said chromosomes constituting said initial population.
5. A method for mass transit based personnel route planning according to claim 4, characterized in that the adaptive merit function of the genetic algorithm is expressed as:
wherein f isi(T) is the fitness value of chromosome i in the population of the T generation,ziAnd (T) is an objective function value of the chromosome i in the population of the T generation, namely the transportation total cost corresponding to the chromosome i.
6. The method for personnel route planning based on public transportation according to any one of claims 1 to 5, characterized in that the conservation algorithm and the genetic algorithm implement operation process under spark architecture based on Hadoop distributed cluster.
7. A mass transit based personnel route planning apparatus, comprising:
the trip information acquisition module: the system is used for acquiring travel information of each person, and the travel information comprises: starting address, target address, departure time and service time window;
an original route obtaining module: for acquiring a plurality of pieces of public transportation route information satisfying the travel information based on route information of public transportation, the public transportation route information including: route time, route distance, and specific traffic mode;
an initial planned route obtaining module: the system comprises a plurality of pieces of public transportation route information, a route planning unit and a route planning unit, wherein the public transportation route information is used for acquiring an initial planned route from a plurality of pieces of public transportation route information corresponding to each person according to an economizing algorithm;
the module for obtaining the optimal planning route comprises: and generating a large number of initial populations from all the obtained initial planning routes, and combining a genetic algorithm to iterate to obtain the optimal planning route.
8. The public transportation-based staff route planning device of claim 7, further comprising a map latitude and longitude inquiry module for judging whether the starting address and the target address conform to real coordinate information.
9. A mass transit based personnel routing apparatus, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the processor is adapted to perform the method of any one of claims 1 to 6 by invoking a computer program stored in the memory.
10. A computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910870544.6A CN110689174B (en) | 2019-09-16 | 2019-09-16 | Personnel route planning method and device based on public transportation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910870544.6A CN110689174B (en) | 2019-09-16 | 2019-09-16 | Personnel route planning method and device based on public transportation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110689174A true CN110689174A (en) | 2020-01-14 |
CN110689174B CN110689174B (en) | 2023-09-26 |
Family
ID=69109313
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910870544.6A Active CN110689174B (en) | 2019-09-16 | 2019-09-16 | Personnel route planning method and device based on public transportation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110689174B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112163754A (en) * | 2020-09-22 | 2021-01-01 | 深圳市北斗智能科技有限公司 | Personnel scheduling planning method, device and computer storage medium |
CN112183838A (en) * | 2020-09-22 | 2021-01-05 | 湘潭大学 | Method for optimizing and solving intelligent unmanned vehicle path planning problem based on multi-constraint correction C-W algorithm |
CN113393024A (en) * | 2021-06-03 | 2021-09-14 | 北京沃东天骏信息技术有限公司 | Indoor space planning method and device, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105427001A (en) * | 2015-12-03 | 2016-03-23 | 北京理工大学 | Optimal route of school bus of regional middle and primary school |
CN107330559A (en) * | 2017-07-03 | 2017-11-07 | 华南理工大学 | A kind of hybrid customization public bus network planing method of many terminus multi-vehicle-types |
CN108921483A (en) * | 2018-07-16 | 2018-11-30 | 深圳北斗应用技术研究院有限公司 | A kind of logistics route planing method, device and driver arrange an order according to class and grade dispatching method, device |
CN109934401A (en) * | 2019-03-09 | 2019-06-25 | 吉林大学 | A kind of customization public transport method based on mobile interchange |
CN110084402A (en) * | 2019-03-25 | 2019-08-02 | 广东工业大学 | A kind of public transport self-adapting dispatching method preferably to be tracked with ant based on website |
-
2019
- 2019-09-16 CN CN201910870544.6A patent/CN110689174B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105427001A (en) * | 2015-12-03 | 2016-03-23 | 北京理工大学 | Optimal route of school bus of regional middle and primary school |
CN107330559A (en) * | 2017-07-03 | 2017-11-07 | 华南理工大学 | A kind of hybrid customization public bus network planing method of many terminus multi-vehicle-types |
CN108921483A (en) * | 2018-07-16 | 2018-11-30 | 深圳北斗应用技术研究院有限公司 | A kind of logistics route planing method, device and driver arrange an order according to class and grade dispatching method, device |
CN109934401A (en) * | 2019-03-09 | 2019-06-25 | 吉林大学 | A kind of customization public transport method based on mobile interchange |
CN110084402A (en) * | 2019-03-25 | 2019-08-02 | 广东工业大学 | A kind of public transport self-adapting dispatching method preferably to be tracked with ant based on website |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112163754A (en) * | 2020-09-22 | 2021-01-01 | 深圳市北斗智能科技有限公司 | Personnel scheduling planning method, device and computer storage medium |
CN112183838A (en) * | 2020-09-22 | 2021-01-05 | 湘潭大学 | Method for optimizing and solving intelligent unmanned vehicle path planning problem based on multi-constraint correction C-W algorithm |
CN112183838B (en) * | 2020-09-22 | 2024-02-02 | 湘潭大学 | Method for optimally solving intelligent unmanned vehicle path planning problem based on multi-constraint correction C-W algorithm |
CN113393024A (en) * | 2021-06-03 | 2021-09-14 | 北京沃东天骏信息技术有限公司 | Indoor space planning method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110689174B (en) | 2023-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103413209B (en) | Many client many warehouses logistics distribution routing resources | |
CN110632907B (en) | Scheduling optimization method and system for distributed assembly type replacement flow shop | |
CN110222005A (en) | Data processing system and its method for isomery framework | |
CN110689174A (en) | Personnel route planning method and device based on public transport | |
Kieritz et al. | Distributed time-dependent contraction hierarchies | |
Grzybowska et al. | Decision support system for real-time urban freight management | |
CN105653204A (en) | Distributed graph calculation method based on disk | |
US20150170052A1 (en) | Method of reducing resource fluctuations in resource leveling | |
CN103914556A (en) | Large-scale graph data processing method | |
Lei et al. | Hybrid heuristic search approach for deadlock-free scheduling of flexible manufacturing systems using Petri nets | |
CN105468439A (en) | Adaptive parallel algorithm for traversing neighbors in fixed radius under CPU-GPU (Central Processing Unit-Graphic Processing Unit) heterogeneous framework | |
CN112836974A (en) | DQN and MCTS based box-to-box inter-zone multi-field bridge dynamic scheduling method | |
Gholami et al. | Solving parallel machines job-shop scheduling problems by an adaptive algorithm | |
CN110347636A (en) | Data execute body and its data processing method | |
Shang et al. | Spatial scheduling optimization algorithm for block assembly in shipbuilding | |
CN111510334B (en) | Particle swarm algorithm-based VNF online scheduling method | |
CN115293623A (en) | Training method and device for production scheduling model, electronic equipment and medium | |
CN114611755A (en) | Hybrid meta-heuristic algorithm-based optimal path determination method for traveling salesman | |
Potuzak | Optimization of a genetic algorithm for road traffic network division using a distributed/parallel genetic algorithm | |
Er et al. | Parallel genetic algorithm to solve traveling salesman problem on mapreduce framework using hadoop cluster | |
Souravlias et al. | Smart traffic lights: A first parallel computing approach | |
Zhang et al. | A hybrid differential evolution and tree search algorithm for the job shop scheduling problem | |
CN116907490A (en) | Multi-robot path planning method based on conflict search | |
Wu et al. | An Improved Genetic‐Shuffled Frog‐Leaping Algorithm for Permutation Flowshop Scheduling | |
Quan et al. | Multi-objective evolutionary scheduling based on collaborative virtual workflow model and adaptive rules for flexible production process with operation reworking |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |