560 likes | 639 Views
Coping with Time & Continuous Quantities. David E. Smith desmith@arc.nasa.gov. Collaborators: Jeremy Frank, Ari Jónsson. The Ambitious Spacecraft. Observation-1 priority time window target instruments duration Observation-2 Observation-3 Observation-4 …. Objective:
E N D
Coping with Time & Continuous Quantities David E. Smith desmith@arc.nasa.gov • Collaborators: • Jeremy Frank, Ari Jónsson
The Ambitious Spacecraft Observation-1 priority time window target instruments duration Observation-2 Observation-3 Observation-4 … Objective: maximize science return
Complications Observation-1 priority time window target instruments duration Observation-2 Observation-3 Observation-4 … angle between targets turn duration linked calibration target1 target2 … consumables: fuel power data storage cryogen Objective: maximize science return
The Spacecraft’s Choices Observations Instrument Calibration target Ordering Communication Instrument Status
The Spacecraft’s Choices Observations Instrument Calibration target Ordering Communication Instrument status continuous time time constraints concurrent actions metric resources optimization
The Choice Spectrum planning job-shop scheduling
The Choice Spectrum planning job-shop scheduling R3 R7 R1 • Job1 • task1 < task2 < task3 < … • Job2 • Job3 • … Ordering choices only
planning job-shop scheduling The Choice Spectrum cascading levels of choice … … … … … … …
The Choice Spectrum resource choices (RCSP) planning job-shop scheduling 5 11 umfagoggin clavitracle fernambulator [8,17] Task4 Task7 Task2 Task5 Task1 Task8 Ordering choices Resource choices Task3 Task6
resource choices (RCSP) alternative processes planning job-shop scheduling process3 process7 Task4 Task7 Task2 Task5 Task1 Task8 Task3 Task6 The Choice Spectrum process8 Ordering choices Resource choices Process choices
The Choice Spectrum ambitious spacecraft alternative processes planning job-shop scheduling resource choices (RCSP) Observation choices Instrument choices Calibration target choices Ordering choices Communication choices Instrument status choices
The Choice Spectrum alternative processes planning job-shop scheduling resource choices (RCSP) • Subset Selection • ambitious spacecraft • observation scheduling • process planning
Strips Assumptions Instantaneous actions No time constraints No concurrent actions No continuous quantities Bleak?
Some STRIPS Operators • TakeImage (?target, ?instr): • Pre: Status(?instr, Calibrated), Pointing(?target) • Eff: Image(?target) • Calibrate (?instrument): • Pre: Status(?instr, On), Calibration-Target(?target), Pointing(?target) • Eff: ¬Status(?inst, On), Status(?instr, Calibrated) • Turn (?target): • Pre: Pointing(?direction), ?direction ≠ ?target • Eff: ¬Pointing(?direction), Pointing(?target) no time, no resources
Outline Resources Reusable Consumable Time Uncertainty?
Resources Discrete Continuous single/multiple(metric) Reusable instruments bandwidth Consumable solid rockets fuel
Reusable Resources(single-capacity) TakeImage (?target, ?instr): Res: ?instr Pre: Status(?instr, Calibrated), Pointing(?target) Eff: Image(?target) Prevent concurrent actions • Mutual exclusion between actions: • Graphplan trivial • Satplan ¬A1 ¬A2 • POCL A1<A2 A2<A1
Reusable Resources(multiple-capacity) • Suppose: 2 cameras • Simple approach: name the cameras TakeImage (?target, ?instr): Res: ?instr Pre: Status(?instr, Calibrated), Pointing(?target) Eff: Image(?target) • Mutual exclusion between actions: • Graphplan trivial • Satplan ¬A1 ¬A2 • POCL ?instr1≠?instr2 A1<A2 A2<A1
Reusable Resources(multiple-capacity) • 2 Cameras: • Not named TakeImage (?target): Res: Camera(1) Pre: Pointing(?target) Eff: Image(?target) Capacity(Camera)=2 Explicit checking of concurrent actions to ensure: usage ≤ capacity
Reusable Resources(multiple-capacity) usage > capacity • Mutual exclusion between sets of actions: • Graphplan n-ary mutex • Satplan ¬(A1 A2 A3 …) • POCL A1<A2 A2<A1 A1<A3 A3<A1 … • Profiling heuristics • Sadeh, Fox, Beck • O-Plan • Graph Techniques • IxTeT
Summary Resources Reusable Single-capacity binary mutex easy Multiple-capacity n-ary mutex tricky specialized algorithms search heuristics Consumable Time Uncertainty?
Consumable Resources • Turn (?target): • Pre: Pointing(?direction), ?direction ≠ ?target • Fuel ≥ Angle(?direction,?target) *ConsumptionRate • Eff: ¬Pointing(?direction), Pointing(?target) • Fuel –= Angle(?direction,?target) *ConsumptionRate • Simple approach: • wait until all variables are instantiated
LP Approaches • Zeno: • open conditions: P1, P2, P3, P4, P5, E1, E2, E3 • constraints: Fuel ≤ 10 Simplex
LP Approaches: LPSAT • Turn (?target): • Pre: Pointing(?direction), ?direction ≠ ?target • Fuel ≥ Angle(?direction,?target) *ConsumptionRate • Eff: ¬Pointing(?direction), Pointing(?target) • Fuel –= Angle(?direction,?target) *ConsumptionRate • ¬Turn-T3-T71 v • {Pointing-T31C11 • ¬Pointing-T32 Pointing-T72C22} • C11Fuel1 ≥ Angle(T3,T7) *ConsumptionRate • C22Fuel2 = Fuel1 – Angle(T3,T7) *ConsumptionRate SAT engine Simplex
ILP planning • ¬Turn-T3-T71 v • {Pointing-T31C11 • ¬Pointing-T32 Pointing-T72C22} • C11Fuel1 ≥ Angle(T3,T7) *ConsumptionRate • C22Fuel2 = Fuel1 – Angle(T3,T7) *ConsumptionRate Kautz & Walser Vossen et al. • ¬Turn-T3-T71 v Pointing-T31 • ¬Turn-T3-T71 v C11 • ¬Turn-T3-T71 v ¬ Pointing-T32 • ¬Turn-T3-T71 v Pointing-T72 • ¬Turn-T3-T71 v C22 • C11Fuel1 ≥ Angle(T3,T7) *ConsumptionRate • C22Fuel2 = Fuel1 – Angle(T3,T7) *ConsumptionRate
ILP planning ¬Turn-T3-T71 v Pointing-T31 ¬Turn-T3-T71 v C11 ¬Turn-T3-T71 v ¬ Pointing-T32 ¬Turn-T3-T71 v Pointing-T72 ¬Turn-T3-T71 v C22 C11Fuel1 ≥ Angle(T3,T7) *ConsumptionRate C22Fuel2 = Fuel1 – Angle(T3,T7) *ConsumptionRate (1 - Turn-T3-T71) + Pointing-T31 ≥ 1 M(1 - Turn-T3-T71) + (1 + D11 ) ≥ 1 (1 - Turn-T3-T71) + (1 - Pointing-T32 ) ≥ 1 (1 - Turn-T3-T71) + Pointing-T72 ≥ 1 M(1 - Turn-T3-T71) + (1 ± D21 ) ≥ 1 D11=Fuel1 – Angle(T3,T7) *ConsumptionRate D22=Fuel2 – (Fuel1 – Angle(T3,T7) *ConsumptionRate)
Summary Resources Reusable Consumable Equality and Inequality conditions POCL + LP slow SAT + LP fast ILP medium Graphplan ? Concurrent continuous change ugly! Time Uncertainty?
Concurrent Continuous Change • Turn (?target): • Pre: Pointing(?direction), ?direction ≠ ?target • Fuel ≥ Angle(?direction,?target) *ConsumptionRate • Eff: ¬Pointing(?direction), Pointing(?target) • Fuel –= Angle(?direction,?target) *ConsumptionRate Fuel Fuel = F(t) Time Fuel Fuel Time Time
Outline Resources Time Uncertainty?
Pointing(Earth) Status(Cam2, Calibrated) ¬ Image(A7) Pointing(A7) Status(Cam2, Calibrated) ¬ Image(A7) Turn(A7) World Description • State-centric: • for each time describe propositions that are true • Proposition-centric: • for each proposion describe times it is true Turn(A7) Pointing(Earth) Pointing(A7) Status(Cam2, Calibrated)
B A A before B B A A meets B A A overlaps B B A contains B A A = B B A starts B A B A A A ends B B B Allen’s Ordering Relationships
TakeImage Schema • TakeImage (?target, ?instr): • Pre: Status(?instr, Calibrated), Pointing(?target) • Eff: Image(?target) TakeImage(?target, ?instr)A $P {Status(?instr, Calibrated)P Contains(P, A)} $Q {Pointing(?target)Q Contains(Q, A)} $R {Image(?target)R Meets(A, R)}
Pointing(?target) contains meets Image(?target) TakeImage(?target, ?instr) contains Status(?instr, Calibrated) Shorthand TakeImage (?target, ?instr) contained-by Status(?instr, Calibrated) contained-by Pointing(?target) meets Image(?target)
meets meets Pointing(?target) Turn(?target) Pointing(?direction) Turn Turn (?target) met-by Pointing(?direction) meets Pointing(?target)
Pointing(?target) contains meets meets Status(?instr, Calibrated) Calibrate(?instr) Status(?instr, On) contains CalibrationTarget(?target) Calibrate Calibrate (?instr) met-by Status(?instr, On) contained-by CalibrationTarget(?target) contained-by Pointing(?target) meets Status(?instr, Calibrated)
Algorithm • Choose: • introduce an action & instantiate constraints • coalesce propositions • Propagate constraints
Pointing(Earth) Status(Cam1, Off) Status(Cam2, On) CalibrationTarget(T17) Initial Plan meets Past Image(?target) Future meets -∞ ∞
Pointing(Earth) Status(Cam1, Off) Past meets Status(Cam2, On) -∞ CalibrationTarget(T17) Expansion 1 before Pointing(A7) contains meets meets Image(A7) Future TakeImage(A7, ?instr) ∞ contains Status(?instr, Calibrated)
Pointing(Earth) Status(Cam1, Off) Status(Cam2, On) CalibrationTarget(T17) Expansion 2 meets meets Pointing(A7) Turn(A7) Pointing(?direction) contains before meets Image(A7) TakeImage(A7, ?instr) Pointing(?caltarget) contains contains meets meets Status(?instr, Calibrated) Calibrate(?instr) Status(?instr, On) contains CalibrationTarget(?caltarget)
meets meets Pointing(A7) Turn(A7) Pointing(?direction) contains Pointing(Earth) before before meets Image(A7) TakeImage(A7, Cam2) Pointing(T17) Status(Cam1, Off) contains contains meets meets Status(Cam2, Calibrated) Calibrate(Cam2) Status(Cam2, On) contains CalibrationTarget(T17) Coalescing
Coalescing meets Pointing(A7) Turn(A7) contains Pointing(Earth) meets before meets Image(A7) TakeImage(A7, Cam2) Pointing(T17) Status(Cam1, Off) contains contains meets meets Status(Cam2, Calibrated) Calibrate(Cam2) Status(Cam2, On) contains CalibrationTarget(T17)
Expansion 3 meets Pointing(?direction) Pointing(A7) Turn(A7) Pointing(Earth) meets contains meets meets meets Image(A7) Turn(T17) TakeImage(A7, Cam2) Pointing(T17) Status(Cam1, Off) contains contains meets meets Status(Cam2, Calibrated) Calibrate(Cam2) Status(Cam2, On) contains CalibrationTarget(T17)
Coalescing meets Pointing(A7) Turn(A7) Pointing(Earth) contains meets meets meets meets Image(A7) Turn(T17) TakeImage(A7, Cam2) Pointing(T17) Status(Cam1, Off) contains contains meets meets Status(Cam2, Calibrated) Calibrate(Cam2) Status(Cam2, On) contains CalibrationTarget(T17)
POCL vs CBI POCL CBI search goal-directed goal-directed strategy temporal before/after complex reasoning protection causal links meets conflicts threats mutex conflict proactive lazy resolution
proposition action action proposition action action threatens action meets meets action proposition action action proposition mutex action proposition Causal Links & Threats POCL CBI Causal links: Threats:
CBI Planners Zeno (Penberthy) intervals, no CSP Trains (Allen) Descartes (Joslin) extreme least commitment IxTeT (Ghallab) functional rep. HSTS (Muscettola) functional rep., activities
Timelines Turn (?target) met-by Pointing(?direction) meets Pointing(?target) Pointing=Turn (?target) met-by Pointing=?direction meets Pointing=?target Pointing: Earth ?direction Turn(A7) A7 ? T17
meets meets Pointing(?target) Turn(?target) Pointing(?direction) Explanatory Frame Axioms Turn (?target) met-by Pointing(?direction) meets Pointing(?target) Pointing(?target) met-by Past or met-by Turn (?target)
A Stupid Question Why should CBI perform any better than POCL? • less commitment • better propagation • timelines
A Stupid Question Why should CBI perform any better than POCL? • less commitment • better propagation • timelines • reachability analysis • heuristic estimators