Planning and Scheduling Stephen F Smith The Robotics
Planning and Scheduling Stephen F. Smith The Robotics Institute Carnegie Mellon University Pittsburgh PA 15213 sfs@cs. cmu. edu 412 -268 -8811 Carnegie Mellon
Outline • What is Scheduling? • Current State of the Art: Constraint-Based Scheduling Models • Is Scheduling a Solved Problem? Carnegie Mellon
What is Scheduling? Allocation of resources to activities over time so that input demands are met in a timely and costeffective manner Most typically, this involves determining a set of activity start and end times, together with resource assignments, which • satisfy all temporal constraints on activity execution (following from process considerations) • satisfy resource capacity constraints, and • optimize some set of performance objectives to the extent possible Carnegie Mellon
A Basic Scheduling Problem Carnegie Mellon
A More Complex Scheduling Problem Origin Sea-POE Air-POE Sea-POD Air-POD Carnegie Mellon Destination
Scheduling Research: The Last 10 Years • Major advances in techniques for solving practical problems • Constraint solving frameworks • Incremental mathematical programming models • Meta-heuristic search procedures • Several significant success stories • Commercial enterprises and tools Carnegie Mellon
Constraint-Based Scheduling Models Components: Commitment Strategies/ Heuristics Active Data Base (Current Schedule) Constraint Propagation Properties: • Modeling Generality/Expressiveness • Incrementality • Compositional Carnegie Mellon Conflict Handling
What is a CSP? Given a triple {V, D, C}, where • V = set of decision variables • D = set of domains for variables in V • C = set of constraints on the values of variables in V Find a consistent assignment of values to all variables in V Carnegie Mellon
A Basic CSP Procedure 1. [Consistency Enforcement] - Propagate constraints to establish the current set vd of feasible values for each unassigned variable d 2. If vd = Ø for any variable d , backtrack 3. If no unassigned variables or no consistent assignments for all variables, quit; Otherwise 4. [Variable Ordering] - Select an unassigned variable d to assign 5. [Value Ordering] - Select a value from vd to assign to d. 6. Go to step 1 Carnegie Mellon
Formulating Scheduling Problems as CSPs “Fixed times” model • Find a consistent assignment of start times to activities • Variables are activity start times Disjunctive graph model • Post sufficient additional precedence constraints between pairs of activities to eliminate resource contention • Variables are ordering decisions Carnegie Mellon
A Simple Job Shop Scheduling CSP Variables: start times (stj, i) - Domain: [0, 12] Job 1: Job 2 : O 1, 2 O 1, 1 [0, 12] O 2, 1 R 1 O 3, 1 Job 3 : [0, 12] Oi, j Oi, k Sti, j + Duri, j ≤ Sti, k Carnegie Mellon [0, 12] R 3 O 2, 2 [0, 12] O 1, 3 O 3, 2 [0, 12] R 2 O 3, 3 [0, 12] Rx Oi, j Ok, l Sti, j + Duri, j ≤ Stk, l V Stk, l + Durk, l ≤ Sti, j
Constraint Propagation Deductive process of inferring additional constraints from existing constraints as decisions are made Two roles: • Early pruning of the search space by eliminating infeasible assignments • Detection of constraint conflicts Carnegie Mellon
Some Constraint Propagation Terminology K-consistency guarantees that any locally consistent instantiation of (K-1) variables is extensible to any K-th variable Example: 2 -consistency (“arc-consistency”) Complexity: Enforcing K-consistency is (in general) exponential in K • Forward Checking: partial arc-consistency only involving constraints between an instantiated variable and a non-instantiated one Carnegie Mellon
Temporal Constraint Propagation through Precedence Constraints Assume dui, j = 3 for all Oi, j • Before propagation: O 1, 2 O 1, 1 [0, 12] O 1, 3 [0, 12] • Forward propagation O 1, 2 O 1, 1 [0, 12] [3, 12] • Backward propagation O 1, 1 [0, 6] Carnegie Mellon O 1, 2 [0, 9] O 1, 3 [6, 12]
Capacity Constraint Propagation Observation: Enforcing consistency with respect to capacity constraints is more difficult due to the disjunctive nature of these constraints Forward Checking: O 1, 1 Scheduled to start at time 6 [6, 6] R 1 O 2, 1 Carnegie Mellon Before propagation: [6, 12] After propagation: [9, 12]
Pruning Operation Ordering Alternatives Example: Erschler’s dominance conditions Conclusion: Oi cannot precede Oj In general: For any unordered pair of operations {Oi, Oj}, we have four possible cases: 1. LSTi < EFTj and LSTj ≥ EFTi: Oi is before Oj Carnegie Mellon 2. LSTj < EFTi and LSTi ≥ EFTj : Oj is before Oi 3. LSTi < EFTj and LSTj < EFTi : inconsistency 4. LSTi ≥ EFTj and LSTj ≥ EFTi: both options remain open
Edge Finding • S - a set of operations competing for resource R • O - an operation not in S also requiring R ((LFT(S) - EST(S) < Dur(O) + Dur(S)) (LFT(S) - EST(O) < Dur(O) + EST(O)) EST(O) ≥ EST(S) + Dur(S) OP k OP j OP i 10 Carnegie Mellon S = {OPi , OPj}; O = OPk 20 30 Start Time OP k≥ 25
More Complex Temporal Constraints “Simple Temporal Problem” (STP) [Dechter 91] • Edge-weighted graph of time points expressing constraints of the form: a tpj tpi b • Assuming no disjunction, allows incorporation of • Temporal relations: • finish-to-start <0, ∞> (precedence) • start-to-finish <t 1, t 2> (duration) • Start-to-start <0, 0> (same-start) • . . . • Metric bounds: offsets from time origin • Efficiently solved via all-pairs shortest path Carnegie Mellon
Constraint-Posting Scheduling Models • Conduct search in the space of ordering decisions • variables - Ordering(i, j, R) for operations i and j contending for resource R • values - i before j, j before i • Constraint posting and propagation in the underlying temporal constraint network (time points and distances) Carnegie Mellon
Search Heuristics (Variable and Value Ordering) • Slack/Temporal Flexibility • Choose pair of activities with least sequencing flexibility • Post sequencing constraint that leaves the most slack • Resource Demand/Contention • Identify bottleneck resource • Schedule (or sequence) those activities contributing most to demand • Minimal critical sets • Generalization to multi-capacity resources Carnegie Mellon
Search Control • Backtracking-based search • Least-Discrepancy Search • Iterative Re-starting with randomized heuristics • Local search - Tabu, GAs, etc. Carnegie Mellon
The Broader Picture Constraint posting provides a framework for integrating planning and scheduling • contemporary temporal planners operate with analogous representational assumptions • E. g. , IXTET, HSTS/RAX, COMIREM, … • “Constraint-Based Interval Planning” [D. Smith 00] Constraint posting is a relatively unexplored approach to scheduling with several advantages • more flexible solutions • simple heuristics can yield high performance solution techniques under a wide variety of problem constraints Carnegie Mellon
Technological Strengths • Scalability • Modeling flexibility • Optimization • Configurable So, Is scheduling a solved problem? Carnegie Mellon
What is Scheduling (Again)? Classic view: • Scheduling is a puzzle solving activity • Given problem constraints and objective criterion, figure out how to best tile the capacity over time surface with operations • Research agenda - specify new puzzles and/or provide new best solutions OP 1, 1 rd 1 OP 1, 2 R 1 R 2 dd 1 st(i) + p(i) ≤ st(j), where p(i) is the processing time of op i i OP 2, 1 R dd 2 rd(j) ≤ st(i) for each op i of job j Minimize ∑ |c(j) - dd(j)| Carnegie Mellon R 1 OP 2, 1 OP 1, 2 j st(i) + p(i) ≤ st(j) V st(j) + p(j) ≤ st(i) OP 2, 2 rd 2 j i OP 1, 3 R 2 OP 1, 1 OP 2, 2 OP 1, 3
What’s Missing from the Classical View of Scheduling Practical problems can rarely be formulated as static optimization tasks • Ongoing iterative process • Situated in a larger problem-solving context • Dynamic, unpredictable environment Carnegie Mellon
Managing Change “Scheduling” is really an ongoing process of responding to change Manufacturing Crisis Action Project Management Planning • Unpredictable, Dynamic Environment • Robust response Carnegie Mellon • Predictable, Stable Environment • Optimized plans
Approaches to Managing Change • Build schedules that retain flexibility • Produce schedules that promote localized recovery • Incremental re-scheduling techniques (e. g. , that consider “continuity” as an objective criteria) • Self-scheduling control systems Carnegie Mellon
Incremental Schedule Repair Several competing approaches to maintaining solution stability • Minimally disruptive schedule revision (temporal delay, resource area, etc. ) • Priority-based change • Regeneration with preference for same decisions Little understanding of how these techniques stack up against each other Even less understanding of how to trade stability concerns off against (re)optimization needs Carnegie Mellon
Delayed-Commitment Scheduling Procedures Identify a contention peak and post a leveling constraint R 1 Activity 2 Activity 1 Activity 2 R 1 Activity 1 Advantages • Retain flexibility implied by problem constraints (time and capacity) • Can establish conditions for guaranteed executability Carnegie Mellon
Building Robust Schedules Some open questions: • • Extended conditions for “Dispatchability” Robustness versus optimization Use of knowledge about domain uncertainties Local search with robust representations Carnegie Mellon
Self-Scheduling Systems • Distribute decision-making among individual entities (machines, tools, parts, operators; manufacturers, suppliers) • Specify local behaviors and protocols for interaction • Robust, emergent global behavior Carnegie Mellon
Morley’s GM Paint Shop System Paint Booth 1 Bid Dispatcher Announcement (new truck) Bid “If bid for same color then award else if empty booth then award else if queue space then award” Carnegie Mellon Paint Booth 2 Bid parameters: - same color as last truck - space in queue - empty queue
Tradeoffs Advantages: • • Complexity reduction Simple, configurable software systems Robust to component failures More stable computational load Problems: • No understanding of global optima (or how to achieve global behavior that attends to specific performance goals) • Prediction only at aggregate level (can become unstable) Carnegie Mellon
Adaptive Systems: “Routing Wasps” in the Factory Machine 1 Machine 2 . . . Machine N R-Wasp Agent 1 ST 2 P(route|ST, ØT) = _____ ST 2 + Ø T 2 R-Wasp Agent. N A B C A Jobs C B Response Thresholds: ØA, ØB, ØC, . . . Carnegie Mellon B Stimulus: SB
Updating Response Thresholds ØT = ØT – ∆1 if next job is same type as current job ØT = ØT + ∆2 if next job is a different type ØT = ØT – ∆3 if the machine is currently idle • Routing framework can be seen as an adaptive variant of Morley’s bidding rule • Experimental results showing significant performance improvement Carnegie Mellon
Some Open Issues in Multi-Agent Scheduling • Self-scheduling approaches do not preclude the use of advance schedules • How to incorporate? • Opportunistic optimization • Cooperative, distributed scheduling is a fact of life in many domains (geographic constraints, autonomous business entities, etc. ) • How to negotiate and compromise? • Can self-interest be compatible with global performance objectives? Carnegie Mellon
Integrating Planning & Scheduling “Planning & scheduling are rarely separable” Waterfall Model Planner Plan Scheduler Mixed-Initiative Model Planner Plan Scheduler Schedule Carnegie Mellon Schedule
Design Issues • Integrated search space versus separable subspaces • Single solver versus interacting solvers • Resource-driven versus strategy-driven • Loose coupling versus tight coupling Carnegie Mellon
JFACC Planner/Scheduler Plan Server HTN Planner (SRI) PLANS SCHEDULES ANNOTATIONS TRIGGERS Technological • Interleaved generation & repair of plans/schedules • Distributed architecture to support remote collaboration Carnegie Mellon Constraint Based Scheduler (CMU) Experimental • Simple, low-cost info. exchanges yield • Marked reduction in comp. time • Comparable plan/schedule quality • More complex models can improve performance further SRI International
Some Challenges that Remain • Scheduling models that incorporate richer models of state • Can integrated P & S problems really be solved as one big optimization task? • The limitations of SAT-style approaches • How to achieve tighter interleaving of action selection and resource allocation processes • Managing change in this larger arena Carnegie Mellon
Requirements Analysis “Scheduling is really a process of getting the constraints right” Current tools designed around a “Specify and Solve” model of user/system interaction • Inefficient problem solving cycle Mixed-Initiative solution models • Incremental solution of relaxed problems • Iterative adjustment of problem constraints, preferences, priorities Carnegie Mellon
Use of Relaxed Models to Identify Resource Capacity Shortfalls Carnegie Mellon
The AMC Barrel Allocator Domain: Day-to-Day Management of Airlift & Tanker Assets at the USAF Air Mobility Command (AMC) Technical Capabilities: • Efficient generation of airlift and tanker schedules • Incremental solution change to accommodate new missions and changes in resource availability over time • Flexible control over degree of automation • Selective, user-controlled constraint relaxation and option generation when constraints cannot be satisfied Carnegie Mellon
Parameterizable Search Procedures Assign. Mission: C 141, [t 1, t 2] Configuration Search Configurations Gen. Resources 305 th AMW 437 th AMW 60 th AW 62 nd AW Gen. Intervals I 1, 305 I 2, 305. . . I 1, 437 I 2, 437. . . I 1, 60 . . . Eval. Criteria I 1, 60. . . I 1, 62. . . Feasible - <Gen. Requested. Res, Gen. Intervals, Eval. Min. Completion > Delay - <Gen. Requested. Res, Gen. Delay. Ints, Eval. Min. Tardiness> Over-Allocate - <Gen. Requested. Res, Gen. Over. Ints, Eval. Min. Over. Usage> Bump – <Gen. Requested. Res, Gen. Bump. Ints, Eval. Min. Disruption> Alternative-MDS - < Gen. Altern. Res, Gen. Intervals, Eval. Min. Completion> Composite Relaxations - … Feasible - <Gen. Resources, Gen. Intervals, Eval. Min. Completion> Carnegie Mellon
Generate Relaxation Options Carnegie Mellon
Mixed-Initiative Scheduling Challenges • Management of user context across decision cycles • Explanation of scheduling decisions • Why did you do this? • Why didn’t you do that? • Adjustable autonomy Carnegie Mellon
Research Directions for the Next 10 Years • Deeper integration of AI and OR techniques • Robust schedules and scheduling • Global coherence through local interaction • Extension to larger-scoped problem-solving processes • Rapid construction of high performance scheduling services Carnegie Mellon
- Slides: 47