CN111461396A - Logistics wiring method and device, electronic equipment and readable storage medium - Google Patents

Logistics wiring method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111461396A
CN111461396A CN202010117859.6A CN202010117859A CN111461396A CN 111461396 A CN111461396 A CN 111461396A CN 202010117859 A CN202010117859 A CN 202010117859A CN 111461396 A CN111461396 A CN 111461396A
Authority
CN
China
Prior art keywords
target
template
line
point
current
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
CN202010117859.6A
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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202010117859.6A priority Critical patent/CN111461396A/en
Publication of CN111461396A publication Critical patent/CN111461396A/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/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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/06315Needs-based resource requirements planning or analysis
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Operations Research (AREA)
  • Marketing (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Educational Administration (AREA)
  • Databases & Information Systems (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the disclosure provides a logistics wiring method, a logistics wiring device, an electronic device and a readable storage medium, wherein the method comprises the following steps: carrying out grid division on a target area according to the geographical position of a point position to be lined in the target area; expanding outwards layer by taking the initial grid in the target area as a center, and determining a target flat cable template corresponding to the expanded current local search area according to a historical flat cable template in the target area in the expanding process; and arranging the line of the point in the current local search area according to the target line arranging template and a first constraint condition until all the grid searches in the target area are finished, and obtaining a line arranging result of the target area. The method and the device can improve the line fixing rate, and further can improve the distribution timeliness and reduce the distribution cost in the scene of regional multi-vehicle types.

Description

Logistics wiring method and device, electronic equipment and readable storage medium
Technical Field
The embodiment of the disclosure relates to the field of computers, in particular to a logistics wiring method and device, an electronic device and a readable storage medium.
Background
With the continuous deepening of the retail industry revolution, the logistics distribution platform is cut in from the same city and the take-out field, and is gradually expanded to the fresh and super distribution field of the business, and even the more extensive terminal field of express delivery.
In recent years, the research on logistics distribution by domestic and foreign scholars mainly focuses on the creation of distribution line models and operation modes of distribution line models, such as A L NS (Adaptive L arge new born Search) proposed by Ropke and Pisinger, which aims at distribution cost and vehicle number and optimizes distribution lines by insertion and removal operations, and a famous open source framework Jsprit based on A L NS and SA (Simulated Annealing algorithm) provides algorithm models of various problems such as TSP (tracking Salesman Proble, Problem of Traveling Salesman), VRP (vehicular Path Problem), etc., but the research on distribution line problems still has some defects at present.
Typically, after the merchant places an order, the warehouse dispatcher performs order allocation and vehicle assignment, and manually selects the number of logistics vehicles by experience. However, in the actual transportation allocation process, due to the limitation of various factors such as transportation capacity resources, driver scheduling, traffic congestion and the like, a restriction policy for classifying vehicles in different areas is mostly introduced, and the traditional wire arranging mode cannot meet the actual requirements, so that the problems of low scheduling efficiency of transportation paths and drivers, low vehicle resource utilization rate, uneven driver allocation and the like exist.
Disclosure of Invention
The embodiment of the disclosure provides a logistics wiring method, a logistics wiring device, an electronic device and a readable storage medium, which are used for improving the line fixing rate, and further improving the distribution timeliness and reducing the distribution cost in the scene of regional multi-vehicle types.
According to a first aspect of embodiments of the present disclosure, there is provided a logistics routing method, the method comprising:
carrying out grid division on a target area according to the geographical position of a point position to be lined in the target area;
expanding outwards layer by taking the initial grid in the target area as a center, and determining a target flat cable template corresponding to the expanded current local search area according to a historical flat cable template in the target area in the expanding process;
and arranging the line of the point in the current local search area according to the target line arranging template and a first constraint condition until all the grid searches in the target area are finished, and obtaining a line arranging result of the target area.
According to a second aspect of embodiments of the present disclosure, there is provided a logistics routing apparatus, the apparatus including:
the grid division module is used for carrying out grid division on the target area according to the geographic position of the point position of the wire to be arranged in the target area;
the expansion optimizing module is used for expanding outwards layer by taking the initial grid in the target area as a center, and determining a target wire arranging template corresponding to the expanded current local search area according to a historical wire arranging template in the target area in the expanding process;
and the searching wire arranging module is used for performing wire arranging on the point positions in the current local searching area according to the target wire arranging template and a first constraint condition until all grid searching in the target area is completed, and obtaining a wire arranging result of the target area.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic apparatus including:
the logistics wiring method comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, and is characterized in that the logistics wiring method is realized when the processor executes the program.
According to a fourth aspect of embodiments of the present disclosure, there is provided a readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the aforementioned logistics wiring method.
The embodiment of the disclosure provides a logistics wiring method, a logistics wiring device, an electronic device and a readable storage medium, wherein the method comprises the following steps:
carrying out grid division on a target area according to the geographical position of a point position to be lined in the target area;
expanding outwards layer by taking the initial grid in the target area as a center, and determining a target flat cable template corresponding to the expanded current local search area according to a historical flat cable template in the target area in the expanding process;
and arranging the line of the point in the current local search area according to the target line arranging template and a first constraint condition until all the grid searches in the target area are finished, and obtaining a line arranging result of the target area.
According to the method and the device, the line position in the local search area is arranged on the basis of the optimal line arranging template in the local search area, the line arranging result in the local search area is similar to the historical line arrangement as far as possible due to the fact that the optimal line arranging template is determined according to the historical line arranging template, the line fixing rate can be improved under the scene of regional multi-vehicle type, and therefore distribution efficiency can be improved and distribution cost can be reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments of the present disclosure will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 illustrates a flow chart of steps of a logistic pooling method in one embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of the present disclosure for traversing a target area to obtain an initial solution for a route;
FIG. 3 illustrates a flow chart of the present disclosure for locally reordering an initial solution of a line;
FIG. 4 shows a block diagram of a logistics routing device in one embodiment of the present disclosure;
fig. 5 shows a block diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
Technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments, which can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present disclosure, belong to the protection scope of the embodiments of the present disclosure.
Method embodiment
Referring to fig. 1, a flow chart of steps of a logistics routing method in one embodiment of the present disclosure is shown, the method comprising:
step 101, performing grid division on a target area according to the geographical position of a point position to be lined in the target area;
102, expanding outwards layer by taking the initial grid in the target area as a center, and determining a target flat cable template corresponding to the expanded current local search area according to a historical flat cable template in the target area in the expanding process;
103, arranging the line of the point in the current local search area according to the target line arranging template and a first constraint condition until all the grid searches in the target area are completed, and obtaining a line arranging result of the target area.
The logistics wiring method can be applied to electronic equipment, and the electronic equipment specifically comprises but is not limited to a smart phone, a tablet computer, an electronic book reader, an MP3 (Moving Picture Experts Group Audio L eye III) player, an MP4 (Moving Picture Experts Group Audio L eye IV) player, a laptop portable computer, a vehicle-mounted computer, a desktop computer, a set-top box, an intelligent television, a wearable device and the like.
The target area refers to an area to be wired, for example, the target area may be an area covered by a city, a distribution center, or the like. The point location refers to a location (e.g., a merchant location, etc.) to which the order needs to be dispensed. The flat cable refers to a logistics distribution line formed by combining a plurality of orders. For example, the order of merchants is aggregated, and nearby merchants are reasonably arranged in a vehicle for centralized distribution, and each vehicle and its merchant that needs to be responsible for the distribution are referred to as a "flat line".
In practical applications, a target area may be configured with a plurality of vehicles of a plurality of vehicle types, each vehicle type includes a plurality of vehicles, and in the process of arranging lines for points in the target area, for a certain route, a certain vehicle may be randomly allocated from the plurality of vehicles of the same vehicle type, thereby causing that for the same route, different vehicles of the same vehicle type may be allocated each time.
The purpose of the present disclosure is to improve the line fixing rate, that is, to allocate the same vehicle to the same line as much as possible, thereby achieving the binding of the vehicle and the line. Thus, the driver of the vehicle is more familiar with the route, and the delivery timeliness can be improved and the delivery cost can be reduced.
Based on the thought, the flat cable planning problem model can be reconstructed, the optimization target and the constraint condition are provided by combining the actual situation of the business, and the mathematical model of the multi-target combination optimization with a single storage center, multiple constraint conditions and the distribution cost and the template matching degree as the optimization target is established.
The basic assumptions of the flat cable planning problem are as follows:
(1) the system comprises a distribution center, wherein each distribution center is provided with a plurality of vehicle types, and the delivery of the vehicle types is influenced by regional limitation;
(2) each distribution center has a master vehicle type, and the number is unlimited;
(3) each vehicle is only dispatched once without considering the round trip distance and the cost of the vehicle;
(4) the actual demand of any merchant does not exceed the maximum cargo capacity limit of each vehicle type, and each vehicle can serve at least one merchant;
(5) driver revenue is related to the number of merchants, the weight and volume of the order, and the furthest distance traveled.
The disclosed embodiment can construct a winding displacement planning problem model as follows:
Figure BDA0002392047470000051
Figure BDA0002392047470000052
Figure BDA0002392047470000053
Figure BDA0002392047470000054
Figure BDA0002392047470000055
wherein J is a customer set, J is a customer, K is a set of all vehicles, K is a vehicle, L is a set of vehicle types, l is a vehicle type, Ql kMaximum load of type I vehicle k, qjThe demand for customer j; dijIs the distance from node i to node j, wkFor the k-th vehicle driverThe payroll of (c); xijkFrom node i to node j for vehicle k, otherwise Xijk0; f is the transportation cost per unit distance of the goods and materials.
The formula (1) is an objective function for minimizing the distribution cost, and is mainly related to distribution mileage, demand and the number of merchants; the formula (2) is to maximize the line fixing degree; the formula (3) is the load capacity constraint of the vehicle, and represents that the total load weight cannot exceed the upper load limit of the vehicle type; equation (4) represents that one customer is delivered by only one vehicle; equation (5) represents that the demand of each customer is smaller than the load of any vehicle type.
The above-described winding layout problem can be described as follows: a city warehousing center needs to serve numerous merchants within a distribution area, each of which has a known actual demand for a certain item. The storage center is only provided with one distribution area and can be selected by various vehicle types, each vehicle can serve a plurality of merchants, and each merchant can be distributed by only one vehicle. The total delivery cost is minimized by reasonably scheduling vehicles and selecting delivery ranges without considering the round trip of vehicles and the storage center to determine a delivery scheme from the storage center to the customers. This solution not only determines how to dispatch the vehicle, but also takes into account the fixed driver fixed route requirements, i.e. it is desirable that the daily distribution route is as fixed as possible.
The embodiment of the disclosure provides a logistics winding displacement planning algorithm based on template matching based on the winding displacement planning problem model, and on the premise of ensuring distribution cost and performance timeliness, the method can realize 'fixing driver fixed lines' to a certain extent, can improve line fixing rate, and can meet the requirements of urban side on regional multiple vehicle types.
Before the wire arranging is performed on the target area, relevant data required by the wire arranging algorithm is collected, and may include: the method comprises the steps of distributing order information to be distributed, main force vehicle type information (including load, volume, number of vehicles, number of merchants and mileage limitation), historical cable template information (including vehicle type information, drivers, template boundaries and the like), algorithm operation parameter configuration and the like. The historical flat cable template corresponds to a line and comprises point positions where the line passes through and information of distributed drivers, vehicle types, loads and the like. Then, extracting historical winding displacement data of a recent period in the target area, and acquiring a historical winding displacement template set with the highest matching degree according to the spatial similarity between the historical order and the order to be wound and the frequency of the occurrence of the line; and arranging the line of the point positions in the target area based on the historical line arranging template set.
Specifically, step 101 performs mesh division on the target area according to the geographic position of the point location of the line to be arranged in the target area, that is, an order-mesh unit may be constructed according to the geographic position information of the order, so as to generate a mesh cluster. The embodiment of the disclosure determines a local search area based on the grid, iteratively searches point locations in the local search area by taking the starting point location as a search starting point to generate a distribution line, and uses the grid for dimension reduction to greatly reduce the problem scale, accelerate the operation speed, and find the global optimal solution in a short time.
And 102, expanding outwards layer by taking the initial grid in the target area as a center, and determining a target flat cable template corresponding to the expanded current local search area according to the historical flat cable template in the target area in the expanding process.
Specifically, edge detection is performed on the grid cluster generated in step 101, an initial search unit (initial grid) is determined according to a certain rule, the initial grid is used as a center to expand outwards layer by layer, a local search area S is dynamically expanded, and in the expansion process, a target wire arranging template corresponding to a currently expanded current local search area is determined according to a historical wire arranging template in the target area. The target winding displacement template may be an optimal winding displacement template in the historical winding displacement template set of the target area, that is, the historical point locations in the target winding displacement template have the highest spatial similarity with the point locations to be wound in the current local search area and meet the preset similarity.
Step 103, according to the target wire arranging template and a first constraint condition, wire arranging is performed on the point positions in the current local search area until all grid searches in the target area are completed, and a wire arranging result of the target area is obtained.
The first constraint condition may be a preset multiple constraint condition, for example, the first constraint condition may include at least one or more of the following constraints: load, volume, number of pieces, number of merchants, etc.
In the wire arranging process, in order to improve the distribution timeliness, the distribution is generally performed by putting adjacent point positions together in a concentrated manner, and a 'neighborhood' is limited to a smaller local range, such as between spatially adjacent lines. Therefore, in the embodiment of the present disclosure, a grid is used as a unit to search, a local search area is expanded layer by layer, each expansion obtains a current local search area S, a point location in the area S is wired according to a target wiring template of the area S and a first constraint condition, and then a next area S is searched until all grids in the target area are searched, so that a wiring result of the target area can be obtained.
The line location in the local search area is arranged on the basis of the optimal line arranging template in the local search area, and the optimal line arranging template is determined according to the historical line arranging template, so that the line arranging result in the local search area is similar to the historical line arranging result as much as possible, and on the premise of ensuring distribution cost and performance effectiveness, a fixed driver fixed line can be realized to a certain extent, so that the line fixing rate can be improved, and meanwhile, the requirement of a city side on regional multi-vehicle types can be met.
In an optional embodiment of the present disclosure, in the expanding process, the determining, according to the historical flat cable template in the target area, a target flat cable template corresponding to the expanded current local search area in step 102 includes:
step S11, each layer is expanded outwards, the point position in the current local search area is matched with the historical winding displacement template of the target area, and whether the target winding displacement template meeting the matching condition exists is determined;
and step S12, if it is determined that no target flat cable template exists in the historical flat cable templates, continuing outward layer-by-layer expansion based on the current local search area until the target flat cable template is found or the expansion termination condition is reached.
And carrying out grid division on the target area according to the geographical position of the point position to be subjected to wire arrangement in the target area, and carrying out edge detection on the grid after generating a grid cluster. Specifically, edge operator detection is performed on all grids, a boundary grid is determined, an initial grid is determined according to a certain rule, a layer is expanded outwards by taking the initial grid as a center, and a local search area is constructed. The disclosed embodiments are expanded outward layer by layer, in one example, the first layer obtained by the first outward expansion includes 1 starting grid located at the center and 8 adjacent grids all around, and the outward expansion is continued, the second layer includes 1 starting grid located at the center and 16 adjacent grids all around, and so on.
And each layer is expanded outwards, the point positions in the current local search area are matched with the historical winding displacement template of the target area, and whether the target winding displacement template meeting the matching condition exists or not is determined, namely, whether the optimal winding displacement template with the space similarity of the historical point positions and the point positions to be wound in the current local search area meeting the preset similarity exists or not is determined.
And if the historical winding displacement template does not have a target winding displacement template which meets the preset similarity, continuing outward layer-by-layer expansion based on the current local search area until the target winding displacement template is found or the expansion termination condition is reached.
Optionally, the termination extension condition may include: the current local search area reaches the maximum number of expansion layers or the maximum point number. In order to limit the 'neighborhood' to a smaller local range, the maximum expansion layer number (such as m layers) and the maximum point bit number (such as n layers) can be preset, and in the process of expanding the local search area, if the m layers are expanded and still are not matched with the target flat cable template, the expansion is stopped; or, if the number of points included in the expanded current local search area reaches n and the target flat cable template is not matched yet, the expansion is stopped.
In an optional embodiment of the present disclosure, the step S11 of matching the point location in the current local search area with the historical flat cable template of the target area, and determining whether there is a target flat cable template that satisfies a matching condition includes:
step S111, counting the point location ratio of the point location in the current local search area in each historical line location template for the historical line location templates in the current local search area;
step S112, determining the historical winding displacement template with the point position ratio exceeding the preset ratio as a candidate winding displacement template;
step S113, calculating the matching degree between the point location in the candidate flat cable template and the point location in the current local search area;
and step S114, determining whether a target flat cable template meeting the matching condition exists according to the matching degree.
Aiming at the matching of the current local search area and the target flat cable template, the embodiment of the disclosure provides a matching method based on the Hausdorff distance.
Firstly, counting the point position occupation ratio T of the point position in the current local search area in each historical flat cable template for the historical flat cable templates in the current local search area through the following formula (6).
Figure BDA0002392047470000091
And determining the historical flat cable template with the point position ratio exceeding a preset ratio (for example) as a candidate flat cable template, namely determining the historical flat cable template of T > as the candidate flat cable template.
If only 1 candidate flat cable template exists, determining the candidate flat cable template as a target flat cable template; and if a plurality of candidate flat cable templates exist, calculating the matching degree between the point in each candidate flat cable template and the point in the current local search area according to the Hausdorff distance as shown in the following formula (7).
H(A,B)=max{h(A,B),h(B,A)} (7)
Figure BDA0002392047470000092
The Hausdorff distance is a measure of the distance between tracksIs used in the embodiments of the present disclosure to calculate the template matching degree. The main idea of the algorithm is as follows: by giving a target trajectory point set A ═ a1,a2,...,amB, and a set of trace points to be matched B ═ B1,b2,...,bnAnd calculating the matching degree between the target track and the track to be matched. In the embodiment of the present disclosure, the target trajectory point set a may be a set of point locations in the current local search area, and the trajectory point set B to be matched may be a set of point locations in the candidate flat cable template.
Optionally, the embodiment of the present disclosure improves equation (7) above, and obtains an improved Hausdorff distance calculation formula as follows:
Figure BDA0002392047470000101
the Hausdorff distance is calculated through the formula (8), so that the influence of the abnormal point on the template matching rate can be reduced. Calculating the matching degree of each candidate flat cable template according to the above (8), and determining whether there is a target flat cable template satisfying the matching condition. For example, whether the calculated matching degree meets a preset matching degree may be determined, if there are a plurality of candidate flat cable templates meeting the preset matching degree, topk flat cable templates may be selected as target flat cable templates, and if there are no candidate flat cable templates meeting the preset matching degree, the target flat cable template in the current local search area is set to be empty.
In an optional embodiment of the present disclosure, the arranging, according to the optimal arranging template and the first constraint condition, the point location in the current local search area in step 103 includes:
step S21, determining the starting point position in the current local search area;
step S22, searching the position of the current local search area which is not arranged by taking the initial position as a search starting point;
and step S23, adding point locations to be arranged one by using a nearest insertion method according to the target line arranging template and the first constraint condition until all the point locations are added or the first constraint condition is reached, and obtaining a current line corresponding to the current local search area.
First, a start point location is determined among the point locations within the current local search area. Preferably, if the target flat cable template exists in the current local search area S, an edge point of the target flat cable template is selected as a start point. For example, the edge of the target flat cable template is detected by a convex hull algorithm, and a point is selected as a starting point at the edge. And if the target flat cable template does not exist in the current local search area S, optionally selecting one point in the boundary of the area S as a starting point.
And searching the position of the non-row point in the current local search area by taking the starting point position as a search starting point. The unpinned sites refer to sites to which no line has been added.
And adding point positions to be arranged one by utilizing a nearest insertion method according to the target line arranging template of the current local search area and the first constraint condition and in combination with a template priority principle. The nearest insertion method is to add the position of the unplaced point which is nearest to the initial point in sequence. The template priority principle refers to that if two nearest non-row points exist, one point is a point in the target row line template, and the other point is not a point in the target row line template. And under the condition that only one of the line modules can be selected to be added into the current line, preferentially selecting the point position in the target flat cable template to be added into the current line.
And adding the point positions to be arranged one by one until all the point positions which are not arranged in the current local search area are added or the first constraint condition is reached, and stopping adding continuously to obtain the current line corresponding to the current local search area.
And when the first constraint condition is reached, any one of the load, the volume and the number of pieces required by the current line meets a preset upper limit, or the number of merchants required to be distributed by the current line reaches a preset number of merchants. For example, if the load required by the current line reaches the preset upper load limit, the current line reaches a first constraint condition; or if the number of the orders of the current line reaches the preset upper limit of the number of the orders, the current line reaches the first constraint condition; or, if the number of merchants needing to be distributed by the current route reaches the preset number of merchants, the current route reaches the first constraint condition, and the like.
In an optional embodiment of the present disclosure, the step S23, according to the target winding displacement template and the first constraint condition, adding point positions to be arranged one by using a nearest insertion method until all the point positions are added or the first constraint condition is reached, to obtain a current route corresponding to the current local search area, includes:
step S231, taking the starting point position as an initial sub-loop;
step S232, searching a target point position closest to the initial point position in the non-arranged point positions based on a template priority principle;
step S233, if the sub-loop does not reach the first constraint condition and the total travel of the sub-loop does not exceed the travel upper limit, searching a target arc in the sub-loop, and inserting the target point between the target arc starting point and the target arc end point; the value obtained by subtracting the target arc length from the sum of the distance from the target arc starting point to the target point position and the distance from the target point position to the target arc end point is minimum;
step S234, returning to re-search for the edge template point or the area boundary point closest to the start point until all the unpinned points are added or the sub-loop reaches the first constraint condition.
After determining the starting point location in the current local search area, taking the starting point location as an initial sub-loop.
Searching a target point v closest to the starting point based on a template priority principlekIf the sub-loop does not reach the first constraint condition and the total stroke of the sub-loop does not exceed the stroke upper limit, adding the position of the non-discharge point continuously. Specifically, a target arc (i, j) is searched in the sub-loop, and an arc is called between every two nodes in the sub-loop, wherein i is a starting point of the target arc, and j is an end point of the target arc. The target arc is such that the sum of the distance from the starting point i to the target point location and the distance from the target point location to the end point j is subtractedThe value of the length of the desarget arc is minimized, i.e. C is madeik+Ckj-CijIf there is a target arc satisfying the above conditions, the target point location v is set to be the smallest valuekAnd inserting the position between the starting point i of the target arc and the end point j of the target arc.
Returning to step S232 to search again the target point closest to the starting point until all the unpinned points have been added or the sub-loop reaches the first constraint condition, at this time, terminating the adding operation, and obtaining the current line (i.e., the sub-loop) corresponding to the current local search area.
In the searching process, if the current line meets a first constraint condition, that is, the number of point positions on the current line meets the requirements of the maximum quotient, the maximum full load rate and the mileage, a dispatching line is generated, that is, a flat cable is generated according to a target flat cable template corresponding to the current line, and the flat cable comprises all the point positions on the current line. That is, the route of the embodiment of the present disclosure is generated in the local search area search process.
In an optional embodiment of the present disclosure, after obtaining the current route corresponding to the current local search area in step S23, the method may further include: and adjusting the generated line according to the current line.
After the current line is generated, the generated line may be affected, and all generated lines (including the current line) need to be adjusted.
In an optional embodiment of the present disclosure, the adjusting the generated line according to the current line includes:
step S31, replacing the target arranged point in the generated line and the target arranged point in the local search area;
step S32, constructing an adjacency relation graph by taking the replaced lines as nodes, and adjusting the abnormal point positions of the adjacent lines in the adjacency relation graph;
and step S33, re-matching the adjusted current line with the optimal flat cable template.
And when all point positions in the current local search area are searched completely or the current line meets the first constraint condition, adjusting all generated lines, exiting the current local search area, and re-determining the next local search area for searching. Adjusting the generated line may include the following three steps: edge node replacement (step S31), local link adjustment (step S32), and template re-matching (step S33).
Wherein the edge node permutation is used for permuting the non-template points which are more adjacent to the current line into the current line. The local link adjustment is used for adjusting the abnormal point positions in the arranged lines. And the template re-matching is used for solving the problem of template dislocation of the current line and re-matching the optimal flat cable template for the current line.
In an optional embodiment of the present disclosure, the replacing, in step S31, the target excluded point location in the generated route and the target excluded point location in the current local search area includes:
step S311, searching a target non-row point position adjacent to the starting point position by taking the starting point position as a search starting point, wherein the target non-row point position is a non-template point position;
step S312, adding the target position not arranged into the current line;
step 313, if the current line exceeds the first constraint condition, searching a target point position in the current line, wherein the target point position is a point position which is farthest from the starting point position in the current line;
and step S314, deleting the target position arranged point from the current line.
In particular, with the starting point v1And sequentially searching target non-row point positions adjacent to the starting point position as a searching starting point, wherein the target non-row point positions are non-template point positions closest to the starting point position in the current local searching area.
In the process of generating the current line corresponding to the current local search area, the embodiment of the present disclosure is based on the principle of template priority, and therefore, a point location in the target flat cable template may be preferentially added to the current line, and a non-template point location with a higher proximity degree is discarded. The purpose of step S31 is to replace these non-template point locations with higher proximity than the template point locations into the current route.
After adding the target non-discharge point location into the current line, judging whether the current line exceeds the first constraint condition, if not, continuing to search the next target non-discharge point location; and if so, searching a target arranged point location in the current line, wherein the target arranged point location is the point location which is farthest from the starting point location in the current line, and deleting the target arranged point location from the current line so as to enable the current line to meet a first constraint condition.
The step of deleting the target arranged point from the current line means that the target arranged point can be changed into other more suitable lines, or the target arranged point is set as a non-arranged point.
In an optional embodiment of the present disclosure, in step S32, constructing an adjacency relation graph with the replaced lines as nodes, and adjusting an abnormal point of an adjacent line in the adjacency relation graph includes:
step S321, constructing an adjacency graph by taking the replaced lines as nodes;
step S322, calculating the contour coefficient of each point position for each adjacent line in the adjacent relation graph;
step S323, determining abnormal point positions in the adjacent lines and original attaching lines and target attaching lines corresponding to the abnormal point positions according to the contour coefficients;
and step S324, adjusting the abnormal point from the original attaching line to the target attaching line.
In the process of arranging the lines of the points in each local search area, abnormal points may exist in the line arrangement results of some local search areas, and the abnormal points refer to points where the line arrangement is not reasonable or the line arrangement results are not optimal. For example, point a is already aligned in line 1, but point a is actually closer to line 2, and it should be more reasonable to align point a in line 2.
The purpose of step S32 is to find out whether there is an abnormal point (e.g., point a) in any of the generated lines (e.g., line 1), and then adjust point a from line 1 to line 2, so that the bus cable result is better.
Specifically, the embodiment of the present disclosure constructs an adjacency graph with the replaced lines as nodes, where each node in the adjacency graph represents one generated line; calculating the contour coefficient of each point position for each adjacent line in the adjacent relation graph; the contour coefficients are used to detect outlier sites in adjoining lines. The definition of the contour coefficient is specifically as follows:
Figure BDA0002392047470000141
Figure BDA0002392047470000151
wherein a (i) represents the average distance from the point i to other points in the cluster, b (i) represents the average distance from the point i to all points in the closest cluster, and has a value of-1, and a value of 0 represents that the point is near the critical point.
And (4) calculating the contour coefficient of each point in each generated line according to the formula (9), and if a point with sc <0 exists in a certain line, indicating that an abnormal point exists in the line.
Two flat cables can be calculated through the contour coefficient, wherein one flat cable is a line (an original attribution line) where the abnormal point is located at present, and the other flat cable is a line (a target attribution line) where the abnormal point should be attributed. For example, if an abnormal point location a exists in the line 1 is calculated according to the contour coefficient, the line a is recorded as tail; assuming that the abnormal point a should be assigned to the line 2 according to the contour coefficient, the line 2 is marked as head.
And sequentially acquiring the head node and the tail node corresponding to the head node, constructing a head to tail link, and performing cascade adjustment, namely adjusting the abnormal point position in the tail to the head. And after the current link is adjusted, entering the next cycle until all the nodes are adjusted or the iteration number reaches the preset upper limit, and finishing the adjustment.
In an optional embodiment of the present disclosure, the step S33 of re-matching the adjusted current route with the optimal flat cable template includes:
step S331, obtaining a matched flat cable template set matched with the current line;
step S332, if the first wiring template with the highest matching degree in the matching wiring template set is not used, setting the first wiring template as a target wiring template of the current line;
step S333, if the first routing template is used by a target route, calculating a first matching degree between the current route and the first routing template and a second matching degree between the target route and the first routing template;
step S334, determining whether the first matching degree is greater than the second matching degree, and if so, setting the first routing template as a target routing template of the current route; otherwise, searching the second flat cable template with the highest matching degree until the target flat cable template corresponding to the current line or all the templates in the matched flat cable template set are searched.
After the adjustment of steps S31 and S32, the optimal flat cable template of the current flat cable may be misaligned. For example, assuming that the optimal traverse template of the current route is the historical traverse template M, after the adjustment in steps S31 and S32, M does not conform to the current route, and the adjusted current route needs to be re-matched with the optimal traverse template.
Specifically, first, the current line r is acquirediMatched flat cable template set. For example, a Hausdorff distance between each historical flat cable template in the historical flat cable templates of the target area and the current flat cable can be calculated, and a matching flat cable template set is constructed by the historical flat cable templates which accord with a preset matching degree.
Selecting the first matched flat cable template set with the highest matching degreeA routing template, such as M1, if the first routing template is not used, setting the first routing template as the target routing template of the current route; if the first routing template has been targetedjIf used, then the current route r is calculatediA first matching degree p1 with the first routing template M1, and calculating the target route rjA second degree of match p2 with the first line template M1; if p1>p2, set M1 as the current line riOtherwise, searching a second flat cable template with the highest matching degree in the matched flat cable template set, such as M2, until the target flat cable template corresponding to the current line or all templates in the matched flat cable template set are searched.
And if all the templates in the matched winding displacement template set are searched completely and the target winding displacement template corresponding to the current line is not found yet, setting the target winding displacement template of the current line to be empty.
Thus, the adjustment process for all the generated lines after the single line is generated in the current local search area is completed. At this time, whether all grids of the target area are searched completely is judged, if not, the local search area is expanded continuously, if all grids are searched completely, the wire arranging process of the target area is finished, and the wire arranging result of the target area can be output.
In an optional embodiment of the present disclosure, after obtaining the cabling result of the target area, the method further includes:
step S41, extracting a flat cable template set in the flat cable result;
step S42, expanding k layers of the templates which do not meet the matching conditions in the flat cable template set, and then carrying out local rearrangement;
step S43, judging whether the rearranged line meets a second constraint condition, if so, updating the wire arranging result according to the rearranged line; otherwise, continuing to expand the k layers for local rearrangement until the rearranged line meets a second constraint condition or reaches an iteration upper limit.
The wire arrangement result of the target area obtained through the steps 101 to 103 is not an optimal solution. The wire arrangement result is used as a line initial solution, and the current solution is optimized based on neighborhood transformation and adjustment on the basis of the line initial solution, so that a more reasonable wire arrangement result is obtained.
Firstly, a winding displacement template set in the winding displacement result is extracted, the winding displacement template set comprises target winding displacement templates corresponding to all lines in the winding displacement result, and it should be noted that lines without the target winding displacement templates may exist in the winding displacement result. In the wire arrangement result, the disclosed embodiment finds out one or more unreasonable lines to carry out local rearrangement.
And determining templates which do not meet the matching condition in the flat cable template set. Specifically, the Hausdorff distance between each line in the line arranging result and the corresponding target line arranging template can be calculated to determine the matching degree between each line and the corresponding target line arranging template, the templates with the matching degree not meeting the matching condition are determined in the line arranging template set, and the k layer is expanded by taking one of the templates as the center to perform local rearrangement.
Judging whether the rearranged line meets a second constraint condition, if so, keeping the current optimal solution, and updating the wire arrangement result according to the rearranged line; otherwise, discarding the current rearrangement result, continuing to expand the k layers for local rearrangement until the rearranged line meets the second constraint condition or reaches the iteration upper limit, stopping iteration, and outputting the optimized wire arrangement result.
Although the initial line solutions obtained in steps 101 to 103 may have the effect of fixing the line to some extent, in the process of generating the initial line solution, some lines may cause the template to be misaligned in order to achieve the full loading rate, and therefore, the line fixing effect may be affected. In order to further improve the line fixing rate, in the embodiment of the present disclosure, a template adjustment strategy is adopted to perform local rearrangement based on the line initial solution, and a 2-opt (2-exchange, two-element optimization) algorithm is adopted to perform intra-path node exchange, so as to obtain an optimal wire arrangement result.
In an optional embodiment of the disclosure, the second constraint includes: whether the weighted sum of the rearranged line freight and the line fixed rate is better than the current optimal value.
In the embodiment of the present disclosure, an evaluation function may be defined to represent the second constraint, where the evaluation function is defined as follows: f (x) F + λ (1-G). The merit function represents a weighted sum of the line cost and the line fixing rate. Wherein, F represents the line cost, G represents the line fixed rate, and lambda is the preset weight. Continuously performing iterative optimization on the initial line solution through the second constraint condition, if the weighted sum of the line freight rate and the line fixed rate generated by the current iteration is superior to the current optimal value, retaining the rearrangement result of the current iteration, and updating the wire arrangement result; otherwise, the current rearrangement result is abandoned, so that the weighted sum of the line freight rate and the line fixed rate of the final wire arrangement result is an optimal value, and further the line fixed rate can be improved as much as possible and the distribution cost can be reduced.
In summary, the embodiments of the present disclosure provide a logistic cable layout planning algorithm based on historical cable layout template matching. And constructing an order-grid cluster according to the geographical spatial position of the order, generating a line by adopting a nearest insertion method according to certain heuristic rules by combining template characteristics, and after the line is generated, carrying out edge node replacement, local link adjustment and template re-matching by combining an improved Hausdorff distance so as to adjust the generated line. After all the grids in the target area are searched, the flat cable result of the target area can be obtained. On the premise of ensuring distribution cost and performance effectiveness, the wire arrangement result realizes 'fixing driver fixed lines' to a certain extent, improves line fixing rate, and can meet the requirements of urban side on regional multiple vehicle types.
Referring to fig. 2, a flowchart illustrating the method for obtaining an initial solution of a line by performing a line arranging process on a target area according to the present disclosure is shown, which specifically includes:
step 201, constructing an order-grid unit and generating a grid cluster.
And performing grid division on the target area according to the geographic position of the point position to be lined in the target area, namely constructing an order-grid unit according to the geographic position information of the order in the target area to generate a grid cluster.
Meanwhile, historical winding displacement templates of a target area in a recent period of time can be collected to form a historical winding displacement template set of the target area, and the historical winding displacement templates can include information such as drivers, vehicle types and loads.
Step 202, a local search area is constructed according to a certain rule, and a target flat cable template of the local search area is determined.
And expanding outwards layer by taking the initial grid in the target area as a center, and determining a target flat cable template corresponding to the expanded current local search area according to the historical flat cable template in the target area in the expanding process.
And 203, generating a current line corresponding to the current local search area by adopting a nearest insertion method according to the target flat cable template and the first constraint condition and by combining a template priority principle.
Determining a starting point position in the current local search area; searching the position of the non-row point in the current local searching area by taking the starting point position as a searching starting point; and adding point positions to be arranged one by using a nearest insertion method according to the target line arranging template and the first constraint condition until all the point positions are added or the first constraint condition is reached, and obtaining a current line corresponding to the current local search area.
And performing wire arrangement setting on the current line according to a target wire arrangement template corresponding to the current local search area, such as setting a default vehicle type, parameter setting and the like.
And step 204, after the current line is generated, adjusting the generated line.
After the current line is generated, the generated line may be affected, and all generated lines (including the current line) need to be adjusted.
Firstly, performing edge node replacement on the current line, specifically, performing replacement on target arranged point positions in the generated line and target non-arranged point positions in the local search area.
Then, local link adjustment is performed on the generated line, specifically, an adjacency relation graph is constructed by using the replaced line as a node, and abnormal points of the adjacent line in the adjacency relation graph are adjusted.
And finally, carrying out template re-matching on the current line, specifically, re-matching the adjusted current line with the optimal flat cable template.
Step 205, judging whether all grids in the target area are searched, if so, executing step 206; otherwise, step 202 is performed.
Judging whether all grids of the target area are searched, if not, returning to the state 202 to continue expanding the local search area, if all grids are searched, finishing the wire arranging process of the target area, and executing the step 206 to output a wire arranging result of the target area, wherein the wire arranging result is an initial line solution of the wire arranging of the target area.
And step 206, outputting a line initial solution of the flat cable of the target area.
After generating the initial solution of the target area flat cable, a template adjustment strategy may be adopted to perform local rearrangement on the basis of the initial solution so as to optimize the initial solution of the line.
Referring to fig. 3, a flowchart illustrating local rearrangement of the initial line solution generated in fig. 2 according to the present disclosure specifically includes:
step 301, extracting a flat cable template set in the flat cable result.
The winding displacement template set includes target winding displacement templates corresponding to each line in the winding displacement result, and it should be noted that there may be lines without target winding displacement templates in the winding displacement result.
And step 302, expanding k layers of templates which do not meet the matching conditions, and then carrying out local rearrangement.
In the wire arrangement result, the embodiment of the disclosure finds out an unreasonable line or lines, and expands the k layer by taking the template as the center to perform local rearrangement.
The process of local rearrangement executes the process of the flow chart 2.
Step 303, judging whether the rearranged line meets a second constraint condition, if so, executing step 304; otherwise, executing the step.
Judging whether the rearranged line meets a second constraint condition, if so, executing a step 304 to keep the current optimal solution, and updating the wire arrangement result according to the rearranged line; otherwise, step 307 is executed to discard the current rearrangement result, re-expand the k layers to perform local rearrangement until the rearranged line meets the second constraint condition or reaches the iteration upper limit, stop iteration, and output the optimized wire arrangement result.
Step 304, updating the wire arrangement result.
Step 305, judging whether a template which does not meet the matching condition exists, if so, executing step 302; otherwise, step 306 is performed.
And step 306, outputting the optimized wire arranging result.
Step 307, discarding the current result.
And when all the templates which do not meet the matching condition are searched, or the iteration times reach the iteration upper limit, ending the optimization process, and outputting the optimized wire arranging result.
Aiming at the requirements of regional multi-vehicle type wire arranging planning, the embodiment of the disclosure provides a template matching strategy based on Hausdorff distance, according to a certain heuristic rule and a template priority principle, a nearest insertion method and local line adjustment (including edge node replacement, local link adjustment and template re-matching) are combined to generate a line initial solution, then the line initial solution is locally rearranged by adopting the template adjustment strategy to obtain a line improved solution, and finally, 2-opt is adopted to carry out node exchange in a path to obtain a final wire arranging result.
The embodiment of the disclosure provides functions of regional multi-vehicle type, stencil wire arrangement and the like on the basis of ensuring the performance time effect and reducing the distribution cost; the local search area is expanded by adopting heuristic rules, so that the operation time of a search space algorithm can be reduced, the effect of fixing lines is achieved, and the line fixing rate is improved.
It is noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the disclosed embodiments are not limited by the described order of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the disclosed embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the disclosed embodiments.
Device embodiment
Referring to fig. 4, a block diagram of a logistics routing device in one embodiment of the present disclosure is shown, as follows.
The grid division module 401 is configured to perform grid division on a target area according to a geographical position of a point location to be lined in the target area;
an expansion optimizing module 402, configured to expand layer by layer outward with an initial grid in the target region as a center, and determine, according to a historical winding displacement template in the target region, a target winding displacement template corresponding to an expanded current local search region in an expansion process;
the search wire arranging module 403 is configured to perform wire arranging on the point locations in the current local search area according to the target wire arranging template and a first constraint condition until all grid searches in the target area are completed, so as to obtain a wire arranging result in the target area.
Optionally, the extended optimization module 402 includes:
the matching sub-module is used for matching the point positions in the current local search area with the historical winding displacement template of the target area every time one layer is expanded outwards, and determining whether the target winding displacement template meeting the matching condition exists or not;
and the searching submodule is used for continuing outward layer-by-layer expansion based on the current local search area if the historical winding displacement template is determined not to have a target winding displacement template, until the target winding displacement template is searched or the expansion termination condition is reached.
Optionally, the matching sub-module includes:
the proportion counting unit is used for counting the point location proportion of the point location in each historical line arranging template in the current local searching area for the historical line arranging templates in the current local searching area;
a candidate determining unit, configured to determine a historical flat cable template with the point location ratio exceeding a preset ratio as a candidate flat cable template;
the matching degree calculation unit is used for calculating the matching degree between the point position in the candidate flat cable template and the point position in the current local search area;
and the target determining unit is used for determining whether a target flat cable template meeting the matching condition exists according to the matching degree.
Optionally, the search flat cable module 403 includes:
the starting determining submodule is used for determining a starting point position in the current local search area;
the search submodule for searching the search starting point of the current local search area is used for searching the search starting point of the search starting point;
and the point location insertion submodule is used for adding point locations to be arranged one by using a nearest insertion method according to the target wire arranging template and the first constraint condition until all the point locations are added or the first constraint condition is reached, and obtaining a current line corresponding to the current local search area.
Optionally, the point location insertion sub-module includes:
the initial determining unit is used for taking the starting point position as an initial sub-loop;
the point location searching unit is used for searching a target point location closest to the starting point location in the non-arranged point locations based on a template priority principle;
the point location inserting unit is used for searching a target arc in the sub-loop and inserting the target point location between the target arc starting point and the target arc end point if the sub-loop does not reach the first constraint condition and the total stroke of the sub-loop does not exceed the stroke upper limit; the value obtained by subtracting the target arc length from the sum of the distance from the target arc starting point to the target point position and the distance from the target point position to the target arc end point is minimum;
and the re-searching unit is used for returning to re-search the edge template point or the area boundary point which is closest to the starting point until the non-discharge points are added or the sub-loop reaches the first constraint condition.
Optionally, the apparatus further comprises:
and the line adjusting module is used for adjusting the generated line according to the current line.
Optionally, the line adjusting module includes:
the edge replacement submodule is used for replacing target arranged point positions in the generated line and target non-arranged point positions in the local search area;
the link adjustment submodule is used for constructing an adjacency relation graph by taking the replaced line as a node and adjusting the abnormal point position of the adjacent line in the adjacency relation graph;
and the re-matching sub-module is used for re-matching the adjusted current line with the optimal flat cable template.
Optionally, the edge replacement submodule includes:
the first searching unit is used for searching a target non-row point position adjacent to the starting point position by taking the starting point position as a searching starting point, wherein the target non-row point position is a non-template point position;
a point location adding unit, configured to add the target unpinned point location to the current line;
a second searching unit, configured to search for a target point location in the current line if the current line exceeds the first constraint condition, where the target point location is a point location in the current line that is farthest from the starting point location;
and the point location deleting unit is used for deleting the target arranged point location from the current line.
Optionally, the link adjusting sub-module includes:
the adjacency construction unit is used for constructing an adjacency relation graph by taking the replaced line as a node;
the coefficient calculation unit is used for calculating the contour coefficient of each point position for each adjacent line in the adjacent relation graph;
an exception determining unit, configured to determine, according to the contour coefficient, an exception point in the adjacent line, and an original attribution line and a target attribution line corresponding to the exception point;
and the point location adjusting unit is used for adjusting the abnormal point location from the original attaching line to the target attaching line.
Optionally, the re-matching sub-module includes:
the set acquisition unit is used for acquiring a matched flat cable template set matched with the current line;
a judging and setting unit, configured to set the first flat cable template as a target flat cable template of the current line if the first flat cable template with the highest matching degree in the matching flat cable template set is not used;
the matching calculation unit is used for calculating a first matching degree of the current line and the first routing template and a second matching degree of the target line and the first routing template if the first routing template is used by the target line;
the template traversing unit is used for judging whether the first matching degree is greater than the second matching degree, and if so, setting the first wiring template as a target wiring template of the current line; otherwise, searching the second flat cable template with the highest matching degree until the target flat cable template corresponding to the current line or all the templates in the matched flat cable template set are searched.
Optionally, the apparatus further comprises:
the template extraction module is used for extracting a wire arranging template set in the wire arranging result;
the local rearrangement module is used for performing local rearrangement after expanding k layers of the templates which do not meet the matching conditions in the flat cable template set;
the optimal iteration module is used for judging whether the rearranged line meets a second constraint condition or not, and if so, updating the wire arrangement result according to the rearranged line; otherwise, continuing to expand the k layers for local rearrangement until the rearranged line meets a second constraint condition or reaches an iteration upper limit.
Optionally, the second constraint includes:
whether the weighted sum of the rearranged line freight and the line fixed rate is better than the current optimal value.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An embodiment of the present disclosure further provides an electronic device, see fig. 5, including: a processor 501, a memory 502, and a computer program 5021 stored on the memory and executable on the processor, the processor implementing the logistics cabling method of the foregoing embodiments when executing the program.
Embodiments of the present disclosure also provide a readable storage medium, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the logistics wiring method of the foregoing embodiments.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present disclosure are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the embodiments of the present disclosure as described herein, and any descriptions of specific languages are provided above to disclose the best modes of the embodiments of the present disclosure.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the disclosure, various features of the embodiments of the disclosure are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that is, claimed embodiments of the disclosure require more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of an embodiment of this disclosure.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
The various component embodiments of the disclosure may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a sequencing device according to embodiments of the present disclosure. Embodiments of the present disclosure may also be implemented as an apparatus or device program for performing a portion or all of the methods described herein. Such programs implementing embodiments of the present disclosure may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit embodiments of the disclosure, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the disclosure may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above description is only for the purpose of illustrating the preferred embodiments of the present disclosure and is not to be construed as limiting the embodiments of the present disclosure, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the embodiments of the present disclosure are intended to be included within the scope of the embodiments of the present disclosure.
The above description is only a specific implementation of the embodiments of the present disclosure, but the scope of the embodiments of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the embodiments of the present disclosure, and all the changes or substitutions should be covered by the scope of the embodiments of the present disclosure. Therefore, the protection scope of the embodiments of the present disclosure shall be subject to the protection scope of the claims.

Claims (15)

1. A method for arranging wires in a logistics, the method comprising:
carrying out grid division on a target area according to the geographical position of a point position to be lined in the target area;
expanding outwards layer by taking the initial grid in the target area as a center, and determining a target flat cable template corresponding to the expanded current local search area according to a historical flat cable template in the target area in the expanding process;
and arranging the line of the point in the current local search area according to the target line arranging template and a first constraint condition until all the grid searches in the target area are finished, and obtaining a line arranging result of the target area.
2. The method of claim 1, wherein during the expansion process, determining a target flat cable template corresponding to the expanded current local search area according to a historical flat cable template in the target area comprises:
when one layer is expanded outwards, matching the point positions in the current local search area with the historical winding displacement template of the target area, and determining whether a target winding displacement template meeting the matching condition exists or not;
and if the historical winding displacement template is determined not to have the target winding displacement template, continuing outward layer-by-layer expansion based on the current local search area until the target winding displacement template is found or the expansion termination condition is reached.
3. The method of claim 2, wherein the matching the point location in the current local search area with the historical flat cable template of the target area, and determining whether there is a target flat cable template satisfying a matching condition comprises:
counting the point location ratio of the point location in each historical line location template in the current local search area for the historical line location templates in the current local search area;
determining a historical winding displacement template with the point position ratio exceeding a preset ratio as a candidate winding displacement template;
calculating the matching degree between the point positions in the candidate flat cable template and the point positions in the current local search area;
and determining whether a target flat cable template meeting the matching condition exists according to the matching degree.
4. The method of claim 1, wherein the spooling the point locations in the current local search area according to the optimal spooling template and a first constraint comprises:
determining a starting point position in the current local search area;
searching the position of the non-row point in the current local searching area by taking the starting point position as a searching starting point;
and adding point positions to be arranged one by using a nearest insertion method according to the target line arranging template and the first constraint condition until all the point positions are added or the first constraint condition is reached, and obtaining a current line corresponding to the current local search area.
5. The method according to claim 4, wherein the adding point positions to be arranged one by using a nearest insertion method according to the target line arrangement template and the first constraint condition until all the point positions not arranged are added or the first constraint condition is reached to obtain a current line corresponding to the current local search area, includes:
taking the starting point position as an initial sub-loop;
searching a target point position closest to the starting point position in the non-row point positions based on a template priority principle;
if the sub-loop does not reach the first constraint condition and the total stroke of the sub-loop does not exceed the stroke upper limit, searching a target arc in the sub-loop and inserting the target point between the target arc starting point and the target arc end point; the value obtained by subtracting the target arc length from the sum of the distance from the target arc starting point to the target point position and the distance from the target point position to the target arc end point is minimum;
and returning to search the edge template point or the area boundary point closest to the starting point again until the non-discharge points are added or the sub-loop reaches the first constraint condition.
6. The method of claim 4, wherein after obtaining the current route corresponding to the current local search area, the method further comprises:
and adjusting the generated line according to the current line.
7. The method of claim 6, wherein the adjusting the generated route according to the current route comprises:
replacing target arranged point positions in the generated line and target non-arranged point positions in the local search area;
constructing an adjacency relation graph by taking the replaced line as a node, and adjusting the abnormal point position of the adjacent line in the adjacency relation graph;
and re-matching the adjusted current line with the optimal flat cable template.
8. The method of claim 7, wherein the permuting target permuted bits in the generated route and target un-permuted bits in the local search area comprises:
searching a target non-discharge point position adjacent to the starting point position by taking the starting point position as a search starting point, wherein the target non-discharge point position is a non-template point position;
adding the target unpinned point location to the current line;
if the current line exceeds the first constraint condition, searching a target arranged point position in the current line, wherein the target arranged point position is a point position which is farthest from the starting point position in the current line;
and deleting the target scheduled point from the current line.
9. The method according to claim 7, wherein the constructing the adjacency graph with the replaced lines as nodes and adjusting the abnormal point positions of the adjacent lines in the adjacency graph comprises:
constructing an adjacency relation graph by taking the replaced lines as nodes;
calculating the contour coefficient of each point position for each adjacent line in the adjacent relation graph;
determining abnormal point positions in the adjacent lines according to the contour coefficients, and an original attribution line and a target attribution line corresponding to the abnormal point positions;
and adjusting the abnormal point position from the original attaching line to the target attaching line.
10. The method of claim 7, wherein the re-matching the adjusted current route to the optimal winding displacement template comprises:
acquiring a matched flat cable template set matched with the current line;
if the first wiring template with the highest matching degree in the matching wiring template set is not used, setting the first wiring template as a target wiring template of the current line;
if the first routing template is used by a target route, calculating a first matching degree of the current route and the first routing template and a second matching degree of the target route and the first routing template;
judging whether the first matching degree is greater than the second matching degree, if so, setting the first wiring template as a target wiring template of the current line; otherwise, searching the second flat cable template with the highest matching degree until the target flat cable template corresponding to the current line or all the templates in the matched flat cable template set are searched.
11. The method of claim 1, wherein after obtaining the traverse result of the target area, the method further comprises:
extracting a flat cable template set in the flat cable result;
expanding k layers of the templates which do not meet the matching conditions in the flat cable template set, and then carrying out local rearrangement;
judging whether the rearranged line meets a second constraint condition, if so, updating the wire arrangement result according to the rearranged line; otherwise, continuing to expand the k layers for local rearrangement until the rearranged line meets a second constraint condition or reaches an iteration upper limit.
12. The method of claim 11, wherein the second constraint comprises:
whether the weighted sum of the rearranged line freight and the line fixed rate is better than the current optimal value.
13. A logistics cable routing device, the device comprising:
the grid division module is used for carrying out grid division on the target area according to the geographic position of the point position of the wire to be arranged in the target area;
the expansion optimizing module is used for expanding outwards layer by taking the initial grid in the target area as a center, and determining a target wire arranging template corresponding to the expanded current local search area according to a historical wire arranging template in the target area in the expanding process;
and the searching wire arranging module is used for performing wire arranging on the point positions in the current local searching area according to the target wire arranging template and a first constraint condition until all grid searching in the target area is completed, and obtaining a wire arranging result of the target area.
14. An electronic device, comprising:
processor, memory and computer program stored on the memory and executable on the processor, characterized in that the processor when executing the program implements the logistics cabling method according to one or more of claims 1-12.
15. A readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a logistics cabling method as recited in one or more of method claims 1-12.
CN202010117859.6A 2020-02-25 2020-02-25 Logistics wiring method and device, electronic equipment and readable storage medium Pending CN111461396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010117859.6A CN111461396A (en) 2020-02-25 2020-02-25 Logistics wiring method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010117859.6A CN111461396A (en) 2020-02-25 2020-02-25 Logistics wiring method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN111461396A true CN111461396A (en) 2020-07-28

Family

ID=71684131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010117859.6A Pending CN111461396A (en) 2020-02-25 2020-02-25 Logistics wiring method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111461396A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780831A (en) * 2021-09-14 2021-12-10 北京沃东天骏信息技术有限公司 Resource allocation method and device, electronic equipment and storage medium
CN116151574A (en) * 2023-02-27 2023-05-23 浙江利珉环境科技有限公司 Sanitation vehicle-mounted dynamic weighing method and system
CN117332912A (en) * 2023-09-26 2024-01-02 山东浪潮爱购云链信息科技有限公司 Intelligent order wire arrangement method and device
CN117332912B (en) * 2023-09-26 2024-05-28 山东浪潮爱购云链信息科技有限公司 Intelligent order wire arrangement method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780831A (en) * 2021-09-14 2021-12-10 北京沃东天骏信息技术有限公司 Resource allocation method and device, electronic equipment and storage medium
CN116151574A (en) * 2023-02-27 2023-05-23 浙江利珉环境科技有限公司 Sanitation vehicle-mounted dynamic weighing method and system
CN116151574B (en) * 2023-02-27 2023-08-18 浙江利珉环境科技有限公司 Sanitation vehicle-mounted dynamic weighing method and system
CN117332912A (en) * 2023-09-26 2024-01-02 山东浪潮爱购云链信息科技有限公司 Intelligent order wire arrangement method and device
CN117332912B (en) * 2023-09-26 2024-05-28 山东浪潮爱购云链信息科技有限公司 Intelligent order wire arrangement method and device

Similar Documents

Publication Publication Date Title
CN109034481B (en) Constraint programming-based vehicle path problem modeling and optimizing method with time window
US11416787B2 (en) Parallel processing for solution space partitions
CN108764777B (en) Electric logistics vehicle scheduling method and system with time window
Pelzer et al. A partition-based match making algorithm for dynamic ridesharing
CN106156898B (en) Commodity distribution path planning method based on MoCD algorithm
CN105513400B (en) The method of Dynamic Programming trip route
Huang et al. Large scale real-time ridesharing with service guarantee on road networks
CN107103383B (en) Dynamic taxi sharing scheduling method based on taxi-taking hotspot
Lai et al. An heuristic search for the routing of heterogeneous trucks with single and double container loads
TW201741993A (en) System and method for determining routes of transportation service
US20180032955A1 (en) System and method of minimizing waiting time in vehicle routing and scheduling with narrow time-windows
CN110390415A (en) A kind of method and system carrying out trip mode recommendation based on user&#39;s trip big data
Grzybowska et al. Decision support system for real-time urban freight management
CN112288347A (en) Method, device, server and storage medium for determining route of cold chain distribution
CN107392358B (en) Vehicle distribution method and device
CN111461396A (en) Logistics wiring method and device, electronic equipment and readable storage medium
CN113848970A (en) Multi-target collaborative path planning method for vehicle and unmanned aerial vehicle
Chen et al. A modified harmony search algorithm for solving the dynamic vehicle routing problem with time windows
CN109447319A (en) A kind of Meshing Method, computer readable storage medium and terminal device
CN111860957A (en) Multi-vehicle type vehicle path planning method considering secondary distribution and balance time
Bayliss et al. Designing a multi-modal and variable-echelon delivery system for last-mile logistics
CN110930092B (en) Distribution route adjusting method and device, electronic equipment and storage medium
Tomaras et al. Crowd-based ecofriendly trip planning
JP6834600B2 (en) Delivery plan creation program, delivery plan creation method, and delivery plan creation device
CN110264140A (en) A kind of logistics transportation dispatching method, device and equipment with time window

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200728

WD01 Invention patent application deemed withdrawn after publication