CN114239931A - Method and device for realizing logistics storage loading scheduling based on improved ant colony algorithm - Google Patents
Method and device for realizing logistics storage loading scheduling based on improved ant colony algorithm Download PDFInfo
- Publication number
- CN114239931A CN114239931A CN202111453903.1A CN202111453903A CN114239931A CN 114239931 A CN114239931 A CN 114239931A CN 202111453903 A CN202111453903 A CN 202111453903A CN 114239931 A CN114239931 A CN 114239931A
- Authority
- CN
- China
- Prior art keywords
- store
- logistics storage
- ant colony
- colony algorithm
- logistics
- 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
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 89
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000013178 mathematical model Methods 0.000 claims abstract description 57
- 239000003016 pheromone Substances 0.000 claims abstract description 42
- 238000005457 optimization Methods 0.000 claims abstract description 18
- 241000257303 Hymenoptera Species 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 9
- 238000010276 construction Methods 0.000 claims description 6
- 230000008034 disappearance Effects 0.000 claims description 3
- 230000006872 improvement Effects 0.000 claims description 3
- 230000002688 persistence Effects 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 3
- 239000008186 active pharmaceutical agent Substances 0.000 claims 2
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 238000004590 computer program Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- 230000007423 decrease Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000000126 substance Substances 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"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial 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]
-
- 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/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
- G06Q10/06311—Scheduling, planning or task assignment for a person or group
-
- 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/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
- G06Q10/06312—Adjustment or analysis of established resource schedule, e.g. resource or task levelling, or dynamic rescheduling
-
- 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/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Operations Research (AREA)
- Marketing (AREA)
- Development Economics (AREA)
- Game Theory and Decision Science (AREA)
- Educational Administration (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a method and a device for realizing logistics storage loading scheduling based on an improved ant colony algorithm, which relate to the field of dynamic scheduling and combination optimization, wherein the method comprises the steps of acquiring logistics data information of each store in a logistics storage system and longitude and latitude of each store, and calculating to obtain a journey between each store and a journey from a logistics storage center to each store; setting a selection strategy, and simultaneously improving the updating rule of the pheromone to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model; and the improved ant colony algorithm mathematical model is adopted to carry out dynamic dispatching of the truck, so that optimization of logistics storage loading dispatching is realized. The invention can improve the working efficiency of logistics storage.
Description
Technical Field
The invention relates to the field of dynamic scheduling and combination optimization, in particular to a method and a device for realizing logistics storage loading scheduling based on an improved ant colony algorithm.
Background
For the logistics storage management system, storage plays a crucial role in the whole supply chain of an enterprise, if correct feeding, inventory control and delivery cannot be guaranteed, the management cost is increased, and the service quality is difficult to guarantee, so that the competitiveness of the enterprise is affected.
When the traditional logistics storage is used for leaving a warehouse bound with a homing area, loading is carried out by virtue of working experience of workers, and then the loaded goods are sent to each store, meanwhile, the journey between each store is required to be as low as half an hour as possible, the minimum number of trucks can be arranged to save shunting cost, but the problem of low manual scheduling efficiency exists, and the scheduling result is not satisfactory. Therefore, the traditional simple and static warehouse management cannot guarantee the efficient utilization of various resources of enterprises at present.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method and a device for realizing logistics storage loading scheduling based on an improved ant colony algorithm, which can improve the work efficiency of logistics storage.
In order to achieve the above purpose, the method for realizing logistics storage loading scheduling based on the improved ant colony algorithm provided by the invention specifically comprises the following steps:
acquiring logistics data information of each store in the logistics storage system and longitude and latitude of each store, and calculating to obtain a journey between each store and a journey from the logistics storage center to each store;
setting a selection strategy, and simultaneously improving the updating rule of the pheromone to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model;
and the improved ant colony algorithm mathematical model is adopted to carry out dynamic dispatching of the truck, so that optimization of logistics storage loading dispatching is realized.
On the basis of the technical scheme, the method for acquiring logistics data information of each store in the logistics storage system and the longitude and latitude of each store is used for calculating and obtaining the vehicle distance between each store and the vehicle distance from the logistics storage center to each store, and the specific steps comprise:
reading logistics data information of each store in the logistics warehousing system based on python, wherein the logistics data information comprises order data, sorting data and loading truck information;
acquiring the longitude and latitude of each store based on the API of the map software;
and calculating to obtain the train routes between the stores and the train routes from the logistics storage center to the stores according to the acquired longitude and latitude, and storing the calculation result in a redis cache.
On the basis of the technical scheme, the selection strategy is set, the updating rule of the pheromone is improved to improve the ant colony algorithm mathematical model, and the improved ant colony algorithm mathematical model is built, wherein the set selection strategy is as follows:
wherein, let m denote the number of ants in the ant colony, bi(t) represents the number of ants located at node i at time t,n represents a time; tau isij(t) represents the amount of information remaining on the path between the nodes (i, j) at time t, the amount of information on each path is equal at the initial time, τij(0) C is a constant; the k-th ant (k is 1,2, …, m) determines the transfer direction according to the information quantity on each path in the moving process;indicates ants at time tProbability from node i to node j; etaij(t) represents the heuristic value of ants from node i to node j at time t; α represents a parameter for controlling the amount of information; β represents a parameter for controlling the heuristic value; allowedk={0,1,…,n-1}-Tabuk,allowedkShows the city Tabu that the kth ant allows to select nextkRepresents the node that the kth ant has currently walked, l represents an element in the set of nodes that the kth ant can select among the city nodes, and N represents a city node.
On the basis of the technical scheme, the selection strategy is set, and meanwhile, the updating rule of the pheromone is improved to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model, wherein the updating rule of the improved pheromone is as follows:
τij(t+n)=((1-ρ)·τij(t))·τij(t)+ρ·τij(t)·Δτij(t)
where ρ represents the coefficient of the degree of disappearance of the pheromone, 1- ρ represents the coefficient of persistence of the pheromone, ρ ∈ (0, 1); all ants complete one cycle after n times; delta tauij(t) denotes the pheromone increment on the path in the current cycle, and the initial time, Δ τij(t)=0;Representing the number of pheromones of the kth ant left on the path (i, j) in the current cycle; q represents a constant; lkRepresents the total path cost of the kth ant; tau isij(t + n) represents the amount of information remaining on the path between nodes (i, j) at time t + n.
On the basis of the technical scheme, the selection strategy is set, and meanwhile, the updating rule of the pheromone is improved to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model, wherein the specific process of obtaining the improved ant colony algorithm mathematical model is as follows:
numbering the logistics storage center as 0, numbering the trucks in sequence according to the sequence of 1,2 and …, and defining a variable xijkAnd jijk:
Calculating the minimum transportation cost:
wherein minZ represents the minimum transportation cost, CijRepresents the cost of transportation from node i to node j;
defining a relational expression that the sum of the cargo quantities borne by the a-th truck is not more than the capacity of the truck:
wherein,represents the sum of the cargo load borne by the kth truck, and q represents the truck capacity;
defining the logistics storage center 0 to send out an expression of m trucks:
On the basis of the technical scheme, the dynamic dispatching of the truck is carried out by adopting the improved ant colony algorithm mathematical model to realize the optimization of the loading dispatching of the logistics storage, and the method specifically comprises the following steps:
initializing parameters alpha and beta, and juxtaposing iteration times 1 ← NC;
starting from a logistics storage center, setting zeros ← Tabu in the trucks, randomly selecting starting points for m trucks, and recording the m starting points in a path table Tabu (: 1);
calculating the initial weight sum _ G (i,1) of each truck as G (Tabu (: 1));
placing 2 ← b and 1 ← a, wherein b represents the serial number of the next goods in the delivery route, and a represents the serial number of the goods van, and m goods van are provided;
sequentially increasing the number of trucks from the logistics storage center, and circulating based on the improved ant colony algorithm mathematical model after increasing the number of trucks each time to obtain an optimal scheduling scheme;
where NC represents the total number of iterations, G represents the weight calculation function, zeros represents a set with an initial value of 0, and Tabu represents a list of nodes that the truck has currently walked through.
On the basis of the technical scheme, the number of trucks from the logistics storage center is sequentially increased, circulation is performed based on the improved ant colony algorithm mathematical model after the number of trucks is increased every time, and an optimal scheduling scheme is obtained, and the method specifically comprises the following steps:
s301: recording the to-be-delivered store of the a-th truck, storing the to-be-delivered store into a set J, giving a weight to the to-be-delivered store of the a-th truck, selecting the serial number of the delivery store with the largest weight in the set J as the next delivery store, recording the serial number in a set to _ visit (i,1), and turning to S302;
s302: update sum _ G (i,1) ═ sum _ G (i,1)1+ G (to _ visit (i,1)), then go to S303, where sum _ G (i,1)1Indicates that it has not selectedThe cargo weight of the truck at the next delivery store;
s303: comparing the magnitude relation between sum _ G (i,1) and q, if sum _ G (i,1) > q, going to S304, otherwise, going to S305;
s304: finding out the store to be delivered closest to the logistics storage center from the set J, taking the store as the next store to be delivered, recording the store in to _ visit (i,1), updating sum _ G (i,1) ═ G (to _ visit (i,1)), and going to S305;
s305: recording to _ visit (i,1) in Tabu (: 1), updating the arrival time of the a-th truck at the store, calculating the transportation cost, adding 1 to a, and going to S306;
s306: comparing the relation between a and m, if a is less than or equal to m, going to S301, otherwise, adding 1 to b, and going to S307;
s307: comparing the relationship between b and c, if b is not more than c, resetting 2 ← b, resetting 1 ← a, otherwise, going to S308, wherein c represents the total number of goods;
s308: calculating the lengths of the m paths, finding out the length of the shortest path and the optimal loading scheduling scheme, and recording the lengths and the optimal loading scheduling scheme in a path table Rbest(NC, i), the pheromone is updated, and the next generation NC is incremented by 1, proceeding to S309;
s309: and comparing the relation between NC and NC _ max, if NC is not more than NC _ max, starting the truck from the logistics storage center again, and juxtaposing zeros ← Tabu, otherwise, outputting the optimal scheduling scheme.
The invention provides a device for realizing logistics storage loading scheduling based on an improved ant colony algorithm, which comprises:
the calculation module is used for acquiring logistics data information of each store in the logistics storage system and longitude and latitude of each store, and calculating to obtain a train distance between each store and a train distance from the logistics storage center to each store;
the construction module is used for setting a selection strategy and improving the updating rule of the pheromone to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model;
and the scheduling module is used for dynamically scheduling the trucks by adopting the improved ant colony algorithm mathematical model to realize optimization of logistics storage loading scheduling.
On the basis of the technical scheme, the method for acquiring logistics data information of each store in the logistics storage system and the longitude and latitude of each store calculates to obtain the bus routes between the stores and the bus routes from the logistics storage center to the stores, and comprises the following specific processes:
reading logistics data information of each store in the logistics warehousing system based on python;
acquiring the longitude and latitude of each store based on the API of the map software;
and calculating to obtain the train routes between the stores and the train routes from the logistics storage center to the stores according to the acquired longitude and latitude, and storing the calculation result in a redis cache.
On the basis of the technical scheme, the logistics data information comprises order data, sorting data and loading truck information.
Compared with the prior art, the invention has the advantages that: the improved ant colony algorithm mathematical model is obtained through construction, then the improved ant colony algorithm mathematical model is adopted to carry out dynamic scheduling on trucks, optimization of logistics storage loading scheduling is achieved, namely improvement is carried out on the basis of the traditional ant colony algorithm, searching capacity of the algorithm is improved, algorithm convergence speed is accelerated, logistics storage working efficiency is improved, a large amount of loading scheduling additional cost is saved, time and labor are saved, and storage scale is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for implementing logistics storage loading scheduling based on an improved ant colony algorithm in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method for realizing logistics storage loading scheduling based on an improved ant colony algorithm, which is characterized in that an improved ant colony algorithm mathematical model is obtained through construction, then the improved ant colony algorithm mathematical model is adopted to carry out dynamic scheduling on trucks, and optimization of logistics storage loading scheduling is realized, namely improvement is carried out on the basis of the traditional ant colony algorithm, the searching capacity of the algorithm is improved, the algorithm convergence speed is accelerated, the work efficiency of logistics storage is improved, a large amount of additional cost of loading scheduling is saved, the time and the labor are saved, and the storage scale is reduced. The embodiment of the invention correspondingly provides a device for realizing logistics storage loading scheduling based on the improved ant colony algorithm.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments.
Referring to fig. 1, a method for implementing logistics storage loading scheduling based on an improved ant colony algorithm provided in an embodiment of the present invention specifically includes the following steps:
s1: acquiring logistics data information of each store in the logistics storage system and longitude and latitude of each store, and calculating to obtain a journey between each store and a journey from the logistics storage center to each store; the method specifically comprises the following steps:
s101: reading logistics data information of each store in the logistics warehousing system based on python (a programming language), wherein the logistics data information comprises order data, sorting data and loading truck information;
s102: acquiring the longitude and latitude of each store based on an Application Programming Interface (API) of map software;
s103: according to the acquired longitude and latitude, the bus routes between the stores and the bus routes from the logistics storage center to the stores are calculated, and the calculation results are stored in a Remote Dictionary service (Remote Dictionary Server) cache. The calculation result is stored in the redis cache, so that the speed of the algorithm in operation is improved.
S2: setting a selection strategy, and simultaneously improving the updating rule of the pheromone to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model;
the ant colony algorithm adopts the memorized artificial ants, finds the shortest circuit from the ant hole to the food source through information exchange and mutual cooperation among individuals, and the ant individuals transmit information through a substance called pheromone so as to mutually cooperate and complete complex tasks.
S3: and the improved ant colony algorithm mathematical model is adopted to carry out dynamic dispatching of the truck, so that optimization of logistics storage loading dispatching is realized.
In the embodiment of the invention, a selection strategy is set, and meanwhile, the updating rule of pheromones is improved to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model, wherein the set selection strategy is as follows:
wherein, let m denote the number of ants in the ant colony, bi(t) represents the number of ants located at node i at time t,n represents a time; tau isij(t) represents the amount of information remaining on the path between the nodes (i, j) at time t, the amount of information on each path is equal at the initial time, τij(0) C is a constant; the k-th ant (k is 1,2, …, m) determines the transfer direction according to the information quantity on each path in the moving process;representing the probability of ants from node i to node j at time t; etaij(t) represents the heuristic value of ants from node i to node j at time t; alpha is alphaA parameter indicating an amount of control information; β represents a parameter for controlling the heuristic value; allowedk={0,1,…,n-1}-Tabuk,allowedkShows the city Tabu that the kth ant allows to select nextkThe node which is currently walked by the kth ant is represented, namely the node is equivalent to a store at the time of subsequent cargo distribution, l represents one element in the set of nodes which can be selected by the kth ant in the city nodes, and N represents the city nodes.
In the embodiment of the invention, a selection strategy is set, and meanwhile, the updating rule of the pheromone is improved to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model, wherein the updating rule of the improved pheromone is as follows:
τij(t+n)=((1-ρ)·τij(t))·τij(t)+ρ·τij(t)·Δτij(t)
where ρ represents the coefficient of the degree of disappearance of the pheromone, 1- ρ represents the coefficient of persistence of the pheromone, ρ ∈ (0, 1); all ants complete one cycle after n times; delta tauij(t) denotes the pheromone increment on the path in the current cycle, and the initial time, Δ τij(t)=0;Representing the number of pheromones of the kth ant left on the path (i, j) in the current cycle; q represents a constant; lkRepresents the total path cost of the kth ant; tau isij(t + n) represents the amount of information remaining on the path between nodes (i, j) at time t + n. Over time, previously left pheromones gradually disappear.
Such a phenomenon exists in the real ant worldThe higher the pheromone concentration is, the faster the pheromone volatilizes; the lower the pheromone concentration, the slower the volatilization. This effectively prevents the pheromone concentration on some paths from increasing indefinitely, while the pheromone on some paths decreases to zero, leading to the possibility of falling into local optima. In this case the volatility factor changes from a constant to a function tau with time as a variableij(t), therefore, the present invention improves the pheromone update rule.
In the embodiment of the invention, a selection strategy is set, and meanwhile, the updating rule of the pheromone is improved to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model, wherein the specific process of obtaining the improved ant colony algorithm mathematical model is as follows:
s201: numbering the logistics storage center as 0, numbering the trucks in sequence according to the sequence of 1,2 and …, and defining a variable xijkAnd jijk:
S202: calculating the minimum transportation cost:
wherein minZ represents the minimum transportation cost, CijRepresents the cost of transportation from node i to node j;
s203: defining a relational expression that the sum of the cargo quantities borne by the a-th truck is not more than the capacity of the truck:
wherein,represents the sum of the cargo load borne by the kth truck, and q represents the truck capacity;
s204: defining the logistics storage center 0 to send out an expression of m trucks:
In the embodiment of the invention, the improved ant colony algorithm mathematical model is adopted to carry out dynamic dispatching of the truck, so that the optimization of the logistics storage loading dispatching is realized, and the method specifically comprises the following steps:
s31: initializing parameters alpha and beta, and juxtaposing iteration times 1 ← NC;
s32: starting from a logistics storage center, setting zeros ← Tabu in the trucks, randomly selecting starting points for m trucks, and recording the m starting points in a path table Tabu (: 1);
s33: calculating the initial weight sum _ G (i,1) of each truck as G (Tabu (: 1));
s34: placing 2 ← b and 1 ← a, wherein b represents the serial number of the next goods in the delivery route, and a represents the serial number of the goods van, and m goods van are provided;
s35: and sequentially increasing the number of trucks from the logistics storage center, and circulating based on the improved ant colony algorithm mathematical model after increasing the number of trucks each time to obtain an optimal scheduling scheme.
Where NC represents the total number of iterations, G represents the weight calculation function, zeros represents a set with an initial value of 0, and Tabu represents a list of nodes that the truck has currently walked through.
In the embodiment of the invention, the number of trucks from a logistics storage center is sequentially increased, and circulation is performed based on an improved ant colony algorithm mathematical model after the number of trucks is increased each time to obtain an optimal scheduling scheme, and the method specifically comprises the following steps:
s301: recording the to-be-delivered store of the a-th truck, storing the to-be-delivered store into a set J, giving a weight to the to-be-delivered store of the a-th truck, selecting the serial number of the delivery store with the largest weight in the set J as the next delivery store, recording the serial number in a set to _ visit (i,1), and turning to S302;
s302: update sum _ G (i,1) ═ sum _ G (i,1)1+ G (to _ visit (i,1)), then go to S303, where sum _ G (i,1)1Indicating the weight of the cargo of the truck when the next delivery store has not been selected;
s303: comparing the magnitude relation between sum _ G (i,1) and q, if sum _ G (i,1) > q, going to S304, otherwise, going to S305;
s304: finding out the store to be delivered closest to the logistics storage center from the set J, taking the store as the next store to be delivered, recording the store in to _ visit (i,1), updating sum _ G (i,1) ═ G (to _ visit (i,1)), and going to S305;
s305: recording to _ visit (i,1) in Tabu (: 1), updating the arrival time of the a-th truck at the store, calculating the transportation cost, adding 1 to a, and going to S306;
s306: comparing the relation between a and m, if a is less than or equal to m, going to S301, otherwise, adding 1 to b, and going to S307;
s307: comparing the relationship between b and c, if b is not more than c, resetting 2 ← b, resetting 1 ← a, namely going to step S34, otherwise going to S308, wherein c represents the total number of goods;
s308: calculating the lengths of the m paths, finding out the length of the shortest path and the optimal loading scheduling scheme, and recording the lengths and the optimal loading scheduling scheme in a path table Rbest(NC, i), the pheromone is updated, and the next generation NC is incremented by 1, proceeding to S309;
s309: and comparing the relation between NC and NC _ max, if NC is less than or equal to NC _ max, starting the truck from the logistics storage center again, and juxtaposing zeros ← Tabu, namely going to step S32, otherwise, outputting the optimal scheduling scheme.
The invention provides an improved ant colony algorithm based design optimization method for realizing a logistics storage loading scheduling scheme for the existing warehouse inventory data, store orders and vehicle and store related basic information data. When the traditional logistics storage is used for delivering stores bound with the homing areas, loading is carried out by virtue of working experience of workers and delivered to each store, generally, the vehicle distance between each store is as low as half an hour as possible, the minimum number of vehicles are required to be arranged as far as possible to save the shunting cost, and because the manual scheduling efficiency is low and the scheduling result is not satisfactory, the process needs to be automated by a computer, which is a complex combinatorial optimization problem, and the ant colony algorithm is used for solving various combinatorial optimization problems.
According to the method for realizing logistics storage loading scheduling based on the improved ant colony algorithm, the improved ant colony algorithm mathematical model is obtained through construction, then the improved ant colony algorithm mathematical model is adopted to carry out dynamic scheduling on trucks, and optimization of logistics storage loading scheduling is realized.
The device for realizing logistics storage loading scheduling based on the improved ant colony algorithm comprises a computing module, a building module and a scheduling module.
The calculation module is used for acquiring logistics data information of each store in the logistics storage system and longitude and latitude of each store, and calculating to obtain a train journey between each store and a train journey from the logistics storage center to each store; the construction module is used for setting a selection strategy and improving the updating rule of the pheromone to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model; the dispatching module is used for dynamically dispatching the trucks by adopting the improved ant colony algorithm mathematical model to realize optimization of logistics storage loading dispatching.
In the embodiment of the invention, logistics data information of each store in the logistics storage system and longitude and latitude of each store are acquired, and a journey between each store and a journey from a logistics storage center to each store are obtained through calculation, wherein the specific process comprises the following steps:
reading logistics data information of each store in the logistics warehousing system based on python;
acquiring the longitude and latitude of each store based on the API of the map software;
and calculating to obtain the train routes between the stores and the train routes from the logistics storage center to the stores according to the acquired longitude and latitude, and storing the calculation result in a redis cache.
The logistics data information comprises order data, sorting data and loading truck information.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Claims (10)
1. A method for realizing logistics storage loading scheduling based on an improved ant colony algorithm is characterized by comprising the following steps:
acquiring logistics data information of each store in the logistics storage system and longitude and latitude of each store, and calculating to obtain a journey between each store and a journey from the logistics storage center to each store;
setting a selection strategy, and simultaneously improving the updating rule of the pheromone to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model;
and the improved ant colony algorithm mathematical model is adopted to carry out dynamic dispatching of the truck, so that optimization of logistics storage loading dispatching is realized.
2. The method for realizing logistics storage loading scheduling based on the improved ant colony algorithm as claimed in claim 1, wherein the steps of obtaining logistics data information of each store in the logistics storage system and longitude and latitude of each store, and calculating to obtain the routes between stores and the routes from the logistics storage center to each store comprise:
reading logistics data information of each store in the logistics warehousing system based on python, wherein the logistics data information comprises order data, sorting data and loading truck information;
acquiring the longitude and latitude of each store based on the API of the map software;
and calculating to obtain the train routes between the stores and the train routes from the logistics storage center to the stores according to the acquired longitude and latitude, and storing the calculation result in a redis cache.
3. The method for realizing logistics storage loading scheduling based on the improved ant colony algorithm as claimed in claim 1, wherein the selection policy is set, and the pheromone updating rule is improved to improve the ant colony algorithm mathematical model to build the improved ant colony algorithm mathematical model, wherein the set selection policy is:
wherein, let m denote the number of ants in the ant colony, bi(t) represents the number of ants located at node i at time t,n represents a time; tau isij(t) represents the amount of information remaining on the path between the nodes (i, j) at time t, the amount of information on each path is equal at the initial time, τij(0) C is a constant; the k-th ant (k is 1,2, …, m) determines the transfer direction according to the information quantity on each path in the moving process;representing the probability of ants from node i to node j at time t; etaij(t) represents the heuristic value of ants from node i to node j at time t; α represents a parameter for controlling the amount of information; β represents a parameter for controlling the heuristic value; allowedk={0,1,…,n-1}-Tabuk,allowedkShows the city Tabu that the kth ant allows to select nextkRepresents the node that the kth ant has currently walked, l represents an element in the set of nodes that the kth ant can select among the city nodes, and N represents a city node.
4. The method according to claim 3, wherein the selection strategy is set, and the pheromone updating rule is improved to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model, wherein the improved pheromone updating rule is as follows:
τij(t+n)=((1-ρ)·τij(t))·τij(t)+ρ·τij(t)·Δτij(t)
where ρ represents the coefficient of the degree of disappearance of the pheromone, 1- ρ represents the coefficient of persistence of the pheromone, ρ ∈ (0, 1); all ants complete one cycle after n times; delta tauij(t) denotes the pheromone increment on the path in the current cycle, and the initial time, Δ τij(t)=0;Representing the number of pheromones of the kth ant left on the path (i, j) in the current cycle; q represents a constant; lkRepresents the total path cost of the kth ant; tau isij(t + n) represents the amount of information remaining on the path between nodes (i, j) at time t + n.
5. The method for achieving logistics storage loading scheduling based on the improved ant colony algorithm as claimed in claim 4, wherein the setting of the selection strategy and the improvement of the pheromone updating rule are performed to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model, wherein the specific process of obtaining the improved ant colony algorithm mathematical model is as follows:
numbering the logistics storage center as 0, numbering the trucks in sequence according to the sequence of 1,2 and …, and defining a variable xijkAnd jijk:
Calculating the minimum transportation cost:
wherein minZ represents the minimum transportation cost, CijRepresents the cost of transportation from node i to node j;
defining a relational expression that the sum of the cargo quantities borne by the a-th truck is not more than the capacity of the truck:
wherein,represents the sum of the cargo load borne by the kth truck, and q represents the truck capacity;
defining the logistics storage center 0 to send out an expression of m trucks:
6. The method for realizing logistics storage loading scheduling based on the improved ant colony algorithm as claimed in claim 5, wherein the dynamic scheduling of trucks is performed by adopting the improved ant colony algorithm mathematical model to realize the optimization of logistics storage loading scheduling, and the specific steps include:
initializing parameters alpha and beta, and juxtaposing iteration times 1 ← NC;
starting from a logistics storage center, setting zeros ← Tabu in the trucks, randomly selecting starting points for m trucks, and recording the m starting points in a path table Tabu (: 1);
calculating the initial weight sum _ G (i,1) of each truck as G (Tabu (: 1));
placing 2 ← b and 1 ← a, wherein b represents the serial number of the next goods in the delivery route, and a represents the serial number of the goods van, and m goods van are provided;
sequentially increasing the number of trucks from the logistics storage center, and circulating based on the improved ant colony algorithm mathematical model after increasing the number of trucks each time to obtain an optimal scheduling scheme;
where NC represents the total number of iterations, G represents the weight calculation function, zeros represents a set with an initial value of 0, and Tabu represents a list of nodes that the truck has currently walked through.
7. The method for realizing logistics storage loading scheduling based on the improved ant colony algorithm as claimed in claim 6, wherein the number of trucks from the logistics storage center is sequentially increased, and the cycle is performed based on the improved ant colony algorithm mathematical model after the number of trucks is increased each time to obtain the optimal scheduling scheme, and the specific steps include:
s301: recording the to-be-delivered store of the a-th truck, storing the to-be-delivered store into a set J, giving a weight to the to-be-delivered store of the a-th truck, selecting the serial number of the delivery store with the largest weight in the set J as the next delivery store, recording the serial number in a set to _ visit (i,1), and turning to S302;
s302: update sum _ G (i,1) ═ sum _ G (i,1)1+ G (to _ visit (i,1)), then go to S303, where sum _ G (i,1)1Indicating the weight of the cargo of the truck when the next delivery store has not been selected;
s303: comparing the magnitude relation between sum _ G (i,1) and q, if sum _ G (i,1) > q, going to S304, otherwise, going to S305;
s304: finding out the store to be delivered closest to the logistics storage center from the set J, taking the store as the next store to be delivered, recording the store in to _ visit (i,1), updating sum _ G (i,1) ═ G (to _ visit (i,1)), and going to S305;
s305: recording to _ visit (i,1) in Tabu (: 1), updating the arrival time of the a-th truck at the store, calculating the transportation cost, adding 1 to a, and going to S306;
s306: comparing the relation between a and m, if a is less than or equal to m, going to S301, otherwise, adding 1 to b, and going to S307;
s307: comparing the relationship between b and c, if b is not more than c, resetting 2 ← b, resetting 1 ← a, otherwise, going to S308, wherein c represents the total number of goods;
s308: calculating the lengths of the m paths, finding out the length of the shortest path and the optimal loading scheduling scheme, and recording the lengths and the optimal loading scheduling scheme in a path table Rbest(NC, i), the pheromone is updated, and the next generation NC is incremented by 1, proceeding to S309;
s309: and comparing the relation between NC and NC _ max, if NC is not more than NC _ max, starting the truck from the logistics storage center again, and juxtaposing zeros ← Tabu, otherwise, outputting the optimal scheduling scheme.
8. The utility model provides a realize device of logistics storage loading dispatch based on improve ant colony algorithm which characterized in that includes:
the calculation module is used for acquiring logistics data information of each store in the logistics storage system and longitude and latitude of each store, and calculating to obtain a train distance between each store and a train distance from the logistics storage center to each store;
the construction module is used for setting a selection strategy and improving the updating rule of the pheromone to improve the ant colony algorithm mathematical model to obtain the improved ant colony algorithm mathematical model;
and the scheduling module is used for dynamically scheduling the trucks by adopting the improved ant colony algorithm mathematical model to realize optimization of logistics storage loading scheduling.
9. The apparatus for realizing logistics storage loading scheduling based on the improved ant colony algorithm according to claim 8, wherein the acquiring logistics data information of each store in the logistics storage system and the longitude and latitude of each store, and calculating to obtain the journey between each store and the journey from the logistics storage center to each store comprises:
reading logistics data information of each store in the logistics warehousing system based on python;
acquiring the longitude and latitude of each store based on the API of the map software;
and calculating to obtain the train routes between the stores and the train routes from the logistics storage center to the stores according to the acquired longitude and latitude, and storing the calculation result in a redis cache.
10. The apparatus for realizing logistics storage loading scheduling based on the improved ant colony algorithm as claimed in claim 9, wherein: the logistics data information comprises order data, sorting data and loading truck information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111453903.1A CN114239931B (en) | 2021-12-01 | 2021-12-01 | Method and device for realizing logistics storage loading scheduling based on improved ant colony algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111453903.1A CN114239931B (en) | 2021-12-01 | 2021-12-01 | Method and device for realizing logistics storage loading scheduling based on improved ant colony algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114239931A true CN114239931A (en) | 2022-03-25 |
CN114239931B CN114239931B (en) | 2024-08-06 |
Family
ID=80752552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111453903.1A Active CN114239931B (en) | 2021-12-01 | 2021-12-01 | Method and device for realizing logistics storage loading scheduling based on improved ant colony algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114239931B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023245740A1 (en) * | 2022-06-22 | 2023-12-28 | 江南大学 | Fourth-party logistics transportation edge planning method based on ant colony optimization algorithm |
CN118396345A (en) * | 2024-06-27 | 2024-07-26 | 深圳市大树人工智能科技有限公司 | Coordinated scheduling management method and system for port and dock and railway freight |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105717926A (en) * | 2015-11-09 | 2016-06-29 | 江苏理工学院 | Mobile robot traveler optimization method based on improved ant colony algorithm |
CN107578199A (en) * | 2017-08-21 | 2018-01-12 | 南京航空航天大学 | A kind of method for solving two dimension and loading constraint logistics vehicle dispatching problem |
CN110705742A (en) * | 2019-08-21 | 2020-01-17 | 浙江工业大学 | Logistics distribution method based on improved ant colony algorithm |
WO2021189720A1 (en) * | 2020-03-23 | 2021-09-30 | 南京理工大学 | Parking agv route planning method based on improved ant colony algorithm |
-
2021
- 2021-12-01 CN CN202111453903.1A patent/CN114239931B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105717926A (en) * | 2015-11-09 | 2016-06-29 | 江苏理工学院 | Mobile robot traveler optimization method based on improved ant colony algorithm |
CN107578199A (en) * | 2017-08-21 | 2018-01-12 | 南京航空航天大学 | A kind of method for solving two dimension and loading constraint logistics vehicle dispatching problem |
CN110705742A (en) * | 2019-08-21 | 2020-01-17 | 浙江工业大学 | Logistics distribution method based on improved ant colony algorithm |
WO2021189720A1 (en) * | 2020-03-23 | 2021-09-30 | 南京理工大学 | Parking agv route planning method based on improved ant colony algorithm |
Non-Patent Citations (1)
Title |
---|
祝文康;钟育彬;: "基于改进蚁群算法的物流车辆调度问题研究", 江南大学学报(自然科学版), no. 03, 28 June 2012 (2012-06-28) * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023245740A1 (en) * | 2022-06-22 | 2023-12-28 | 江南大学 | Fourth-party logistics transportation edge planning method based on ant colony optimization algorithm |
CN118396345A (en) * | 2024-06-27 | 2024-07-26 | 深圳市大树人工智能科技有限公司 | Coordinated scheduling management method and system for port and dock and railway freight |
Also Published As
Publication number | Publication date |
---|---|
CN114239931B (en) | 2024-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108846623B (en) | Whole vehicle logistics scheduling method and device based on multi-target ant colony algorithm, storage medium and terminal | |
CN109034481B (en) | Constraint programming-based vehicle path problem modeling and optimizing method with time window | |
CN110782086B (en) | Rescue vehicle distribution path optimization method and system with unmanned aerial vehicle | |
CN114239931A (en) | Method and device for realizing logistics storage loading scheduling based on improved ant colony algorithm | |
Liu et al. | Novel multi-objective resource allocation and activity scheduling for fourth party logistics | |
CN109214756B (en) | Vehicle logistics scheduling method and device, storage medium and terminal | |
CN113011644A (en) | Smart city dynamic cold-chain logistics scheduling method based on ant colony optimization algorithm | |
CN107798423A (en) | Vehicle path planning Simulation Experimental Platform based on multi-intelligence algorithm | |
Jiang et al. | Picking-replenishment synchronization for robotic forward-reserve warehouses | |
CN107862403A (en) | A kind of the outbound sequence dispatching method and system of unmanned plane goods to be dispensed | |
Ferrara et al. | Fleet sizing of laser guided vehicles and pallet shuttles in automated warehouses | |
CN109345091A (en) | Complete vehicle logistics dispatching method and device, storage medium, terminal based on ant group algorithm | |
CN115994725A (en) | Logistics part freight method, device, equipment and storage medium | |
CN115345549B (en) | Vehicle path adjustment method and system combined with loading scheme | |
CN116228089B (en) | Store distribution path planning method based on shortest mileage | |
CN115860613A (en) | Part load and goods matching and vehicle scheduling method considering reservation mechanism | |
WO2024032376A1 (en) | Vehicle path optimization method based on hybrid genetic algorithm, and application thereof | |
CN109934372A (en) | A kind of paths planning method, device and equipment | |
CN115759917A (en) | Logistics path planning method based on improved mixed ant colony algorithm | |
CN115062868B (en) | Pre-polymerization type vehicle distribution path planning method and device | |
CN116227773A (en) | Distribution path optimization method based on ant colony algorithm | |
KR20230166060A (en) | Server, method and computer program for providing route information for logistics | |
Kim et al. | Ant colony optimisation with random selection for block transportation scheduling with heterogeneous transporters in a shipyard | |
WO2021040612A1 (en) | Methods and apparatuses for generating product delivery plans | |
Chen et al. | Heuristics based ant colony optimization for vehicle routing problem |
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 |