1 / 77

Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks

Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks. Brian C. Williams 16.412J/6.834J December 2 nd , 2002. 1. Model-based Programming& Execution. Task-Decomposition Execution. Goals and Environment Constraints. Projective Task Expansion. Temporal

hayden
Download Presentation

Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks Brian C. Williams 16.412J/6.834J December 2nd, 2002 1

  2. Model-based Programming& Execution Task-Decomposition Execution Goals and Environment Constraints Projective Task Expansion Temporal NetworkSolver Temporal Planner Temporal Plan Task Dispatch Dynamic Scheduling and Task Dispatch Goals Modes Reactive Task Expansion Commands Observations

  3. Model-based Programming& Execution Task-Decomposition Execution Goals and Environment Constraints Projective Task Expansion Temporal NetworkSolver Temporal Planner Temporal Plan Task Dispatch Dynamic Scheduling and Task Dispatch Goals Modes Reactive Task Expansion Commands Observations

  4. Outline • Temporal Representation • Qualitative temporal relations • Metric constraints • Temporal Constraint Networks • Temporal Plans • Temporal Reasoning forPlanning and Scheduling • Flexible Execution throughDynamic Scheduling

  5. Qualitative Temporal Constraints(Allen 83) • y after x • y met-by x • y overlapped-by x • y contains x • y started-by x • y finished-by x • y equals x • x before y • x meets y • x overlaps y • x during y • x starts y • x finishes y • x equals y X Y X Y X Y Y X Y X Y X Y X

  6. contained_by Idle_Seg Th_Sega Th_Seg Th_Seg Idle_Seg Th_Seg Th_Seg contained_by contained_by Accum_Thr Accum_Thr Accum_Thr Thr_Boundary Accum_NO_Thr Thr_Boundary equals equals meets meets Thrust Thrust Standby Thrust Thrust Standby Standby Start_Up Start_Up contained_by Shut_Down Shut_Down CP(Ips_Tvc) CP(Ips_Tvc) CP(Ips_Tvc) Example: Deep Space One Remote Agent Experiment Timer Max_Thrust Idle Idle SEP_Segment Accum SEP Action Attitude Poke

  7. Qualitative Temporal ConstraintsMaybe Expressed as Inequalities (Vilain, Kautz 86) • x before y X+ < Y- • x meets y X+ = Y- • x overlaps y (Y- < X+) & (X- < Y+) • x during y (Y- < X-) & (X+ < Y+) • x starts y (X- = Y-) & (X+ < Y+) • x finishes y (X- < Y-) & (X+ = Y+) • x equals y (X- = Y-) & (X+ = Y+) Inequalities may be expressed as binary interval relations: X+ - Y-< [-inf, 0]

  8. Metric Constraints • Going to the store takes at least 10 minutes and at most 30 minutes. • 10 < [T+(store) – T-(store)] < 30 • Bread should be eaten within a day of baking. • 0 < [T+(baking) – T-(eating)] < 1 day • Inequalities, X+ < Y- , may be expressed as binary interval relations: • - inf < [X+ - Y-] < 0

  9. Metric Time: Quantitative Temporal Constraint Networks(Dechter, Meiri, Pearl 91) • A set of time points Xi at which events occur. • Unary constraints (a0< Xi < b0 ) or (a1< Xi < b1 ) or . . . • Binary constraints (a0< Xj -Xi < b0 ) or (a1< Xj -Xi < b1 ) or . . .

  10. [30,40] [10,20] [60,inf] 0 1 3 [10,20] 2 4 [20,30] [40,50] [60,70] TCSP Are Visualized UsingDirected Constraint Graphs

  11. Simple Temporal Networks(Dechter, Meiri, Pearl 91) Simple Temporal Networks: • A set of time points Xi at which events occur. • Unary constraints (a0< Xi < b0 ) or (a1< Xi < b1 ) or . . . • Binary constraints (a0< Xj -Xi < b0 ) or (a1< Xj -Xi < b1 ) or . . . • Sufficient to represent: • most Allen relations • simple metric constraints • Can’t represent: • Disjoint tokens

  12. [30,40] [10,20] [60,inf] 0 1 3 [10,20] 2 4 [20,30] [40,50] [60,70] Simple Temporal Network • Tij = (aij£ Xi - Xj£ bij)

  13. A Completed Plan Forms an STN       

  14. Outline • Temporal Representation • Temporal Reasoning forPlanning and Scheduling • TCSP Queries • Induced Constraints • Plan Consistency • Static Scheduling • Flexible Execution throughDynamic Scheduling

  15. TCSP Queries(Dechter, Meiri, Pearl, AIJ91) • Is the TCSP consistent? • What are the feasible times for each Xi? • What are the feasible durations between each Xi and Xj? • What is a consistent set of times? • What are the earliest possible times? • What are the latest possible times?

  16. TCSP Queries(Dechter, Meiri, Pearl, AIJ91) • Is the TCSP consistent? Planning • What are the feasible times for each Xi? • What are the feasible durations between each Xi and Xj? • What is a consistent set of times?Scheduling • What are the earliest possible times? Scheduling • What are the latest possible times?

  17. 20 40 0 1 3 -10 [10,20] -30 [30,40] 0 1 3 -10 20 [10,20] 50 2 4 -40 2 4 -60 [40,50] 70 [60,70] To Query an STN Map to aDistance Graph Gd = < V,Ed > Edge encodes an upper bound on distance to target from source. Xj - Xi£ bij Xi - Xj£ - aij Tij = (aij£ Xj - Xi£ bij)

  18. Gd Induces Constraints • Path constraint: i0 =i, i1 = . . ., ik = j • Conjoined path constraints result in the shortest path as bound: where dij is the shortest path from i to j

  19. 20 40 0 1 2 -10 -30 -10 20 50 3 4 -40 -60 70 d-graph Shortest Paths of Gd

  20. STN Minimum Network d-graph STN minimum network

  21. Conjoined Paths are Computed using All Pairs Shortest Path(e.g., Floyd-Warshall’s algorithm ) 1. for i := 1 to n do dii 0; 2. for i, j := 1 to n do dij aij; 3. for k := 1 to n do 4. for i, j := 1 to n do 5. dij min{dij, dik + dkj}; k i j

  22. 20 40 0 1 2 -10 -30 -10 20 50 3 4 -40 -60 70 Testing Plan Consistency No negative cycles: -5 > TA– TA = 0 d-graph

  23. Scheduling:Feasible Values Latest Times • X1 in [10, 20] • X2 in [40, 50] • X3 in [20, 30] • X4 in [60, 70] Earliest Times d-graph

  24. Scheduling without Search: Solution by Decomposition • Select value for 1 • 15 [10,20] d-graph

  25. Scheduling without Search: Solution by Decomposition • Select value for 1 • 15 [10,20] d-graph

  26. Solution by Decomposition • Select value for 1 • 15 • Select value for 2, consistent with 1 • 45 [40,50], 15+[30,40] d-graph

  27. Solution by Decomposition • Select value for 1 • 15 • Select value for 2, consistent with 1 • 45[45,50] d-graph

  28. Solution by Decomposition • Select value for 1 • 15 • Select value for 2, consistent with 1 • 45[45,50] d-graph

  29. Solution by Decomposition • Select value for 1 • 15 • Select value for 2, consistent with 1 • 45 • Select value for 3, consistent with 1 & 2 • 30 [20,30], 15+[10,20],45+[-20,-10] d-graph

  30. Solution by Decomposition • Select value for 1 • 15 • Select value for 2, consistent with 1 • 45 • Select value for 3, consistent with 1 & 2 • 30[25,30] d-graph

  31. Solution by Decomposition • Select value for 1 • 15 • Select value for 2, consistent with 1 • 45 • Select value for 3, consistent with 1 & 2 • 30[25,30] d-graph

  32. O(N2) Solution by Decomposition • Select value for 1 • 15 • Select value for 2, consistent with 1 • 45 • Select value for 3, consistent with 1 & 2 • 30 d-graph • Select value for 4, consistent with 1,2 & 3

  33. Outline • Temporal Representation • Temporal Reasoning forPlanning and Scheduling • Flexible Execution throughDynamic Scheduling

  34. Model-based Programming& Execution Task-Decomposition Execution Goals and Environment Constraints Projective Task Expansion Temporal NetworkSolver Temporal Planner Temporal Plan Task Dispatch Dynamic Scheduling and Task Dispatch Goals Modes Reactive Task Expansion Commands Observations

  35. EXECUTIVE CONTROLLED SYSTEM Executing Flexible Temporal Plans[Muscettola, Morris, Pell et al.] • Handling delays and fluctuations in task duration: • Least commitment temporal plans leave room to adapt • flexible execution adapts through dynamic scheduling • Assigns time to event when executed.

  36. Issues in Flexible Execution • How do we minimize execution latency? • How do we schedule at execution time?

  37. Time Propagation Can Be Costly EXECUTIVE CONTROLLED SYSTEM

  38. Time Propagation Can Be Costly EXECUTIVE CONTROLLED SYSTEM

  39. Time Propagation Can Be Costly EXECUTIVE CONTROLLED SYSTEM

  40. Time Propagation Can Be Costly EXECUTIVE CONTROLLED SYSTEM

  41. Time Propagation Can Be Costly EXECUTIVE CONTROLLED SYSTEM

  42. Time Propagation Can Be Costly EXECUTIVE CONTROLLED SYSTEM

  43. Issues in Flexible Execution • How do we minimize execution latency? • Propagate through a small set of neighboring constraints. • How do we schedule at execution time?

  44. Compile to Efficient Network EXECUTIVE CONTROLLED SYSTEM

  45. Compile to Efficient Network EXECUTIVE CONTROLLED SYSTEM

  46. Compile to Efficient Network EXECUTIVE CONTROLLED SYSTEM

  47. Issues in Flexible Execution • How do we minimize execution latency? • Propagate through a small set of neighboring constraints. • How do we schedule at execution time?

  48. Issues in Flexible Execution • How do we minimize execution latency? • Propagate through a small set of neighboring constraints. • How do we schedule at execution time? • Through decomposition?

  49. [0,10] [-1,1] 10 -1 A D D A B C B C 0 1 [0,10] [-2,2] 0 -2 Equivalent Distance Graph Representation 2 10 Dynamic Scheduling by Decomposition Simple Example

  50. 11 10 -1 0 10 1 -1 -1 1 A D D A C B C B 0 -2 0 1 Equivalent All Pairs Shortest Paths (APSP) Representation 2 0 -2 10 -2 2 10 Dynamic Scheduling by Decomposition • Compute APSP graph • Decomposition enables assignment without search Equivalent Distance Graph Representation

More Related