A Formal Semantics for Multiple Vehicle Task and ... - Semantic Scholar

0 downloads 0 Views 198KB Size Report
and, at present, there appear to be no clearly supe- ... noeuvre on the roadway with no risk of collision. In addition ... oating trace of xed duration but without a se-.
A Formal Semantics for Multiple Vehicle Task and Motion Planning Neil Rugg-Gunn and Stephen Cameron Department of Engineering Science and Computing Laboratory University of Oxford U.K. fnrg,[email protected]

Abstract

time windows, and each then allocated to a vehicle. The Operations Research community have developed wide ranging methods for such problems [?, ?, ?], with Linear Programming formulations predominating. Secondly, paths for vehicles must be planned through an environment which include few external dynamic obstacles and large numbers of other moving vehicles. This approach has led to several methods for planning robot motions within a dynamic workspace. Centralised, or global, strategies have proved intractable for signi cant eet sizes, while localised strategies are able to successfully determine paths in `fairly' static environments [?, ?], however, they often deadlock in vehicle-vehicle interactions. The proposal of this paper is to develop a central controller that separates the vehicles and guarantees they will be unable to cause interference. This separation permits the use of ecient localised single vehicle path planners to re ne the `coarse' paths determined by the controller. A central controller need only generate coarse routes with reference to the hazard areas, over which it can maintain strict control. Software onboard each vehicle may then perform any local obstacle avoidance during execution of the route. Centralised motion planning has, therefore, been e ectively abstracted to a series of related hazard allocations .

The application of autonomous guided vehicles to well-structured industrial sites requires considerably more than a path planning algorithm onboard each vehicle. Issues such as task planning, vehicle routing and vehicle-vehicle interactions predominate in determining the overall system ability. We exhibit a mathematical model of a multiple vehicle system, which has similarities to the Timed Traces models developed to reason about parallel processes. A denotational semantics is derived from this model, ascribing meaning to a simple language of service operations and concurrent path planning. This semantics captures a complete description of vehicles' behaviour, which can provide a global planning strategy guaranteeing both satis ability and liveness.

1 Introduction

The problems of organising a eet of autonomous vehicles within a single factory-like environment are addressed. Many such systems are now in place within industry, each with its own vehicle to task assignment heuristic, vehicle routing strategy, oor layout and collision avoidance scheme. These areas, dicult in their own right, are also clearly coupled and, at present, there appear to be no clearly superior methods. We, therefore, propose a formal model with which to examine the underlying structure of the problem, and analytically compare the solution methodologies currently used. The speci c problem under consideration is to assign tasks and determine paths for a predetermined number of homogeneous vehicles servicing a set of tasks which comprise pickup and delivery of a single unit of material. The pickup and delivery points are speci ed by both a time interval and a single location, and the vehicles are limited to capacities of one unit. Firstly, tasks must be scheduled within

Environment

The simpli cation of the workspace is essential to reduce the complexity of the model used within the central controller. For many factory domains with narrow corridors and few open spaces, this reduction is straightforward, as the vehicles' working environment, , may be considered a connected and directed graph G = (N ; E ), modelling the physical intersections as nodes, N , and the roadways as edges, E . Bidirectional two lane roads are readily separated into two edges, and bidirectional single lane 1

edge exists between any 2 nodes, by specifying that a vehicle is to travel directly from the current node to the next node implies a unique edge. Routes are, therefore, represented as a sequence of nodes with associated time allocations (the time period the vehicle is potentially passing over the node). The sequence is time ordered, e.g., a trace h(L; [0 ; 1 )); (TA; [6 ; 7 )); (A; [8 ; 11 ))i describes a vehicle travelling from L to A via TA .

roads can be modelled using intermediate `pseudo'nodes. Cycles may freely occur in the graph; however, there may be at most one (directed) edge between any two nodes, i.e., for an n -node graph there are at most n incoming and n outgoing edges at each node. The set of outgoing edges from node is denoted by  ( ). Figure ?? shows a portion of a manufacturing facility comprising two main roadways sandwiching three workcells. Positions A,B and C mark the loading and unloading bays, which may be approached from either direction. E

L

TA

TB

TC

A

B

C

BA

BB

BC

Syntax

The language for describing task allocation currently consists of two constructs: P ::= ( 1 ; 1 ) ; ( 2 ; 2 ) j P kP

R

The rst speci es a task starting at node 1 somewhere in the time interval 1 , completing at node 2 during the time interval 2 . The only assumption made about the connecting route is the obvious time constraint. The second construct denotes a process composed of two processes operating simultaneously, but never interacting. This language is sucient to de ne a set of timed tasks within a single environment and require that the vehicles' schedules for these tasks ful ll both the routing and timing constraints, and guarantee spatial separation of the vehicles as they move through the domain. The next section of the paper describes a mathematical framework, based on the Timed Communicating Sequential Processes model [?]. We then show how tasks may be represented within this model by assigning a semantics to the language. Finally, examples are discussed together with the concluding remarks.

Figure 1: Map of a Factory Section. The graph for gure ??, including scaled time costs, is shown in gure ??. Both nodes and edges have time costs associated with them: Edge times costs are simply the target time,  ( 1 ; 2 ), taken to navigate the roadway from node 1 to node 2 (which is not necessarily the minimum travel time); While node time costs,  ( ), includes an entry and exit safety margin in addition to the nominal navigation time. This safety margin must also include time to allow two vehicles following the same path to manoeuvre on the roadway with no risk of collision. In addition, the environment incorporates timing information on the service duration for each node. This service period is assumed necessary at both ends of service operations, and is denoted by  ( ) for 2 The Semantic Model Vehicle movement within the environment is reprenode . sented by a nite sequence of timed resource alloTgA 3 -TgB 3 -TgC cations arranged in chronological order, known as >  Z 6 6 6 5 a timed trace. Each allocation, or event, is a pair 1 1 1 1Z 5 1 1 Z  ( ;  ) indicating the node, , and the time interC g? Z B g? A g? Lg ~1 Rg val,  , during which 1 3 3 3 the resource is required. Time >  ZZ 6 6 6 delays between events correspond to the duration of 1 1 1 1 1 1 5 Z5 ZZ travel over the connecting edges, and the whole trace ~ g? 3 - g? 3 - g? is xed with reference to an imaginary global clock, BC BB BA enabling timewise comparisons between traces. A useful abstraction used later removes the obligation Figure 2: Graph description of the environment. to synchronise with the global clock, providing a

oating trace of xed duration but without a seVehicles quence start time. A further abstraction is possible Vehicles in this environment traverse both nodes by withdrawing all time constraints from the trace, and edges, however, since at most one directed leaving a route which comprises a sequence of nodes. T

D

S

2

Notation

Timewise Addition

From the set of nodes, N , in the environment graph, we de ne T N as the set of all timed node allocations, or events, and T N6 as the set of all timed traces. These times are taken from TINT, the set of all half-open intervals within the time domain [0 ; 1), denoted by TIME:

Many trace operations require delays to be inserted at arbitrary events. The operator + allows timewise addition to trace events: hi + t = hi h( ; [b ; e ))ias + t = h( ; [b + t ; e + t ))ia(s + t )

b b b b

b b

Wait

T N = N  TINT T N6 = fs 2 T N j (a ;  ) precedes (a 0 ;  0) in s ) start ( ) 6 start ( 0 )g TINT = f[b ; e ) j 0 6 b < e < 1g TST = P T N6

The wait operator delays the completion time of the initial event in the oating trace. In restricting the operator scope to oating traces, the problems of assigning meaning for simultaneous events are avoided. hiwait t = hi Vehicle schedules are represented in the model by elements of TST , the space of sets of Timed Traces [?]. h( ; [b ; e ))iaswait t = h( ; [b ; e + t ))ia(s + t ) To facilitate reasoning of these schedules through algebraic manipulation, the language of set and se- During quence theory has been used, together with the no- The during operator, ", returns a maximal trace tation from [?], which de nes: containing events with times that are also within a given interval. the empty trace hi hi "  = hi a and trace concatenation h( ;  )ias "  = s " ; if  \  = fg a(s "  ); o/w = h ( ;  \  ) i Other simple operators have been de ned on time intervals, timed events, and timed traces to enhance where 1 \ 1 denotes interval intersection. This readability of the semantics as described later. operator returns either the interval bounded by the maximumof the two in ma and the minimum of the two suprema, or the empty set if this would generate Times an interval not in TINT. The during operator may The times operator enables the central controller to also be used with single times instead of intervals, locate vehicles temporally; it determines the set of with the same result as for [t ; t ]. time values when a trace has allocated resources:

b b

bb b

Restriction

b

times (s ) = f j 9  ( ;  ) 2 s g

Timed traces may be restricted to include only those resources speci ed by a given set; such a restriction This operator may be used to de ne the start and is denoted by tr N . Relative trace order is preserved end times of timed traces, to indicate the times at along with timing information. which the rst event starts and the last event has hi  N = hi completed, respectively: h( ;  )ias  N = h( ;  )ia(s  N ); if 2 N = s N; otherwise start (s ) = inf(times (s )) end (s ) = sup(times (s )) Equivalence and Closure Both the sets of oating traces and timed traces have A duration operator may also be de ned as the equivalence classes. Floating traces are chronologilength of time for which a trace is active: cally ordered sequences with events speci ed only in relative time. Further, no two events may start siduration (s ) = end (s ) ? start (s ) multaneously, producing a unique ordering. A suitable equivalence relation de nition is The operator also has a valid meaning for oating traces, where it may be de ned as end (s ). u = v , 9 t : TIME  (u + t = v ) _ (u = v + t )

bb b

b b

b

3

R( 1 ; 2 ) denotes the set of minimal oating traces satisfying the motion condition of starting at node 1 and terminating at node 2 . To these timed routes, it is necessary to add the service times:   C 1 ; 2  = f(h 1 ias a(h 2 iwait  ( 2 ))) wait  ( 1 ) j h 1 ias ah 2 i 2 R( 1 ; 2 )g From this, an expanded set of oating traces is formed comprising all possible traces of behaviour which will satisfy the relative timing constraints:   T ( 1 ; 1 ) ; ( 2 ; 2 )  = fExb ?a ?end (c) (c ) j c 2 C ( 1 ; 2 ); (a ; b ) 2 1  2  b ? a > end (c )g The trace expansion function, Ext adds delay t to all node combinations, achieving a timewise increase in trace length, accommodating the required time constraints within the route. Each oating trace in  T ( 1 ; 1 ) ; ( 2 ; 2 )  ful lls the predicate:   8 tr 2 T ( 1 ; 1 ) ; ( 2 ; 2 )   (9 t1 ; t2 : TIME j t1 2 1 ^ t2 2 2  duration (tr ) = t2 ? t1 ) that there is at least one valid start and end time separated by the duration of the trace. Furthermore, the converse is also true: 8 t1 ; t2 : TIME j t1 2 1 ; t2 2 2   (9 tr 2 T ( 1 ; 1 ) ; ( 2 ; 2 )   duration (tr ) = t2 ? t1 ) i.e., that all valid traces are represented in the semantic set. The de nition of the expand function, Ext places departure delays on each trace event, subject to a maximum total delay t : Ext he1 ; e2 ; . . . ; en i = fhe1 ia(. . .(hen iwait dn ) . . .)wait d1

This relation may be used to de ne a closure operator on sets of oating traces: CL= (S ) = fu 2 T N j 9 v 2 S  u  = vg Timed traces are xed with respect to a global clock, voiding the time equivalence of the oating traces, however, simultaneous events may occur giving rise to the equivalence relation: u = v , u is a permutation of v which is a sucient condition, as equivalent traces may only permute the order of simultaneous events. An identical closure exists for sets of timed traces.

b

S

S

b

3 A Semantic Function

We give a semantics to the language de ned by P ::= ( 1 ; 1 ) ; ( 2 ; 2 ) j P kP

 

b

and use F P to denote the semantics of term P , which may be evaluated as follows.

Service

The service operator, ;, introduces a job description into the process; the expression ( 1 ; 1 ) ; ( 2 ; 2 ) denotes a process which must service node 1 no earlier than start (1 ) and must have completed by end (1 ). An arbitrary route connecting node 1 with node 2 is implicit in the operator, followed by a second service at node 2 , again, starting no earlier than start (2 ) and completing before end (2 ). This is not to say that events 1 and 2 cannot continue beyond end (1 ), or start before start (2 ), only that any such extended time is not part of the service time. We initially generate the set of possible routes from 1 to 2 , based on the route map, E , and associated transportation costs de ned in environn ment D : j di 2 [0 ; t ]  di = t g R( 1 ; 2 ) = fcost (h 1 ias )g i =1 where s 2 R( ( 1 ) ; 2 ); if 1 6= 2 The timed traces semantics for the service operator can now be given: s 2 fhig [ R( ( 1 ) ; 2 ); if 1 = 2   R(f 1 ; 2 ; . . . ; n g ; m ) = R( i ; m ) F ( 1 ; 1 ) ; ( 2 ; 2 )  =   i 2f1 ...n g ftr j tr 2 CL= (T ( 1 ; 1 ) ; ( 2 ; 2 ) ) where  start (1 ) 6 start (tr ) 6 end (1 ) ?  ( 1 ) ^ start (2 ) +  ( 2 ) 6 end (tr ) 6 end (2 )g cost (hi) = hi A valid timed trace must complete by the end of the cost (h i) = h( ; [0 ; 0 ))iwait  ( ) service interval, 2 , having previously acquired the cost (h 1 ; 2 ias ) = (h( 1 ; [0 ; 0 )ia((h 2 ias ) + resource for a time of at least  ( 2 ) within this  ( 1 ; 2 )))wait  ( 1 ) interval. E

b X

b

b[

E

b b b

b

S

S

D

S

T

D

4

Parallel

function can be separately applied for each vehicle, which yields a single route starting at any time, and arriving at the destination node at least 15 time units later. The parallel operator selects a trace from each vehicle semantic set and, if the node allocations are non-intersecting, timewise interleaves the events. This forces one vehicle to follow the other through the corridor c to d .

The parallel operator allows two processes to evolve simultaneously, and insists that they cooperate on every event that either performs. The cooperation di ers from that given in [?], where both processes must perform the same actions in lockstep, as we wish to ensure that resources are exclusively allocated. Cooperation, therefore, demands that both processes may not hold the same resource at any time. As a result, any timed trace of the process

a

@3 @@Rc  3?? b?

P kQ

will be an interleaving of two traces, one from each component process. Trace interleavings require timed trace equivalences, as events may be started simultaneously, and so may appear in any order within the trace. Further, traces may not simply be concatenated as this need not be a valid trace. Instead, we specify that the interleaved trace has the same behaviour at any given time as each of the component traces:

5

?3? d -?@ @3@R

e

f

Figure 3: Environment Graph with edge travel times. Node timings are 1 unit The second example is taken from the industrial setting shown in gure ??. The environment graph of gure ?? was used to determine the node allocations of 5 vehicles which arrive at node L in consecutive timesteps and are required to service one of the machines at A, B or C . Figure ?? shows one possible sequence of node allocations, selected to minimise the time during which the machines must be available. The graph nodes are labelled vertically, with each allocation labelled with the vehicle number. Travel times may be determined from the time di erence between like numbered allocations, and added delays are shown as a second, continuing allocation, except for nodes A, B and C where this represents the service time. The diagram shows vehicles altering routes to avoid other vehicles, for example, vehicle 2 chooses node TA as vehicle 1 occupies node BA . Also shown are additional delays, such as vehicle 3 waiting for machine A, while vehicle 5 waits for vehicle 3. From this, each vehicle can be represented by a path containing around 7 via points with time constraints, with a guarantee that no other vehicle will cause interference.

b

u jjj v = fs : T N6 j 8 t : TIME  s " t  = u " t av " t g

The parallel process semantics is then all possible interleavings which contain no resource interference   F P k Q = fs : T N6 j     ( 9 sP 2 F P ; sQ 2 F Q  s 2 sP jjj sQ ^ (8 c : N  times (sP  c ) \ times (sQ  c ) = fg)g)

b

4 Results

An implementation based upon the formal semantics has been developed for use with an interactive scheduling tool. Complexity is managed by aggregating similar families of schedules, and incrementally re ning plans only when necessary. Both techniques are derived from the semantics, ensuring that any generated schedules are identical to those expressed within the model. The rst example demonstrates the rewriting of a simple speci cation into the new syntax, and derives a semantics which yields the possible timed routes through the environment satisfying the speci cation. A route map is shown in gure ??, with 6 nodes labelled a to f , connected with 5 directed edges. Two vehicles are placed on the graph at nodes a and b , and are to travel to e and f respectively. One possible description of this behaviour is (a ; [0 ; 1)) ; (e ; [0 ; 1)) k (b ; [0 ; 1)) ; (f ; [0 ; 1)) which comprises two service operations interleaved by the parallel process operator. The semantic

5 Conclusions

A speci cation language has been designed to capture the basic requirements of a vehicle routing and scheduling problem. The language has a formalised semantics from which the behaviour of the solutions can be analysed. Such examination is anticipated to highlight the areas of `diculty' within scheduling problems, and thus to subject schedulers to critical analysis. The syntax shown is constructive and consists of two terms, a service operation and a parallel combinator. The service operation imitates a 5

R TC TB TA C B A BC BB BA L

2

2

4

4

2

1 3

1 3

1234

0

5

5

1

3

10

1

1 3 2

4 5

5

15

20

25

3 5

2

4

30

12 5

3 4 5

5

40

Time

4

35

Figure 4: Resource allocation diagram for one trace from the example

References

vehicle being loaded, travelling through a factory environment and then unloading, while the parallel operator enables processes to act independently within the same environment. The semantics of this language is an interleaving of the traces of each process, subject to a non-interaction predicate, thereby maintaining the illusion that each process has exclusive use of the environment. Since competent single vehicle path planners exist, this abstraction from a multiple agents, dynamic environment to a single agent, static environment is a realistic and sound strategy. An implementation of the semantic equations forms the basis of an interactive scheduling tool. The complexity inherent in the problem domain is managed by generating families of similar schedules and incrementally re ning these families. Both these strategies are derived from the semantics, thus ensuring the accuracy of results.

[Bodin & Golden] L.D. Bodin & B.L. Golden

Classi cation in Vehicle Routing and Scheduling

Networks, Vol.11 (1981) No.2, pp 97{108 [Bodin 90] L.D. Bodin

Twenty Years of Routing and Scheduling

Operations Research, Vol.38 (1990) No.4, pp 571{579 [Desrochers et al.] M. Desrochers, J. Desrosiers & M. Solomon

A New Optimisation Algorithm for the Vehicle Routing Problem with Time Windows

Operations Research, Vol.40 (1992) No.2, pp 342{354 [Fujimura] K. Fujimura

On Motion Planning amidst Transient Obstacles

IEEE Int. Conference on Robotics and Automation (1992) Vol.2, pp 1488{1493 [Hague] T. Hague & S. Cameron

Motion Planning for Non-Holonomic Industrial Robot Vehicles

Proceedings IROS (1991) pp 1275{1280 [Hoare] C.A.R. Hoare

Communicating Sequential Processes

Prentice-Hall International (1985)

Future Work

[Reed & Roscoe] G.M. Reed & A.W. Roscoe

With similarities to existing semantic models, automated proof checkers have become a viable strategy for continued analysis of this generalised problem. Alternatively, the underlying structure has shown areas where careful simpli cation and use of more speci c domains can signi cantly reduce problem complexity, allowing larger problems to be considered. The primary focus of this paper, however, has been to formally describe the behaviour of multiagent interactions. We aim to re ne these observed behaviours through syntactic expansion of the language, and stronger speci cation of system requirements, which will enable inter alia a guarantee of system safety.

A Timed Model for CSP

Proceedings ICALP (1986), Springer LNCS 226; Theoretical Computer Science 58 (1988)

This paper was presented at the IEEE Conference on Robotics and Automation (pages c 2464{2469), San Diego, 8{13 May 1994. IEEE 1994. Contact address for second author: Oxford University Computing Laboratory, Wolfson Building, Parks Road, Oxford OX1 3QD, UK. Phone: +44 1865 273850. 6