26
Planning and Scheduling

Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component – actions happen

Embed Size (px)

Citation preview

Page 1: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

Planning and Scheduling

Page 2: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

2USC INFORMATION SCIENCES INSTITUTE

Some background

Many planning problems have a time-dependent component – actions happen over time intervals, goals have time windows when they should be achieved Need to synchronize with other agents

Normal Situation calculus, STRIPS, etc. don’t support this very well

Planners choose actions to achieve goals. Picking a time line is typically seen as scheduling

Page 3: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

3USC INFORMATION SCIENCES INSTITUTE

Handling time in planners

How should we model temporal problems

Do we need new planning algorithms or will modifications on others be enough?

Can we plan first, then schedule? Should the two be merged?

Page 4: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

4USC INFORMATION SCIENCES INSTITUTE

Different time-related issues in planning

If actions take different time intervals, partial-order planners must account for this

Actions with continuous effects – e.g. drive truck from LA to San Francisco

Concurrent/simultaneous actions – may have different effects or preconditions

Page 5: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

5USC INFORMATION SCIENCES INSTITUTE

Actions with continuous effects

Drive from LA to SF takes 5 hours. Location changes continuously

If the action gets interrupted – e.g. need to recall the truck 1 hour later. Where is it?

Some approaches: situation calculus with differential equations for the state, event calculus.

Page 6: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

6USC INFORMATION SCIENCES INSTITUTE

Concurrent actions

Synergy: to open the door, hold handle down and pull simultaneously – neither action achieves anything alone

Interference: if two actions require the same resource (e.g. a spanner), cannot both take place simultaneously

Page 7: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

7USC INFORMATION SCIENCES INSTITUTE

Generalizing STRIPS

STRIPS action: if preconds hold in current situation, can apply action ‘now’, and effects hold in ‘next’ situation.

If action takes place over an interval – should preconds hold just when the action starts? Throughout the interval? When do the effects take place?

Page 8: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

8USC INFORMATION SCIENCES INSTITUTE

Temporal Graph Plan

Consider the question: can we use Graphplan ideas for temporal planning?

What are the problems, if actions have different durations?

Page 9: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

9USC INFORMATION SCIENCES INSTITUTE

TGP action model

STRIPS actions, plus start time, end time, duration

All preconds must hold at the start

Preconds not affected by the action must hold throughout execution

Effects are undefined during execution and only hold at the final time point

Page 10: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

10USC INFORMATION SCIENCES INSTITUTE

Temporal planning graph

Propositions and actions monotonically increasing

Mutexes monotonically decreasing

Nogoods are monotonically decreasing

So..

Page 11: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

11USC INFORMATION SCIENCES INSTITUTE

Cyclic planning graph

Earliest start time

Page 12: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

12USC INFORMATION SCIENCES INSTITUTE

Distinguishing mutex conditions

Some mutexes are always true – eternal

Some can become false – conditional

Action/Proposition mutex

Page 13: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

13USC INFORMATION SCIENCES INSTITUTE

Page 14: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

14USC INFORMATION SCIENCES INSTITUTE

Propagating mutexes

Can maintain which are conditional or eternal mutexes:

Note: these are temporal conditions, essentially on when instances of A and P can coexist

Page 15: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

15USC INFORMATION SCIENCES INSTITUTE

Solution extraction

Page 16: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

16USC INFORMATION SCIENCES INSTITUTE

Dealing with uncountable choices..

The algorithm makes every action take place as late as possible by using persistence ONLY when nothing else would work.

Page 17: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

17USC INFORMATION SCIENCES INSTITUTE

Approximating mutex conditions

Checking disjunctions can be expensive, so try to maintain a form like

Page 18: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

18USC INFORMATION SCIENCES INSTITUTE

Conclusions

Can extend mutex reasoning to temporal case

But it’s not easy!

Page 19: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

19USC INFORMATION SCIENCES INSTITUTE

ASPEN

Combine planning and scheduling steps as alternative ‘conflict repair’ operations

Activities have start time, end time, duration

Maintain ‘most-commitment’ approach – easier to reason about temporal dependencies with full information C.f. TLPlan

Page 20: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

20USC INFORMATION SCIENCES INSTITUTE

Temporal constraints

Page 21: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

21USC INFORMATION SCIENCES INSTITUTE

Activity decompositions

Page 22: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

22USC INFORMATION SCIENCES INSTITUTE

Conflict types

Page 23: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

23USC INFORMATION SCIENCES INSTITUTE

Contributors for a non-depletable resource violation

Page 24: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

24USC INFORMATION SCIENCES INSTITUTE

Contributors for a depletable resource violation

Page 25: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

25USC INFORMATION SCIENCES INSTITUTE

Domain-independent heuristics

Prefer to solve conflicts that require new activities, then timeline conflicts

To repair a conflict, prefer moving activities, then adding a new activity

Try to solve conflicts while introducing as few others as possible

Page 26: Planning and Scheduling. 2 USC INFORMATION SCIENCES INSTITUTE Some background Many planning problems have a time-dependent component –  actions happen

26USC INFORMATION SCIENCES INSTITUTE

Conclusions

Successfully integrates planning and scheduling

Does it do so in the most profitable way?

What can we say about guarantees for the algorithm?