Distance matrix creation device and distance matrix creation method
The device uses Voronoi division and weighted graphs to efficiently create distance matrices by minimizing external map service reliance, addressing inefficiencies in existing VRP solutions and improving route calculation speed.
Patent Information
- Application Number
- PCT/JP2024/022115
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-12-26
AI Technical Summary
Existing vehicle routing problem (VRP) solutions that rely on external map servers for calculating travel distances or times between nodes incur exponential time increases as the number of nodes grows, and cached routes do not account for uncached or refreshed routes, leading to inefficiencies in distance matrix creation.
A distance matrix creation device that utilizes Voronoi division to identify adjacent nodes, calculates edge distances using external map services, and constructs weighted bidirectional graphs to efficiently determine shortest paths, reducing reliance on external map services.
This approach allows for the efficient generation of distance matrices by minimizing external map service usage, thereby reducing calculation time and maintaining accuracy in determining optimal routes.
Smart Images

Figure JP2024022115_26122025_PF_FP_ABST
Abstract
Description
Distance matrix creation device and distance matrix creation method
[0001] The present disclosure relates to a distance matrix creation device and a distance matrix creation method.
[0002] The technology described in Patent Document 1 is known as a conventional technology for solving the vehicle routing problem (VRP). In the technology described in Patent Document 1, a distance matrix is created by calculating the travel distance (or travel time) between nodes indicating delivery destinations, and the delivery planning problem is solved using the distance matrix. However, in the technology described in Patent Document 1, an external map server is used to calculate the travel distance (or travel time) between each node by route search when creating the distance matrix, which causes a problem in that the time required to create the distance matrix increases exponentially as the number of nodes increases.
[0003] To address the above problem, by caching the results of route search (Non-Patent Document 1), it is possible to reduce the time required to obtain the travel distance (or travel time) of previously searched routes.
[0004] JP 2024-011066 A
[0005] "HTTP Caching," MDN Web Docs. Internet <URL: https: / / developer.mozilla.org / ja / docs / Web / HTTP / Caching>
[0006] However, since the travel distance (or travel time) of a route that has not been previously searched is not cached, it takes time to acquire the travel distance (or travel time). Similarly, when the cache is refreshed, it also takes time to acquire the travel distance (or travel time).
[0007] The present disclosure has been made in consideration of the above points, and aims to efficiently create a distance matrix used to solve a delivery planning problem.
[0008] A distance matrix creation device according to one aspect of the present disclosure is a distance matrix creation device that creates a distance matrix for solving a delivery planning problem, and includes: a Voronoi division unit that calculates the Voronoi region of each object that is a destination in the delivery planning problem through Voronoi division using location information of each object; a calculation unit that calculates at least the two-way distance or time of edges whose Voronoi regions connect adjacent nodes, with the object as a node; a shortest path calculation unit that calculates the shortest path between any two nodes in a weighted bidirectional graph in which the distance or time is assigned to the edges as weights; and a creation unit that creates a distance matrix using the sum of weights assigned to edges included in the shortest path as an element corresponding to the start point and end point of the shortest path.
[0009] Distance matrices used to solve the vehicle dispatch planning problem can be efficiently generated.
[0010] FIG. 1 is a diagram illustrating an example of the hardware configuration of an inspection plan creation device according to the present embodiment. FIG. 2 is a diagram illustrating an example of the functional configuration of an inspection plan creation device according to the present embodiment. FIG. 3 is a flowchart illustrating an example of an inspection plan creation process according to the present embodiment. FIG. 4 is a flowchart illustrating a distance matrix creation process according to Example 1. FIG. 5 is a diagram illustrating an example of a Voronoi region of each utility pole. FIG. 6 is a diagram illustrating an example of an edge between adjacent utility poles. FIG. 7 is a diagram illustrating an example of a comparison of distances when a route is searched using a map service. FIG. 8 is a diagram illustrating an example of a case where k-nearest neighbor nodes and edges are connected. FIG. 9 is a flowchart illustrating a distance matrix creation process according to Example 2.
[0011] An embodiment of the present invention will be described in detail below with reference to the drawings. Hereinafter, a problem of determining an inspection route for utility poles (more specifically, a problem of determining the order in which utility poles are to be visited in order to inspect the utility poles) will be considered as an example of a problem that can be reduced to a delivery planning problem. An inspection plan creation device 10 will be described that outputs the order in which utility poles are to be visited as an inspection plan.
[0012] When given utility pole information including the numbers and locations of utility poles to be inspected, the inspection plan creation device 10 according to this embodiment creates a distance matrix whose elements are the distances (or times) between each utility pole, and then uses this distance matrix to solve an optimization problem that reduces to a delivery plan problem, thereby outputting an inspection plan. When creating the distance matrix, the inspection plan creation device 10 according to this embodiment reduces the number of times that distances (or times) are calculated using a map service implemented by an external map server, compared to the technology described in Patent Document 1. This allows the inspection plan creation device 10 according to this embodiment to efficiently create the distance matrix used to solve the delivery plan problem.
[0013] The problem of determining an inspection route for utility poles is just one example, and the inspection plan creation device 10 according to this embodiment can be similarly applied to any delivery planning problem and any problem that can be reduced to the delivery planning problem. Specific examples of such problems include the problem of determining the order of visits when delivering goods, the problem of determining the order of visits when collecting garbage, and the problem of determining the order of visits when replenishing goods in a vending machine.
[0014] <Example of Hardware Configuration of Inspection Plan Creation Device 10> An example of a hardware configuration of the inspection plan creation device 10 according to this embodiment is shown in Fig. 1. As shown in Fig. 1, the inspection plan creation device 10 according to this embodiment includes an input device 101, a display device 102, an external I / F 103, a communication I / F 104, a random access memory (RAM) 105, a read only memory (ROM) 106, an auxiliary storage device 107, and a processor 108. Each of these pieces of hardware is connected to each other so as to be able to communicate with each other via a bus 109.
[0015] The input device 101 is, for example, a keyboard, a mouse, a touch panel, a physical button, etc. The display device 102 is, for example, a display, a display panel, etc. Note that the inspection plan creation device 10 does not necessarily have to include at least one of the input device 101 and the display device 102, for example.
[0016] The external I / F 103 is an interface with an external device such as a recording medium 103a. The inspection plan creation device 10 can read from and write to the recording medium 103a via the external I / F 103. Examples of the recording medium 103a include a flexible disk, a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), and a USB (Universal Serial Bus) memory card.
[0017] The communication I / F 104 is an interface that allows the inspection schedule creation device 10 to communicate with other devices and equipment. The RAM 105 is a volatile semiconductor memory (storage device) that temporarily stores programs and data. The ROM 106 is a non-volatile semiconductor memory (storage device) that can store programs and data even when the power is turned off. The auxiliary storage device 107 is a storage device (storage device) such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), or a flash memory. The processor 108 is an arithmetic device such as a CPU (Central Processing Unit).
[0018] The inspection plan creation device 10 according to this embodiment has the hardware configuration shown in Fig. 1 and is therefore capable of implementing the inspection plan creation process described below. Note that the hardware configuration shown in Fig. 1 is merely an example, and the hardware configuration of the inspection plan creation device 10 is not limited to this. For example, the inspection plan creation device 10 may have multiple auxiliary storage devices 107 or multiple processors 108, may not have some of the hardware shown in the figure, or may have various hardware components other than the hardware shown in the figure.
[0019] <Example of Functional Configuration of Inspection Plan Creation Device 10> An example of the functional configuration of the inspection plan creation device 10 according to this embodiment is shown in Fig. 2. As shown in Fig. 2, the inspection plan creation device 10 according to this embodiment has an input unit 201, a distance matrix creation unit 202, an inspection plan creation unit 203, and an output unit 204. Each of these units is realized, for example, by processing in which one or more programs installed in the inspection plan creation device 10 are executed by the processor 108 or the like.
[0020] The input unit 201 inputs given utility pole information. The utility pole information is information that includes the number of each utility pole to be inspected (an example of utility pole identification information) and the location information of the utility pole (e.g., information indicating the latitude and longitude).
[0021] The distance matrix creation unit 202 uses the utility pole information input by the input unit 201 to create matrix-format data called a distance matrix. The distance matrix is a matrix whose (i, j)-component element is, for example, the distance (or time) between the ith utility pole and the jth utility pole. The distance (or time) between the ith utility pole and the jth utility pole refers to the distance (or time) traveled between the ith utility pole and the jth utility pole by a moving object (e.g., a vehicle, etc.) used to travel between the utility poles. The moving object is not limited to a vehicle, but may be, for example, a person, a two-wheeled vehicle (including a motorcycle), a drone, etc. Furthermore, the moving object may be a ship, an airplane, a spacecraft, etc.
[0022] Here, the distance matrix creation unit 202 includes a Voronoi division unit 211 , a graph creation unit 212 , an edge distance calculation unit 213 , a shortest path calculation unit 214 , and an inter-node distance calculation unit 215 .
[0023] The Voronoi division unit 211 obtains the Voronoi region of each utility pole by Voronoi division, thereby identifying utility poles whose Voronoi regions are adjacent to each other as adjacent utility poles.
[0024] The graph creation unit 212 regards each utility pole as a node and connects at least adjacent utility poles with edges. The graph creation unit 212 also creates a weighted bidirectional graph using the distance (or time) calculated by the edge distance calculation unit 213 as the weight of the edge.
[0025] The edge distance calculation unit 213 calculates the distance (or time) in both directions of each edge by using a map service provided by an external map server. That is, the edge distance calculation unit 213 calculates the distance (or time) from a node at one end of an edge to a node at the other end, and the distance (or time) from the node at the other end to the node at one end.
[0026] The shortest path calculation unit 214 uses the weighted bidirectional graph created by the graph creation unit 212 to calculate the shortest path between each node.
[0027] The node distance calculation unit 215 calculates the distance (or time) between each node using the shortest path calculated by the shortest path calculation unit 214 and the weights of the edges included in that shortest path. This allows the distance (or time) of the shortest path to be obtained for any pair of two nodes, and therefore a distance matrix whose (i, j) component is the distance (or time) of the shortest path from the ith utility pole to the jth utility pole can be obtained.
[0028] The inspection plan creation unit 203 creates an inspection plan using the distance matrix created by the distance matrix creation unit 202. The inspection plan creation unit 203 may create an inspection plan from the distance matrix using, for example, a method similar to the method described in Patent Document 1. In Patent Document 1, a graph convolution layer is used to convert the distance matrix into feature quantities, and the feature quantities are used to calculate an optimal delivery plan using an actor-critic reinforcement learning model (neural network) having a pointer network. For details of this method, please refer to Patent Document 1.
[0029] The output unit 204 outputs the inspection plan created by the inspection plan creation unit 203 to a predetermined output destination. Note that the output destination is not limited to a specific output destination and may be any output destination. Examples of such output destinations include the display device 102 such as a display, a storage area such as the auxiliary storage device 107, other devices or equipment connected in a communicable manner, etc.
[0030] <Inspection Plan Creation Process> An example of the inspection plan creation process according to this embodiment will be described below with reference to FIG.
[0031] The input unit 201 inputs given utility pole information (step S101).
[0032] The distance matrix creation unit 202 creates a distance matrix using the utility pole information input in step S101 (step S102). Details of the distance matrix creation process for creating the distance matrix will be described later.
[0033] The inspection plan creation unit 203 creates an inspection plan using the distance matrix created in step S102, for example, by a method similar to the method described in Patent Document 1 (step S103).
[0034] The output unit 204 outputs the inspection plan created in step S103 to a predetermined output destination (step S104).
[0035] <<Distance Matrix Creation Process According to First Embodiment>> Hereinafter, a first embodiment of the process (distance matrix creation process) of step S102 in FIG. 3 will be described with reference to FIG.
[0036] The Voronoi division unit 211 of the distance matrix creation unit 202 calculates the Voronoi region of each utility pole by Voronoi division using the position information of each utility pole (step S201). Voronoi division is a technique for dividing a plane into regions formed by points closest to each of the given points (called "kernel points" or "sites") on the plane. The regions obtained by Voronoi division are called "Voronoi regions" (or "Voronoi cells"). As an example, FIG. 5 shows an example of a Voronoi region calculated from the pole information of a certain number of utility poles. As shown in FIG. 5, the points indicated by the position information of each utility pole are used as kernel points (or sites) to obtain the Voronoi region of each utility pole. When performing Voronoi division, distance must be defined, and Euclidean distance, for example, is used as this distance. In the example shown in Figure 5, only a certain range is illustrated (specifically, the range of "-100 to 1100" in the x direction and "-100 to 110" in the y direction), and when performing Voronoi division, a wider range (e.g., the range from the minimum value to the maximum value in the x direction, and the range from the minimum value to the maximum value in the y direction) is set as the coordinates of the plane to be divided.
[0037] By the Voronoi division in step S201 described above, utility poles whose Voronoi regions are adjacent to each other are identified as adjacent utility poles.
[0038] The graph creation unit 212 of the distance matrix creation unit 202 uses each utility pole as a node and connects adjacent utility poles (i.e., utility poles with adjacent Voronoi regions) with edges (step S202). As an example, Fig. 6 shows an example of edges when the Voronoi regions shown in Fig. 5 are obtained. As shown in Fig. 6, utility poles with adjacent Voronoi regions are connected with edges.
[0039] Hereinafter, the number of the electric pole is i=1,...,N, and the node representing the i-th electric pole is x i In addition, the node x i and node x j The edge with both endpoints is e ij We will express this as follows.
[0040] The edge distance calculation unit 213 of the distance matrix creation unit 202 calculates the bidirectional distance (or time) of each edge using a map service implemented by an external map server (step S203). That is, the edge distance calculation unit 213 calculates the bidirectional distance (or time) of each edge obtained in step S202 by, for example, using the web application programming interface (API) of the map service. Here, the bidirectional distance (or time) of an edge refers to the distance (or time) required to travel from a node at one end of the edge to a node at the other end by a given mobile object (e.g., a vehicle), and the distance (or time) required to travel from the node at the other end to the node at the one end by the same mobile object. The map service performs route search using map information (e.g., a road network, etc.) stored in the map server, and calculates the distance (or time) of the shortest route. However, the map service may also perform route search using, in addition to map information, traffic information (e.g., road congestion information, etc.), for example.
[0041] As a result, adjacent nodes x i and x j With respect to edge e ij and the distance (or time) of the edge e ji The distance (or time) of the edge e ij distance (or time) w ij , edge e ji distance (or time) w ji We will express this as follows.
[0042] The graph creation unit 212 of the distance matrix creation unit 202 creates a weighted bidirectional graph using the distance (or time) calculated in step S203 as the weight of the edge (step S204). ij The weight of ij , edge e ji The weight of ji Create a weighted bidirectional graph as follows:
[0043] The shortest path calculation unit 214 of the distance matrix creation unit 202 solves the All Pair Shortest Path (APSA) problem using the weighted bidirectional graph created in step S204, and calculates the distance between any two nodes x i and x j For node x i is the starting point, and node x j The shortest path having the end point of (step S205) is calculated. The all-pairs shortest path problem can be solved by, for example, the Dijkstra algorithm.
[0044] This allows us to create a pair of two nodes (x i , x j ) is the shortest path of L ij Assuming that N × N shortest paths L ij (i, j = 1, ..., N) is obtained. ij is node x i The edge starting from and the node x j is represented by an edge set (ordered set) that includes at least an edge having an end point of
[0045] The node distance calculation unit 215 of the distance matrix creation unit 202 calculates the shortest paths L ij The sum of the weights (distance or time) of each edge included in is calculated, and a distance matrix is created in which the sum is the (i, j)-component element (step S206). This results in a distance matrix in which the (i, j)-component element is the distance (or time) of the shortest path from the i-th utility pole to the j-th utility pole. Note that the (i, j)-component element of the distance matrix is calculated by ij Then, for i≠j, m ij = m ji It is not limited to m ij ≠m ji Note that this can be expressed as the shortest path L ij and the shortest path is L ji are different paths, and edge weights are assigned in both directions.
[0046] In this way, in the distance matrix creation process according to the first embodiment, nodes whose Voronoi regions are adjacent are considered to be adjacent nodes, and only the distances (or times) in both directions of the edges between the adjacent nodes are calculated using an external map service. Therefore, compared to the technology described in Patent Literature 1, the use of external map services is reduced, and as a result, the time required to create a distance matrix can be reduced.
[0047] <<Distance matrix creation process according to Example 2>> In Example 1, only the two-way distance (or time) of the edge between nodes whose Voronoi regions are adjacent is calculated using an external map service. In this case, however, the accuracy of the distance (or time) of the shortest path may decrease.
[0048] For example, as shown in FIG. 1 , x 2 , x 3 There exists a node x 1 and x 2 is the node whose Voronoi region is adjacent to the node x 2 and x 3 In this case, in the first embodiment, the node x 1 is the starting point, and node x 3 The shortest route from the end point to 1 →x 2 →x 3 The distance (or time) is w 12 +w 23 On the other hand, if you use a map service to find node x 1 is the starting point, and node x 3 When searching for a route with w as the end point, w<w 12 +w 23 The shortest path for which
[0049] In this way, in the first embodiment, a route that requires a longer distance (or a longer time) than the actual shortest route may be obtained as the shortest route.
[0050] Therefore, in the second embodiment, taking into consideration the above-mentioned problems of the first embodiment, after the nodes whose Voronoi regions are adjacent are connected by edges, the k-nearest neighbors are also connected by edges. Here, the k-nearest neighbors of a node refer to nodes that can be reached by tracing a predetermined number of edges or less from the node after the nodes whose Voronoi regions are adjacent are connected by edges. As an example, FIG. 8 shows a case where k-nearest neighbors are connected when k=2. The left diagram in FIG. 8 is a graph after the nodes whose Voronoi regions are adjacent are connected by edges. In this case, for example, node x 1 follows two or fewer edges to reach node x 3 can be reached, so node x 1 and node x 3 Similarly, a new edge is created between node x and node x. 1 follows two or fewer edges to reach node x 5 can be reached, so node x 1 and node x 5 A new edge is created between and . The same applies to the other newly connected edges.
[0051] By connecting k-nearest neighbor nodes with edges, it becomes possible to calculate the value of each element of the distance matrix with greater accuracy. The larger the value of k, the more accurately the value of each element of the distance matrix can be calculated. However, since the number of route searches using map services also increases, it is necessary to determine an appropriate value for k, taking into account accuracy and efficiency.
[0052] A second embodiment of the process (distance matrix creation process) in step S102 of FIG. 3 will be described below with reference to FIG.
[0053] The Voronoi division unit 211 of the distance matrix creation unit 202 calculates the Voronoi region of each utility pole by Voronoi division using the position information of each utility pole, similar to step S201 in FIG. 4 (step S301).
[0054] The graph creation unit 212 of the distance matrix creation unit 202 treats each utility pole as a node and connects adjacent utility poles (i.e., utility poles with adjacent Voronoi regions) with edges, and also connects each utility pole with other utility poles that are k-nearest neighbors of that utility pole with edges (step S302). As a result, edges are connected not only between nodes with adjacent Voronoi regions, but also between each node and nodes that can be reached by tracing k or fewer edges. The value of k is set in advance (where k is an integer greater than or equal to 1).
[0055] Hereinafter, as in the first embodiment, the number of the utility pole is represented by i=1, . . . , N, and the node representing the i-th utility pole is represented by x i , node x i and node x j The edge with both endpoints is e ij We will express this as follows.
[0056] The edge distance calculation unit 213 of the distance matrix creation unit 202 calculates the distance (or time) in both directions of each edge using a map service provided by an external map server, similar to step S203 in FIG. 4 (step S303).
[0057] As a result, nodes x that are connected to each other by edges i and x j With respect to edge e ij and the distance (or time) of the edge e ji Hereinafter, similarly to the first embodiment, the distance (or time) of the edge e ij distance (or time) w ij , edge e ji distance (or time) w ji We will express this as follows.
[0058] The graph creation unit 212 of the distance matrix creation unit 202 creates a weighted bidirectional graph using the distance (or time) calculated in step S303 as the edge weight, similar to step S204 in FIG. 4 (step S304).
[0059] The shortest path calculation unit 214 of the distance matrix creation unit 202 uses the weighted bidirectional graph created in step S304 to solve the all-points-pairs shortest path problem, similar to step S205 of FIG. 4, to calculate the shortest path between any two nodes x i and x j For node x i is the starting point, and node x j The shortest route having the end point at is calculated (step S305).
[0060] As a result, as in the first embodiment, the pair of two nodes (x i , x j ) is the shortest path of L ij Assuming that N × N shortest paths L ij (i, j=1, . . . , N) is obtained.
[0061] The node distance calculation unit 215 of the distance matrix creation unit 202 calculates the shortest paths L calculated in step S305 in the same manner as in step S206 of FIG. ij The sum of the weights (distance or time) of each edge included in is calculated, and a distance matrix is created in which the sum is the (i, j) component (step S306).
[0062] In this way, in the distance matrix creation process according to the second embodiment, edges are used to connect not only nodes whose Voronoi regions are adjacent, but also nodes that are k-nearest neighbors. As a result, by increasing the value of k, the number of route searches using external map services increases, but it becomes possible to accurately determine the values of the elements of the distance matrix. Note that the case of k=1 corresponds to the first embodiment.
[0063] <Summary> As described above, the inspection plan creation device 10 according to this embodiment utilizes Voronoi division to define nodes whose Voronoi regions are adjacent to each other as adjacent nodes, and calculates the weights of the edges between the adjacent nodes (and further, edges between k-nearest neighbor nodes in Example 2) using an external map service. This makes it possible to reduce the number of route searches using an external map service, and enables the efficient creation of distance matrices.
[0064] Therefore, by using the inspection plan creation device 10 according to this embodiment, it becomes possible to efficiently solve the delivery plan problem by utilizing the distance matrix.
[0065] The present invention is not limited to the above-described specifically disclosed embodiments, and various modifications, changes, and combinations with known technologies are possible without departing from the scope of the claims.
[0066] REFERENCE SIGNS LIST 10 Inspection plan creation device 101 Input device 102 Display device 103 External I / F 103a Recording medium 104 Communication I / F 105 RAM 106 ROM 107 Auxiliary storage device 108 Processor 109 Bus 201 Input unit 202 Distance matrix creation unit 203 Inspection plan creation unit 204 Output unit 211 Voronoi division unit 212 Graph creation unit 213 Edge distance calculation unit 214 Shortest path calculation unit 215 Node distance calculation unit
Claims
1. A distance matrix creation device that creates a distance matrix for solving a delivery planning problem, comprising: a Voronoi division unit that calculates the Voronoi region of each object that is a destination in the delivery planning problem by Voronoi division using location information of the object; a calculation unit that calculates at least the two-way distance or time of edges connecting adjacent nodes whose Voronoi regions connect the objects as nodes, a shortest path calculation unit that calculates the shortest path between any two nodes in a weighted bidirectional graph in which the distance or time is assigned to the edges as weights; and a creation unit that creates a distance matrix using the sum of weights assigned to edges included in the shortest path as the element corresponding to the start point and end point of the shortest path.
2. The distance matrix creation device according to claim 1, wherein the calculation unit calculates the distance or time in both directions of the edge connecting the nodes adjacent to the Voronoi region by using an external service that searches for a path between a node representing one end point of the edge and a node representing the other end point of the edge based on map information.
3. The distance matrix creation device according to claim 1 or 2, wherein the calculation unit calculates the two-way distance or time of an edge connecting the node and a node reached by tracing k (where k is a predetermined integer of 1 or more) edges from the node, in addition to the edge connecting the nodes whose Voronoi regions are adjacent to each other.
4. A distance matrix creation method for creating a distance matrix for solving a delivery planning problem, the distance matrix creation method comprising: a Voronoi division procedure for calculating the Voronoi region of each object that is a destination in the delivery planning problem by Voronoi division using location information of the object; a calculation procedure for calculating at least the two-way distance or time of edges connecting adjacent nodes whose Voronoi regions are connected to the object as nodes; a shortest path calculation procedure for calculating the shortest path between any two nodes in a weighted bidirectional graph in which the distance or time is assigned as a weight to the edge; and a creation procedure for creating a distance matrix in which the sum of weights assigned to edges included in the shortest path is used as the element corresponding to the start point and end point of the shortest path.
Citation Information
Patent Citations
Second-order Voronoi segmentation method and system in obstacle environment
CN117436146A
Method and device for preparing data base, and program storage medium, and speed result information displaying device, and traveling time calculating device, and route retrieving device
JP2001093077A
Patrol route generating device, patrol route generation method, and program
JP2019096100A