temporal planning
play

Temporal Planning Planning with Temporal and Concurrent Actions - PDF document

Temporal Planning Planning with Temporal and Concurrent Actions Literature Malik Ghallab, Dana Nau, and Paolo Traverso. Automated Planning Theory and Practice , chapter 13-14. Elsevier/Morgan Kaufmann, 2004. Temporal Planning 2 1 Why


  1. Temporal Planning Planning with Temporal and Concurrent Actions Literature � Malik Ghallab, Dana Nau, and Paolo Traverso. Automated Planning – Theory and Practice , chapter 13-14. Elsevier/Morgan Kaufmann, 2004. Temporal Planning 2 1

  2. Why Explicit Time? � assumption A6: implicit time • actions and events have no duration • state transitions are instantaneous � in reality: • actions and events do occur over a time span • preconditions not only at beginning • effects during or even after the action • actions may need to maintain partial states • events expected to occur in future time periods • goals must be achieved within time bound Temporal Planning 3 Overview Actions and Time Points � Interval Algebra and Quantitative Time � Planning with Temporal Operators Temporal Planning 4 2

  3. Time � mathematical structure: • set with transitive, asymmetric ordering operation • discrete, dense, or continuous • bounded or unbounded • totally ordered or branching � temporal references: • time points (represented by real numbers) • time intervals (pair of real numbers) � temporal relations: • examples: before, during Temporal Planning 5 Causal vs. Temporal Analysis of Actions � example: load(crane2, cont5, robot1, interval6) � causal analysis (what propositions hold?): • what propositions will change (effects) • what propositions are required (preconditions) � temporal analysis (when propositions hold?): • when other, related assertions can/cannot be true • reason over: • time periods during which propositions must hold • time points at which values of state variables change Temporal Planning 6 3

  4. Temporal Databases � maintain temporal references for every domain proposition • when does it hold • when does it change value � functionality: • assert new temporal relations • querying whether temporal relation holds • check for consistency � planner attempts to assert relations among temporal references Temporal Planning 7 Temporal References Example: Container Loading � load container c onto robot r at location l � t 1 : instant at which robot r enters location l � t 2 : instant at which robot r stops at location l • i 1 =[ t 1 , t 2 ]: interval corresponding to r entering l � t 3 : instant at which the crane starts picking up c � t 4 : instant at which crane finishes putting c on r • i 2 =[ t 3 , t 4 ]: interval corresponding to picking up and loading c � t 5 : instant at which c begins to be loaded onto r � t 6 : instant at which c is no longer loaded onto r • i 3 =[ t 5 , t 6 ]: interval corresponding to c being loaded onto r Temporal Planning 8 4

  5. Temporal Relations Example: Container Loading � assumption: crane is allowed to pick up container as soon as robot has entered location � possible temporal sequences: • t 1 < t 3 < t 2 < t 4 = t 5 < t 6 (see figure) or • t 1 = t 3 or t 2 = t 3 or t 2 < t 3 entering t 1 t 2 t 5 loaded t 6 picking up t 3 t 4 and loading Temporal Planning 9 Example: Temporal Relations as Constraint Netw orks < t 1 t 2 < < t 5 t 6 ≤ = < t 3 t 4 before i 1 i 3 starts meets before i 2 Temporal Planning 10 5

  6. Point Algebra (PA): Relations and Constraints � possible primitive relations P between instants t 1 and t 2 : P = {<,=,>} • t 1 before t 2 : [ t 1 < t 2 ] • t 1 equal to t 2 : [ t 1 = t 2 ] • t 1 after t 2 : [ t 1 > t 2 ] � possible qualitative constraints R between instants: • sets of the above relations (interpret as disjunction) • R = 2 P = { ∅ , {<}, {=}, {>}, {<,=}, {<,>}, {=,>}, P } Temporal Planning 11 Container Loading Example: PA Constraints � [ t 1 {<} t 2 ] � [ t 1 {<,=} t 3 ] � [ t 2 {<} t 5 ] {<} t 1 t 2 {<} {<} t 5 t 6 � [ t 3 {<} t 4 ] {<,=} {=} � [ t 4 {=} t 5 ] {<} � [ t 5 {=} t 4 ] t 3 t 4 � [ t 5 {<} t 6 ] Temporal Planning 12 6

  7. PA: Combining Constraints � usual set operations: ∙ < = > • ∩ , ∪ etc. � composition (noted ∙ ): < < < P • let r , q ∈ R • if [ t 1 r t 2 ] and [ t 2 q t 3 ] = < = > • then [ t 1 r ∙ q t 3 ] • r ∙ q as defined in < P > > composition table PA composition table Temporal Planning 13 PA: Properties of Combined Constraints � ( R , ∪ , ∙ ) is an algebra: � distributive • R is closed under ∪ • ( r ∪ q ) ∙ s = ( r ∙ s ) ∪ ( q ∙ s ) and ∙ • s ∙ ( r ∪ q ) = ( s ∙ r ) ∪ ( s ∙ q ) • ∪ is an associative and commutative operation � symmetrical constraint r’ of • identity element for ∪ r : is ∅ • [ t 1 r t 2 ] iff [ t 2 r’ t 1 ] • is an associative • obtained by replacing in r : operation • identity element for ∙ is < with > and vice versa • ( r ∙ q )’ = q’ ∙ r’ {=} Temporal Planning 14 7

  8. PA: Constraint Propagation � given constraints: q ∙ s • [ t 1 r t 2 ] • [ t 1 q t 3 ] r t 1 t 2 • [ t 3 s t 2 ] q s � implied constraint: • [ t 1 r ∩ q ∙ s t 2 ] t 3 � inconsistency: • if r ∩ q ∙ s = ∅ Temporal Planning 15 Container Loading Example: Constraint Propagation {<} t 1 t 2 {<} {<} t 5 t 6 {<} {<,=} { P } {=} { P } {<} {<} t 3 t 4 � path: t 4 - t 5 - t 6 : [ t 4 = t 5 ] ∙ [ t 5 < t 6 ] implies [ t 4 < t 6 ] � path: t 2 - t 1 - t 3 : [ t 2 > t 1 ] ∙ [ t 1 ≤ t 6 ] implies [ t 2 Pt 3 ] � path: t 2 - t 5 - t 4 : [ t 2 < t 5 ] ∙ [ t 5 = t 4 ] implies [ t 2 < t 4 ] [ t 2 < t 4 ] � path: t 2 - t 3 - t 4 : [ t 2 Pt 3 ] ∙ [ t 3 < t 4 ] implies [ t 2 Pt 4 ] Temporal Planning 16 8

  9. PA Constraint Netw orks � A binary PA constraint network is a directed graph ( X , C ), where: • X = { t 1 ,…, t n } is a set of instant variables (nodes), and • C ⊆ X × X (the edges), c ij is labelled by a constraint r ij ∈ R iff [ t i r ij t j ] holds. � A tuple 〈 v 1 ,…, v k 〉 of real numbers is a solution for ( X , C ) iff t i = v i satisfy all the constraints in C . � ( X , C ) is consistent iff there exists at least one solution. Temporal Planning 17 Primitives in Consistent Netw orks � Proposition : A PA network ( X , C ) is consistent iff • there is a set of primitives p ij ∈ r ij for every c ij ∈ C such that • for every k : p ij ∈ ( p ik ∙ p kj ) � note: not interested in solution, just consistency (qualitative solution) Temporal Planning 18 9

  10. Redundant Netw orks � A primitive p ij ∈ r ij is redundant if there is no solution in which [ t i p ij t j ] holds. � idea: filter out redundant primitives until • either: no more redundant primitives can be found • or: we find a constraint that is reduced to ∅ (inconsistency) Temporal Planning 19 Path Consistency: Pseudo Code pathConsistency( C ) while ¬ C .isStable() do for each k : 1 ≤ k ≤ n do for each pair i , j : 1 ≤ i < j ≤ n , i ≠ k , j ≠ k do c ij � c ij ∩ [ c ik ∙ c kj ] if c ij = ∅ then return inconsistent Temporal Planning 20 10

  11. Path Consistency: Properties � algorithm pathConsistency( C ) is: • incomplete for general CSPs • complete for PA networks � network ( X , C ) is minimal if it has no redundant primitives in a constraint � algorithm pathConsistency( C ) does not guarantee a minimal network Temporal Planning 21 Overview � Actions and Time Points Interval Algebra and Quantitative Time � Planning with Temporal Operators Temporal Planning 22 11

  12. Extended Example: Inspect and Seal � every container must be inspected and sealed: � inspection: • carried out by the crane • must be performed before or after loading � sealing: • carried out by robot • before or after unloading, not while moving � corresponding intervals: • i load , i move , i unload , i inspect , i seal Temporal Planning 23 Inspect and Seal Example: Interval Constraint Netw ork i move before i load before before before before i unload or after or after before i inspect before i seal Temporal Planning 24 12

  13. Inspect and Seal Example: Qualitative Instant Constraints � Let i be an interval. • i.b and i.e denote two end time points • [ i.b ≤ i.e ] constraint: beginning before end � [ i load before i move ]: • [ i load .b ≤ i load .e ] and [ i move .b ≤ i move .e ] and • [ i load .e < i move .b ] � [ i move before-or-after i seal ]: • [ i move .e < i seal .b ] or • [ i seal .e < i move .b ] disjunction cannot be translated into binary PA constraint Temporal Planning 25 Interval Algebra (IA): Relations � i 1 before i 2 : [ i 1 b i 2 ] � i 1 starts i 2 : [ i 1 s i 2 ] i 1 i 1 i 2 i 2 � i 1 meets i 2 : [ i 1 m i 2 ] � i 1 during i 2 : [ i 1 d i 2 ] i 1 i 1 i 2 i 2 � i 1 overlaps i 2 : [ i 1 o i 2 ] � i 1 finishes i 2 : [ i 1 f i 2 ] i 1 i 1 i 2 i 2 Temporal Planning 26 13

Recommend


More recommend