Databases Reference
In-Depth Information
Figure 5-15. Sample of the Global Post network
In the production data, nodes are connected by multiple relationships, each of which is
timestamped with a start_date and end_date property. Relationships are of two types:
CONNECTED_TO , which connect parcel centers and delivery bases, and DELIVERY_ROUTE ,
which connect delivery bases to delivery areas, and delivery areas to delivery segments.
These two different types of relationships effectively partition the graph into its upper
and lower parts, which, as we'll see shortly, provides for efficient traversals. Figure 5-16
shows three of the timestamped CONNECTED_TO relationships connecting a parcel center
to a delivery base.
Route calculation
As described in the previous section, the CONNECTED_TO and DELIVERY_ROUTE relation‐
ships partition the graph into upper and lower parts, with the upper parts made up of
complexly connected parcel centers and delivery centers, the lower parts of delivery
bases, delivery areas, and delivery segments organized—for any given period—in simple
tree structures.
Route calculations involve finding the cheapest route between two locations in the lower
portions of the graph. The starting location is typically a delivery segment or delivery
area, whereas the end location is always a delivery segment (indexed, as we discussed
earlier, by its delivery units). Irrespective of the start and end locations, the calculated
route must go via at least one parcel center in the upper part of the graph.
 
Search WWH ::




Custom Search