temporal reasoning for planning scheduling and execution
play

Temporal Reasoning for Planning, Scheduling and Execution in - PowerPoint PPT Presentation

Temporal Reasoning for Planning, Scheduling and Execution in Autonomous Agents AAMAS-2005 Tutorial (T4) Nicola Muscettola, Ioannis Tsamardinos, and Luke Hunsberger AAMAS-2005 Tutorial T4 1 Luke Hunsberger Simple Temporal


  1. Temporal Reasoning for Planning, Scheduling and Execution in Autonomous Agents AAMAS-2005 Tutorial (T4) Nicola Muscettola, Ioannis Tsamardinos, and Luke Hunsberger AAMAS-2005 Tutorial • T4 – 1 • Luke Hunsberger

  2. Simple Temporal Networks AAMAS-2005 Tutorial • T4 – 2 • Luke Hunsberger

  3. Temporal Constraints on an Action Starting Ending A Time-Point Time-Point t 2 t 1 t 1 ≥ 4 ( A starts at or after 4) t 2 ≤ 12 ( A ends at or before 12) 3 ≤ t 2 − t 1 ≤ 6 ( A ’s dur. between 3 and 6) AAMAS-2005 Tutorial • T4 – 3 • Luke Hunsberger

  4. Temporal Constraints on Airline Travel Goal: Fly from Boston to Seattle: • Leave Boston after 4 p.m. on Aug. 8; • Return to Boston before 10 p.m., Aug. 18; • Away from Boston no more than 7 days; • In Seattle at least 5 days; and • Return flight lasts no more than 7 hours. AAMAS-2005 Tutorial • T4 – 4 • Luke Hunsberger

  5. Simple Temporal Network (STN) ∗ A Simple Temporal Network (STN) is a pair, S = ( T , C ) , where: • T is a set of time-point variables: { t 0 , t 1 , . . . , t n − 1 } and • C is a set of binary constraints, each of the form: t j − t i ≤ δ , where δ is a real num- ber. ∗ (Dechter, Meiri, & Pearl 1991) AAMAS-2005 Tutorial • T4 – 5 • Luke Hunsberger

  6. Solutions, Consistency, Equivalence • A solution to an STN S = ( T , C ) is a com- plete set of variable assignments: { t 0 = w 0 , t 1 = w 1 , . . . , t n − 1 = w n − 1 } that satisfies all the constraints in C . • An STN with at least one solution is called consistent. • STNs with identical solution sets are called equivalent . AAMAS-2005 Tutorial • T4 – 6 • Luke Hunsberger

  7. The Zero Time-Point Variable • Frequently, it is useful to fix one of the time- point variables to 0. That “variable” will often be called z. • Binary constraints involving z are equivalent to unary constraints: t j − z ≤ 5 ⇐ ⇒ t j ≤ 5 z − t i ≤ − 3 ⇐ ⇒ t i ≥ 3 AAMAS-2005 Tutorial • T4 – 7 • Luke Hunsberger

  8. STN for Constrained Action z = 0 T = { z , t 1 , t 2 } , where: t 1 = Start of A t 2 = End of A   t 2 − t 1 ≤ 6 ( Dur . less than 6 )         t 1 − t 2 ≤ − 3 ( Dur . greater than 3 )       C =       z − t 1 ≤ − 4 ( A starts after 4 )             t 2 − z ≤ 12 ( A ends before 12 )   AAMAS-2005 Tutorial • T4 – 8 • Luke Hunsberger

  9. STN for Constrained Air Travel T = { z, t 1 , t 2 , t 3 , t 4 } , where z = Noon, Aug. 8. C =   z − t 1 ≤ − 4 ( Lv Bos after 4 p . m ., 8 / 8 )                   t 4 − z ≤ 250 ( Av Bos by 10 p . m ., 8 / 18 )                       t 4 − t 1 ≤ 168 ( Gone no more than 7 days )             t 2 − t 3 ≤ − 120 ( In Seattle at least 5 days )                       t 4 − t 3 ≤ 7 ( Return flight less than 7 hrs )           AAMAS-2005 Tutorial • T4 – 9 • Luke Hunsberger

  10. Graphical Representation of an STN ∗ The Distance Graph for an STN, S = ( T , C ) , is a graph, G = ( T , E ) , where: • Time-points in S correspond to nodes in G . • Constraints in C correspond to edges in E : δ tj − ti ≤ δ ti tj ∗ (Dechter, Meiri, & Pearl 1991) AAMAS-2005 Tutorial • T4 – 10 • Luke Hunsberger

  11. Distance Graph for Action Scenario   t 2 − t 1 ≤ 6             t 1 − t 2 ≤ − 3         T = { z , t 1 , t 2 } C =   z − t 1 ≤ − 4               t 2 − z ≤ 12         6 t 2 t 1 -3 12 -4 z AAMAS-2005 Tutorial • T4 – 11 • Luke Hunsberger

  12. Distance Graph for Airline Scenario  z − t 1 ≤ − 4 , t 4 − z ≤ 250              t 4 − t 1 ≤ 168 , t 2 − t 3 ≤ − 120           t 4 − t 3 ≤ 7 , t 1 − t 2 ≤ 0              t 3 − t 4 ≤ 0 ,          168 7 -120 0 t 1 t 4 t 2 0 t 3 250 -4 z AAMAS-2005 Tutorial • T4 – 12 • Luke Hunsberger

  13. Implicit Constraints Explicit constraints in C can combine to form implicit constraints: t j t j − t i ≤ 30 40 30 t k − t j ≤ 40 t k t k − t i ≤ 70 t i 70 AAMAS-2005 Tutorial • T4 – 13 • Luke Hunsberger

  14. Implicit Constraints as Paths • Chains of implicit constraints in an STN cor- respond to paths in its Distance Graph. • Stronger/strongest implicit constraints cor- respond to shorter/shortest paths. 4 3 6 t j 9 5 t i 4 2 3 AAMAS-2005 Tutorial • T4 – 14 • Luke Hunsberger

  15. Distance Matrix ∗ The Distance Matrix for an STN, S = ( T , C ) , is a matrix D defined by: Length of Shortest Path D ( t i , t j ) = from t i to t j in the Distance Graph for S D ( t i , t j ) t j t i (Dechter, Meiri, & Pearl 1991) AAMAS-2005 Tutorial • T4 – 15 • Luke Hunsberger

  16. Distance Matrix (cont’d.) • The strongest implicit constraint on t i and t j in S is: t j − t i ≤ D ( t i , t j ) • Abuse of notation: D ( i , j ) instead of D ( t i , t j ) • D is the All-Pairs, Shortest-Path Matrix for the Distance Graph (Cormen, Leiserson, & Rivest 1990). AAMAS-2005 Tutorial • T4 – 16 • Luke Hunsberger

  17. Distance Matrix for Action Scenario 6 t 2 t 1 -3 12 -4 z z t 1 t 2 D z 0 9 12 t 1 -4 0 6 t 2 -7 -3 0 AAMAS-2005 Tutorial • T4 – 17 • Luke Hunsberger

  18. Distance Matrix for Airline Scenario 168 7 -120 0 t 1 t 4 t 2 t 3 0 -4 250 z z t 1 t 2 t 3 t 4 D z 0 130 130 250 250 t 1 -4 0 48 168 168 t 2 -4 0 0 168 168 t 3 -124 -120 -120 0 7 t 4 -124 -120 -120 0 0 AAMAS-2005 Tutorial • T4 – 18 • Luke Hunsberger

  19. Checking Consistency of an STN Given an STN S with Distance Graph G and Distance Matrix D , the following are equiva- lent (Dechter, Meiri, & Pearl 1991): • S is consistent. • Each loop in G has path length ≥ 0. • The main diagonal of D contains only 0s. AAMAS-2005 Tutorial • T4 – 19 • Luke Hunsberger

  20. Computing D from Scratch Polynomial algorithms for computing the All- Pairs, Shortest-Path Matrix (Cormen, Leiser- son, & Rivest 1990): Floyd-Warshall Algorithm: O ( n 3 ) • Johnson’s Algorithm: O ( n 2 log n + nm ) • AAMAS-2005 Tutorial • T4 – 20 • Luke Hunsberger

  21. Adding Constraint to Consistent STN • Given: S = ( T , C ) , a consistent STN. • Adding the new constraint, t j − t i ≤ δ , to S will maintain the consistency of S iff: −D ( j , i ) ≤ δ (i.e., 0 ≤ D ( j , i ) + δ ). D ( j , i ) t j δ t i Note: This result is stated in different forms by many authors (Dechter, Meiri, & Pearl 1991; Demetrescu & Italiano 2002; Tsamardinos & Pollack 2003; Hunsberger 2003; Rohnert 1985). AAMAS-2005 Tutorial • T4 – 21 • Luke Hunsberger

  22. Rigidly Connected Time-Points For consistent STNs, the following are equivalent: • ( t j − t i ) = δ , for some δ . • D ( i , j ) + D ( j , i ) = 0 • t i and t j belong to a loop of path-length 0. D ( j , i ) = − δ t j D ( i , j ) = δ t i AAMAS-2005 Tutorial • T4 – 22 • Luke Hunsberger

  23. Rigidly Connected Time-Points (ctd.) • t i and t j are said to be rigidly connected if D ( i , j ) = −D ( j , i ) . • A set of time-points that are pairwise rigidly connected form a rigid component . t j -4 -3 3 4 7 t k t i -7 Note: Many authors consider rigidly connected time-points and rigid components (Tsamardinos, Muscettola, & Morris 1998; Gerevini, Perini, & Ricci 1996; Wetprasit & Sattar 1998). AAMAS-2005 Tutorial • T4 – 23 • Luke Hunsberger

  24. Examples of Rigid Components t 2 t 2 8 -3 -3 3 5 t 3 t 3 t 1 t 1 -5 -5 Cyclical representation requires the fewest edges. AAMAS-2005 Tutorial • T4 – 24 • Luke Hunsberger

  25. Adding Constraints to Consistent STNs Result of adding the constraint, t j − t i ≤ δ : Consistent, Consistent, Rigid Consistent, Non-rigid Redundant Inconsistent δ −D ( j , i ) D ( i , j ) Consistent Rohnert (1985) distinguishes most of these cases. AAMAS-2005 Tutorial • T4 – 25 • Luke Hunsberger

  26. Finding a Solution to an STN ∗ While some time-points in are not rigid with z, Pick some t i not rigidly connected to z. Pick some δ ∈ [ −D ( t i , z ) , D ( z , t i )] . Add the constraint, t i = δ (i.e., t i − z ≤ δ and z − t i ≤ − δ ). ∗ This algorithm derives from Dechter et al. (1991). AAMAS-2005 Tutorial • T4 – 26 • Luke Hunsberger

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend