An Efficient Algorithm for the Fast Delivery Problem
AAn Efficient Algorithm for the Fast Delivery Problem
Iago A. Carvalho ∗ Thomas Erlebach † Kleitos Papadopoulos ‡ August 20, 2019
Abstract
We study a problem where k autonomous mobile agents are initially located on distinctnodes of a weighted graph (with n nodes and m edges). Each autonomous mobile agent has apredefined velocity and is only allowed to move along the edges of the graph. We are interestedin delivering a package, initially positioned in a source node s , to a destination node y . Thedelivery is achieved by the collective effort of the autonomous mobile agents, which can carryand exchange the package among them. The objective is to compute a delivery schedule thatminimizes the delivery time of the package. In this paper, we propose an O ( kn log n + km ) timealgorithm for this problem. This improves the previous state-of-the-art O ( k m + kn + APSP)time algorithm for this problem, where APSP stands for the running-time of an algorithm forthe All-Pairs Shortest Paths problem. Enterprises, such as DHL, UPS, Swiss Post, and Amazon, are now delivering goods and packagesto their clients using autonomous drones [1, 16]. Those drones depart from a base (which can bestatic, such as a warehouse [14], or mobile, such as a truck or a van [15]) and deliver the packageinto their clients’ houses or in the street. However, packages are not delivered to a client that istoo far from the drone’s base due to the energy limitations of such autonomous aerial vehicles.In the literature, we find some proposals for delivering packages over a longer distance. Oneof them, proposed by Hong, Kuby, and Murray [14], is to install recharging bases in several spots,which allows a drone to stop, recharge, and continue its path. However, this strategy may resultin a delayed delivery, because drones may stop several times to recharge during a single delivery.A manner to overcome this limitation is to use a swarm of drones. The idea of this techniqueis to position drones in recharging bases all over the delivery area. Therefore, a package can bedelivered from one place to another through the collective effort of such drones, which can exchangepackets among them to achieve a faster delivery. One may note that, when not carrying a package,a drone is stationed in its recharging base, waiting for the next package arrival. The problem ofcomputing a package delivery schedule with minimum delivery time for a single package is calledthe
FastDelivery problem [4].We can model the input to the
FastDelivery problem as a graph G = ( V, E ) with | V | = n and | E | = m , with a positive length l e associated with each edge e ∈ E , and a set of k autonomousmobile agents (e. g., autonomous drones) located initially on distinct nodes p , p , . . . , p k of G . Each ∗ Department of Computer Science, Universidade Federal de Minas Gerais, Brazil. E-mail: [email protected],URL: https://iagoac.github.io † Department of Informatics, University of Leicester, England, UK. E-mail: [email protected] ‡ Department of Informatics, University of Leicester, England, UK. E-mail: [email protected] a r X i v : . [ c s . D S ] A ug b a b (a) a b a b (b) Figure 1: (a) Package exchange on a node; (b) package exchange on an edge.agent i has a predefined velocity v i >
0. Mobile agent i can traverse an edge e of the graph in l e /v i time. The package handover between agents can be done on the nodes of the graph or in anypoint of the graph’s edges, as exemplified in Fig. 1. The objective of FastDelivery is to delivera single package, initially located in a source node s ∈ V , to a target node y ∈ V while minimizingthe delivery time T .B¨artschi et al. [4] also consider the case where each agent i is additionally associated witha weight ω i > ω i · l e when traversing edge e . For this model, the totalenergy consumption E of a solution becomes relevant as well, and one can consider the objectiveof minimizing E among all solutions that have the minimum delivery time T (or vice versa), or ofminimizing a convex combination ε · T + (1 − ε ) · E for a given ε ∈ (0 , The problem of delivering packages through a swarm of autonomous drones has been studied inthe literature. The work of B¨artschi et al. [3] considers the problem of delivering packages whileminimizing the total energy consumption of the drones. In their work, all drones have the samevelocity but may have different weights, and the package’s exchanges between drones are restrictedto take place on the graph’s nodes. They show that this problem is NP-hard when an arbitrarynumber of packages need to be delivered, but can be solved in polynomial time for a single package,with complexity O ( k + n ).When minimizing only the delivery time T , one can solve the problem of delivering a singlepackage with autonomous mobile agents with different velocities in polynomial-time: B¨artschi etal. [4] gave an O ( k m + kn + APSP) algorithm for this problem, where APSP stands for the timecomplexity of the All-Pairs Shortest Paths problem.Some work in the literature considered the minimization of both the total delivery time and theenergy consumption. It was shown that the problem of delivering a single package with autonomousagents of different velocities and weights is solvable in polynomial-time when lexicographicallyminimizing the tuple ( E , T ) [5]. On the other hand, it is NP-hard to lexicographically minimizethe tuple ( T , E ) or a convex combination of both parameters [4].A closely related problem is the Budgeted Delivery Problem ( BDP ) [8, 7, 2], in which a packageneeds to be delivered by a set of energy-constrained autonomous mobile agents. In
BDP , the objective2s to compute a route to deliver a single package while respecting the energy constraints of theautonomous mobile agents. This problem in weakly NP-hard in line graphs [8] and strongly NP-hardin general graphs [7]. A variant of this problem is the
Returning Budgeted Delivery Problem ( RBDP ) [2], which has the additional constraint that the energy-constrained autonomous agentsmust return to their original bases after carrying the package. Surprisingly, this new restrictionmakes
RBDP solvable in polynomial time in trees. However, it is still strongly NP-hard even forplanar graphs.
This paper deals with the
FastDelivery problem. We focus on the first objective, i.e. , computingdelivery schedules with the minimum delivery time. We provide an O ( kn log n + km ) time algorithmfor FastDelivery , which is more efficient than the previous O ( k m + kn + APSP) time algorithmfor this problem [4].Preliminaries are presented in Sect. 2. We then describe our algorithm to solve FastDelivery in Sect. 3. The algorithm uses as a subroutine, called once for each edge of G , an algorithm for aproblem that we refer to as FastLineDelivery , which is presented in Sect. 4.
As mentioned earlier, in the
FastDelivery problem we are given an undirected graph G = ( V, E )with n = | V | nodes and m = | E | edges. Each edge e ∈ E has a positive length l e . We assumethat a path can start on a node or in some point in the interior of an edge. Analogously, it canend on another node or in some point in the interior of an edge. The length of a path is equal tothe sum of the lengths of its edges. If a path starts or ends at a point in the interior of an edge,only the portion of its length that is traversed by the path is counted. For example, a path that isentirely contained in an edge e = { u, v } of length l e = 10 and starts at distance 2 from u and endsat distance 5 from u has length 3.We are also given k mobile agents, which are initially located at nodes p , p , . . . , p k ∈ V . Eachagent i has a positive velocity (or speed) v i , 1 ≤ i ≤ k . A single package is located initially (attime 0) on a given source node s ∈ V and needs to be delivered to a given target node y ∈ V .An agent can pick up the package in one location and drop it off (or hand it to another agent) inanother one. An agent with velocity v i takes time d/v i to carry a package over a path of length d .The objective of FastDelivery is to determine a schedule for the agents to deliver the packageto node y as quickly as possible, i.e. , to minimize the time when the package reaches y .We assume that there is at most one agent on each node. This assumption can be justifiedby the fact that, if there were several agents on the same node, we would use only the fastestone among them. Therefore, as already observed in [4], after a preprocessing step running in time O ( k + | V | ), we may assume that k ≤ n .The following lemma from [4] establishes some useful properties of an optimal delivery schedulefor the mobile agents. Lemma 1 (B¨artschi et al., 2018) . For every instance of
FastDelivery , there is an optimumsolution in which ( i ) the velocities of the involved agents are strictly increasing, and ( ii ) no involvedagent arrives on its pick-up location earlier than the package (carried by the preceding agent). Algorithm for the Fast Delivery Problem
B¨artschi et al. [4] present a dynamic programming algorithm that computes an optimum solutionfor
FastDelivery in time O ( k m + kn + APSP) ⊆ O ( k n + n ), where APSP denotes the timecomplexity of an algorithm for solving the all-pairs shortest path problem. In this paper we designan improved algorithm with running time O ( km + kn log n ) ⊆ O ( n ) by showing that the problemcan be solved by adapting the approach of Dijkstra’s algorithm for edges with time-dependenttransit times [9, 11].For any edge { u, v } , we denote by a t ( u, v ) the earliest time for the package to arrive at v if thepackage is at node u at time t and needs to be carried over the edge { u, v } . We refer to the problemof computing a t ( u, v ), for a given value of t that represents the earliest time when the package canreach u , as FastLineDelivery . In Sect. 4, we will show that
FastLineDelivery can be solvedin O ( k ) time after a preprocessing step that spends O ( k log k ) time per node. Our preprocessingcalls PreprocessReceiver ( v ) once for each node v ∈ V \ { s } at the start of the algorithm. Then,it calls PreprocessSender ( u, t ) once for each node u ∈ V , where t is the earliest time whenthe package can reach u . Both preprocessing steps run in O ( k log k ) time per node. Once bothpreprocessing steps have been carried out, a call to FastLineDelivery ( u, v, t ) computes a t ( u, v )in O ( k ) time.Algorithm 1 shows the pseudo-code for our solution for FastDelivery . Initially, we runDijkstra’s algorithm to solve the single-source shortest paths problem for each node where an agentis located initially (line 2). This takes time O ( k ( n log n + m )) if we use the implementation ofDijkstra’s algorithm with Fibonacci heaps as priority queue [12] and yields the distance d ( p i , v )(with respect to edge lengths l e ) between any node p i where an agent is located and any node v ∈ V . From this we compute, for every node v , the earliest time when each mobile agent canarrive at that node: The earliest possible arrival time of agent i at node v is a i ( v ) = d ( p i , v ) /v i .Then, we create a list of the arrival times of the k agents on each node (line 3). For each node,we sort the list of the k agents by ascending arrival time in O ( k log k ) time, or O ( nk log k ) in totalfor all nodes. We then discard from the list of each node all agents that arrive at the same timeor after an agent that is strictly faster. If several agents with the same velocity arrive at the sametime, we keep one of them arbitrarily. Let A ( v ) denote the resulting list for node v . Those listswill be used in the solution of the FastLineDelivery problem described in Sect. 4.For each node v , we maintain a value dist ( v ) that represents the current upper bound on theearliest time when the package can reach v (lines 5 and 6). The algorithm maintains a priorityqueue containing nodes that have a finite dist value, with the dist value as the priority (line 8). Ineach step, a node u with minimum dist value is removed from the priority queue (lines 10 and 11),and the node becomes final (line 12). Nodes that are not final are called non-final . The dist valueof a final node will not change any more and represents the earliest time when the package canreach the node (line 16). After u has been removed from the priority queue, we compute for eachnon-final neighbor v of u the time a t ( u, v ), where t = dist ( u ), by solving the FastLineDelivery problem (line 19). If v is already in Q , we compare a t ( u, v ) with dist ( v ) and, if a t ( u, v ) < dist ( v ),update dist ( v ) to dist ( v ) = a t ( u, v ) and adjust the priority of v in Q accordingly (line 23). On theother hand, if v is not yet in Q , we set dist ( v ) = a t ( u, v ) and insert v into Q (line 25).Let t s be the earliest time when an agent reaches s (or 0, if an agent is located at s initially).Let i (cid:48) be that agent. As the package must stay at s from time 0 to time t s , we can assume that i (cid:48) brings the package to s at time t s . Therefore, we initially set dist ( s ) = t s and insert s into thepriority queue Q with priority t s . The algorithm terminates when y becomes final (line 14) andreturns the value dist ( y ), i.e. , the earliest time when the package can reach y . The schedule thatdelivers the package to y by time dist ( y ) can be constructed in the standard way, by storing for each4 lgorithm 1: Algorithm for
FastDelivery
Data: graph G = ( V, E ) with positive edge lengths l e and source node s ∈ V , target node y ∈ V ; k agents with velocity v i and initial location p i for 1 ≤ i ≤ k Result: earliest arrival time dist ( y ) for package at destination begin compute d ( p i , v ) for 1 ≤ i ≤ k and all v ∈ V ; construct list A ( v ) of agents in order of increasing arrival times and velocities for each v ∈ V ; PreprocessReceiver ( v ) for all v ∈ V \ { s } ; dist ( s ) ← t s ; /* time when first agent reaches s */ dist ( v ) ← ∞ for all v ∈ V \ { s } ; final ( v ) ← false for all v ∈ V ; insert s into priority queue Q with priority dist ( s ); while Q not empty do u ← node with minimum dist value in Q ; delete u from Q ; final ( u ) ← true; if u = y then break; end t ← dist ( u ); /* time when package reaches u */ PreprocessSender ( u, t ); forall neighbors v of u with final ( v ) = false do a t ( u, v ) ← FastLineDelivery ( u, v, t ); if a t ( u, v ) < dist ( v ) then dist ( v ) ← a t ( u, v ); if v ∈ Q then decrease priority of v to dist ( v ); else insert v into Q with priority dist ( v ); end end end end return dist ( y ); end node v the predecessor node u such that dist ( v ) = a dist ( u ) ( u, v ) and the schedule of the solution to FastLineDelivery ( u, v, dist ( u )). Theorem 2.
Algorithm 1 runs in O ( kn log n + km ) time and computes an optimal solution to the FastDelivery problem.Proof.
First, we note that it is easy to see that a t ( u, v ) ≤ a t (cid:48) ( u, v ) holds for t (cid:48) ≥ t in our setting:If the package arrives at u at time t and if we had a t (cid:48) ( u, v ) < a t ( u, v ) for some t (cid:48) > t , the packagecould simply wait at u until time t (cid:48) and then get transported to v in the same way as if it hadreached u at time t (cid:48) . The package would reach v at time a t (cid:48) ( u, v ), contradicting the assumption5hat a t (cid:48) ( u, v ) < a t ( u, v ). Thus, the network has the FIFO property (or non-overtaking property),and it is known that the modified Dijkstra algorithm is correct for such networks [11].Furthermore, we can observe that concatenating the solutions of FastLineDelivery (whichare computed by Algorithm 4 in Sect. 4 and which are correct by Theorem 3 in Sect. 4) over theedges of the shortest path from s to y determined by Algorithm 1 indeed gives a feasible solution to FastDelivery : Assume that the package reaches u at time t while being carried by agent i and isthen transported from u to v over edge { u, v } , reaching v at time a t ( u, v ). The only agents involvedin transporting the package from u to v in the solution returned by FastLineDelivery ( u, v, t )will have velocity at least v i because agent i arrives at u before time t , i.e. , a i ( u ) ≤ t , and henceno slower agent would be used to transport the package from u to v . These agents have not beeninvolved in transporting the package from s to u by property (i) of Lemma 1, except for agent i who is indeed available at node u from time t .The running time of the algorithm consists of the following components: Computing standardshortest paths with respect to the edge lengths l e from the locations of the agents to all other nodestakes O ( k ( n log n + m )) time. The time complexity of the Dijkstra algorithm with time-dependenttransit times for a graph with n nodes and m edges is O ( n log n + m ). The only extra work performedby our algorithm consists of O ( k log k ) pre-processing time for each node and O ( k ) time per edge forsolving the FastLineDelivery problem, a total of O ( nk log k + mk ) = O ( kn log n + km ) time. In this section we present the solution to
FastLineDelivery that was used as a subroutine in theprevious section. We consider the setting of a single edge e = { u, v } with end nodes u and v . Theobjective is to deliver the package from node u to node v over edge e as quickly as possible. In ourillustrations, we use the convention that v is drawn on the left and u is drawn on the right. Weassume that the package reaches u at time t (where t is the earliest possible time when the packagecan reach u ) while being carried by agent i .As discussed in the previous section, let A ( v ) = ( a , a , . . . , a (cid:96) ) be the list of agents arriving atnode v in order of increasing velocities and increasing arrival times. For 1 ≤ i ≤ (cid:96) , denote by t i the time when a i reaches v , and by v i the velocity of agent a i . We have t i < t i +1 and v i < v i +1 for1 ≤ i < (cid:96) .Let B ( u ) = ( b , b , . . . , b r ) be the list of agents with increasing velocities and increasing arrivaltimes arriving at node u , starting with the agent i whose arrival time is set to t . The list B ( u )can be computed from A ( u ) in O ( k ) time by discarding all agents slower than i and setting thearrival time of i to t . For 1 ≤ i ≤ r , let t (cid:48) i denote the time when b i reaches w , and let v (cid:48) i denotethe velocity of b i . We have t (cid:48) i < t (cid:48) i +1 and v (cid:48) i < v (cid:48) i +1 for 1 ≤ i < r .As k is the total number of agents, we have (cid:96) ≤ k and r ≤ k . In the following, we first introducea geometric representation of the agents and their potential movements in transporting the packagefrom u to v (Sect. 3) and then present the algorithm for FastLineDelivery (Sect. 4.2).
Figure 2 shows a geometric representation of how agents a , . . . , a (cid:96) move towards u if they start tomove from v to u immediately after they arrive at v . The vertical axis represents time, and thehorizontal axis represents the distance from v (in the direction towards u or, more generally, anyneighbor of v ). The movement of each agent a i can be represented by a line with the line equation y = t i + x/v i ( i.e. , the y value is the time when agent a i reaches the point at distance x from v ).After an agent is overtaken by a faster agent, the slower agent is no longer useful for picking up the6 towards u time v towards u time Figure 2: Geometric representation of agents moving from v towards u (left), and their relevantarrangement with removed half-lines shown dashed (right)package and returning it to v , so we can discard the part of the line of the slower agent that lies tothe right of such an intersection point with the line of a faster agent. After doing this for all agents(only the fastest agent a (cid:96) does not get overtaken and will not have part of its line discarded), weobtain a representation that we call the relevant arrangement Ψ of the agents a , . . . , a (cid:96) . In therelevant arrangement, each agent a i is represented by a line segment that starts at (0 , t i ), lies onthe line y = t i + x/v i , and ends at the first intersection point between the line for a i and the lineof a faster agent a j , j > i . For the fastest agent a (cid:96) , there is no faster agent, and so the agent isrepresented by a half-line. One can view the relevant arrangement as representing the set of allpoints where an agent from A ( v ) travelling towards u could receive the package from a slower agenttravelling towards v .The relevant arrangement has size O ( k ) because each intersection point can be charged tothe slower of the two agents that create the intersection. It can be computed in O ( k log k ) timeusing a sweep-line algorithm very similar to the algorithm by Bentley and Ottmann [6] for linesegment intersection. The relevant arrangement is created by a call to PreprocessReceiver ( v )(see Algorithm 2). Algorithm 2:
Algorithm
PreprocessReceiver ( v ) Data:
Node v (and list A ( v ) of agents arriving at v ) Result:
Relevant arrangement Ψ Create a line y = t i + x/v i for each agent a i in A ( v ); Use a sweep-line algorithm (starting at x = 0, moving towards larger x values) to constructthe relevant arrangement Ψ;For the agents in the list B ( u ) = ( b , . . . , b r ) that move from u towards v , we use a similarrepresentation. However, in this case we only need to determine the lower envelope of the linesrepresenting the agents. See Fig. 3 for an example. The lower envelope L can be computed in O ( k log k ) time (e.g., using a sweep-line algorithm, or via computing the convex hull of the pointsthat are dual to the lines [10, Sect. 11.4]). The call PreprocessSender ( u, t ) (see Algorithm 3)determines the list B ( u ) from A ( u ) and t in O ( k ) time and then computes the lower envelope ofthe agents in B ( u ) in time O ( k log k ). When we consider a particular edge e = { u, v } , we place7 lgorithm 3: Algorithm
PreprocessSender ( u, t ) Data:
Node u (and list A ( u ) of agents arriving at u ), time t when package arrives at u (carried by agent i ) Result:
Lower envelope L of agents carrying package away from u B ( u ) ← A ( u ) with agents slower than i removed and arrival time of i set to t ; Create a line y = t (cid:48) i − x/v (cid:48) i for each agent b i in B ( v ); Use a sweep-line algorithm (starting at x = 0, moving towards smaller x values) to constructthe lower envelope L ; timetowards v tu Figure 3: Geometric representation of agents moving from u towards v (lower envelope marked inred)the lower envelope L in such a way that the position on the x -axis that represents u is at x = l e .We say in this case that the lower envelope is anchored at x = l e . Algorithm 3 creates the lowerenvelope anchored at x = 0, and the lower envelope anchored at x = l e can be obtained by shiftingit right by l e . Assume we have computed the relevant arrangement Ψ of the agents in the list A ( v ) = ( a , . . . , a (cid:96) )and the lower envelope L of the lines representing the agents in the list B ( u ) = ( b , b , . . . , b r ).The lower envelope L of the agents in B ( u ) represents the fastest way for the package to betransported from u to v if only agents in B ( u ) contribute to the transport and these agents movefrom u towards v as quickly as possible. At each time point during the transport, the package isat the closest point to v that it can reach if only agents in B ( u ) travelling from u to v contributeto its transport. We say that such a schedule where the package is as close to v as possible at alltimes is fastest and foremost (with respect to a given set of agents).The agents in A ( v ) can potentially speed up the delivery of the package to v by travellingtowards u , picking up the package from a slower agent that is currently carrying it, and thenturning around and moving back towards v as quickly as possible. By considering intersections8etween L and the relevant arrangement Ψ of A ( v ), we can find all such potential handover points.More precisely, we trace L from u ( i.e. , x = d ( u, v )) towards v ( i.e. , x = 0). Assume that q is thefirst point where a handover is possible. If a faster agent j from A ( v ) can receive the package froma slower agent i at point q of L , we update L by computing the lower envelope of L and the half-linerepresenting the agent j travelling from point q towards v . If the intersection point is with an agent j from A ( v ) that is not faster than the agent i that is currently carrying the package, we ignorethe intersection point. We then continue to trace L towards v and process the next intersectionpoint in the same way. We repeat this step until we reach v ( i.e. , x = 0). The final L representsan optimum solution to the FastLineDelivery problem, and the y -value of L at x = 0 representsthe arrival time of the package at v . See Algorithm 4 for pseudo-code of the resulting algorithm. Algorithm 4:
Algorithm
FastLineDelivery ( u, v, t ) Data:
Edge e = { u, v } , earliest arrival time t of package at u , lists A ( u ) and A ( v ) Result:
Earliest time when package reaches v over edge { u, v } /* Assume PreprocessReceiver ( v ) and PreprocessSender ( u, t ) have already beencalled. */ L ← lower envelope of agents B ( u ) anchored at x = l e ; Ψ ← relevant arrangement of A ( v ); start tracing L from u ( i.e. , x = l e ) towards v ( i.e. , x = 0); while v (i.e., x = 0 ) is not yet reached do q ← next intersection point of L and Ψ; /* assume q is intersection of agent i from L and agent j from Ψ */ if v j > v i then replace L by the lower envelope of L and the line for agent j moving left from point q ; else ignore q end end return y -value of L at x = 0An illustration of step 7 of Algorithm 4, which updates L by incorporating a faster agent from A ( v ), is shown in Fig. 4. Note that the time for executing this step is O ( g ), where g is the numberof segments removed from L in the operation. As a line segment corresponding to an agent canonly be removed once, the total time spent in executing step 7 (over all executions of step 7 whilerunning Algorithm 4) is O ( k ).Finally, we need to analyze how much time is spent in finding intersection points with linesegments of the relevant arrangement Ψ while following the lower envelope L from u to v . SeeFig. 5 for an illustration. We store the relevant arrangement using standard data structures forplanar arrangements [13], so that we can follow the edges of each face in clockwise or counter-clockwise direction efficiently ( i.e. , we can go from one edge to the next in constant time) and movefrom an edge of a face to the instance of the same edge in the adjacent face in constant time. Thisrepresentation also allows us to to trace the lower envelope of Ψ in time O ( k ).First, we remove from Ψ all line segments corresponding to agents that are not faster than i (recall that i is the agent that brings the package to node u at time t ). Then, in order to find thefirst intersection point q between L and Ψ, we can trace L and the lower envelope of Ψ from u towards v in parallel until they meet. One may observe that L cannot be above the lower envelopeof Ψ at u because otherwise an agent faster than i reaches u before time t , and that agent could9 q (cid:48) ijj i time u towards v t qq (cid:48) j i time u towards v t Figure 4: Agent i meets a faster agent j at intersection point q (left). The part of L from q to q (cid:48) has been replaced by a line segment representing agent j carrying the package towards v (right).pick up the package from i before time t and deliver it to u before time t , a contradiction to t being the earliest arrival time for the package at u . This takes O ( k ) time. After computing oneintersection point q i (and possibly updated L as shown in Fig. 4), we find the next intersectionpoint by following the edges on the inside of the next face in counter-clockwise direction until wehit L again at q i +1 . This process is illustrated by the blue arrow in Fig. 5, showing how q is foundstarting from q . Hence, the total time spent in finding intersection points is bounded by the initialsize of L and the number of edges of all the faces of the relevant arrangement, which is O ( k ). v q q q q f L time ut Figure 5: Intersection points q , q , q , q between the lower envelope L (red) and the relevantarrangement Ψ. Point q is found from q by simultaneously tracing L and the edges of the face f of Ψ in counter-clockwise direction. Theorem 3.
Algorithm 4 solves
FastLineDelivery ( u, v, t ) and runs in O ( k ) time, provided that PreprocessReceiver ( v ) and PreprocessSender ( u, t ) , which take time O ( k log k ) each, havealready been executed. roof. The claimed running time follows from the discussion above. Correctness follows by observ-ing that the following invariant holds: If the algorithm has traced L up to position ( x , y ), thenthe current L represents the fastest and foremost solution for transporting the package from u to v using only agents in B ( u ) and agents from A ( v ) that can reach the package by time y . Acknowledgments
Iago A. Carvalho was financed in part by the Coordena¸c˜ao de Aperfei¸coamento de Pessoal de N´ıvelSuperior - Brasil (CAPES) - Finance Code 001.
References [1] Dane Bamburry. Drones: Designed for product delivery.
Design Management Review , 26(1):40–48, 2015.[2] Andreas B¨artschi, J´er´emie Chalopin, Shantanu Das, Yann Disser, Barbara Geissmann, DanielGraf, Arnaud Labourel, and Mat´uˇs Mihal´ak. Collaborative delivery with energy-constrainedmobile robots.
Theoretical Computer Science , :, 2017. doi:10.1016/j.tcs.2017.04.018 .[3] Andreas B¨artschi, J´er´emie Chalopin, Shantanu Das, Yann Disser, Daniel Graf, Jan Hackfeld,and Paolo Penna. Energy-efficient delivery by heterogeneous mobile agents. In , volume 66 of
LIPIcs , page 10.Schloss Dagstuhl, Leibniz-Zentrum f¨ur Informatik, 2017. doi:10.4230/LIPIcs.STACS.2017.10 .[4] Andreas B¨artschi, Daniel Graf, and Mat´us Mihal´ak. Collective fast delivery by energy-efficient agents. In Igor Potapov, Paul Spirakis, and James Worrell, editors, , vol-ume 117 of
LIPIcs , pages 56:1–56:16. Schloss Dagstuhl–Leibniz-Zentrum f¨ur Informatik, 2018. doi:10.4230/LIPIcs.MFCS.2018.56 .[5] Andreas B¨artschi and Thomas Tschager. Energy-efficient fast delivery by mobile agents.In
International Symposium on Fundamentals of Computation Theory (FCT 2017) , volume10472 of
Lecture Notes in Computer Science , pages 82–95. Springer, 2017. doi:10.1007/978-3-662-55751-8_8 .[6] Jon Louis Bentley and Thomas Ottmann. Algorithms for reporting and counting geometricintersections.
IEEE Trans. Computers , 28(9):643–647, 1979. doi:10.1109/TC.1979.1675432 .[7] J´er´emie Chalopin, Shantanu Das, Mat´uˇs Mihal´ak, Paolo Penna, and Peter Widmayer. Datadelivery by energy-constrained mobile agents. In
International Symposium on Algorithms andExperiments for Sensor Systems, Wireless Networks and Distributed Robotics (ALGOSEN-SORS 2013) , volume 8243 of
Lecture Notes in Computer Science , pages 111–122. Springer,2013. doi:10.1007/978-3-642-45346-5_9 .[8] J´er´emie Chalopin, Riko Jacob, Mat´uˇs Mihal´ak, and Peter Widmayer. Data delivery by energy-constrained mobile agents on a line. In , volume 8573 of
Lecture Notes in Computer Science , pages423–434. Springer, 2014. doi:10.1007/978-3-662-43951-7_36 .119] K. Cooke and E. Halsey. The shortest route through a network with time-dependent internodaltransit times.
Journal of Mathematical Analysis and Applications , 14(3):493–498, 1966.[10] Mark de Berg, Otfried Cheong, Marc J. van Kreveld, and Mark H. Overmars.
Computationalgeometry: Algorithms and applications, 3rd Edition . Springer, 2008.[11] Daniel Delling and Dorothea Wagner. Time-dependent route planning. In Ravindra K. Ahuja,Rolf H. M¨ohring, and Christos D. Zaroliagis, editors,
Robust and Online Large-Scale Opti-mization: Models and Techniques for Transportation Systems , volume 5868 of
Lecture Notesin Computer Science , pages 207–230. Springer, 2009. doi:10.1007/978-3-642-05465-5_8 .[12] Michael L. Fredman and Robert Endre Tarjan. Fibonacci heaps and their uses in improvednetwork optimization algorithms.
J. ACM , 34(3):596–615, 1987. doi:10.1145/28869.28874 .[13] M.T. Goodrich and K. Ramaiyer. Geometric data structures. In J.-R. Sack and J. Urrutia,editors,
Handbook of Computational Geometry , pages 463–489. Elsevier Science, 2000.[14] Insu Hong, Michael Kuby, and Alan Murray. A deviation flow refueling location model forcontinuous space: A commercial drone delivery system for urban areas. In
Advances in Geo-computation , pages 125–132. Springer, 2017.[15] Chase C Murray and Amanda G Chu. The flying sidekick traveling salesman problem: Op-timization of drone-assisted parcel delivery.
Transportation Research Part C: Emerging Tech-nologies , 54:86–109, 2015.[16] Amit Regev. Drone deliveries are no longer pie in the sky, Apr 2018.URL: