Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:

Slides:



Advertisements
Similar presentations
On the Complexity of Scheduling
Advertisements

Scheduling Planning with Actions that Require Resources.
ECE 667 Synthesis and Verification of Digital Circuits
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Inventory Control for Systems with Multiple Echelons.
ISE480 Sequencing and Scheduling Izmir University of Economics ISE Fall Semestre.
Lecture 10: Integer Programming & Branch-and-Bound
5-1 Chapter 5 Tree Searching Strategies. 5-2 Satisfiability problem Tree representation of 8 assignments. If there are n variables x 1, x 2, …,x n, then.
Scheduling with Outliers Ravishankar Krishnaswamy (Carnegie Mellon University) Joint work with Anupam Gupta, Amit Kumar and Danny Segev.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Best-First Search: Agendas
Lateness Models Contents
6 - 1 § 6 The Searching Strategies e.g. satisfiability problem x1x1 x2x2 x3x3 FFF FFT FTF FTT TFF TFT TTF TTT.
1 Pseudo-polynomial time algorithm (The concept and the terminology are important) Partition Problem: Input: Finite set A=(a 1, a 2, …, a n } and a size.
1 IOE/MFG 543* Chapter 1: Introduction *Based in part on material from Izak Duenyas, University of Michigan, Scott Grasman, University of Missouri, Rakesh.
1 Set # 4 Dr. LEE Heung Wing Joseph Phone: Office : HJ639.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
CPSC 322, Lecture 8Slide 1 Heuristic Search: BestFS and A * Computer Science cpsc322, Lecture 8 (Textbook Chpt 3.5) January, 21, 2009.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
5-1 Chapter 5 Tree Searching Strategies. 5-2 Breadth-first search (BFS) 8-puzzle problem The breadth-first search uses a queue to hold all expanded nodes.
ECE Synthesis & Verification - LP Scheduling 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Scheduling Algorithms Analytical approach.
1 IOE/MFG 543 Chapter 7: Job shops Sections 7.1 and 7.2 (skip section 7.3)
1 Contents college 3 en 4 Book: Appendix A.1, A.3, A.4, §3.4, §3.5, §4.1, §4.2, §4.4, §4.6 (not: §3.6 - §3.8, §4.2 - §4.3) Extra literature on resource.
Elements of the Heuristic Approach
INTRODUCTION TO SCHEDULING
1 Plan-Space Planning Dr. Héctor Muñoz-Avila Sources: Ch. 5 Appendix A Slides from Dana Nau’s lecture.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Outline:  Outline of the algorithm  MILP formulation  Experimental Results  Conclusions and Remarks Advances in solving scheduling problems with.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Introduction to Job Shop Scheduling Problem Qianjun Xu Oct. 30, 2001.
Chapter 1. Formulations 1. Integer Programming  Mixed Integer Optimization Problem (or (Linear) Mixed Integer Program, MIP) min c’x + d’y Ax +
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Short Term Scheduling. 2  Planning horizon is short  Multiple unique jobs (tasks) with varying processing times and due dates  Multiple unique jobs.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Outline Introduction Minimizing the makespan Minimizing total flowtime
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Chapter 3 Algorithms Complexity Analysis Search and Flow Decomposition Algorithms.
Roman Barták Visopt B.V. (NL) / Charles University (CZ) IP&S in complex and dynamic areas Visopt Experience.
CONSTRAINT-BASED SCHEDULING AND PLANNING Speaker: Olufikayo Adetunji CSCE 921 4/08/2013Olufikayo Adetunji 1 Authors: Philippe Baptiste, Philippe Laborie,
Chapter 2) CSP solving-An overview Overview of CSP solving techniques: problem reduction, search and solution synthesis Analyses of the characteristics.
Operational Research & ManagementOperations Scheduling Economic Lot Scheduling 1.Summary Machine Scheduling 2.ELSP (one item, multiple items) 3.Arbitrary.
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
CS 361 – Chapter 10 “Greedy algorithms” It’s a strategy of solving some problems –Need to make a series of choices –Each choice is made to maximize current.
Roman Barták (Charles University in Prague, Czech Republic) ACAT 2010.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Chapter 5 Branch-and-bound Framework and Its Applications.
1 Chapter 4 Geometry of Linear Programming  There are strong relationships between the geometrical and algebraic features of LP problems  Convenient.
Linear program Separation Oracle. Rounding We consider a single-machine scheduling problem, and see another way of rounding fractional solutions to integer.
Classification of Scheduling Problems
Scheduling with Constraint Programming
Some Topics in OR.
Basic Project Scheduling
Basic Project Scheduling
CMSC 722, AI Planning Planning and Scheduling
Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable.
Integer Programming (정수계획법)
Dana S. Nau University of Maryland 9:01 AM December 6, 2018
Chapter 1. Formulations (BW)
Integer Programming (정수계획법)
Topic 15 Job Shop Scheduling.
Dr. Arslan Ornek DETERMINISTIC OPTIMIZATION MODELS
Chapter 1. Formulations.
Presentation transcript:

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 1 CMSC 722, AI Planning Planning and Scheduling Dana S. Nau Dept. of Computer Science, and Institute for Systems Research University of Maryland

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 2 Scheduling l Given: u actions to perform u set of resources to use u time constraints l Objective: u allocate times and resources to the actions l What is a resource? u Usually represented as a numeric quantity u Actions modify it in a relative way u Several concurrent actions may use the same resource

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 3 Planning and Scheduling l Scheduling has usually been addressed separately from planning u Thus, will give an overview of scheduling algorithms l In some cases, cannot decompose them so cleanly u Thus, will discuss how to integrate them

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 4 Scheduling Problem l Scheduling problem u set of resources and their future availability u actions and their resource requirements u constraints u cost function l Schedule u allocations of resources and start times to actions »must meet the constraints and resource requirements

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 5 l Action a u resource requirements »which resources, what quantities u start time s(a), end time e(a), duration d(a) u usually, upper and lower bounds »s(a) in [s min (a),s max (a)] »e(a) in [e min (a),e max (a)] l Non-preemptive action: cannot be interrupted l Preemptive action: can interrupt and resume u d(a) = sum { d i (a) ≤ e(a)–s(a) | i in I} u can have constraints on the intervals

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 6 Resources l Reusable resource r u “borrowed” by an action, and released afterward »e.g., use a tool, return it when done u total capacity Q r, may be either discrete or continuous u current level z r (t) in [0,Q r ] »e.g., five cranes at a location Q r = 5, and 5 ≥ z r (t) ≥ 0 u if action requires quantity q of r, then diminish z r by q at time s(a), increase it by q at time e(a)

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 7 l Consumable resource r u “consumed” (or in some cases produced) by an action u afterwards, does not revert to previous value u e.g., use fuel u total capacity Q r u current level z r (t) in [0,Q r ]

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 8 l Resource requirement of an action is a conjunct of assertions u consume(a,r j,q j ) & … l or disjunct if there are alternatives  consume(a,r j,q j ) v … l z r is called the “resource profile” for z

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 9 Constraints l Bounds on start and end points of an action u absolute times »e.g., a deadline: e(a) ≤ u »release date: s(a) ≥ v u relative times »latency: s(b)–e(a) in [u,v] »total extent: e(a)–s(a) in [u,v] l Constraints on availability of a resource u e.g., can only communicate with a satellite at certain times

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 10 Costs l may be fixed l may be a function of quantity and duration u e.g., set-up cost plus run-time cost l e.g., suppose a follows b u cost c r (a,b) for a u duration d r (a,b), i.e., s(b) ≥ e(a) + d r (a,b)

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 11 l Objective: minimize some function of the various costs and/or end-times

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 12 Types of Scheduling Problems l Machine scheduling u machine i: unit capacity (in use or not in use) u job j: partially ordered set of actions a j1, …, a jk u schedule: »a machine i for each action a jk »a time interval during which i processes a jk »no two actions can use the same machine at once u actions in different jobs are completely independent u actions in the same job cannot overlap »e.g., actions to be performed on the same physical object

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 13 l Single-stage machine scheduling u each job is a single action, and can be processed on any machine u identical parallel machines »processing time p j is the same regardless of which machine can model all m machines as a single resource of capacity m u uniform parallel machines »machine i has speed(i); time for j is p j /speed(i) u unrelated parallel machines »different time for each combination of job and machine

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 14 l Multiple-stage scheduling problems u job contains several actions u each requires a particular machine u flow-shop problems: »each job j has exactly m actions {a ji | j = 1, …, m} »each a ji needs to be done on machine i »actions must be done in order a j1, a j2, …, a jm u open-shop problems »like flow-shop, but can do actions in any order u job-shop problems (general case) »constraints on order of actions, which machine for each action

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 15 Example l Job shop, machines m 1, m 2, m 3, jobs j 1, …, j 5. l j 1 : u m 2 for 3 time units, m 1 for 3 time units, m 3 for 6 time units l j 2 : l j 3 : l j 4 : l j 5 :

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 16 Notation l Standard notation for designating machine scheduling problems:  |  |   = type of problem: P (identical), U (uniform), R (unrelated) parallel machines F (flow shop), O (open shop), J (job shop)  = job characteristics (deadlines, setup times, precedence constraints), empty if there are no constraints  = the objective function l Examples: u Pm |  j |  j w j e j »m identical parallel machines, deadlines on jobs, minimize weighted completion time u J | prec | makespan »job shop with arbitrary number of machines, precedence constrants between jobs, minimize the makespan

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 17 Complexity l Most machine scheduling problems are NP-hard l There are many polynomial-time reductions P - identical parallel machines U - uniform parallel machines R - unrelated parallel machines F - flow shop O - open shop J - job shop

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 18 Solving Machine Scheduling Problems l Integer Programming (IP) formulations u n-dimensional space u Set of constraints C, all are linear inequalities u Linear objective function f u Find a point p=(x 1,…, x n ) such that »p satisfies C »p is integer-valued, i.e., every x i is an integer »no other integer-valued point p’ satisfies C and has f(p') < f(p) l A huge number of problems can be translated into this format l An entire subfield of Operations Research is devoted to Integer Programming u Several commercial IP solvers

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 19 IP Solvers l Most IP solvers use depth-first branch-and-bound l Depth-first backtracking u Node selection is guided by a lower bound function L(u) »For every node u, L(u) ≤ {f(v) : v is a descendant of u} procedure DFBB global u*  nil; f*  ∞ call search(r), where r is the initial node return (u*,f*) procedure search(u) if u is a solution and f(u) < f* then u*  u; f*  f(u) else if u has no unvisited children or L(u) ≥ f(u*) then do nothing else call search(v), where v = argmin{L(v) : v is a not-yet-visited child of u} L(u) is similar to A*’s heuristic function f(u) = g(u)+h(u) A* can be expressed as a best-first branch-and- bound procedure

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 20 Planning as Scheduling l Some planning problems can be modeled as machine-scheduling problems l Example: modified version of DWR u m identical robots, several distinct locations u job: container-transportation(c,l,l') »processed by a single robot go to l, load c, go to l', unload c u release dates, deadlines, durations u setup time t ijk if robot i does job j after performing job k u minimize weighted completion time l Can generalize the example to account for the following: u cranes for loading/unloading u arrangement of containers into piles l But can’t handle the part I said to ignore Let’s ignore this for a moment

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 21 Limitations l Some other things cause problems too:

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 22 Integrating Planning and Scheduling l Extend the chronicle representation to include resources u finite set Z={z 1,…,z m } of resource variables »z i is the resource profile for resource i l Like we did with other state variables, will use function-and- arguments notation to represent resource profiles u cranes(l) = number of cranes available at location l l Will focus on reusable resources u resources are borrowed but not consumed

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 23 Temporal Assertions l Resource variable z whose total capacity is Q l A temporal assertion on z is one of the following:

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 24 Temporal Assertions (Continued)

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 25 Example: same figure as before.

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 26 l Assume distinct resources are completely independent u Using a resource z does not affect another resource z' u Every assertion about a resource concerns just one resource l Don’t need consistency requirements for assertions about different resource variables u Just for assertions about the same variable

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 27

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 28 Consistency l A chronicle is consistent if u Temporal assertions on state variables are consistent »in the sense specified in Chapter 14 u No conflicts among temporal assertions

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 29 Example l DWR domain, but locations may hold more than one robot  Resource variable space (l) = number of available spots at location l u Each robot requires one spot

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 30 l Also need to specify total capacity of each resource l One way: fixed total capacity Q for {space(l) : l is a location} u Example: Q = 12 »At most 12 spots in each location »If location loc1 has only 4 spots then the initial chronicle will contain l Another way: make Q depend on the location l Q(loc1) = 4, Q(loc2) = 12, … l Suppose we’re only trying to find a feasible plan, not an optimal one u Then except for the resources, our definitions of planning domain, planning problem, etc. are basically the same as in Chapter 14

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 31

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 32

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 33

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 34

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 35

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 36

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 37 l Can use such constraints to resolve resource-conflict flaws

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 38

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 39

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 40 Three main steps: l solve open-goal flaws l solve threat flaws l solve resource-conflict flaws