CN111768084A - Secondary delivery scheduling optimization method, device, equipment and storage medium for product oil - Google Patents

Secondary delivery scheduling optimization method, device, equipment and storage medium for product oil Download PDF

Info

Publication number
CN111768084A
CN111768084A CN202010498401.XA CN202010498401A CN111768084A CN 111768084 A CN111768084 A CN 111768084A CN 202010498401 A CN202010498401 A CN 202010498401A CN 111768084 A CN111768084 A CN 111768084A
Authority
CN
China
Prior art keywords
individual
fitness value
probability
value
model
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
CN202010498401.XA
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.)
Dingli Corp ltd
Original Assignee
Dingli Corp 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 Dingli Corp ltd filed Critical Dingli Corp ltd
Priority to CN202010498401.XA priority Critical patent/CN111768084A/en
Publication of CN111768084A publication Critical patent/CN111768084A/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/06312Adjustment or analysis of established resource schedule, e.g. resource or task levelling, or dynamic rescheduling
    • 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/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0835Relationships between shipper or supplier and carriers
    • G06Q10/08355Routing methods

Landscapes

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

Abstract

The invention relates to a method, a device, equipment and a storage medium for optimizing secondary delivery scheduling of product oil, wherein the method comprises the following steps: constructing a chromosome representing a feasible line based on a secondary delivery scheduling optimization mathematical model and a genetic algorithm of the finished oil; calculating the fitness value of the individual, selecting the individual with the largest fitness value as a target individual, converting the fitness value of the target individual into a function value, and stopping calculation and outputting each individual information if the function value is lower than the target expected value of the function value; randomly selecting two individuals, generating a first random number which is more than 0 and less than 1, and if the first random number is lower than the crossing probability, crossing the two individuals; generating a second random number which is larger than 0 and smaller than 1 for each individual in sequence according to the fitness value, and if the second random number is smaller than the variation probability, performing variation on the individual; and if the iteration times meet the set conditions, outputting the dispatching combination information. And (3) searching the dispatching combination with the oil tank truck fully loaded as much as possible and the shortest driving route by using a genetic algorithm.

Description

Secondary delivery scheduling optimization method, device, equipment and storage medium for product oil
Technical Field
The invention relates to the technical field of path planning, in particular to a method, a device, equipment and a storage medium for optimizing secondary delivery and scheduling of finished oil.
Background
The consumption of Chinese finished oil accounts for the third place of the world, about 3000 oil depots are available, nearly 90000 gas stations are supplied, 30 gas stations are distributed in each oil depot on average, and the distribution efficiency is low. In order to improve the delivery efficiency, the adoption of a modern delivery scheduling system is a necessary trend.
In order to save cost, the distribution center needs to meet oil requirements of a plurality of gas stations with limited vehicles in time, needs to consider combination vehicle dispatching and selection of a shortest driving route, and simultaneously fully loads as much as possible.
Therefore, it is of great significance to find the dispatching combination with the oil tank truck fully loaded as much as possible and the shortest driving route.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a device and a storage medium for optimizing secondary delivery scheduling of product oil, so as to solve the problems of high cost and low efficiency in secondary delivery of product oil in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for optimizing secondary delivery scheduling of product oil, where the method includes:
establishing a mathematical model for secondary delivery scheduling optimization of the product oil, wherein the mathematical model comprises a transportation cost model, a demand point vehicle access model, a vehicle path planning model, a demand point vehicle passing model, a vehicle loading capacity model and a transportation expense model;
constructing chromosomes representing feasible lines by using integer codes based on the mathematical model and the genetic algorithm, and setting population scale;
calculating the fitness value of an individual, selecting the individual with the largest fitness value as a target individual, converting the fitness value of the target individual into a function value, and stopping calculation and outputting each individual information if the function value is lower than the target expected value of the function value;
randomly selecting two individuals, generating a first random number which is more than 0 and less than 1, and if the first random number is lower than the crossing probability, crossing the two individuals and randomly generating a crossing position;
sequentially generating a second random number which is larger than 0 and smaller than 1 for each individual according to the sequence from large to small of the fitness value, and if the second random number is smaller than the variation probability, performing variation on the individual;
if the iteration times meet the set conditions, outputting the dispatching combination information;
wherein, each individual includes a plurality of genes, each gene corresponds to a gas station, the demand of each gas station changes in real time, and each delivery vehicle corresponds to the vehicle loading capacity.
In a second aspect, an embodiment of the present application provides a finished oil secondary delivery scheduling optimization device, including:
the model establishing module is used for establishing a mathematical model for secondary delivery scheduling optimization of the product oil, wherein the mathematical model comprises a transportation cost model, a demand point vehicle access model, a vehicle path planning model, a demand point vehicle passing model, a vehicle loading capacity model and a transportation expense model;
the construction module is used for constructing chromosomes representing feasible lines by using integer codes based on the mathematical model and the genetic algorithm and setting population scale;
the fitness value calculation module is used for calculating the fitness value of an individual, selecting the individual with the largest fitness value as a target individual, converting the fitness value of the target individual into a function value, and stopping calculation and outputting each individual information if the function value is lower than the target expected value of the function value;
the crossing module is used for randomly selecting two individuals and generating a first random number which is larger than 0 and smaller than 1, if the first random number is lower than the crossing probability, the two individuals are crossed, and a crossing position is randomly generated;
the variation module is used for sequentially generating a second random number which is larger than 0 and smaller than 1 for each individual according to the sequence of the fitness value from large to small, and if the second random number is smaller than the variation probability, the individual is subjected to variation;
the output module is used for outputting the dispatching combination information when the iteration times meet the set conditions;
wherein, each individual includes a plurality of genes, each gene corresponds to a gas station, the demand of each gas station changes in real time, and each delivery vehicle corresponds to the vehicle loading capacity.
In a third aspect, an embodiment of the present application provides an apparatus, including:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program, and the computer program is at least used for executing the product oil secondary delivery scheduling optimization method in the first aspect of the embodiment of the application;
the processor is used for calling and executing the computer program in the memory.
In a fourth aspect, an embodiment of the present application provides a storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method implements the steps in the method for optimizing the secondary delivery scheduling of product oil according to the first aspect.
By adopting the technical scheme, a mathematical model of the secondary delivery scheduling problem is established by introducing corresponding parameters and variables, and the scheduling problem of the secondary delivery of the product oil is solved by utilizing a genetic algorithm; and constructing a secondary finished oil distribution system by using a genetic algorithm as a core thought. Based on the mathematical model, a specific genetic algorithm solving scheme is researched, and the aim is to seek a reasonable vehicle dispatching combination, so that the oil tank truck is fully loaded as much as possible, and the driving route is shortest. On the premise of meeting the requirements of gas stations, the delivery cost can be reduced by combining the vehicle dispatching and the shortest driving route which are fully loaded as much as possible.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for optimizing secondary delivery scheduling of product oil according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a product oil secondary delivery scheduling optimization device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
First, applicable scenarios of the embodiments of the present application will be described. The oil refinery is called the primary distribution of the product oil to the oil depot, and the oil depot is called the secondary distribution of the product oil to the gas station. The actual secondary delivery network of the product oil is a complex system, which comprises oil depots and a large number of filling stations distributed in different areas, and for convenience of description, it is assumed that the delivery system comprises a delivery center, an oil depot and a plurality of filling stations, and a plurality of oil tank trucks are responsible for transportation and delivery. In order to save the distribution cost, in the embodiment of the application, the following optimization work is performed: the combined dispatching means that requirements of different oil products of a plurality of gas stations are combined, vehicle dispatching is reasonably arranged, and the full load rate and the utilization rate of the vehicles are improved; and the distribution route is optimized, the driving route of the oil tank truck is selected, and the driving mileage is reduced.
Examples
Fig. 1 is a flowchart of a method for optimizing a product oil secondary delivery scheduling according to an embodiment of the present invention, where the method may be executed by a device for optimizing a product oil secondary delivery scheduling according to an embodiment of the present invention, and the device may be implemented in a software and/or hardware manner. Referring to fig. 1, the method may specifically include the following steps:
s101, establishing a mathematical model for secondary delivery scheduling optimization of the product oil, wherein the mathematical model comprises a transportation cost model, a demand point vehicle access model, a vehicle path planning model, a demand point vehicle passing model, a vehicle loading capacity model and a transportation expense model.
Specifically, assume that the distribution center can transport and distribute n gas stations by m vehicles at most, each vehicle having a load of bk(k ═ 1,2,3, …, m), and the demand per fueling station is di(i ═ 1,2,3, …, n), the transport of station i to station j is referred to as CijCost of gas station i to the distribution center is Ci0. Under the condition of meeting the delivery requirements of gas stations, how to combine and dispatch vehicles, namely, how to go to a plurality of stations by one vehicle and how to arrange the driving path of each vehicle so as to save the transportation cost is the problem to be solved by the application. In addition, each gas station is a demand point.
The following variables were introduced:
Figure BDA0002523820230000051
Figure BDA0002523820230000052
and establishing various mathematical models including a transportation cost model, a demand point vehicle access model, a vehicle path planning model, a demand point vehicle passing model, a vehicle loading capacity model and a transportation expense model.
(1) A transportation cost model, an objective function that minimizes transportation costs throughout the delivery process:
Figure BDA0002523820230000053
(2) the demand point vehicle access model indicates that a certain demand point has one and only one vehicle access:
Figure BDA0002523820230000054
(3) the vehicle path planning model indicates that each transport vehicle starts from the distribution center and finally returns to the distribution center after passing through the gas station:
Figure BDA0002523820230000055
(4) the vehicle passing model of the demand points comprises the following steps that:
Figure BDA0002523820230000061
(5) vehicle load model, the load of the vehicle is less than its rated load:
Figure BDA0002523820230000062
(6) the transportation cost model, the transportation cost from point i to point j is equal to the transportation cost from point j to point i:
Cij=Cji,(i,j=0,1,2,...,n)。
the value ranges of the variables are as follows:
(7)Rijk∈{0,1},(i,j=0,1,2,...,n;k=1,2,...,m);
(8)Vik∈{0,1},(i=1,2,...,n;k=1,2,...,m);
(9)Cij≥0,(i,j=0,1,2,...,n);
(10)di>0,(i=1,2,...,n);
(11)bk>0,(k=1,2,...,m);
(12)m>0,n>0。
s102, constructing chromosomes representing feasible lines by using integer codes based on a mathematical model and a genetic algorithm, and setting the population scale.
Optionally, before calculating the fitness function, the individuals are constructed to produce an initial population. Specifically, integer codes, which may also be referred to as natural number codes, are used to fully arrange natural numbers 1 to n for each individual, where each natural number corresponds to a number of a gas station in the delivery system. A popsize number of individuals was randomly generated as an initial population. Illustratively, a popsize may take 50. The sequence of the natural numbers in each individual is the actual distribution sequence of each transport vehicle, and the operation starting point and the operation ending point of each transport vehicle are distribution centers, namely, the transport vehicles start from the distribution centers each time and return to the distribution centers after completing distribution tasks.
In addition, after constructing the initial population, integer coding is applied to construct chromosomes representing feasible lines based on mathematical models and genetic algorithms, and the population size, which may be 50, for example, is set. The respective mathematical models can be referred to as expression in S101.
S103, calculating the fitness value of the individual, selecting the individual with the largest fitness value as a target individual, converting the fitness value of the target individual into a function value, and stopping calculation and outputting each individual information if the function value is lower than the target expected value of the function value.
Specifically, the fitness value of each individual is calculated, then the individual with the largest fitness value is selected, the fitness value of the individual with the largest fitness value is converted into a function value, the function value is compared with the target expected value of the function value, if the fitness value is lower than the target expected value, the calculation is stopped, the function value is output, and if the fitness value is not higher than the target expected value, the calculation is continued.
S104, randomly selecting two individuals, generating a first random number which is larger than 0 and smaller than 1, and if the first random number is lower than the crossing probability, crossing the two individuals and randomly generating a crossing position.
Specifically, in all populations, two individuals are randomly selected, a first random number which is larger than 0 and smaller than 1 is generated, then the first random number is compared with the cross probability, if the first random number is lower than the cross probability, the two individuals can be crossed, otherwise, the two individuals are not crossed, and the crossed position is randomly generated.
And S105, sequentially generating a second random number which is larger than 0 and smaller than 1 for each individual according to the sequence from large to small of the fitness value, and if the second random number is smaller than the mutation probability, mutating the individual.
Specifically, each individual is sequentially selected from the large to the small according to the size of the fitness value, a second random number which is larger than 0 and smaller than 1 is generated, the second random number is compared with the variation probability, if the variation probability is lower than the variation probability, the individual is subjected to variation, and otherwise, the individual is not subjected to variation.
And S106, outputting the dispatching combination information if the iteration times meet the set conditions.
For example, a maximum iteration number may be selected in advance, and when the iteration number is greater than the set maximum iteration number, or a result meets a certain requirement, the genetic algorithm is terminated. Optionally, the setting condition includes reaching a set iteration number or meeting a set requirement. The iteration number may be 100, that is, the iteration is performed for 100 generations, and if the iteration reaches 100 generations, the conditional output result is satisfied. Otherwise, if the generation is not 100, the steps of selecting, crossing and mutating are returned.
Wherein, each individual includes a plurality of genes, each gene corresponds to a gas station, the demand of each gas station changes in real time, and each delivery vehicle corresponds to the vehicle loading capacity. Alternatively, the delivery vehicle may be a tanker truck.
By adopting the technical scheme, a mathematical model of the secondary delivery scheduling problem is established by introducing corresponding parameters and variables, and the scheduling problem of the secondary delivery of the product oil is solved by utilizing a genetic algorithm; and constructing a secondary finished oil distribution system by using a genetic algorithm as a core thought. Based on the mathematical model, a specific genetic algorithm solving scheme is researched, and the aim is to seek a reasonable vehicle dispatching combination, so that the oil tank truck is fully loaded as much as possible, and the driving route is shortest. On the premise of meeting the requirements of gas stations, the delivery cost can be reduced by combining the vehicle dispatching and the shortest driving route which are fully loaded as much as possible.
In the embodiment of the present application, the specific process of the solution using the genetic algorithm is as follows: initializing a population through a random function to obtain a first generation individual; calculating a fitness value of each individual; recording the fitness value, the gene code and the function value of the individual with the maximum fitness value of the most current generation; judging whether the evolution algebra meets the requirements, if so, stopping calculation, and outputting a result, otherwise, continuing to evolve; selecting next generation individuals by adopting a roulette method according to the fitness value, and carrying out intersection according to the intersection probability; and (4) carrying out mutation on the crossed individuals according to the mutation probability, finally obtaining new generation individuals, forming a new population and returning to the step of calculating the individual fitness value. The detailed procedure is as follows.
Optionally, the fitness function is applied to calculate the fitness value, and the calculation method of the fitness function includes: respectively calculating feasible solutions, feasible vehicle paths and the number of required vehicles corresponding to each individual according to the real-time demand of each gas station and the loading capacity of each delivery vehicle; and calculating a fitness function according to the feasible solution, the feasible vehicle path and the required vehicle number corresponding to each individual.
Specifically, for each individual, the delivery volumes d of the gasoline stations corresponding to the respective genes are accumulated one by one from the 1 st gene not involved in the accumulationiIf accumulated again, is overloaded, i.e.
Figure BDA0002523820230000081
(the load carrying capacity of the simplified vehicle is b) and
Figure BDA0002523820230000082
when x < m-1, the 1 st and the last 1 genes of the cycle are recorded in set S. If the individual has genes which do not participate in accumulation, entering the next cycle, otherwise ending; if the last gene of the individual has been accumulated but no overload has occurred, the 1 st gene of the cycle and the last 1 gene of the individual are added to S and the process is finished. For example, when the individual i is "1, 2,3,4,5,6,7,8,9,10,11,12, 13", the delivery volume of each gene at the gas station is determinedThe vehicle load is "4.8, 3.6,4.3,9.2,5.7,1.6,5.6,3.0,5.7,4.7,9.1,5.5,3.8 tons" and the vehicle load is 20 tons. Then, when the 1 st gene "4.8" is added to the 3 rd gene "4.3", the total dispensing amount is 12.7<20, if the delivery volume "9.2" of the filling station corresponding to the 4 th gene "4" is added, the total delivery volume is 21.7>20, i.e. overload, genes "1" and "3" are added to S, i.e. S ═ 1,3, completing 1 cycle. Then, the loop is repeated, and finally, S is obtained as {1,3,4,6,7,10,11,13}, and the process is ended. With the individual and the starting position of the corresponding path, the number of vehicles corresponding to the individual and the running path of each vehicle can be obtained, 4 vehicles to be transported can be obtained from S, and the running paths of the vehicles are respectively '0-1-2-3-0'; 0-4-5-6-0; 0-7-9-10-0; 0-11-12-13-0". The calculation process can ensure that each individual is a feasible solution, thereby avoiding the generation of infeasible solutions in the operation process, saving resources and improving the calculation speed.
Here, the fitness function, value (i), which is the total cost of the transport of the ith individual, is used 1/value (i), which is the population size.
Value(i)=(C12+C23+C34+C45++C56+C67+C78+C89+C9,10+C10,11+C11,12+C12,13)+(C10+C30+C40+C60+C70+C10,0+C11,0+C13,0)-(C34+C67+C10,11)
Thus, the result is fitness (i) 1/value (i).
According to the method and the device, each individual can be guaranteed to be a feasible solution in the calculation process of the fitness value, so that the generation of an infeasible solution in the operation process is avoided, resources are saved, and the calculation speed is increased.
Optionally, the technical solution of the present application further includes: directly copying the chromosome with the maximum fitness value in the chromosomes of the population of each generation, and entering the next generation as a cross object and/or a variant object.
The selection is also called replication operation, wherein the chromosome with the maximum fitness value in the chromosomes of each generation of population is directly replicated and enters the next generation to be used as the object of genetic operation such as crossing, mutation and the like. A bet tray selection method may be employed. The gambling plate selection refers to selecting individuals from a group, wherein the probability of the individuals being selected is in direct proportion to the fitness value of the individuals, and the higher the fitness value of the individuals is, the higher the probability of the individuals being selected is.
On the basis of the technical scheme, the cross probability adopts the self-adaptive probability, and aiming at cross objects, the calculation mode of the cross probability comprises the following steps:
Figure BDA0002523820230000091
Pcis an individual i in the population1And i2Cross probability of (2); pargIs the base crossover probability specified in the population; pmaxIs the elite crossover probability adopted for individuals in the population whose fitness value is greater than the average; f is the individual i1And i2The fitness value of an individual having a large fitness value; f. ofargIs the average fitness value in the population; f. ofmaxIs the maximum fitness value in the population.
In each generation of population, individuals are subjected to cross recombination with a certain cross probability, and the self-adaptive probability can be adopted. By adopting the calculation formula of the self-adaptive cross probability, the genetic ability of excellent individuals can be effectively enhanced, and the excellent individuals are protected from entering the next generation. And for individuals with fitness values lower than the average value, the elimination probability of the weak individuals is increased by adopting a larger cross probability. Meanwhile, excellent individuals cannot occupy a complete dominant position at the initial stage of evolution, and the occurrence probability of the local optimal solution is reduced. In a specific example, if the parent i is "1, 2/3,4,5,6,7,8/9,10,11,12, 13" and the individual j is "13, 12/11,10,9,8,7/6,5,4,3,2, 1", the new individual is "3, 4,5,6,7,8,13,12,11,10,9,2, 1" after the intersection.
On the basis of the technical scheme, the mutation probability adopts inverse mutation, and aiming at a mutation object, the calculation mode of the mutation probability comprises the following steps:
Figure BDA0002523820230000101
Pmis an individual i in the population1The mutation probability of (2); pmargIs the base variation probability specified in the population; pmmaxIs the elite variation probability adopted by individuals whose population fitness value is greater than the average value; f. ofmIs an individual i1A fitness value of; f. ofmargIs the average fitness value in the population; f. ofmmaxIs the maximum fitness value among individuals in the population.
Thus, two variation points of a chromosome are randomly generated according to the probability, and the variation section is reversed to obtain a new individual. For example, "1, 2,3,4,5/6,7,8,9,10/11,12, 13", where "/" indicates an ectopic mutation, and the new individual obtained after the mutation is "1, 2,3,4,5/10,9,8,7,6/11,12, 13", and then the calculation of fitness value is returned.
The method introduces a novel crossover operator in the algorithm, namely, the crossover probability, and can still generate new individuals even if two same individuals are crossed, so that the requirement of the traditional crossover operator on the diversity of a group is eliminated, simultaneously, the premature phenomenon is avoided, and the possibility that the result is a local optimal solution is reduced.
Fig. 2 is a schematic structural diagram of a device for optimizing the secondary delivery scheduling of finished oil according to an embodiment of the present invention, where the device is suitable for executing a method for optimizing the secondary delivery scheduling of finished oil according to an embodiment of the present invention. As shown in fig. 2, the apparatus may specifically include a model building module 201, a constructing module 202, a fitness value calculating module 203, a crossing module 204, a mutation module 205, and an output module 206.
The model establishing module 201 is used for establishing a mathematical model for secondary delivery scheduling optimization of the product oil, wherein the mathematical model comprises a transportation cost model, a demand point vehicle access model, a vehicle path planning model, a demand point vehicle passing model, a vehicle loading capacity model and a transportation expense model; a construction module 202, configured to construct chromosomes representing feasible lines by using integer codes based on a mathematical model and a genetic algorithm, and set a population scale; the fitness value calculation module 203 is used for calculating the fitness value of the individual, selecting the individual with the largest fitness value as a target individual, converting the fitness value of the target individual into a function value, and stopping calculation and outputting each individual information if the function value is lower than the target expected value of the function value; the crossing module 204 is configured to randomly select two individuals and generate a first random number that is greater than 0 and less than 1, and if the first random number is lower than a crossing probability, the two individuals are crossed and a crossing position is randomly generated; a variation module 205, configured to sequentially generate a second random number that is greater than 0 and less than 1 for each individual according to a descending order of the fitness value, and if the second random number is less than the variation probability, perform variation on the individual; the output module 206 is used for outputting the dispatching combination information when the iteration times meet the set conditions; wherein, each individual includes a plurality of genes, each gene corresponds to a gas station, the demand of each gas station changes in real time, and each delivery vehicle corresponds to the vehicle loading capacity.
By adopting the technical scheme, a mathematical model of the secondary delivery scheduling problem is established by introducing corresponding parameters and variables, and the scheduling problem of the secondary delivery of the product oil is solved by utilizing a genetic algorithm; and constructing a secondary finished oil distribution system by using a genetic algorithm as a core thought. Based on the mathematical model, a specific genetic algorithm solving scheme is researched, and the aim is to seek a reasonable vehicle dispatching combination, so that the oil tank truck is fully loaded as much as possible, and the driving route is shortest. On the premise of meeting the requirements of gas stations, the delivery cost can be reduced by combining the vehicle dispatching and the shortest driving route which are fully loaded as much as possible.
Optionally, the fitness value calculating module 203 is specifically configured to:
respectively calculating feasible solutions, feasible vehicle paths and the number of required vehicles corresponding to each individual according to the real-time demand of each gas station and the loading capacity of each delivery vehicle;
and calculating a fitness function according to the feasible solution, the feasible vehicle path and the required vehicle number corresponding to each individual.
Optionally, the system further comprises an object determination module, configured to directly copy chromosomes with the largest fitness value in the chromosomes of each generation of population into the next generation, where the chromosomes are used as crossover objects and/or variant objects.
Optionally, the cross probability adopts an adaptive probability, and further includes a cross probability calculation module, configured to calculate, for a cross object, a cross probability in a manner including:
Figure BDA0002523820230000121
Pcis an individual i in the population1And i2Cross probability of (2); pargIs the base crossover probability specified in the population; pmaxIs the elite crossover probability adopted for individuals in the population whose fitness value is greater than the average; f is the individual i1And i2The fitness value of an individual having a large fitness value; f. ofargIs the average fitness value in the population; f. ofmaxIs the maximum fitness value in the population.
Optionally, the mutation probability adopts inverse mutation, and further includes a mutation probability calculation module, which is configured to calculate the mutation probability in a manner that, for a mutation object:
Figure BDA0002523820230000122
Pmis an individual i in the population1The mutation probability of (2); pmargIs the base variation probability specified in the population; pmmaxIs the elite variation probability adopted by individuals whose population fitness value is greater than the average value; f. ofmIs an individual i1A fitness value of; f. ofmargIs the average fitness value in the population; f. ofmmaxIs the maximum fitness value among individuals in the population.
Optionally, the setting condition includes reaching a set iteration number or meeting a set requirement.
Optionally, an initial population constructing module is further included, configured to construct individuals to generate an initial population before calculating the fitness function.
The finished oil secondary delivery scheduling optimization device provided by the embodiment of the invention can execute the finished oil secondary delivery scheduling optimization method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
An embodiment of the present invention further provides an intelligent terminal, please refer to fig. 3, and fig. 3 is a schematic structural diagram of the intelligent terminal, and as shown in fig. 3, the intelligent terminal includes: a processor 310, and a memory 320 coupled to the processor 310; the memory 320 is used for storing a computer program for executing at least the product oil secondary delivery scheduling optimization method in the embodiment of the present invention; the processor 310 is used for calling and executing the computer program in the memory; the secondary delivery scheduling optimization method of the finished oil at least comprises the following steps: establishing a mathematical model for secondary delivery scheduling optimization of the product oil, wherein the mathematical model comprises a transportation cost model, a demand point vehicle access model, a vehicle path planning model, a demand point vehicle passing model, a vehicle loading capacity model and a transportation expense model; constructing chromosomes representing feasible lines by using integer codes based on a mathematical model and a genetic algorithm, and setting population scale; calculating the fitness value of the individual, selecting the individual with the largest fitness value as a target individual, converting the fitness value of the target individual into a function value, and stopping calculation and outputting each individual information if the function value is lower than the target expected value of the function value; randomly selecting two individuals, generating a first random number which is more than 0 and less than 1, and if the first random number is lower than the crossing probability, crossing the two individuals and randomly generating a crossing position; sequentially generating a second random number which is greater than 0 and less than 1 for each individual according to the sequence from large to small of the fitness value, and if the second random number is less than the variation probability, performing variation on the individual; if the iteration times meet the set conditions, outputting the dispatching combination information; wherein, each individual includes a plurality of genes, each gene corresponds to a gas station, the demand of each gas station changes in real time, and each delivery vehicle corresponds to the vehicle loading capacity.
The embodiment of the present invention further provides a storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for optimizing secondary delivery scheduling of product oil in the embodiment of the present invention includes: the secondary delivery scheduling optimization method of the finished oil at least comprises the following steps: establishing a mathematical model for secondary delivery scheduling optimization of the product oil, wherein the mathematical model comprises a transportation cost model, a demand point vehicle access model, a vehicle path planning model, a demand point vehicle passing model, a vehicle loading capacity model and a transportation expense model; constructing chromosomes representing feasible lines by using integer codes based on a mathematical model and a genetic algorithm, and setting population scale; calculating the fitness value of the individual, selecting the individual with the largest fitness value as a target individual, converting the fitness value of the target individual into a function value, and stopping calculation and outputting each individual information if the function value is lower than the target expected value of the function value; randomly selecting two individuals, generating a first random number which is more than 0 and less than 1, and if the first random number is lower than the crossing probability, crossing the two individuals and randomly generating a crossing position; sequentially generating a second random number which is greater than 0 and less than 1 for each individual according to the sequence from large to small of the fitness value, and if the second random number is less than the variation probability, performing variation on the individual; if the iteration times meet the set conditions, outputting the dispatching combination information; wherein, each individual includes a plurality of genes, each gene corresponds to a gas station, the demand of each gas station changes in real time, and each delivery vehicle corresponds to the vehicle loading capacity.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A secondary delivery scheduling optimization method for finished oil is characterized by comprising the following steps:
establishing a mathematical model for secondary delivery scheduling optimization of the product oil, wherein the mathematical model comprises a transportation cost model, a demand point vehicle access model, a vehicle path planning model, a demand point vehicle passing model, a vehicle loading capacity model and a transportation expense model;
constructing chromosomes representing feasible lines by using integer codes based on the mathematical model and the genetic algorithm, and setting population scale;
calculating the fitness value of an individual, selecting the individual with the largest fitness value as a target individual, converting the fitness value of the target individual into a function value, and stopping calculation and outputting each individual information if the function value is lower than the target expected value of the function value;
randomly selecting two individuals, generating a first random number which is more than 0 and less than 1, and if the first random number is lower than the crossing probability, crossing the two individuals and randomly generating a crossing position;
sequentially generating a second random number which is larger than 0 and smaller than 1 for each individual according to the sequence from large to small of the fitness value, and if the second random number is smaller than the variation probability, performing variation on the individual;
if the iteration times meet the set conditions, outputting the dispatching combination information;
wherein, each individual includes a plurality of genes, each gene corresponds to a gas station, the demand of each gas station changes in real time, and each delivery vehicle corresponds to the vehicle loading capacity.
2. The method of claim 1, wherein the fitness value is calculated using a fitness function that includes:
respectively calculating feasible solutions, feasible vehicle paths and the number of required vehicles corresponding to each individual according to the real-time demand of each gas station and the loading capacity of each delivery vehicle;
and calculating a fitness function according to the feasible solution, the feasible vehicle path and the required vehicle number corresponding to each individual.
3. The method of claim 1, further comprising:
directly copying the chromosome with the maximum fitness value in the chromosomes of the population of each generation, and entering the next generation as a cross object and/or a variant object.
4. The method of claim 3, wherein the cross probability is an adaptive probability, and the cross probability is calculated for the cross object by:
Figure FDA0002523820220000021
Pcis an individual i in the population1And i2Cross probability of (2); pargIs the base crossover probability specified in the population; pmaxIs the elite crossover probability adopted for individuals in the population whose fitness value is greater than the average; f is the individual i1And i2The fitness value of an individual having a large fitness value; f. ofargIs the average fitness value in the population; f. ofmaxIs the largest in the populationThe fitness value of (a).
5. The method of claim 3, wherein the mutation probability is based on an inverse mutation, and the mutation probability is calculated for the mutated subject by:
Figure FDA0002523820220000022
Pmis an individual i in the population1The mutation probability of (2); pmargIs the base variation probability specified in the population; pmmaxIs the elite variation probability adopted by individuals whose population fitness value is greater than the average value; f. ofmIs an individual i1A fitness value of; f. ofmargIs the average fitness value in the population; f. ofmmaxIs the maximum fitness value among individuals in the population.
6. The method of claim 1, wherein the set condition comprises reaching a set number of iterations or meeting a set requirement.
7. The method of claim 2, wherein prior to calculating the fitness function, the individuals are constructed to produce an initial population.
8. The utility model provides a finished product oil secondary delivery scheduling optimizing apparatus which characterized in that includes:
the model establishing module is used for establishing a mathematical model for secondary delivery scheduling optimization of the product oil, wherein the mathematical model comprises a transportation cost model, a demand point vehicle access model, a vehicle path planning model, a demand point vehicle passing model, a vehicle loading capacity model and a transportation expense model;
the construction module is used for constructing chromosomes representing feasible lines by using integer codes based on the mathematical model and the genetic algorithm and setting population scale;
the fitness value calculation module is used for calculating the fitness value of an individual, selecting the individual with the largest fitness value as a target individual, converting the fitness value of the target individual into a function value, and stopping calculation and outputting each individual information if the function value is lower than the target expected value of the function value;
the crossing module is used for randomly selecting two individuals and generating a first random number which is larger than 0 and smaller than 1, if the first random number is lower than the crossing probability, the two individuals are crossed, and a crossing position is randomly generated;
the variation module is used for sequentially generating a second random number which is larger than 0 and smaller than 1 for each individual according to the sequence of the fitness value from large to small, and if the second random number is smaller than the variation probability, the individual is subjected to variation;
the output module is used for outputting the dispatching combination information when the iteration times meet the set conditions;
wherein, each individual includes a plurality of genes, each gene corresponds to a gas station, the demand of each gas station changes in real time, and each delivery vehicle corresponds to the vehicle loading capacity.
9. A mobile terminal, comprising:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program, and the computer program is at least used for executing the product oil secondary delivery scheduling optimization method of any one of claims 1-7;
the processor is used for calling and executing the computer program in the memory.
10. A storage medium storing a computer program which, when executed by a processor, implements the steps of the method for optimizing secondary delivery scheduling of product oil according to any one of claims 1 to 7.
CN202010498401.XA 2020-06-04 2020-06-04 Secondary delivery scheduling optimization method, device, equipment and storage medium for product oil Pending CN111768084A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010498401.XA CN111768084A (en) 2020-06-04 2020-06-04 Secondary delivery scheduling optimization method, device, equipment and storage medium for product oil

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010498401.XA CN111768084A (en) 2020-06-04 2020-06-04 Secondary delivery scheduling optimization method, device, equipment and storage medium for product oil

Publications (1)

Publication Number Publication Date
CN111768084A true CN111768084A (en) 2020-10-13

Family

ID=72720171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010498401.XA Pending CN111768084A (en) 2020-06-04 2020-06-04 Secondary delivery scheduling optimization method, device, equipment and storage medium for product oil

Country Status (1)

Country Link
CN (1) CN111768084A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115965172A (en) * 2023-03-16 2023-04-14 中国石油大学(华东) Path optimization algorithm, system and equipment of finished oil secondary distribution vehicle

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096011A (en) * 2015-09-11 2015-11-25 浙江中烟工业有限责任公司 Improved chromosome coding based logistic transportation and scheduling method
CN109919376A (en) * 2019-03-01 2019-06-21 浙江工业大学 Multi-field model and multi-vehicle-type vehicle route dispatch control method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096011A (en) * 2015-09-11 2015-11-25 浙江中烟工业有限责任公司 Improved chromosome coding based logistic transportation and scheduling method
CN109919376A (en) * 2019-03-01 2019-06-21 浙江工业大学 Multi-field model and multi-vehicle-type vehicle route dispatch control method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马义飞;孙晓燕;: "成品油二次配送调度优化模型及其遗传算法求解", 运筹与管理, no. 06, pages 74 - 77 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115965172A (en) * 2023-03-16 2023-04-14 中国石油大学(华东) Path optimization algorithm, system and equipment of finished oil secondary distribution vehicle
CN115965172B (en) * 2023-03-16 2024-01-30 中国石油大学(华东) Path optimization algorithm, system and equipment for finished oil secondary distribution vehicle

Similar Documents

Publication Publication Date Title
CN108764777B (en) Electric logistics vehicle scheduling method and system with time window
CN107766994A (en) A kind of shared bicycle dispatching method and scheduling system
CN107578119A (en) A kind of resource allocation global optimization method of intelligent dispatching system
CN109559062B (en) Task allocation and path planning method for cooperative logistics problem
CN111091238A (en) Automatic container terminal AGV intelligent scheduling method
Sombuntham et al. Multi‐depot Vehicle Routing Problem with Pickup and Delivery Requests
CN110322066B (en) Collaborative vehicle path optimization method based on shared carrier and shared warehouse
CN111612358A (en) Shared automobile vehicle scheduling and dispatcher path optimization method
CN115689247A (en) Complete vehicle logistics scheduling optimization method based on improved genetic algorithm
Wang et al. Cooperation and profit allocation for two-echelon logistics pickup and delivery problems with state–space–time networks
CN107316152A (en) Electric automobile participates in planing method, device and the computing device of Demand Side Response
CN110098964A (en) A kind of disposition optimization method based on ant group algorithm
CN115965172B (en) Path optimization algorithm, system and equipment for finished oil secondary distribution vehicle
CN113919557A (en) Logistics route optimization method and system based on self-adaptive NSGAII
CN115879657A (en) Electric vehicle power station changing location path optimization method considering multi-station capacity design
CN111768084A (en) Secondary delivery scheduling optimization method, device, equipment and storage medium for product oil
Hani et al. Simulation based optimization of a train maintenance facility
Duan et al. Combined configuration of container terminal berth and quay crane considering carbon cost
He Optimization of edge delay sensitive task scheduling based on genetic algorithm
CN113344267A (en) Logistics network resource allocation optimization method based on cooperation
CN110751564B (en) Electric vehicle charging station construction method and system based on game theory
CN112183933A (en) Verification assembly line scheduling method and system based on hybrid variable neighborhood evolution algorithm
CN115495859B (en) Warehouse net planning method based on genetic algorithm
CN115759914A (en) Electricity meter distribution vehicle path planning method and system considering material loading rate optimization
CN116663819A (en) Robot task scheduling method for improving population initialization strategy and related device

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