temporal plan execution: dynamic scheduling and simple temporal networks
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/1.jpg)
Temporal Plan Execution: Dynamic Scheduling and
Simple Temporal Networks
1
Brian C. Williams
16.412J/6.834J
December 2nd, 2002
![Page 2: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/2.jpg)
Model-based
Programming&
Execution
Task-Decompositio
nExecution
Reactive Task Expansion
ProjectiveTask Expansion
Goals
Dynamic Scheduling and Task Dispatch
TaskDispatch
Temporal Plan
CommandsObservations
Modes
Goals and Environment Constraints
TemporalNetworkSolver
TemporalPlanner
![Page 3: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/3.jpg)
Model-based
Programming&
Execution
Task-Decompositio
nExecution
Reactive Task Expansion
ProjectiveTask Expansion
Goals
Dynamic Scheduling and Task Dispatch
TaskDispatch
Temporal Plan
CommandsObservations
Modes
Goals and Environment Constraints
TemporalNetworkSolver
TemporalPlanner
![Page 4: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/4.jpg)
Outline
• Temporal Representation– Qualitative temporal relations– Metric constraints– Temporal Constraint Networks– Temporal Plans
• Temporal Reasoning forPlanning and Scheduling
• Flexible Execution throughDynamic Scheduling
![Page 5: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/5.jpg)
Y
Qualitative Temporal Constraints(Allen 83)
• 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
YX
YX
Y X
X
• 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
![Page 6: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/6.jpg)
Example: Deep Space One Remote Agent Experiment
Max_ThrustIdle Idle
Poke
Timer
Attitude
Accum
SEP Action
SEP_Segment
Th_Seg
contained_by
equals equalsmeets
meets
contained_by
Start_Up Start_UpShut_Down Shut_Down
Thr_Boundary
Thrust ThrustThrustThrustStandby Standby Standby
Th_Sega Th_Seg Th_SegIdle_Seg Idle_Seg
Accum_NO_Thr Accum_ThrAccum_Thr Accum_ThrThr_Boundary
contained_by
CP(Ips_Tvc) CP(Ips_Tvc) CP(Ips_Tvc)
contained_by
Th_Seg
![Page 7: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/7.jpg)
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]
![Page 8: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/8.jpg)
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
![Page 9: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/9.jpg)
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 . . .
![Page 10: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/10.jpg)
TCSP Are Visualized UsingDirected Constraint Graphs
1 3
42
0[10,20]
[30,40][60,inf]
[10,20]
[20,30][40,50]
[60,70]
![Page 11: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/11.jpg)
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
Sufficient to represent:• most Allen relations • simple metric constraints
Can’t represent:• Disjoint tokensCan’t represent:• Disjoint tokens
![Page 12: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/12.jpg)
Simple Temporal Network
• Tij = (aij Xi - Xj bij)
1 3
42
0[10,20]
[30,40][60,inf]
[10,20]
[20,30][40,50]
[60,70]
![Page 13: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/13.jpg)
A Completed Plan Forms an STNA Completed Plan Forms an STN
![Page 14: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/14.jpg)
Outline
• Temporal Representation• Temporal Reasoning for
Planning and Scheduling– TCSP Queries– Induced Constraints– Plan Consistency– Static Scheduling
• Flexible Execution throughDynamic Scheduling
![Page 15: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/15.jpg)
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?
![Page 16: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/16.jpg)
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?
![Page 17: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/17.jpg)
To Query an STN Map to aDistance Graph Gd = < V,Ed >
70
1 3
42
020
50
-10
40
-30
20 -10
-40-60
1 3
42
0[10,20] [30,40]
[10,20]
[40,50]
[60,70]
Tij = (aij Xj - Xi bij)Xj - Xi bij
Xi - Xj - aij
Edge encodes an upper bound on distance to target from source.
![Page 18: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/18.jpg)
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
X j Xi ai j 1 ,i jj1
k
X j Xi dij
![Page 19: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/19.jpg)
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
Shortest Paths of Gd
70
1 2
43
020
50
-10
40
-30
20 -10
-40-60
![Page 20: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/20.jpg)
STN Minimum Network
0 1 2 3 4
0 [0] [10,20] [40,50] [20,30] [60,70]
1 [-20,-10] [0] [30,40] [10,20] [50,60]
2 [-50,-40] [-40,-30] [0] [-20,-10] [20,30]
3 [-30,-20] [-20,-10] [10,20] [0] [40,50]
4 [-70,-60] [-60,-50] [-30,-20] [-50,-40] [0]
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph STN minimum network
![Page 21: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/21.jpg)
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};
ik
j
![Page 22: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/22.jpg)
Testing Plan Consistency
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph70
1 2
43
020
50
-10
40
-30
20 -10
-40-60
No negative cycles: -5 > TA – TA = 0
![Page 23: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/23.jpg)
Scheduling:Feasible Values
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
• X1 in [10, 20]
• X2 in [40, 50]
• X3 in [20, 30]
• X4 in [60, 70]
Latest Times
Earliest Times
![Page 24: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/24.jpg)
Scheduling without Search: Solution by Decomposition
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
• Select value for 1
15 [10,20]
![Page 25: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/25.jpg)
Scheduling without Search: Solution by Decomposition
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
• Select value for 1
15 [10,20]
![Page 26: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/26.jpg)
Solution by Decomposition
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
• Select value for 2, consistent with 1
45 [40,50], 15+[30,40]
• Select value for 1
15
![Page 27: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/27.jpg)
Solution by Decomposition
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
• Select value for 2, consistent with 1
45 [45,50]
• Select value for 1
15
![Page 28: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/28.jpg)
Solution by Decomposition
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
• Select value for 2, consistent with 1
45 [45,50]
• Select value for 1
15
![Page 29: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/29.jpg)
Solution by Decomposition
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
• Select value for 2, consistent with 1
45
• Select value for 1
15
• Select value for 3, consistent with 1 & 2
30 [20,30], 15+[10,20],45+[-20,-10]
![Page 30: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/30.jpg)
Solution by Decomposition
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
• Select value for 2, consistent with 1
45
• Select value for 1
15
• Select value for 3, consistent with 1 & 2
30 [25,30]
![Page 31: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/31.jpg)
Solution by Decomposition
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph
• Select value for 2, consistent with 1
45
• Select value for 1
15
• Select value for 3, consistent with 1 & 2
30 [25,30]
![Page 32: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/32.jpg)
Solution by Decomposition
0 1 2 3 4
0 0 20 50 30 70
1 -10 0 40 20 60
2 -40 -30 0 -10 30
3 -20 -10 20 0 50
4 -60 -50 -20 -40 0
d-graph • Select value for 4, consistent with 1,2 & 3O(N2)
• Select value for 2, consistent with 1
45
• Select value for 1
15
• Select value for 3, consistent with 1 & 2
30
![Page 33: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/33.jpg)
Outline
• Temporal Representation
• Temporal Reasoning forPlanning and Scheduling
• Flexible Execution throughDynamic Scheduling
![Page 34: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/34.jpg)
Model-based
Programming&
Execution
Task-Decompositio
nExecution
Reactive Task Expansion
ProjectiveTask Expansion
Goals
Dynamic Scheduling and Task Dispatch
TaskDispatch
Temporal Plan
CommandsObservations
Modes
Goals and Environment Constraints
TemporalNetworkSolver
TemporalPlanner
![Page 35: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/35.jpg)
Executing Flexible Temporal Plans [Muscettola, Morris, Pell et al.]
EXECUTIVE
CONTROLLED SYSTEM
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.
![Page 36: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/36.jpg)
Issues in Flexible Execution
1. How do we minimize execution latency?
2. How do we schedule at execution time?
![Page 37: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/37.jpg)
Time Propagation Can Be Costly
EXECUTIVE
CONTROLLED SYSTEM
![Page 38: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/38.jpg)
EXECUTIVE
CONTROLLED SYSTEM
Time Propagation Can Be Costly
![Page 39: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/39.jpg)
EXECUTIVE
CONTROLLED SYSTEM
Time Propagation Can Be Costly
![Page 40: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/40.jpg)
EXECUTIVE
CONTROLLED SYSTEM
Time Propagation Can Be Costly
![Page 41: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/41.jpg)
EXECUTIVE
CONTROLLED SYSTEM
Time Propagation Can Be Costly
![Page 42: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/42.jpg)
EXECUTIVE
CONTROLLED SYSTEM
Time Propagation Can Be Costly
![Page 43: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/43.jpg)
Issues in Flexible Execution
1. How do we minimize execution latency? Propagate through a small set of
neighboring constraints.
2. How do we schedule at execution time?
![Page 44: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/44.jpg)
EXECUTIVE
CONTROLLED SYSTEM
Compile to Efficient Network
![Page 45: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/45.jpg)
EXECUTIVE
CONTROLLED SYSTEM
Compile to Efficient Network
![Page 46: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/46.jpg)
EXECUTIVE
CONTROLLED SYSTEM
Compile to Efficient Network
![Page 47: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/47.jpg)
Issues in Flexible Execution
1. How do we minimize execution latency? Propagate through a small set of
neighboring constraints.
2. How do we schedule at execution time?
![Page 48: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/48.jpg)
Issues in Flexible Execution
1. How do we minimize execution latency? Propagate through a small set of
neighboring constraints.
2. How do we schedule at execution time? Through decomposition?
![Page 49: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/49.jpg)
Dynamic Scheduling by Decomposition
A
C
B
D
[0,10] [-2,2]
[-1,1][0,10]
Simple Example
A
C
B
D0
0
10
10 2
-2
-1
1
Equivalent Distance Graph Representation
![Page 50: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/50.jpg)
A
C
B
D0
0
10
10 2
-2
-1
1
Equivalent Distance Graph Representation
A
C
B
D0
0
10
10 2
-2
-1
1
11
-2
1-1
Equivalent All Pairs Shortest Paths (APSP) Representation
• Compute APSP graph• Decomposition enables assignment without search
Dynamic Scheduling by Decomposition
![Page 51: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/51.jpg)
Assignment by Decomposition
A
C
B
D0
0
10
10 2
-2
-1
1
11
-2
1-1t = 0
<0,10>
<0,10>
<2,11>
![Page 52: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/52.jpg)
A
C
B
D0
0
10
10 2
-2
-1
1
11
-2
1-1
t = 3
<0,10>
<0,0> <2,11>
Assignment by Decomposition
![Page 53: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/53.jpg)
A
C
B
D0
0
10
10 2
-2
-1
1
11
-2
1-1
<2,2>
<0,0> <4,4>
But C now has to be executed at t =2, which is already in the past!
Solution:
• Assignments must monotonically increase in value.
Execute first, all APSP neighbors with negative delays.
Assignment by Decomposition
t = 3
![Page 54: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/54.jpg)
Dispatching Execution Controller
Execute an event when enabled and active
• Enabled - APSP Predecessors are completed – Predecessor – a destination of a negative edge that
starts at event.
• Active - Current time within bound of task.
![Page 55: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/55.jpg)
Initially:• E = Time points w/o predecessors• S = {}Repeat:1. Wait until current_time has advanced st
a. Some TP in E is activeb. All time points in E are still enabled.
2. Set TP’s execution time to current_time.3. Add TP to S.4. Propagate time of execution to TP’s APSP immediate neighbors.5. Add to A, all immediate neighbors that became enabled.
a. TPx enabled if all negative edges starting at TPx have their destination in S.
Dispatching Execution Controller
EXECUTIVE
![Page 56: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/56.jpg)
Propagation is Focused
• Propagate forward along positive edges to tighten upper bounds.
– forward prop along negative edges is useless.
• Propagate backward along negative edges to tighten lower bounds.
–Backward prop along positive edges useless.
![Page 57: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/57.jpg)
Propagation Example
A
C
B
D0
-1
10
92
-2
-1
1
-2
-11
11
<0,0>
S = {A}
![Page 58: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/58.jpg)
Propagation Example
A
C
B
D0
-1
10
92
-2
-1
1
-2
-11
11
<0,0>
<1,10>
S = {A}
![Page 59: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/59.jpg)
Propagation Example
A
C
B
D0
-1
10
92
-2
-1
1
-2
-11
11
<0,0>
<1,10>
<0,9>
S = {A}
![Page 60: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/60.jpg)
Propagation Example
A
C
B
D0
-1
10
92
-2
-1
1
-2
-11
11
<0,0>
<1,10>
<0,9>
<2,11>
S = {A}
![Page 61: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/61.jpg)
Propagation Example
A
C
B
D0
-1
10
92
-2
-1
1
-2
-11
11
<0,0>
<1,10>
<0,9>
<2,11>
S = {A}
E = { C }
![Page 62: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/62.jpg)
A
C
B
D0
0
10
10 2
-2
-1
1
11
-2
1-1
t = 3
<0,10>
<0,0> <2,11>
Execution time is O(n)
• worst case
• best case
Filtering:
• some edges are redundant
• remove redundant edges
Reducing Execution Latency
![Page 63: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/63.jpg)
C
A B
150
-10010080
-50 -20
• Edge Dominance– Eliminate edge that is redundant due to the
triangle inequality AB + BC = AC
![Page 64: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/64.jpg)
C
A B
150
-10010080
-50 -20
• Edge Dominance– Eliminate edge that is redundant due to the
triangle inequality AB + BC = AC
![Page 65: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/65.jpg)
C
A B
150
-10080
-50 -20
• Edge Dominance– Eliminate edge that is redundant due to the
triangle inequality AB + BC = AC
![Page 66: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/66.jpg)
C
A B
150
-10080
-50
• Edge Dominance– Eliminate edge that is redundant due to the
triangle inequality AB + BC = AC
![Page 67: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/67.jpg)
An Example of Edge Filtering
• Start off with the APSP network
A
C
BD
0
-110
92
-2
-11
-2
-11
11
![Page 68: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/68.jpg)
An Example of Edge Filtering
• Start at A-B-C triangle
A
C
BD
0
-110
92
-2
-11
-2
-11
11
![Page 69: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/69.jpg)
An Example of Edge Filtering
• Look at B-D-C triangle
A
C
BD
0
-1
2
-2
-11
-2
-1
11
9
1
![Page 70: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/70.jpg)
An Example of Edge Filtering
• Look at B-D-C triangle
A
C
BD
0
-1
2
-2
-11
-1
11
9
1
![Page 71: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/71.jpg)
An Example of Edge Filtering
• Look at D-A-B triangle
A
C
BD
0
-1
2
-11
-1
11
9
1
![Page 72: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/72.jpg)
An Example of Edge Filtering
• Look at D-A-C triangle
A
C
BD
0
2
-11
-1
11
9
1
![Page 73: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/73.jpg)
An Example of Edge Filtering
• Look at B-C-D triangle
A
C
BD
0
2
-11
-1
9
1
![Page 74: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/74.jpg)
An Example of Edge Filtering
• Look at B-C-D triangle
A
C
BD
0
-11
-1
9
1
![Page 75: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/75.jpg)
An Example of Edge Filtering
• Resulting network has less edges than the original
A C B D0 -1
1
-1
9 1
A
C
B
D0
0
10
10 2
-2
-1
1
![Page 76: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/76.jpg)
Avoiding Intermediate Graph Explosion
Problem:
• APSP consumes O(n2) space.
Solution:
• Interleave process of APSP construction with edge elimination– Never have to build whole APSP graph
![Page 77: Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks](https://reader035.vdocuments.us/reader035/viewer/2022062520/568158a8550346895dc5fd32/html5/thumbnails/77.jpg)
Model-based
Programming&
Execution
Task-Decompositio
nExecution
Reactive Task Expansion
ProjectiveTask Expansion
Goals
Dynamic Scheduling and Task Dispatch
TaskDispatch
Temporal Plan
CommandsObservations
Modes
Goals and Environment Constraints
TemporalNetworkSolver
TemporalPlanner