Summary of the invention
In view of this, the present invention solves the road in logistics distribution for providing a kind of distribution route method and system for planning
Line optimization problem improves dispatching efficiency.
A kind of distribution route planing method is provided according to an aspect of the present invention characterized by comprising obtains n station
The delivery demand of point;And according to the delivery demand, plan the respective distribution route of m vehicle, to traverse the n station
Point, wherein the planning includes original route collection being obtained using local neighborhood iterative process, and repair using Dynamic Neighborhood search
Change the original route collection, to obtain optimization Route Set, m, n are respectively natural number.
Preferably, the delivery demand of the n website is obtained according to x order parameter, wherein searched in Dynamic Neighborhood
Cheng Zhong, using the x order parameter as constraint condition, to be optimized to the original route collection.
Preferably, the order parameter is selected from least one of order timeliness, container sizes and site-bound.
Preferably, modifying the original route collection includes: that the website of at least one original route is transferred at the beginning of another
Beginning route.
Preferably, further include the website of at least one shorter original route is transferred to another it is longer initial
Route.
It preferably, further include judging whether the website and another original route meet constraint before transfer
Table, if satisfied, then forbidding this transfer;If not satisfied, then continuing to allow this transfer.
Preferably, further include that the website and an original route are put into the restriction table after the transfer, update
The restriction table.
Preferably, if distribution route planing method further include meet while the website meets the restriction table it is described about
Beam condition then allows this transfer.
Preferably, Dynamic Neighborhood search further include current route collection when meeting termination condition is determined as it is described excellent
Change Route Set.
Preferably, the termination condition includes pre-set the number of iterations, time threshold or acquisition unoptimizable route
The number of collection.
A kind of distribution route device for planning is provided according to the second aspect of the invention characterized by comprising website determines
Module, for obtaining the delivery demand of n website;And route planning module plans m vehicle according to the delivery demand
Respective distribution route, to traverse the n website, wherein it is described planning include using local neighborhood iterative process obtain
Original route collection, and the original route collection is modified using Dynamic Neighborhood search, to obtain optimization Route Set, m, n are respectively
Natural number.
Preferably, the distribution route device for planning further include: order reception module, for receiving x order parameter, institute
State the delivery demand that website determining module obtains the n website according to the x order parameter, wherein search in Dynamic Neighborhood
During rope, using the x order parameter as constraint condition, to be optimized to the original route collection.
Preferably, the order parameter is selected from least one of order timeliness, container sizes and site-bound.
Preferably, modifying the original route collection includes: that the website of at least one original route is transferred at the beginning of another
Beginning route.
Preferably the distribution route device for planning further includes by the website of at least one shorter original route
It is transferred to another longer original route.
Preferably, the route planning module further includes judging unit, for judging the website and institute before transfer
State whether another original route meets restriction table, if satisfied, then forbidding this transfer;If not satisfied, then continuing to allow this
Transfer.
Preferably, the route planning module further includes updating unit, for after the transfer by the website and described one
Original route is put into the restriction table, updates the restriction table.
Preferably, if the judging unit is set as meeting the constraint item while website meets the restriction table
Part then allows this transfer.
Preferably, the route planning module further include terminate unit, for when meeting termination condition by current route
Collection is determined as the optimization Route Set.
Preferably, the termination condition includes pre-set the number of iterations, time threshold or acquisition unoptimizable route
The number of collection.
A kind of computer readable storage medium is provided according to the third aspect of the invention we, which is characterized in that the computer
Readable storage medium storing program for executing is stored with computer instruction, and the computer instruction is performed realization such as above-mentioned planing method.
4th invention according to the present invention provides a kind of distribution route planning system characterized by comprising memory,
For storing computer instruction;Processor is coupled to the memory, the processor is configured to being deposited based on the memory
The computer instruction of storage, which executes, realizes such as above-mentioned planing method.
In distribution route planing method in above-described embodiment, an original route collection is constructed by insertion, is then led to
It crosses Dynamic Neighborhood search and modifies the original route collection, to obtain the Route Set of optimization.The distribution route of the embodiment of the present invention is advised
The method of drawing plans optimal distribution route according to the user's order dispensed in real time, can meet user demand and promotion to greatest extent
The carrying capacity of distribution vehicle improves dispatching efficiency.
Specific embodiment
Below based on embodiment, present invention is described, but the present invention is not restricted to these embodiments.Under
Text is detailed to describe some specific detail sections in datail description of the invention.Do not have for a person skilled in the art
The present invention can also be understood completely in the description of these detail sections.In order to avoid obscuring essence of the invention, well known method, mistake
Journey, process do not describe in detail.In addition attached drawing is not necessarily drawn to scale.
Fig. 1 shows the method flow diagram of distribution route planing method according to an embodiment of the present invention.
In step S101, the delivery demand of n website is obtained.It specifically includes and the n website is obtained according to x order
Delivery demand, wherein x and n is respectively natural number.
Step S102 plans the respective distribution route of m vehicle according to the delivery demand, to traverse the n station
Point, wherein m is natural number.Specifically, it is described planning include using local neighborhood iterative process obtain original route collection, and
The original route collection is modified using Dynamic Neighborhood search, to obtain optimization Route Set.
In the present embodiment, each order includes order parameter, obtains n website delivery demand according to order parameter,
Furthermore in Dynamic Neighborhood search, using the method for loop iteration using x order parameter as constraint condition to original route set
It optimizes, the current route collection for meeting termination condition is determined as to optimize Route Set.Wherein, termination condition includes presetting
The number of iterations, time threshold or obtain unoptimizable Route Set number.
It is described in detail referring to distribution route planing method of Fig. 2-Fig. 4 to the embodiment of the present invention.
Fig. 2 shows distribution route figures according to an embodiment of the present invention, wherein box S indicates loading point, circle s1-s6 table
Show dispatching website, dispense between website and dispatching website and loading point between have a straight line, multiple vehicles are from loading point
It sets out, returns to loading point after traversing all dispatching websites according to the route of planning, dispatching the time it takes is as evaluation
The standard of this distribution route quality.
Fig. 3 shows the flow diagram according to an embodiment of the present invention for obtaining original route collection.In embodiments of the present invention,
Be illustrated by taking the dispatching of unmanned vehicle group as an example, each unmanned vehicle group includes multiple unmanned vehicles, the unmanned vehicle from loading point,
It moves to distribution point and completes dispatching task.The following examples are only an example, should not be to the function of the embodiment of the present invention
Any restrictions are constituted with use scope.
In step S201, the n website is obtained.In one embodiment, n website is determined according to x order parameter
Delivery demand.Wherein, the order parameter is selected from least one of order timeliness, container sizes and site-bound.?
It further include so that the route of all unmanned vehicles is sky in one embodiment, before step S201.
In step S202, judge in n website with the presence or absence of the website for the condition that meets.If so, step S203 is carried out, with
Machine selects a website a;If it is not, then carrying out step S204, current route collection is determined as original route collection.Here initial
Route Set is exactly a set of feasible solution of distribution route optimization problem, the number i.e. number of distribution route solved in disaggregation, and one
Solution or a distribution route are referred to as an individual.
In step S205, judge that current route concentrates the best feasible insertion position that whether there is website a, wherein described
Best feasible insertion position is all positions for meeting constraint condition.In one embodiment, best feasible insertion position is institute
There is the position for meeting user's order timeliness, container sizes and site-bound.If it exists, then step S206 is carried out, website a is inserted
Enter above-mentioned position;If it does not exist, then step S207 is carried out, a route is created, website a is inserted into newly-built route.
In step S208, current route is added in newly-built route and is concentrated.
Wherein, the method for obtaining original route collection further includes returning after carrying out step S206 and step S208
S202。
During the search of the Dynamic Neighborhood of the present embodiment optimizes distribution route, it is mobile adjacent to execute single-site
The operation in domain, i.e., by a website from being currently located the best feasible insertion position being moved in an other route on route
In, so that dispatching cost is minimum.In one embodiment, in order to reduce the quantity of unmanned vehicle, by website from shorter route
It is moved in longer route.
Fig. 4 shows the flow diagram of Dynamic Neighborhood search according to an embodiment of the present invention.
In step S301, random selection two lines T1 and T2 are concentrated from current route.
In step S302, a website b is randomly choosed from route T1.
In step S303, judge whether website b and route T2 meet restriction table and constraint length.Wherein, restriction table uses
One two-dimensional array LIMIT indicates that its row and column respectively represents the constraint requirements and route of website.For example, if
Website i is removed from route j in iter1 step, then has LIMIT [i] [j]=iter1, a constraint length hereafter at this time
(LIMITLENGTH) in Dynamic Neighborhood search, the website i operation for being inserted into route j will be prohibited.
Assuming that website i is inserted into route j in the i-th ter2 step, if had at this time: LIMIT [i] [j]+
LIMITLENGTH >=iter2 illustrates that the operation being inserted into website i in route j at this time is in restrained condition, does not at this moment execute
Website i is inserted into the operation in route j.If LIMIT [i] [j]+LIMITLENGTH < iter2, illustrates website at this time
The operation that i is inserted into route j is not at restrained condition, then the operation being inserted into website i in route j can be performed.
Wherein, the constraint length in the present embodiment is a key parameter of Dynamic Neighborhood search, generally according to dispensing station
Point difference and change.
If website b and route T2 are unsatisfactory for restriction table and constraint length, illustrate at this time to be transferred to website b in route T2 not
In restrained condition, then step S302 is carried out, website b is transferred to route T2 from route T1;If website b and route T2 are unsatisfactory for
Restriction table and constraint length then carry out step S305.
In step S305, judge whether website b and route T2 meet constraint condition.If website b and route T2 are unsatisfactory for
Constraint condition, then return step S301;If website b and route T2 meet constraint condition, i.e., website b is moved to route T2 can be with
Optimal solution is obtained, then carries out step S304, website b is moved to route T2 from route T1.
In step S306, restriction table is added in website b and route T1, updates restriction table.
It is current route collection by the new Route Set cooperation that website obtains after mobile in step S307.
In step S308, judge whether to meet termination condition, wherein termination condition include pre-set the number of iterations,
Time threshold or the number for obtaining unoptimizable Route Set.If meeting termination condition, S309 is thened follow the steps;Otherwise, it executes
Step S301.
In step S309, current route collection is determined as to optimize Route Set.
Fig. 5 a and Figure 5b shows that Dynamic Neighborhood according to an embodiment of the present invention search for carry out route optimization schematic diagram.Such as figure
Shown in 5a, it includes route r1 and route r2 that original route, which is concentrated, and the website i in route r1 is transferred to route r2, is obtained new
Route R1 and route R2, as shown in Figure 5 b.
Assuming that the dispatching cost of route is f (r) daily, then the evaluation function of Dynamic Neighborhood search of the invention can be obtained
Are as follows:
Δ cost=f (R1)+f (R2)-f (r1)-f (r2)
Wherein, f (r1) and f (r2) respectively indicates the dispatching cost that original route concentrates route r1 and route r2;, f (R1)
The dispatching cost of new route R1 and route R2 are respectively indicated with f (R2).
In embodiments of the present invention, n website is serviced by m vehicle, then on average, each vehicle will service
Each website includes starting point, then illustrates that each car will serviceA website.A road to be exchanged is selected from m route
Line, which has, selects method in m, select a website to be inserted into m-1 other route from the route selected.In selected route
In, the starting point that determination will be used to exchange at most needs to serviceIt is secondary;After determining starting point, at most needIt is secondary come determine can
The website of exchange.After determining starting point and website, the insertion position of determination starting point and website is distinguished most again in an other route
It can mostly needIt is secondary.Therefore Dynamic Neighborhood search it is complicated to for
In distribution route planing method in above-described embodiment, an original route collection is constructed by insertion, is then led to
It crosses Dynamic Neighborhood search and modifies the original route collection, to obtain the Route Set of optimization.The distribution route of the embodiment of the present invention is advised
The method of drawing plans optimal distribution route according to the user's order dispensed in real time, can meet user demand and promotion to greatest extent
The carrying capacity of distribution vehicle improves dispatching efficiency.
Fig. 6 shows the structural schematic diagram of distribution route device for planning according to another embodiment of the present invention.As shown in fig. 6,
Distribution route device for planning includes website determining module 520 and route planning module 530.Website determining module 520 is for obtaining n
The delivery demand of a website.Route planning module 530 is used to plan the respective dispatching road of m vehicle according to the delivery demand
Line, to traverse the n website.Wherein, the planning includes obtaining original route collection using local neighborhood iterative process, with
And the original route collection is modified using Dynamic Neighborhood search, to obtain optimization Route Set, m, n are respectively natural number.
In another embodiment, route planning device further includes order reception module 510, is ordered for receiving x user
Single, each user's order respectively includes at least one order parameter, and website determining module 520 is obtained according to the x order parameter
Obtain the delivery demand of the n website.Wherein, the route planning module 530 is also used to incite somebody to action in Dynamic Neighborhood search process
The x order parameter is as constraint condition, to optimize to the original route collection.
Optionally, the order parameter is selected from least one of order timeliness, container sizes and site-bound.
Optionally, the route planning module 530 is searched for by Dynamic Neighborhood to distribution route progress in the present embodiment
During optimization, execute the operation of single-site move neighborhood, i.e., by a website from be currently located on route be moved to it is another
In best feasible insertion position in an outer route, so that dispatching cost is minimum.In one embodiment, in order to reduce nothing
Website is moved in longer route by the quantity of people's vehicle from shorter route.
Fig. 7 shows the structural schematic diagram of route planning module in Fig. 6.As shown in fig. 7, the route planning module 520 is also
Including judging unit 521, update module 522 and terminate module 523.Judgment module 521 before transfer for judging the station
Whether point and another original route meet restriction table, if satisfied, then forbidding this transfer;If not satisfied, then continuing
Allow this transfer.
Optionally, if the judging unit 521 is also configured to while the website meets the restriction table described in satisfaction
Constraint condition then allows this transfer.
Updating unit 522 is for being put into the restriction table for the website and an original route after the transfer, more
The new restriction table is avoided duplicating access solution in Dynamic Neighborhood search process and be followed for iteration judgement next time
The problem of ring.
In the present embodiment, Dynamic Neighborhood search optimizes original route collection by the way of iterative cycles, therefore
Route planning module further includes terminating unit 523, for current route collection to be determined as the optimization when meeting termination condition
Route Set.The termination condition includes pre-set the number of iterations, time threshold or the number for obtaining unoptimizable Route Set.
Optionally, the distribution route planning module further includes route sending module, for sending out after encrypting distribution route
Give multiple unmanned vehicles.
The distribution route device for planning of the present embodiment plans optimal distribution route according to the user's order dispensed in real time, can
Meet user demand to greatest extent and promote the carrying capacity of distribution vehicle, improves dispatching efficiency.
Fig. 8 is the structure chart of distribution route planning system according to another embodiment of the present invention.Equipment shown in Fig. 6 is only
An example, should not function to the embodiment of the present invention and use scope constitute any restrictions.
With reference to Fig. 8, which includes the processor 601, memory 602 and input connected by bus
Output equipment 603.Memory 602 includes read-only memory (ROM) and random access storage device (RAM), storage in memory 602
There are various computer instructions and data needed for executing system function, processor 601 reads various computers from memory 602
Instruction is to execute various movements appropriate and processing.Input-output equipment 603 includes the importation of keyboard, mouse etc.;Including
The output par, c of cathode-ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage including hard disk etc.
Part;And the communications portion of the network interface card including LAN card, modem etc..Memory 602 be also stored with
Under computer instruction to complete operation as defined in the distribution route planing method of the embodiment of the present invention: obtain sending for n website
Goods demand;And according to the delivery demand, plan the respective distribution route of m vehicle, so that the n website is traversed,
In, the planning includes original route collection being obtained using local neighborhood iterative process, and use Dynamic Neighborhood search modification institute
Original route collection is stated, to obtain optimization Route Set, m, n are respectively natural number.
Correspondingly, the embodiment of the present invention provides a kind of computer readable storage medium, which deposits
Computer instruction is contained, the computer instruction is performed the operation for realizing above-mentioned distribution route planing method defined.
Shown in the drawings of some block diagrams and/or flow chart.It should be understood that some sides in block diagram and/or flow chart
Method or combinations thereof can be realized by computer program instructions.These computer program instructions can be supplied to general purpose computer,
The processor of special purpose computer or other programmable data processing units, so that these instructions when executed by this processor may be used
To create for realizing function/operation device illustrated in these block diagrams and/or flow chart.
Therefore, technology disclosed by the invention can be come real in the form of hardware and/or software (including firmware, microcode etc.)
It is existing.In addition, technology of the invention can take the shape of the computer program product on the computer-readable medium for being stored with instruction
Formula, the computer program product are held for instruction execution system (for example, one or more processors) using or in conjunction with instruction
Row system uses.In the context of disclosure of the invention, computer-readable medium, which can be, can include, store, transmitting, passing
Broadcast or transmit the arbitrary medium of instruction.For example, computer-readable medium can include but is not limited to electricity, magnetic, optical, electromagnetic, infrared
Or semiconductor system, device, device or propagation medium.The specific example of computer-readable medium includes: magnetic memory apparatus, such as magnetic
Band or hard disk (HDD);Light storage device, such as CD (CD-ROM);Memory, such as random access memory (RAM) or flash memory;
And/or wire/wireless communication link.
Above detailed description has elaborated distribution route of the present invention by using schematic diagram, flow chart and/or example
Numerous embodiments of planing method.It include one or more functions and/or behaviour in this schematic diagram, flow chart and/or example
In the case where work, it should be understood by those skilled in the art that each function in this schematic diagram, flow chart and/or example and/or
Operation can be by various structures, hardware, software, firmware or substantially their any combination is come individually and/or common realization.
In one embodiment, if the stem portion of theme described in embodiment disclosed by the invention can pass through specific integrated circuit
(ASIC), field programmable gate array (FPGA), digital signal processor (DSP) or other integrated device are realized.However,
It will be understood by those skilled in the art that some aspects of embodiments disclosed herein on the whole or partly can be equally real
Now in integrated circuits, the one or more computer programs for being embodied as running on one or a plurality of computer are (for example, realize
For the one or more programs run in one or more computer system), it is embodied as transporting on the one or more processors
Capable one or more programs (for example, being embodied as the one or more programs run in one or more microprocessors), it is real
Now it is firmware, or is substantially embodied as any combination of aforesaid way, and those skilled in the art disclose according to the present invention
Content, will be provided with design circuit and/or the ability of software and/or firmware code be written.In addition, those skilled in the art will recognize
Know, the mechanism of theme disclosed by the invention can be distributed as the program product of diversified forms, and no matter reality is used
Come execute distribution signal bearing medium concrete type how, the exemplary embodiment of theme of the present invention uses.Letter
The example of number bearing medium includes but is not limited to: recordable-type media, as floppy disk, hard disk drive, compact-disc (CD), number are logical
With disk (DVD), digital magnetic tape, computer storage etc.;And transmission type media, such as number and/or analogue communication medium (example
Such as, optical fiber cable, waveguide, wired communications links, wireless communication link etc.).
It should be appreciated that the above description is only a preferred embodiment of the present invention, it is not intended to restrict the invention, for this field
For technical staff, the invention can have various changes and changes.It is all made any within the spirit and principles of the present invention
Modification, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.