CN112163754A - Personnel scheduling planning method, device and computer storage medium - Google Patents

Personnel scheduling planning method, device and computer storage medium Download PDF

Info

Publication number
CN112163754A
CN112163754A CN202011001867.0A CN202011001867A CN112163754A CN 112163754 A CN112163754 A CN 112163754A CN 202011001867 A CN202011001867 A CN 202011001867A CN 112163754 A CN112163754 A CN 112163754A
Authority
CN
China
Prior art keywords
particle
processing
particle swarm
personnel
line
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
CN202011001867.0A
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.)
Shenzhen Beidou Intelligence Technology Co ltd
Original Assignee
Shenzhen Beidou Intelligence Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Beidou Intelligence Technology Co ltd filed Critical Shenzhen Beidou Intelligence Technology Co ltd
Priority to CN202011001867.0A priority Critical patent/CN112163754A/en
Publication of CN112163754A publication Critical patent/CN112163754A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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

Landscapes

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

Abstract

The invention discloses a method and a device for personnel scheduling planning and a computer storage medium. The personnel scheduling planning method comprises the following steps: acquiring a shortest path set between any two destinations in the destination set; processing each route in the shortest path set through a saving algorithm to obtain an initial route; processing the initial line through a genetic algorithm to obtain a second line; and processing the second line through a particle swarm algorithm to obtain a distribution line. Therefore, the distribution route of the personnel is obtained by combining a plurality of algorithms including the saving algorithm, the genetic algorithm and the particle swarm algorithm, so that the error caused by the probability of route planning of the genetic algorithm and the particle swarm algorithm can be reduced, the distribution route scheme with the relatively lowest total service cost is obtained, and the personnel scheduling efficiency is improved.

Description

Personnel scheduling planning method, device and computer storage medium
Technical Field
The invention relates to the field of route planning, in particular to a personnel scheduling planning method, a personnel scheduling planning device and a computer storage medium.
Background
With the development of the times, more and more services are provided for the home. At present, the overall service cost of the overall home service is increased sharply due to unreasonable personnel allocation and unreasonable path planning. Although the assignment can be performed by adopting the NP-hard solution to improve the efficiency of personnel scheduling, the increase speed of the total service cost is slowed down. However, as the traffic volume increases, more and more information is processed in the NP-hard, and the conventional methods, such as a manual experience method, a linear programming method, a dynamic programming method, etc., gradually fail to satisfy the requirements of the problem. Although the path can be simply optimized by the saving algorithm and then planned as the genetic algorithm input, the calculation amount of the genetic algorithm can be reduced. However, the routes assigned by the genetic algorithm have randomness, so that the obtained routes are not ideal after the iteration number meets the condition. At this time, scheduling according to the route still causes inefficiency of personnel scheduling.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, in the first aspect, the invention provides a method for personnel scheduling planning, which can improve the efficiency of personnel scheduling; in a second aspect, the present invention provides a personnel scheduling planning apparatus; in a third aspect, the present invention provides a computer storage medium.
In some embodiments of the first aspect of the present invention, the method of staff scheduling planning comprises the steps of:
acquiring a shortest path set between any two destinations in the destination set;
processing each path in the shortest path set through a saving algorithm, and obtaining an initial line according to each processed path;
processing the initial line through a genetic algorithm to obtain a second line;
and processing the second line through a particle swarm algorithm to obtain a distribution line.
According to the above embodiments of the present invention, at least the following advantages are provided: by combining the saving algorithm, the calculation amount of path planning in the genetic algorithm and the particle swarm algorithm can be reduced, and because the genetic algorithm and the particle swarm algorithm are iteratively solved through probability and a single algorithm is adopted to plan multiple targets, the final distribution line has randomness and larger error. Therefore, the distribution routes of the personnel are obtained by combining multiple algorithms of the saving algorithm, the genetic algorithm and the particle swarm algorithm, errors caused by route planning of the genetic algorithm and the particle swarm algorithm through probability can be reduced, the total service cost is relatively the lowest scheme of the distribution routes, and the personnel scheduling efficiency is improved.
In some embodiments of the first aspect of the present invention, the obtaining a shortest path set between any two destinations in the destination set comprises:
acquiring public transportation route data of each destination according to the destination set;
acquiring a public transportation route and route time between any two destinations in the destination set according to the public transportation route data, wherein the route time is the time required by the public transportation route;
and setting the path with the shortest path time in all the public transport paths as the shortest path, and taking the set of all the shortest paths as the shortest path set.
By setting the route travel mode to public transportation, a plan for personnel scheduling in the case of using public transportation can be obtained.
In some embodiments of the first aspect of the present invention, the obtaining a shortest path set between any two destinations in the destination set further includes:
removing routes that are in peak operation in the public transportation route data.
By removing routes that run during peak periods, it is possible to avoid a situation where the total route of the entire destination set takes longer because the selected route runs only during peak periods.
In some embodiments of the first aspect of the present invention, the processing the initial line by a genetic algorithm to obtain the second line comprises the steps of:
initializing the initial lines to obtain an initial line set, and taking each line in the initial line set as a genetic individual of the genetic algorithm;
performing iterative processing on all the gene individuals through the genetic algorithm to obtain a first fitness value of each gene individual after each iterative processing of the genetic algorithm;
matching the first fitness value and the current iteration times of the genetic algorithm with preset conditions, and stopping the iterative processing of the genetic algorithm according to a matching result;
and obtaining a target gene individual with the largest first fitness value in all the gene individuals after the iterative processing of the genetic algorithm is stopped, and taking the target gene individual as the second line.
By setting the preset conditions, the iterative processing of the genetic algorithm can be controlled more flexibly; therefore, the method can adapt to path planning under different scenes.
In some embodiments of the first aspect of the present invention, the processing the second line by a particle swarm algorithm to obtain a distribution line includes the following steps:
acquiring personnel information in a personnel set to be distributed, wherein the personnel information comprises personnel number;
initializing the second line according to the personnel information to obtain a second line set, and taking the second line set as a particle swarm of the particle swarm algorithm;
enabling each particle of the particle swarm to correspond to the personnel to be distributed one by one;
processing the particle swarm through the particle swarm algorithm to obtain a first position of each particle in the particle swarm, and obtaining a distribution route of the personnel to be distributed according to the first position.
Therefore, each distributor is distributed to each particle of the particle swarm, the particle swarm algorithm can be used for simultaneously planning paths for all the distributors, and the total service cost after the iterative processing of each particle swarm is obtained, so that the distribution route corresponding to the personnel on each particle when the total service cost is optimal can be obtained.
In some embodiments of the first aspect of the present invention, the method of staff scheduling planning further comprises the steps of:
processing the particle swarm through the genetic algorithm to obtain an updated particle swarm;
and processing the updated particle swarm through the particle swarm algorithm to obtain the distribution route of the personnel to be distributed.
By adding the genetic algorithm into the particle swarm algorithm, the search range of the particles can be expanded, and therefore the optimal distribution route is selected under the condition of more path selections.
In some embodiments of the first aspect of the present invention, said processing said population of particles by said genetic algorithm to obtain an updated population of particles comprises the steps of:
randomly obtaining first particles and second particles from the population of particles;
acquiring a first position of the first particle;
performing intersection and variation processing on a first path segment corresponding to the first position of the first particle and a second path segment randomly selected from the second particles through the genetic algorithm to obtain an updated first particle and an updated second particle;
updating the particle swarm according to the updated first particles and the updated second particles.
The first particles and the second particles are crossed and varied, so that the distribution route corresponding to the first position with lower total service cost can be obtained, and the personnel scheduling efficiency is improved.
In some embodiments of the first aspect of the present invention, said processing said population of particles by a genetic algorithm to obtain an updated population of particles further comprises the steps of:
obtaining a second location of the particle swarm;
acquiring third particles corresponding to the second position in the particle swarm, and randomly acquiring fourth particles in the particle swarm;
crossing and mutating a third path segment and a fourth path segment by a genetic algorithm to obtain an updated third particle and an updated fourth particle, wherein the third path segment corresponds to the second position of the third particle, and the fourth path segment is a path segment randomly selected from the fourth particle;
updating the particle swarm according to the updated third particle and the updated fourth particle.
By carrying out intersection and variation processing on the third particles and the fourth particles, the retrieval range of the particle swarm algorithm can be expanded, and the situation that the local optimization is not the optimal condition but the global optimization is avoided; therefore, in the next particle swarm algorithm, the total service cost of the particle swarm is the lowest, and the personnel scheduling efficiency is improved.
According to some embodiments of the second aspect of the present invention, the means for personnel scheduling planning comprises:
the system comprises an input module, a processing module and a processing module, wherein the input module is used for acquiring a destination set to be distributed and personnel to be distributed; the map module is used for acquiring a shortest path set according to the destination set; the first processing module performs saving algorithm processing according to the shortest path set to obtain an initial line; the second processing module is used for carrying out genetic algorithm processing on the initial line to obtain a second line; and the third processing module is used for processing the second line through a particle swarm algorithm to obtain the distribution line of the personnel to be distributed.
The method for personnel scheduling planning according to the first aspect of the present invention is implemented by a device for personnel scheduling planning according to an embodiment of the present invention, and therefore has all the advantages of the first aspect of the present invention.
According to some embodiments of the third aspect of the present invention, the computer storage medium has stored thereon computer-executable instructions for causing a computer to perform the method of personnel scheduling planning as set forth in any of the first aspects.
All the benefits of the first aspect of the present invention are obtained in that the computer storage medium of an embodiment of the present invention performs the method for personnel scheduling planning as described in any one of the first aspect of the present invention.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a diagram illustrating steps of a method for scheduling personnel according to an embodiment of the present invention;
fig. 2 is a diagram of a shortest path set obtaining step of a personnel scheduling planning method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a particle swarm algorithm of a personnel scheduling planning method according to an embodiment of the present invention;
fig. 4 is a structural diagram of an apparatus for scheduling and planning personnel according to an embodiment of the present invention.
Reference numerals:
an input module 410, a map module 420, a first processing module 430, a second processing module 440, and a third processing module 450.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
A method, an apparatus, and a computer storage medium for personnel scheduling planning according to embodiments of the present invention are described below with reference to fig. 1-4.
As shown in fig. 1, the method for personnel scheduling planning includes the following steps:
and step S100, acquiring a shortest path set between any two destinations in the destination set.
It should be understood that the shortest path set represents the lowest cost of service between each two destinations. In some embodiments, the cost of service is a cost of time, i.e., the time it takes to travel from one destination to another. In other embodiments, the cost of service is a distance cost, i.e., the distance from one destination to another.
And S200, processing each path in the shortest path set through a saving algorithm, and obtaining an initial line according to each processed path.
It should be appreciated that the savings algorithm may combine the two loops formed in the path to minimize the total cost of service after combining. It should be understood that since the shortest path between any two destinations is acquired in S100, a loop formation situation may occur. In the practical application process, each destination only needs to be served once, so that the access to the destination is reduced as much as possible, and a path with better service cost can be obtained.
It should be understood that processing each path in the shortest path set by the saving algorithm results in a plurality of paths, and it is assumed that each path processed by the saving algorithm is S1, S2, S3, where S1, S2, S3 respectively represent the following: s1 ═ (a, b, c); s2 ═ (d, e, g); s3 ═ (a, k, u); then the initial line S is (0, a, b, c,0, d, e, g,0, a, k, u); where 0 represents the start of another path. It should be noted that, since the saving algorithm is an existing algorithm, the steps of obtaining S1, S2, and S3 are not described in detail herein.
And step S300, processing the initial line through a genetic algorithm to obtain a second line.
It is understood that genetic algorithms are continually optimized for genetic individuals by probability to yield the most valuable genetic individuals of all genetic individuals in the genetic algorithm. And the initial route is a route which is optimized preliminarily, and partial invalid routes are reduced. Therefore, the calculation amount in the iterative process of the genetic algorithm can be reduced, and the efficiency is higher.
And step S400, processing the second line through a particle swarm algorithm to obtain a distribution line.
It should be understood that, because the local search efficiency of the genetic algorithm is low, the search efficiency becomes low after the number of iterations reaches a certain degree, and at this time, the total service cost of the acquired second line is not optimal due to the influence of the number of iterations; therefore, a particle swarm algorithm is added to further obtain a better distribution line.
Therefore, by combining the conservation algorithm, the calculation amount of path planning in the genetic algorithm and the particle swarm algorithm can be reduced, and because the genetic algorithm and the particle swarm algorithm are iteratively solved through probability and a single algorithm is adopted to plan multiple targets, the final distribution line has randomness and larger errors. Therefore, the distribution routes of the personnel are obtained by combining multiple algorithms of the saving algorithm, the genetic algorithm and the particle swarm algorithm, errors caused by route planning of the genetic algorithm and the particle swarm algorithm through probability can be reduced, the total service cost is relatively the lowest scheme of the distribution routes, and the personnel scheduling efficiency is improved.
In some embodiments of the first aspect of the present invention, as shown in fig. 2, step S100 comprises the steps of:
step S101, obtaining public transportation route data of each destination according to the destination set.
It should be understood that the public transportation route data may be acquired from a public transportation operation official network or acquired by inputting address information of a destination in a map. It should be understood that in some embodiments, there are some transit routes that are only run on weekdays, and thus, the public transit route data is the actual transit route that is run on the day that the person to be assigned is working.
Step S102, obtaining a public transportation route between any two destinations and a plurality of route time according to the public transportation route data, wherein the route time is the time required by the public transportation route.
And step S103, setting the path with the shortest path time in all the public transport paths as the shortest path, and taking the set of all the shortest paths as the shortest path set.
By setting the route travel mode to public transportation, a plan for personnel scheduling in the case of using public transportation can be obtained.
In some embodiments of the first aspect of the present invention, S100, obtaining a shortest path set between any two destinations in the destination set, further includes the following steps:
removing the routes that run during the peak periods in the public transportation route data.
By removing routes that run during peak periods, it is possible to avoid a situation where the total route of the entire destination set takes longer because the selected route runs only during peak periods.
In some embodiments of the first aspect of the present invention, step S300 comprises the steps of:
and initializing the initial lines to obtain an initial line set, and taking each line in the initial line set as a genetic individual of the genetic algorithm.
And performing iterative processing on all gene individuals through a genetic algorithm to obtain a first fitness value of each gene individual after each iterative processing of the genetic algorithm.
It should be understood that the first fitness value corresponds to the total service cost, and in some embodiments, a first price evaluation parameter is further set, and the first price evaluation parameter is set as the congestion cost and the distance; the method is used for weighing the loss of more time caused by traffic jam when people go out at different time intervals, and therefore the total service cost which is more consistent with the actual situation is obtained. In other embodiments, the first value evaluation parameter is distance. At this time, the service cost is obtained according to the first value evaluation parameter. In other embodiments, the cost of service is set as the sum of the time spent traversing each path on the genetic entity.
And matching the first fitness value and the current iteration times of the genetic algorithm with preset conditions, and stopping the iterative processing of the genetic algorithm according to the matching result.
It should be understood that the preset condition is used to stop the iterative process of the genetic algorithm. The preset conditions may be set manually, and include the number of iterations and the expected total service cost.
And obtaining a target gene individual with the largest first fitness value in all gene individuals after the iterative processing of the genetic algorithm is stopped, and taking the target gene individual as a second line.
It should be understood that there are cases where the genetic algorithm does not find the optimal genetic individual because the iteration is stopped due to the number of iterations being satisfied, and therefore, it is necessary to obtain the first fitness for all the genetic individuals and select the maximum value as the second route. And when the genetic algorithm stops iteration due to the fact that the expected total service cost is reached, the first fitness value of the target gene individual is the largest, and the total service cost is the lowest.
By setting the preset conditions, the iterative processing of the genetic algorithm can be controlled more flexibly; therefore, the method can adapt to path planning under different scenes.
In some embodiments of the first aspect of the present invention, as shown in fig. 3, step S400 comprises the steps of:
and S410, acquiring personnel information in the personnel set to be distributed, wherein the personnel information comprises the number of the personnel.
It will be appreciated that where staff determination is made, full use of personnel is required so that the overall cost of service can be optimised.
And step S420, initializing the second line according to the personnel information to obtain a second line set, and taking the second line set as a particle swarm of the particle swarm algorithm.
It will be appreciated that the initialization process includes copying the second line to obtain a plurality of second lines having the same number of people.
And step S430, corresponding each particle of the particle group to the personnel to be distributed one by one.
Step S440, processing the particle swarm through a particle swarm algorithm to obtain a first position of each particle in the particle swarm and a second position of the particle swarm, and obtaining a distribution route of the personnel to be distributed according to the first position.
It should be understood that the first location and the second location correspond to the location pbest in the particle swarm algorithm and the global experienced location gbest, respectively. The second fitness value in the particle algorithm is the total service cost of the distribution route.
It should be understood that since each route has directivity, with the first position as a starting point, information on a route to be traveled by a person to be assigned can be obtained. It should be noted that the second fitness value in the particle swarm algorithm is determined according to the total service cost of all the particles. And when the second fitness value of the whole particle swarm is optimal historically, updating the current first position of each particle. And acquiring the first position of the fifth particle when the service cost of all the particles in the particle swarm is the lowest, and updating the current second position as the first position of the fifth particle.
It should be understood that in some embodiments, the personnel information also includes allocation zone information as well as a cost value. In the practical application process, the districts are divided in a city, and a certain number of people are fixedly distributed in each district, so that the business response can be more efficiently carried out. And when people in different areas are processed in a cross-area mode, time cost exists, so that the cost value and distribution area information are added, and the total service cost is calculated to enable the obtained distribution route to be more optimal.
Therefore, each distributor is distributed to each particle of the particle swarm, the particle swarm algorithm can be used for simultaneously planning paths for all the distributors, and the total service cost after the iterative processing of each particle swarm is obtained, so that the distribution route corresponding to the personnel on each particle when the total service cost is relatively optimal can be obtained.
In some embodiments of the first aspect of the present invention, as shown in fig. 2, the method for personnel scheduling planning further comprises the following steps:
and S450, processing the particle swarm through a genetic algorithm to obtain an updated particle swarm.
It will be appreciated that there are situations where the total service cost is not optimal due to the effect on the total service cost of not adding personnel attributes to the second line. Therefore, after the genetic algorithm is added, paths in the second line are recombined, and a better total service cost can be obtained with a certain probability.
It is understood that, when the total service cost of the obtained particle group is higher than the total service cost of the original particle group after being processed by the genetic algorithm, the update operation of the particle group is not performed at this time.
And step S460, processing the updated particle swarm through a particle swarm algorithm to obtain a distribution route of the personnel to be distributed.
It should be understood that the genetic algorithm updates the information of each path in the second line, and therefore the updated particle swarm needs to be processed continuously through the particle swarm algorithm, and the first position and the second position of each particle in the particle swarm are updated until an allocation route lower than the expected total service cost can be obtained or the preset number of iterations in the particle swarm algorithm is reached. The expected total service cost may be set based on human experience, and the expected total service cost may be set to coincide with the expected total service cost in the genetic algorithm.
By adding the genetic algorithm into the particle swarm algorithm, the search range of the particles can be expanded, and therefore a relatively optimal distribution route is selected under the condition of more path selection.
In some embodiments of the first aspect of the present invention, the step S450 of processing the population of particles by a genetic algorithm to obtain an updated population of particles comprises the steps of:
first particles and second particles are randomly obtained from a population of particles.
A first position of the first particle is acquired.
And crossing and mutating a first path segment corresponding to the first position of the first particle and a randomly selected second path segment in the second particles by a genetic algorithm to obtain an updated first particle and an updated second particle.
And updating the particle swarm according to the updated first particles and the updated second particles.
The first particles and the second particles are crossed and varied, so that the distribution route corresponding to the first position with lower total service cost can be obtained, and the personnel scheduling efficiency is improved.
In some embodiments of the first aspect of the present invention, S460, processing the population of particles by a genetic algorithm to obtain an updated population of particles further comprises the steps of:
a second location of the particle population is obtained.
And acquiring third particles corresponding to the second positions in the particle swarm, and randomly acquiring fourth particles in the particle swarm.
And crossing and mutating the third path segment and the fourth path segment through a genetic algorithm to obtain an updated third particle and an updated fourth particle, wherein the third path segment corresponds to a second position of the third particle, and the fourth path segment is a path segment randomly selected from the fourth particle.
And updating the particle swarm according to the updated third particles and the updated fourth particles.
By carrying out intersection and variation processing on the third particles and the fourth particles, the retrieval range of the particle swarm algorithm can be expanded, and the situation that the local optimization is not the optimal condition but the global optimization is avoided; therefore, in the next particle swarm algorithm, the total service cost of the particle swarm is the lowest, and the personnel scheduling efficiency is improved.
It should be noted that crossover and mutation are the existing implementation steps in the genetic algorithm, and therefore are not described in detail here.
According to some embodiments of the second aspect of the present invention, as shown in fig. 4, the apparatus for personnel scheduling planning comprises:
the input module 410, the input module 410 is used for acquiring a destination set to be allocated and persons to be allocated;
the map module 420, the map module 420 is used for obtaining the shortest path set according to the destination set;
the first processing module 430, the first processing module 430 performs saving algorithm processing according to the shortest path set to obtain an initial line;
the second processing module 440, the second processing module 440 is configured to perform genetic algorithm processing on the initial route to obtain a second route;
and the third processing module 450, the third processing module 450 is configured to process the second line through a particle swarm algorithm, so as to obtain a distribution route of the staff to be distributed.
The method for personnel scheduling planning according to the first aspect of the present invention is implemented by a personnel scheduling planning apparatus according to an embodiment of the present invention, and therefore has all the advantages of the first aspect of the present invention.
It should be understood that the input module may be a terminal device, a mobile phone, a web page, etc.; the first processing module, the second processing module and the third processing module may be separate processors or may be one execution unit for processing therein.
According to some embodiments of the third aspect of the present invention, a computer storage medium stores computer-executable instructions for causing a computer to perform a method of personnel scheduling planning as in any one of the first aspect.
All the benefits of the first aspect of the invention are obtained in that the computer storage medium of an embodiment of the invention performs the method for personnel scheduling planning as claimed in any of the first aspect of the invention.
It should be understood that the storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The following describes in detail a method for allocating staff through a staff scheduling planning apparatus according to an embodiment of the present invention with reference to fig. 1 to 4, and it is to be understood that the following description is only exemplary and not a specific limitation of the invention.
As shown in fig. 1, step S100 is to obtain a shortest path set between any two destinations in the destination set.
Specifically, 100 destinations and service personnel are input into the personnel scheduling planning device, and the input module 410 sends destination information to the map module 420. The map module 420, upon receiving the corresponding destination, performs the operations shown in fig. 2:
step S101, obtaining public transportation route data of each destination according to the destination set.
Specifically, public transportation route data to each destination is acquired from the map, and a route that runs at a peak in the public transportation route data is removed.
Further, step S102, a public transportation route between any two destinations in the destination set and a route time, which is a time required for the public transportation route, are obtained according to the announcement transportation route data.
Further, step S103 sets the shortest path among all the public transportation paths, where the path time is the shortest, as the shortest path, and sets the set of all the shortest paths as the shortest path set.
At this time, the map module 420 outputs the shortest path set and the public transportation route data to the first processing module 430, and the first processing module 430 receives the shortest path set and the public transportation route data, and continues to perform the steps shown in fig. 1:
and S200, processing each path in the shortest path set through a saving algorithm, and obtaining an initial line according to each processed path.
At this time, each path obtained after the saving algorithm processing is S1, S2, S3.. Sn, where S1, S2, and S3 respectively represent the following: s1 ═ (a, b, c); s2 ═ (d, e, g); s3 ═ a, k, un(h, y, i); then the initial line S ═ (0, a, b, c,0, d, e, g,0, a, k, u,..., 0, h, y, i); where 0 represents the start of another path.
At this time, the first processing module 430 sends the initial route to the second processing module 440, and the second processing module 440 processes as follows:
and step S300, processing the initial line through a genetic algorithm to obtain a second line.
Specifically, the acquiring of the second line includes the following steps:
firstly, initializing initial lines to obtain an initial line set, and taking each line in the initial line set as a genetic individual of a genetic algorithm.
Specifically, the second processing module 440 receives the initial route obtained by the first processing module 430, and copies the initial route to obtain a plurality of identical initial routes.
And secondly, performing iterative processing on all gene individuals through a genetic algorithm to obtain a first fitness value of each gene individual after each iterative processing of the genetic algorithm.
Specifically, the total service cost corresponding to the first fitness value is the sum of the time spent on each path on the genetic individuals.
Further, the first fitness value, the current iteration times of the genetic algorithm and preset conditions are matched, and the iteration of the genetic algorithm is stopped according to a matching result.
Specifically, the preset condition is used to stop the iterative process of the genetic algorithm. The preset conditions comprise genetic algorithm stopping conditions, specifically, the iteration times reach 500 times or the first fitness value meets A. Where a is the desired total service cost. The total service cost is entered at the input module.
At this time, the second processing module 440 obtains the target gene individual with the largest first fitness value among the gene individuals after the iterative processing of the genetic algorithm is stopped, and sets the target gene individual as the second line.
Further, the second processing module 440 sends the second route to the third processing module 450, and the third processing module 450 performs the following steps to obtain the distribution route as described in fig. 1:
s400, processing the second line through a particle swarm algorithm to obtain a distribution line.
Specifically, as shown in fig. 3, in S410, the staff information in the staff set to be allocated is obtained, where the staff information includes the number of staff.
Specifically, the third processing module 450 obtains the person information in the input module 410.
And S420, initializing the second line according to the personnel information to obtain a second line set, and taking the second line set as a particle swarm of the particle swarm algorithm.
Specifically, the third processing module 450 duplicates the second line, so as to obtain a plurality of second lines with the same number as the number of people, and a set of all the second lines is a second line set.
And S430, enabling each particle of the particle group to correspond to the personnel to be distributed one by one.
Specifically, the personnel to be assigned are numbered, and the number of the personnel to be assigned is consistent with the index of each particle in the particle swarm.
S440, processing the particle swarm through a particle swarm algorithm to obtain a first position of each particle in the particle swarm, and obtaining the distribution route of the staff to be distributed according to the first position.
Further, as shown in fig. 1, the third processing module 450 further processes the following steps:
s450, processing the particle swarm through a genetic algorithm to obtain an updated particle swarm.
Specifically, the first particles and the second particles are randomly obtained from a particle group.
Further, a first position of the first particle is obtained.
Further, a first path segment corresponding to the first position of the first particle and a second path segment randomly selected from the second particles are crossed and mutated through a genetic algorithm to obtain an updated first particle and an updated second particle.
It should be noted that, because the path has directionality, the distribution line of the person to be distributed can be obtained by taking the first position as the starting point of the distribution line, where the distribution line is the first path segment.
Further, the particle group is updated according to the updated first particle and the updated second particle.
Further, a second location of the particle population is obtained.
Further, third particles corresponding to the second position in the particle swarm are obtained, and fourth particles are randomly obtained in the particle swarm.
Further, carrying out intersection and variation processing on the third path segment and the fourth path segment through a genetic algorithm to obtain an updated third particle and an updated fourth particle; the third path segment corresponds to a second position of the third particle, and the fourth path segment is a path segment randomly selected from the fourth particle.
Further, the particle group is updated according to the updated third particle and the updated fourth particle.
And S460, processing the updated particle swarm through a particle swarm algorithm to obtain a distribution route of the personnel to be distributed.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (10)

1. A method for scheduling and planning personnel, comprising the steps of:
acquiring a shortest path set between any two destinations in the destination set;
processing each path in the shortest path set through a saving algorithm, and obtaining an initial line according to each processed path;
processing the initial line through a genetic algorithm to obtain a second line;
and processing the second line through a particle swarm algorithm to obtain a distribution line.
2. The method of personnel scheduling planning of claim 1 wherein,
the method for acquiring the shortest path set between any two destinations in the destination set comprises the following steps:
acquiring public transportation route data of each destination according to the destination set;
acquiring a public transportation route and route time between any two destinations in the destination set according to the public transportation route data, wherein the route time is the time required by the public transportation route;
and setting the path with the shortest path time in all the public transport paths as the shortest path, and taking the set of all the shortest paths as the shortest path set.
3. The method of personnel scheduling planning of claim 2 wherein,
the method for acquiring the shortest path set between any two destinations in the destination set further comprises the following steps:
removing routes that are in peak operation in the public transportation route data.
4. The method of personnel scheduling planning of claim 1 wherein,
the processing the initial line by a genetic algorithm to obtain a second line comprises the following steps:
initializing the initial lines to obtain an initial line set, and taking each line in the initial line set as a genetic individual of the genetic algorithm;
performing iterative processing on all the gene individuals through the genetic algorithm to obtain a first fitness value of each gene individual after each iterative processing of the genetic algorithm;
matching the first fitness value and the current iteration times of the genetic algorithm with preset conditions, and stopping the iterative processing of the genetic algorithm according to a matching result;
and obtaining a target gene individual with the largest first fitness value in all the gene individuals after the iterative processing of the genetic algorithm is stopped, and taking the target gene individual as the second line.
5. The method of personnel scheduling planning of claim 1 wherein,
the processing the second line through the particle swarm algorithm to obtain the distribution line comprises the following steps:
acquiring personnel information in a personnel set to be distributed, wherein the personnel information comprises personnel number;
initializing the second line according to the personnel information to obtain a second line set, and taking the second line set as a particle swarm of the particle swarm algorithm;
enabling each particle of the particle swarm to correspond to the personnel to be distributed one by one;
processing the particle swarm through the particle swarm algorithm to obtain a first position of each particle in the particle swarm, and obtaining a distribution route of the personnel to be distributed according to the first position.
6. The method of personnel scheduling planning of claim 5 further comprising the steps of:
processing the particle swarm through the genetic algorithm to obtain an updated particle swarm;
and processing the updated particle swarm through the particle swarm algorithm to obtain the distribution route of the personnel to be distributed.
7. The method of personnel scheduling planning of claim 6 wherein,
the processing of the particle swarm by the genetic algorithm to obtain an updated particle swarm comprises the following steps:
randomly obtaining first particles and second particles from the population of particles;
acquiring a first position of the first particle;
performing intersection and variation processing on a first path segment corresponding to the first position of the first particle and a second path segment randomly selected from the second particles through the genetic algorithm to obtain an updated first particle and an updated second particle;
updating the particle swarm according to the updated first particles and the updated second particles.
8. Method for personnel scheduling planning according to claim 6 or 7,
the processing of the particle swarm by the genetic algorithm to obtain an updated particle swarm further comprises the steps of:
obtaining a second location of the particle swarm;
acquiring third particles corresponding to the second position in the particle swarm, and randomly acquiring fourth particles in the particle swarm;
crossing and mutating a third path segment and a fourth path segment by a genetic algorithm to obtain an updated third particle and an updated fourth particle, wherein the third path segment corresponds to the second position of the third particle, and the fourth path segment is a path segment randomly selected from the fourth particle;
updating the particle swarm according to the updated third particle and the updated fourth particle.
9. An apparatus for scheduling personnel, comprising:
an input module (410), the input module (410) for obtaining a set of destinations to be allocated and people to be allocated;
a map module (420), the map module (420) for obtaining a set of shortest paths from the set of destinations;
a first processing module (430), wherein the first processing module (430) performs saving algorithm processing according to the shortest path set to obtain an initial line;
a second processing module (440), wherein the second processing module (440) is used for performing genetic algorithm processing on the initial line to obtain a second line;
a third processing module (450), wherein the third processing module (450) is used for processing the second line through a particle swarm algorithm to obtain a distribution line of the personnel to be distributed.
10. A computer storage medium comprising, in combination,
the computer storage medium has stored thereon computer-executable instructions for causing a computer to perform a method of personnel scheduling planning as claimed in any one of claims 1 to 8.
CN202011001867.0A 2020-09-22 2020-09-22 Personnel scheduling planning method, device and computer storage medium Pending CN112163754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011001867.0A CN112163754A (en) 2020-09-22 2020-09-22 Personnel scheduling planning method, device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011001867.0A CN112163754A (en) 2020-09-22 2020-09-22 Personnel scheduling planning method, device and computer storage medium

Publications (1)

Publication Number Publication Date
CN112163754A true CN112163754A (en) 2021-01-01

Family

ID=73862747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011001867.0A Pending CN112163754A (en) 2020-09-22 2020-09-22 Personnel scheduling planning method, device and computer storage medium

Country Status (1)

Country Link
CN (1) CN112163754A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113205229A (en) * 2021-05-29 2021-08-03 五八到家有限公司 Commuting prediction time calculation method and system, electronic device and storage medium
CN114880733A (en) * 2022-07-05 2022-08-09 广东青藤环境科技有限公司 Intelligent water affair hydraulic model data processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107390684A (en) * 2017-07-14 2017-11-24 华南理工大学 A kind of auto-parts welding optimum path planning method of multirobot collaboration
CN109451012A (en) * 2018-11-01 2019-03-08 宜通世纪物联网研究院(广州)有限公司 A kind of end cloud collaboration load equilibration scheduling method, system and storage medium
CN110689174A (en) * 2019-09-16 2020-01-14 深圳市威豹联合金融服务有限公司 Personnel route planning method and device based on public transport

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107390684A (en) * 2017-07-14 2017-11-24 华南理工大学 A kind of auto-parts welding optimum path planning method of multirobot collaboration
CN109451012A (en) * 2018-11-01 2019-03-08 宜通世纪物联网研究院(广州)有限公司 A kind of end cloud collaboration load equilibration scheduling method, system and storage medium
CN110689174A (en) * 2019-09-16 2020-01-14 深圳市威豹联合金融服务有限公司 Personnel route planning method and device based on public transport

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113205229A (en) * 2021-05-29 2021-08-03 五八到家有限公司 Commuting prediction time calculation method and system, electronic device and storage medium
CN114880733A (en) * 2022-07-05 2022-08-09 广东青藤环境科技有限公司 Intelligent water affair hydraulic model data processing method and device
CN114880733B (en) * 2022-07-05 2022-10-28 广东青藤环境科技有限公司 Intelligent water affair hydraulic model data processing method and device

Similar Documents

Publication Publication Date Title
Wang et al. An improved ant colony optimization algorithm to the periodic vehicle routing problem with time window and service choice
Cheung et al. Dynamic routing model and solution methods for fleet management with mobile technologies
CN110443397B (en) Order distribution method
EP3506188A1 (en) Systems and methods for dynamically allocating exchangeable energy storage devices from charging stations
CN112163754A (en) Personnel scheduling planning method, device and computer storage medium
Jung et al. Genetic algorithm for the time-dependent vehicle routing problem
CN109816315A (en) Paths planning method, device, electronic equipment and readable storage medium storing program for executing
CN111428991B (en) Method and device for determining delivery vehicles
CN109934372B (en) Path planning method, device and equipment
CN112378415B (en) Scheduling planning method, device and equipment for tools and appliances
Sun et al. Online delivery route recommendation in spatial crowdsourcing
CN113962481B (en) Resource allocation method and device for emergency materials and server
CN113848970A (en) Multi-target collaborative path planning method for vehicle and unmanned aerial vehicle
CN116501711A (en) Computing power network task scheduling method based on 'memory computing separation' architecture
CN114611755A (en) Hybrid meta-heuristic algorithm-based optimal path determination method for traveling salesman
CN111860957B (en) Multi-vehicle-type vehicle path planning method considering secondary distribution and balancing
CN114092176A (en) Urban commuting regular bus planning method based on bus
CN116866931A (en) Urban mobile edge server deployment method
CN115689431A (en) Tail end distribution path planning method for two-stage incoming line of new customer
CN113887782A (en) Genetic-firework mixing method and system for maintenance resource distribution scheduling
Yang et al. Multi-objective memetic algorithm based on request prediction for dynamic pickup-and-delivery problems
WO2023020213A1 (en) Task allocation method and apparatus, device, storage medium, and program product
JP2004217340A (en) Transport plan preparing system and method thereof
CN112232605B (en) Processing method, device and equipment for dispatching resources and computer readable storage medium
CN108288114A (en) Emergency materials dispatching method based on original duality theory

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