Disclosure of Invention
Technical problem to be solved
Aiming at the defects of the prior art, the invention provides a path optimization method and a path optimization system considering crowdsourcing and self-distribution cooperation situations, and solves the problem that logistics distribution cannot be optimized when various influence factors are considered in the prior art.
(II) technical scheme
In order to achieve the purpose, the invention is realized by the following technical scheme:
in a first aspect, the present invention first proposes a path optimization method considering a crowd-sourcing and self-provisioning coordination scenario, the method comprising:
s1, acquiring n individuals x based on the number M of vehicles and the logistics distribution demand point I1,x2,...,xnAnd generating an initial population pi ═ x1,x2,...,xn);
S2, setting the maximum iteration number t of the variable neighborhood search algorithmmaxSetting the maximum load capacity Q of the vehicle, where the initial iteration number t is 1 and the initialization R is 0, and the initial value k is 1 in the shaking (k) operation1,Q2And the maximum driving distance L of the electric vehiclemaxCost parameter c for fuel-oil vehicles and electric vehicles1,c2Cost of distribution parameter a for crowd-sourced and self-sourced distribution1,a2,b1,b2;
S3, calculating the value of the objective function f of each individual in the initial population pi, and acquiring the minimum objective function value fminAnd fminCorresponding individual xmin;
S4, judging t is less than or equal to tmaxWhether the judgment is true or not is judged, if not, S10 is carried out, otherwise, S5 is carried out;
s5, judging whether k is less than or equal to 3, if not, making k equal to 1, and comparing x1Performing shaking (k) operation to obtain x'1Otherwise, directly to x1Performing shaking (k) operation to obtain x'1If t is t +1, determining whether R is equal to or less than 3, and if so, performing S6; if not, go to S8;
s6, p 'x'1Localsearch operation is carried out to obtain x ″)1Go to S7;
s7, judging f (x ″)1)<f(x1) If yes, then x ″' is applied1Is assigned to x1And updating population pi and fminAnd xminOtherwise, making k equal to k +1 and R equal to R +1, and returning to S4;
s8, pair x 'by utilizing differential evolution algorithm'1Operated on to give x ″)1And calculating f (x ″)1);
S9, judgmentF is broken (x ″)1)<f(x1) If yes, use x1Random substitution of x2,...,xnOf any of the above, and x ″ ", is1Is assigned to x1And updating population pi and fminAnd xminOtherwise, let k be k +1, R be 0 and return to S4;
s10, finishing the algorithm execution and outputting the optimal objective function value fminAnd x corresponding theretomin。
Preferably, the S1 includes:
selecting the number M of vehicles and a logistics distribution demand point I;
randomly coding and sequencing demand points I, and recording n individuals obtained from M-1 0 random insertion sequences as x1,x2,...,xnThe n individuals are combined into an initial population pi ═ x1,x2,...,xn)。
Preferably, the objective function f can be expressed by the following formula:
f=C1+C2+C3
the constraint conditions of the objective function f are as follows:
Q′i>0,i∈I
Q′i-Xj+X′j=Q′i
ti<max(ti)
(T1im+T2ik)×Yi 1+Yi 2=1,i∈I,m∈M
(T1im+T2ik)×Yi 1≤1,i∈I,k∈K
y0jk=yi0k,i∈I,j∈I,k∈K
wherein f represents the total cost in the logistics distribution process; c
1Represents a delivery cost from a demand point of delivery; c
2Represents the cost of transportation of the self-delivered goods; c
3Representing a crowdsourcing cost of crowdsourcing the distribution of goods;
representing the distribution cost of the self-distribution demand points in the demand points i;
representing the crowdsourcing distribution cost of demand points i; maximum load capacity Q of vehicle
1,Q
2(ii) a Maximum driving distance L of electric automobile
maxCost parameter c for fuel-oil vehicles and electric vehicles
1,c
2The cost parameters of the goods delivered by crowdsourcing and self-delivering are respectively a
1,a
2,b
1,b
2;d
ijRepresenting the distance between customer points and the distance between the distribution center and the customer points; q'
iIndicating the remaining capacity of the vehicle after the vehicle has provided service to customer i; y is
i 1,Y
i 2,T
1im,T
2ik,y
ijm,y
ijkAre all decision variables,
Y i 11 means that customer point i is self-delivered by the delivery centre, otherwise Y
i 1=0;
Y i 21 means that customer point i is delivered by crowdsourcing, otherwise, Y
i 2=0;
T 1im1 means that customer point i is self-delivered by fuel vehicle m, otherwise T
1im=0;
T 2ik1 means that customer point i is self-delivered by electric vehicle k, otherwise T
2ik=0;
y ijm1 means that the fuel vehicle m passes through the points i to j when i to j are self-distributed, otherwise y
ijm=0;
y ijk1 means that when i to j self-delivery is such that there is an electric vehicle k passing through points i to j, otherwise y
ijk=0;y
0jm=y
0jmI belongs to I, j belongs to I, and M belongs to M, which indicates that the fuel vehicle M starts from the distribution center and finally returns to the distribution center; y is
0jm=y
0jmThe fuel vehicle m is shown to be sent out from the distribution center and finally returned to the distribution center; y is
0jk=y
i0kIndicating that the electric vehicle k is going to go from the distribution center and finally goes back to the distribution center.
Preferably, the scraping (k) operation in S5 includes:
when k is 1, the scraping (1) operation represents x1Performing a first neighborhood operation to obtain x'1(ii) a The first neighborhood operation represents: exchanging two demand points of the same vehicle at will without exchanging two crowdsourcing distribution points;
when k is 2, the scraping (2) operation represents a pairx1Performing a second neighborhood operation to obtain x'1(ii) a The second neighborhood operation represents: two demand points of different vehicles are exchanged at will and two crowdsourced distribution points are not exchanged;
when k is 3, the scraping (3) operation represents the pair x1Performing a third neighborhood operation to obtain x'1(ii) a The third neighborhood operation represents: a demand point i is taken out at will and inserted into the j-th bit, and a point of crowdsourcing distribution cannot be inserted between two points of crowdsourcing distribution.
Preferably, x 'in S6'1Localsearch operation is carried out to obtain x ″)1Comprises the steps of (a) preparing a mixture of a plurality of raw materials,
step 1: inputting the maximum iteration number y of the localsearch operationmaxAnd initializing y-0, l-1;
step 2: y is judged to be less than or equal tomaxIf yes, performing step 3, wherein y is y + 1; otherwise, performing step 6;
and step 3: judging whether l is less than or equal to 3, if so, performing a step 4, otherwise, making l equal to 1, and returning to the step 2;
and 4, step 4: to x'1Localsearch operation is carried out to obtain x ″)1And f (x ″)1);
And 5: judgment of f (x ″)1)≤f(x′1) If yes, then x ″' is applied1Value to x'1And let l equal to 1, otherwise let l equal to l + 1; returning to the step 2;
step 6: the flow ends and x ″' is output1And f (x ″)1) The value of (c).
In a second aspect, the present invention further provides a path optimization system considering a crowd-sourcing and self-provisioning collaborative scenario, the system comprising:
a processing module for performing the steps of:
s1, acquiring n individuals x based on the number M of vehicles and the logistics distribution demand point I1,x2,...,xnAnd generating an initial population pi ═ x1,x2,...,xn);
S2, setting the maximum iteration times of the variable neighborhood searching algorithmNumber tmaxSetting the maximum load capacity Q of the vehicle, where the initial iteration number t is 1 and the initialization R is 0, and the initial value k is 1 in the shaking (k) operation1,Q2And the maximum driving distance L of the electric vehiclemaxCost parameter c for fuel-oil vehicles and electric vehicles1,c2Cost of distribution parameter a for crowd-sourced and self-sourced distribution1,a2,b1,b2;
S3, calculating the value of the objective function f of each individual in the initial population pi, and acquiring the minimum objective function value fminAnd fminCorresponding individual xmin;
S4, judging t is less than or equal to tmaxWhether the judgment is true or not is judged, if not, S10 is carried out, otherwise, S5 is carried out;
s5, judging whether k is less than or equal to 3, if not, making k equal to 1, and comparing x1Performing shaking (k) operation to obtain x'1Otherwise, directly to x1Performing shaking (k) operation to obtain x'1If t is t +1, determining whether R is equal to or less than 3, and if so, performing S6; if not, go to S8;
s6, p 'x'1Localsearch operation is carried out to obtain x ″)1Go to S7;
s7, judging f (x ″)1)<f(x1) If yes, then x ″' is applied1Is assigned to x1And updating population pi and fminAnd xminOtherwise, making k equal to k +1 and R equal to R +1, and returning to S4;
s8, pair x 'by utilizing differential evolution algorithm'1Operated on to give x ″)1And calculating f (x ″)1);
S9, judging f (x ″)1)<f(x1) If yes, use x1Random substitution of x2,...,xnOf any of the above, and x ″ ", is1Is assigned to x1And updating population pi and fminAnd xminOtherwise, let k be k +1, R be 0 and return to S4;
s10, finishing the algorithm execution and outputting the optimal objective function value fminAnd x corresponding theretomin;
An output module for outputting the optimal objective function value fminAnd x corresponding theretomin。
Preferably, when the processing module executes S1, the S1 includes:
selecting the number M of vehicles and a logistics distribution demand point I;
randomly coding and sequencing demand points I, and recording n individuals obtained from M-1 0 random insertion sequences as x1,x2,...,xnThe n individuals are combined into an initial population pi ═ x1,x2,...,xn)。
Preferably, when the processing module executes the steps S1-S10, the objective function f can be expressed by the following formula:
f=C1+C2+C3
the constraint conditions of the objective function f are as follows:
Q′i>0,i∈I
Q′i-Xj+X′j=Q′i
ti<max(ti)
(T1im+T2ik)×Yi 1+Yi 2=1,i∈I,m∈M
(T1im+T2ik)×Yi 1≤1,i∈I,k∈K
y0jk=yi0k,i∈I,j∈I,k∈K
wherein f represents the total cost in the logistics distribution process; c
1Represents a delivery cost from a demand point of delivery; c
2Represents the cost of transportation of the self-delivered goods; c
3Representing a crowdsourcing cost of crowdsourcing the distribution of goods;
representing the distribution cost of the self-distribution demand points in the demand points i;
representing the crowdsourcing distribution cost of demand points i; maximum load capacity Q of vehicle
1,Q
2(ii) a Maximum driving distance L of electric automobile
maxCost parameter c for fuel-oil vehicles and electric vehicles
1,c
2The cost parameters of the goods delivered by crowdsourcing and self-delivering are respectively a
1,a
2,b
1,b
2;d
ijRepresenting the distance between customer points and the distance between the distribution center and the customer points; q'
iIndicating the remaining capacity of the vehicle after the vehicle has provided service to customer i; y is
i 1,Y
i 2,T
1im,T
2ik,y
ijm,y
ijkAre all decision variables, Y
i 11 means that customer point i is self-delivered by the delivery centre, otherwise Y
i 1=0;Y
i 21 means that customer point i is delivered by crowdsourcing, otherwise, Y
i 2=0;T
1im1 means that customer point i is self-delivered by fuel vehicle m, otherwise T
1im=0;T
2ik1 means that customer point i is self-delivered by electric vehicle k, otherwise T
2ik=0;y
ijm1 means that the fuel vehicle m passes through the points i to j when i to j are self-distributed, otherwise y
ijm=0;y
ijk1 means that when i to j self-delivery is such that there is an electric vehicle k passing through points i to j, otherwise y
ijk=0;y
0jm=y
0jmI belongs to I, j belongs to I, and M belongs to M, which indicates that the fuel vehicle M starts from the distribution center and finally returns to the distribution center; y is
0jm=y
0jmThe fuel vehicle m is shown to be sent out from the distribution center and finally returned to the distribution center; y is
0jk=y
i0kIndicating that the electric vehicle k is going to go from the distribution center and finally goes back to the distribution center.
Preferably, when the processing module executes S5, the scraping (k) operation in S5 includes:
when k is 1, the scraping (1) operation represents x1Performing a first neighborhood operation to obtain x'1(ii) a The first neighborhood operation represents: exchanging two demand points of the same vehicle at will without exchanging two crowdsourcing distribution points;
when k is 2, the scraping (2) operation represents the pair x1Performing a second neighborhood operation to obtain x'1(ii) a The second neighborhood operation represents: exchange two demand points of different vehicles at will withoutExchanging two points of crowdsourced distribution;
when k is 3, the scraping (3) operation represents the pair x1Performing a third neighborhood operation to obtain x'1(ii) a The third neighborhood operation represents: a demand point i is taken out at will and inserted into the j-th bit, and a point of crowdsourcing distribution cannot be inserted between two points of crowdsourcing distribution.
Preferably, the processing module, when executing S6, pairs x 'in S6'1Performing local search operation to obtain x ″)1Comprises the steps of (a) preparing a mixture of a plurality of raw materials,
step 1: inputting the maximum iteration number y of the localsearch operationmaxAnd initializing y-0, l-1;
step 2: y is judged to be less than or equal tomaxIf yes, performing step 3, wherein y is y + 1; otherwise, performing step 6;
and step 3: judging whether l is less than or equal to 3, if so, performing a step 4, otherwise, making l equal to 1, and returning to the step 2;
and 4, step 4: to x'1Localsearch operation is carried out to obtain x ″)1And f (x ″)1);
And 5: judgment of f (x ″)1)≤f(x′1) If yes, then x ″' is applied1Value to x'1And let l equal to 1, otherwise let l equal to l + 1; returning to the step 2;
step 6: the flow ends and x ″' is output1And f (x ″)1) The value of (c).
(III) advantageous effects
The invention provides a path optimization method and system considering crowdsourcing and self-distribution cooperation situations. Compared with the prior art, the method has the following beneficial effects:
the method comprises the steps of constructing a target function based on transportation cost, self-distribution cost and crowdsourcing cost in a logistics distribution process, minimizing the target function to determine a distribution route of self-distribution and demand points of crowdsourcing distribution, and optimizing by utilizing a hybrid algorithm combining an improved variable neighborhood search algorithm and a differential evolution algorithm to obtain an optimal objective function value fminAnd x corresponding theretominAnd according to the solutionThe optimal result of (a) optimizes the logistics distribution process. The invention guides the selection of the distribution mode of the distribution center while reducing the cost of the distribution center, solves the problem that the prior art can not optimize the logistics distribution when considering various influence factors, and realizes the aim of integrally optimizing the logistics distribution.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described, and it is obvious that the described embodiments are a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the application provides a path optimization method and a path optimization system considering crowdsourcing and self-distribution cooperation situations, solves the problem that logistics distribution cannot be optimized in consideration of various influence factors in the prior art, and achieves the purpose of overall optimization of logistics distribution.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows:
in order to solve the problem that logistics distribution cannot be optimized in consideration of various influence factors in the prior art, the technical scheme is that a minimized objective function comprehensively considering transportation cost, self-distribution cost and crowdsourcing cost is established, then a distribution route of self-distribution and demand points of crowdsourcing distribution are determined, then an optimization process is solved by using a hybrid algorithm combining an improved variable neighborhood search algorithm and a differential evolution algorithm, and an optimal objective function value f is obtainedminAnd x corresponding theretominAnd finally, optimizing the logistics distribution process according to the solving result.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Example 1:
in a first aspect, the present invention first discloses a path optimization method considering crowdsourcing and self-distribution coordination situations, the method comprising:
s1, acquiring n individuals x based on the number M of vehicles and the logistics distribution demand point I1,x2,...,xnAnd generating an initial population pi ═ x1,x2,...,xn);
S2, setting the maximum iteration number t of the variable neighborhood search algorithmmaxSetting the maximum load capacity Q of the vehicle, where the initial iteration number t is 1 and the initialization R is 0, and the initial value k is 1 in the shaking (k) operation1,Q2And the maximum driving distance L of the electric vehiclemaxCost parameter c for fuel-oil vehicles and electric vehicles1,c2Cost of distribution parameter a for crowd-sourced and self-sourced distribution1,a2,b1,b2;
S3, calculating the value of the objective function f of each individual in the initial population II, and obtaining the minimum objective function value fminAnd fminCorresponding individual xmin;
S4, judging t is less than or equal to tmaxWhether the judgment is true or not is judged, if not, S10 is carried out, otherwise, S5 is carried out;
s5, judging whether k is less than or equal to 3, if not, making k equal to 1, and comparing x1Performing shaking (k) operation to obtain x'1Otherwise, directly to x1Performing shaking (k) operation to obtain x'1If t is t +1, determining whether R is equal to or less than 3, and if so, performing S6; if not, go to S8;
s6, p 'x'1Localsearch operation is carried out to obtain x ″)1Go to S7;
s7, judging f (x ″)1)<f(x1) If yes, then x ″' is applied1Is assigned to x1And updating population pi and fminAnd xminOtherwise, making k equal to k +1 and R equal to R +1, and returning to S4;
s8, pair x 'by utilizing differential evolution algorithm'1Operated on to give x ″)1And calculating f (x ″)1);
S9, judging f (x ″)1)<f(x1) If yes, use x1Random substitution of x2,...,xnOf any of the above, and x ″ ", is1Is assigned to x1And updating population pi and fminAnd xminOtherwise, let k be k +1, R be 0 and return to S4;
s10, finishing the algorithm execution and outputting the optimal objective function value fminAnd x corresponding theretomin。
Therefore, in the embodiment, the objective function is constructed based on the transportation cost, the self-distribution cost and the crowd-sourcing cost in the logistics distribution process, then the objective function is minimized to determine the distribution route of self-distribution and the demand point of crowd-sourcing distribution, and then the optimization is performed by using the hybrid algorithm of the improved variable neighborhood search algorithm and the differential evolution algorithm, so that the optimal objective function value f is obtainedminAnd x corresponding theretominAnd optimizing the logistics distribution process according to the solved optimal result. The invention guides the selection of the distribution mode of the distribution center while reducing the cost of the distribution center, solves the problem that the prior art can not optimize the logistics distribution when considering various influence factors, and realizes the aim of integrally optimizing the logistics distribution.
In the above method according to an embodiment of the present invention, in order to ensure the difference of each individual in the generated initial population, when the initial population is generated, a preferable processing manner in the step S1 includes:
selecting the number M of vehicles and a logistics distribution demand point I;
randomly coding and sequencing demand points I, and recording n individuals obtained from M-1 0 random insertion sequences as x1,x2,...,xnThe n individuals are grouped into an initial population pi ═ (x)1,x2,...,xn)
In addition, in order to ensure the lowest total cost of the whole logistics distribution process under the condition of comprehensively considering the influence of various influencing factors on the logistics distribution process, a preferred processing mode is that the objective function f can be expressed by the following formula:
f=C1+C2+C3
the constraint conditions of the objective function f are as follows:
Q′i>0,i∈I
Q′i-Xj+X′j=Q′i
ti<max(ti)
(T1im+T2ik)×Yi 1+Yi 2=1,i∈I,m∈M
(T1im+T2ik)×Yi 1≤1,i∈I,k∈K
y0jk=yi0k,i∈I,j∈I,k∈K
wherein f represents the total cost in the logistics distribution process; c
1Represents a delivery cost from a demand point of delivery; c
2Represents the cost of transportation of the self-delivered goods; c
3Representing a crowdsourcing cost of crowdsourcing the distribution of goods;
representing the distribution cost of the self-distribution demand points in the demand points i;
representing the crowdsourcing distribution cost of demand points i; maximum load capacity Q of vehicle
1,Q
2(ii) a Maximum driving distance Lmax of electric vehicle, cost parameter c of fuel vehicle and electric vehicle
1,c
2The cost parameters of the goods delivered by crowdsourcing and self-delivering are respectively a
1,a
2,b
1,b
2;d
ijRepresenting the distance between customer points and the distance between the distribution center and the customer points; q'
iIndicating the remaining capacity of the vehicle after the vehicle has provided service to customer i; y is
i 1,Y
i 2,T
1im,T
2ik,y
ijm,y
ijkAre all decision variables, Y
i 11 means that customer point i is self-delivered by the delivery centre, otherwise Y
i 1=0;Y
i 21 means that customer point i is delivered by crowdsourcing, otherwise, Y
i 2=0;T
1im1 means that customer point i is self-delivered by fuel vehicle m, otherwise T
1im=0;T
2ik1 means that customer point i is self-delivered by electric vehicle k, otherwise T
2ik=0;y
ijm1 means that the fuel vehicle m passes through the points i to j when i to j are self-distributed, otherwise y
ijm=0;y
ijk1 means that when i to j self-delivery is such that there is an electric vehicle k passing through points i to j, otherwise y
ijk=0;y
0jm=y
0jmI belongs to I, j belongs to I, and M belongs to M, which indicates that the fuel vehicle M starts from the distribution center and finally returns to the distribution center; y is
0jm=y
0jmThe fuel vehicle m is shown to be sent out from the distribution center and finally returned to the distribution center; y is
0jk=y
i0kIndicating that the electric vehicle k is going to go from the distribution center and finally goes back to the distribution center.
In the foregoing method according to the embodiment of the present invention, in order to prevent the local optimal solution from being trapped and generate a new feasible solution, a preferred processing manner is that the shaking (k) operation in S5 includes:
when k is 1, the scraping (1) operation represents x1Performing a first neighborhood operation to obtain x'1(ii) a The first neighborhood operation represents: exchanging two demand points of the same vehicle at will without exchanging two crowdsourcing distribution points;
when k is 2, the scraping (2) operation represents the pair x1Carry out the secondNeighborhood operation yields x'1(ii) a The second neighborhood operation represents: two demand points of different vehicles are exchanged at will and two crowdsourced distribution points are not exchanged;
when k is 3, the scraping (3) operation represents the pair x1Performing a third neighborhood operation to obtain x'1(ii) a The third neighborhood operation represents: a demand point i is taken out at will and inserted into the j-th bit, and a point of crowdsourcing distribution cannot be inserted between two points of crowdsourcing distribution.
In addition, in order to select an optimal solution from the adjacent solution space of the current solution as the current solution until reaching the local optimal solution, a preferred processing manner is to perform "x" pairs in S6'1Performing local search operation to obtain x ″)1The method comprises the following steps:
step 1: inputting the maximum iteration number y of the localsearch operationmaxAnd initializing y-0, l-1;
step 2: y is judged to be less than or equal tomaxIf yes, performing step 3, wherein y is y + 1; otherwise, performing step 6;
and step 3: judging whether l is less than or equal to 3, if so, performing a step 4, otherwise, making l equal to 1, and returning to the step 2;
and 4, step 4: to x'1Localsearch operation is carried out to obtain x ″)1And f (x ″)1);
And 5: judgment of f (x ″)1)≤f(x′1) If yes, then x ″' is applied1Value to x'1And let l equal to 1, otherwise let l equal to l + 1; returning to the step 2;
step 6: the flow ends and x ″' is output1And f (x ″)1) The value of (c).
The following describes a specific implementation process of the present invention by taking the demand point I as 10, the logistics distribution vehicle as a fuel vehicle, and the number M of vehicles as 2 as an example.
And S1, generating an initial population. Obtaining n individuals x based on vehicle number M and logistics distribution demand point I1,x2,...,xnAnd generating an initial population pi ═ x1,x2,...,xn)。
Assuming that 10 demand points and 2 fuel vehicles are provided, firstly, randomly sequencing the 10 demand points, and then inserting 0 into the demand points to obtain an initial solution, namely n individuals x1,x2,...,x10Generating an initial population pi ═ x1,x2,...,x10). Let x be1=[1,2,3,4,5,6,0,7,8,9,10]Then the path of the first vehicle at this time is [1,2,3,4,5,6 ]]The path of the second vehicle is [7,8,9,10 ]]。
And S2, setting parameters. Setting maximum iteration times t of variable neighborhood search algorithmmaxSetting the maximum load capacity Q of the vehicle, where the initial iteration number t is 1 and the initialization R is 0, and the initial value k is 1 in the shaking (k) operation1,Q2And the maximum driving distance L of the electric vehiclemaxCost parameter c for fuel-oil vehicles and electric vehicles1,c2Cost of distribution parameter a for crowd-sourced and self-sourced distribution1,a2,b1,b2。
And S3, determining a distribution path and calculating cost. Calculating the value of the objective function f of each individual in the initial population II, and obtaining the minimum objective function value fminAnd fminCorresponding individual xmin。
An actual travel path of the vehicle is determined. Determining an actual travel path and cost f (x) of the vehicle based on the payload limit and the time limit of the vehicle1). Referring to fig. 2, in vehicle one, the travel paths 1,2,3 are taken as self-distribution and 4,5,6 are taken as crowd-sourced distribution, as shown in fig. 2 a; in vehicle two, the travel paths 7,8 are used as self-distribution and 9,10 are used as crowd-sourced distribution, as shown in fig. 2 b. And calculating the cost f (x)1). When calculating the cost, calculating according to the following formula:
f=C1+C2+C3
the constraint of the function f can be expressed as:
Q′i>0,i∈I
Q′i-Xj+X′j=Q′i
ti<max(ti)
(T1im+T2ik)×Yi 1+Yi 2=1,i∈I,m∈M
(T1im+T2ik)×Yi 1≤1,i∈I,k∈K
y0jk=yi0k,i∈I,j∈I,k∈K
wherein f represents the total cost in the logistics distribution process; c
1Represents a delivery cost from a demand point of delivery; c
2Represents the cost of transportation of the self-delivered goods; c
3Representing a crowdsourcing cost of crowdsourcing the distribution of goods;
representing the distribution cost of the self-distribution demand points in the demand points i;
representing the crowdsourcing distribution cost of demand points i; maximum load capacity Q of vehicle
1,Q
2(ii) a The maximum driving distance Lmax of the electric automobile, and the cost parameters of the fuel vehicle and the electric automobile are as follows: c. C
1Represents the transportation cost per unit distance of the electric vehicle, c
2The parameters of transportation cost per unit distance, distribution cargo cost of crowd-sourced distribution and self-distributed distribution of the fuel vehicle are a
1Representing the base cost of self-distribution of the individual goods, a
2Representing the base cost of crowd-sourced distribution of individual goods, b
1Representing the cost of self-dispensing in excess of the basis weight, b
2Representing the cost of crowd-sourced distribution over basis weight, d
ijRepresenting the distance between customer points and the distance between the distribution center and the customer points; q
3Representing the base cost in time of charge, i.e. weight not exceeding Q
3The distribution cost of the single cargo is a
1(a
2);Q′
iIndicating the remaining capacity of the vehicle after the vehicle has provided service to customer i; y is
i 1,Y
i 2,T
1im,T
2ik,y
ijm,y
ijkAre all decision variables, Y
i 11 means that customer point i is self-delivered by the delivery centre, otherwise Y
i 1=0;Y
i 21 means that customer point i is delivered by crowdsourcing, otherwise, Y
i 2=0;T
1im1 representsThe customer point i is self-delivered by the fuel vehicle m, otherwise T
1im=0;T
2ik1 means that customer point i is self-delivered by electric vehicle k, otherwise T
2ik=0;y
ijm1 means that the fuel vehicle m passes through the points i to j when i to j are self-distributed, otherwise y
ijm=0;y
ijk1 means that when there is an electric vehicle k passing through points i to j from the time of i to j delivery, otherwise y
ijk=0;y
0jm=y
0jmI belongs to I, j belongs to I, and M belongs to M, which indicates that the fuel vehicle M starts from the distribution center and finally returns to the distribution center; y is
0jk=y
i0kIndicating that the electric vehicle k is going to go from the distribution center and finally goes back to the distribution center. In particular, the amount of the solvent to be used,
indicating that the total cargo delivered by the fuel vehicle cannot exceed the maximum load capacity of the fuel vehicle during self-delivery;
indicating that the total cargo of the electric automobile cannot exceed the maximum loading capacity of the electric automobile during self-distribution;
Q′ithe I belongs to the I and represents that the residual capacity of the vehicle passing through the I point is not less than 0;
Q′i-Xj+X′j=Q′ii is connected with j to indicate that the residual capacity leaving the point i is equal to the residual capacity leaving the point j plus the delivered cargo amount of the point i minus the pickup amount;
ti<max(ti) Indicating that the time to reach demand point i cannot exceed the latest time for the cargo to arrive;
indicating that waiting is needed if the time for reaching the demand point i is less than the earliest starting time;
indicating that the maximum travel distance of the electric vehicle cannot exceed the maximum travel distance of the electric vehicle at the time of self-distribution;
each self-distribution demand point i is represented, and only one vehicle enters the demand point i or one vehicle starts from the demand point i;
(T1im+T2ik)×Yi 1+Y i 21, I belongs to I, M belongs to M and represents that the demand point can only be self-distributed or can only be crowd-sourced;
(T1im+T2ik)×Yi 1the number of the demand points I is less than or equal to 1, I belongs to I, and K belongs to K and represents that the demand points I of self distribution are transported by only one vehicle;
y0jm=y0jmi belongs to I, j belongs to I, M belongs to M and indicates that the fuel vehicle M starts from the distribution center o and finally returns to the distribution center;
y0jk=yi0ki e I, j e I, K e K indicates that the electric vehicle K departs from the distribution center o and finally returns to the distribution center.
S4, judging t is less than or equal to tmaxAnd if not, performing S10, otherwise, performing S5.
S5, judging whether k is less than or equal to 3, if not, making k equal to 1, and comparing x1Performing shaking (k) operation to obtain x'1Otherwise, directly to x1Performing shaking (k) operation to obtain x'1If t is t +1, determining whether R is equal to or less than 3, and if so, performing S6; if not, S8 is performed.
When k is 1, the scraping (1) operation represents x'1Performing a first neighborhood operation to obtain x'1(ii) a The first neighborhood operation represents: two demand points of the same vehicle are exchanged at will and two points of crowd-sourced distribution are not exchanged, as shown in fig. 2 c;
when k is 2, the scraping (2) operation represents the pair x1Performing a second neighborhood operation to obtain x'1(ii) a The second neighborhood operation represents: exchange two demand points of different vehicles at will andtwo points of crowdsourced distribution are not swapped, as shown in FIG. 2 d;
when k is 3, the scraping (3) operation represents the pair x1Performing a third neighborhood operation to obtain x'1(ii) a The third neighborhood operation represents: a demand point i is taken out at will and inserted into the j-th bit, and a point of crowdsourced distribution cannot be inserted between two crowdsourced distribution points, as shown in fig. 2 e.
S6, p 'x'1Localsearch operation is carried out to obtain x ″)1Then, S7 is performed.
To x'1Localsearch operation is carried out to obtain x ″)1Referring to fig. 3, the specific process is as follows:
step 1: inputting the maximum iteration number y of the localsearch operationmaxAnd initializing y-0, l-1;
step 2: y is judged to be less than or equal tomaxIf yes, performing step 3, wherein y is y + 1; otherwise, performing step 6;
and step 3: judging whether l is less than or equal to 3, if so, performing a step 4, otherwise, making l equal to 1, and returning to the step 2;
and 4, step 4: to x'1Localsearch operation is carried out to obtain x ″)1And f (x ″)1);
And 5: judgment of f (x ″)1)≤f(x′1) If yes, then x ″' is applied1Value to x'1And let l equal to 1, otherwise let l equal to l + 1; returning to the step 2;
step 6: the flow ends and x ″' is output1And f (x ″)1) The value of (c).
S7, judging f (x ″)1)<f(x1) If yes, then x ″' is applied1Is assigned to x1And updating population pi and fminAnd xminOtherwise, let k be k +1 and R be R +1, return to S4.
S8, pair x 'by utilizing differential evolution algorithm'1Operated on to give x ″)1And calculating f (x ″)1)。
Randomly taking x out of population IIj,xzPerforming a mutation operation, i.e. v1=x′1+F*(xj-xz) V obtained1And x1Performing a crossover operation to obtain x ″)1Then f (x ″') is calculated1). For example, referring to FIG. 4, assume x'1=[1,2,3,4,5,6,0,7,8,9,10]Randomly selecting two individuals, such as x, in the population II2=[1,2,4,8,5,6,0,10,9,3,7](i.e., j ═ 2), x3=[1,4,6,8,9,10,0,2,5,3,7](i.e., z-3), a differential evolution algorithm (DE) operation is performed according to the following formula:
v1=x′1+F*(x2-x3)
the resulting solution is [1,1,2,4,3,4,0,11,10,9,10]At this time, the demand point appearing twice is removed to generate a new solution v1=[1,5,2,4,3,7,0,6,10,9,8]Then, the exchange operation is performed.
Then x' is obtained1=[1,2,3,4,3,7,0,6,10,9,8]。
S9, comparing and iterating the cost of the operation of the DE. Judgment of f (x ″)1)<f(x1) If yes, use x1Random substitution of x2,...,xnOf any of the above, and x ″ ", is1Is assigned to x1And updating population pi and fminAnd xminOtherwise, let k be k +1 and R be 0 and return to S4.
S10, finishing the algorithm execution and outputting the optimal objective function value fminAnd x corresponding theretomin。
After the algorithm execution is finished, the optimal objective function value f is outputminAnd x corresponding theretominA logistics distribution scheme is determined and the logistics distribution process is performed according to the scheme.
Thus, the whole process of the path optimization method considering the crowdsourcing and self-distribution cooperation situation is completed.
Example 2:
in a second aspect, the present invention also provides a path optimization system considering a crowd-sourced and self-served collaborative scenario, the system comprising:
a processing module for performing the steps of:
s1, acquiring n individuals x based on the number M of vehicles and the logistics distribution demand point I1,x2,...,xnAnd generating an initial population pi ═ x1,x2,...,xn);
S2, setting the maximum iteration number t of the variable neighborhood search algorithmmaxSetting the maximum load capacity Q of the vehicle, where the initial iteration number t is 1 and the initialization R is 0, and the initial value k is 1 in the shaking (k) operation1,Q2And the maximum driving distance L of the electric vehiclemaxCost parameter c for fuel-oil vehicles and electric vehicles1,c2Cost of distribution parameter a for crowd-sourced and self-sourced distribution1,a2,b1,b2;
S3, calculating the value of the objective function f of each individual in the initial population II, and obtaining the minimum objective function value fminAnd fminCorresponding individual xmin;
S4, judging t is less than or equal to tmaxWhether the judgment is true or not is judged, if not, S10 is carried out, otherwise, S5 is carried out;
s5, judging whether k is less than or equal to 3, if not, making k equal to 1, and comparing x1Performing shaking (k) operation to obtain x'1Otherwise, directly to x1Performing shaking (k) operation to obtain x'1If t is t +1, determining whether R is equal to or less than 3, and if so, performing S6; if not, go to S8;
s6, p 'x'1Localsearch operation is carried out to obtain x ″)1Go to S7;
s7, judging f (x ″)1)<f(x1) If yes, then x ″' is applied1Is assigned to x1And updating population pi and fminAnd xminOtherwise, making k equal to k +1 and R equal to R +1, and returning to S4;
s8, pair x 'by utilizing differential evolution algorithm'1Operated on to give x ″)1And calculating f (x ″)1);
S9, judging f (x ″)1)<f(x1) If yes, use x1Random substitution of x2,...,xnOf any of the above, and x ″ ", is1Is assigned to x1And updating population pi and fminAnd xminOtherwise, let k be k +1, R be 0 and return to S4;
s10, finishing the algorithm execution and outputting the optimal objective function value fminAnd x corresponding theretomin;
An output module for outputting the optimal objective function value fminAnd x corresponding theretomin。
Preferably, when the processing module executes S1, the S1 includes:
selecting the number M of vehicles and a logistics distribution demand point I;
randomly coding and sequencing demand points I, and recording n individuals obtained from M-1 0 random insertion sequences as x1,x2,...,xnThe n individuals are grouped into an initial population pi ═ (x)1,x2,...,xn)。
Preferably, when the processing module executes the steps S1-S10, the objective function f can be expressed by the following formula:
f=C1+C2+C3
the constraint conditions of the objective function f are as follows:
Q′i>0,i∈I
Q′i-Xj+X′j=Q′i
ti<max(ti)
(T1im+T2ik)×Yi 1+Yi 2=1,i∈I,m∈M
(T1im+T2ik)×Yi 1≤1,i∈I,k∈K
y0jk=yi0k,i∈I,j∈I,k∈K
wherein f represents the total cost in the logistics distribution process; c
1Represents a delivery cost from a demand point of delivery; c
2Represents the cost of transportation of the self-delivered goods;C
3representing a crowdsourcing cost of crowdsourcing the distribution of goods;
representing the distribution cost of the self-distribution demand points in the demand points i;
representing the crowdsourcing distribution cost of demand points i; maximum load capacity Q of vehicle
1,Q
2(ii) a Maximum driving distance L of electric automobile
maxCost parameter c for fuel-oil vehicles and electric vehicles
1,c
2The cost parameters of the goods delivered by crowdsourcing and self-delivering are respectively a
1,a
2,b
1,b
2;d
ijRepresenting the distance between customer points and the distance between the distribution center and the customer points; q'
iIndicating the remaining capacity of the vehicle after the vehicle has provided service to customer i; y is
i 1,Y
i 2,T
1im,T
2ik,y
ijm,y
ijkAre all decision variables, Y
i 11 means that customer point i is self-delivered by the delivery centre, otherwise Y
i 1=0;Y
i 21 means that customer point i is delivered by crowdsourcing, otherwise, Y
i 2=0;T
1im1 means that customer point i is self-delivered by fuel vehicle m, otherwise T
1im=0;T
2ik1 means that customer point i is self-delivered by electric vehicle k, otherwise T
2ik=0;y
ijm1 means that the fuel vehicle m passes through the points i to j when i to j are self-distributed, otherwise y
ijm=0;y
ijk1 means that when i to j self-delivery is such that there is an electric vehicle k passing through points i to j, otherwise y
ijk=0;y
0jm=y
0jmI belongs to I, j belongs to I, and M belongs to M, which indicates that the fuel vehicle M starts from the distribution center and finally returns to the distribution center; y is
0jm=y
0jmThe fuel vehicle m is shown to be sent out from the distribution center and finally returned to the distribution center; y is
0jk=y
i0kIndicating that the electric vehicle k is going to go from the distribution center and finally goes back to the distribution center.
Preferably, when the processing module executes S5, the scraping (k) operation in S5 includes:
when k is 1, the scraping (1) operation represents x1Performing a first neighborhood operation to obtain x'1(ii) a The first neighborhood operation represents: exchanging two demand points of the same vehicle at will without exchanging two crowdsourcing distribution points;
when k is 2, the scraping (2) operation represents the pair x1Performing a second neighborhood operation to obtain x'1(ii) a The second neighborhood operation represents: two demand points of different vehicles are exchanged at will and two crowdsourced distribution points are not exchanged;
when k is 3, the scraping (3) operation represents the pair x1Performing a third neighborhood operation to obtain x'1(ii) a The third neighborhood operation represents: a demand point i is taken out at will and inserted into the j-th bit, and a point of crowdsourcing distribution cannot be inserted between two points of crowdsourcing distribution.
Preferably, the processing module, when executing S6, pairs x 'in S6'1Performing local search operation to obtain x ″)1Comprises the steps of (a) preparing a mixture of a plurality of raw materials,
step 1: inputting the maximum iteration number y of the localsearch operationmaxAnd initializing y-0, l-1;
step 2: y is judged to be less than or equal tomaxIf yes, performing step 3, wherein y is y + 1; otherwise, performing step 6;
and step 3: judging whether l is less than or equal to 3, if so, performing a step 4, otherwise, making l equal to 1, and returning to the step 2;
and 4, step 4: to x'1Localsearch operation is carried out to obtain x ″)1And f (x ″)1);
And 5: judgment of f (x ″)1)≤f(x′1) If yes, then x ″' is applied1Value to x'1And let l equal to 1, otherwise let l equal to l + 1; returning to the step 2;
step 6: the flow ends and x ″' is output1And f (x ″)1) The value of (c).
It is to be understood that the path optimization system considering the cooperative situations of crowdsourcing and self-distribution provided in the embodiment of the present invention corresponds to the path optimization method considering the cooperative situations of crowdsourcing and self-distribution, and for the explanation, examples, and beneficial effects of the related contents, reference may be made to corresponding contents in the path optimization method considering the cooperative situations of crowdsourcing and self-distribution, and details are not described here again.
In summary, compared with the prior art, the method has the following beneficial effects:
1. the method comprises the steps of constructing a target function based on transportation cost, self-distribution cost and crowdsourcing cost in a logistics distribution process, minimizing the target function to determine a distribution route of self-distribution and demand points of crowdsourcing distribution, and optimizing by utilizing a hybrid algorithm combining an improved variable neighborhood search algorithm and a differential evolution algorithm to obtain an optimal objective function value fminAnd x corresponding theretominAnd optimizing the logistics distribution process according to the solved optimal result. The invention guides the selection of the distribution mode of the distribution center while reducing the cost of the distribution center, solves the problem that the prior art can not optimize the logistics distribution when considering various influence factors, and realizes the aim of integrally optimizing the logistics distribution;
2. when the objective function is constructed, the distribution cost and the transportation cost of the distribution center, the selection condition of self-distribution and crowdsourcing distribution, the combination condition of goods taking and delivery, the time limit of special demand points, the selection of the types of distributed goods and the like are comprehensively considered, and finally a distribution scheme with the lowest total cost is found, so that the aim of optimizing logistics distribution when the influence factors in various aspects are considered is fulfilled;
3. in the process of optimizing the distribution scheme with the lowest total logistics distribution cost, the variable neighborhood search algorithm and the differential evolution algorithm are combined by combining the characteristics of specific problems in the logistics distribution process according to the defects and advantages of the variable neighborhood search algorithm and the differential evolution algorithm, so that not only is the solving precision of the algorithm effectively improved, but also the convergence speed of the algorithm is greatly improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.