CMSC 722, AI Planning Planning and SchedulingSchedulingPlanning and SchedulingScheduling ProblemActionsReusable ResourcesConsumable ResourcesSlide 8ConstraintsCostsSlide 11Types of Scheduling ProblemsSingle-Stage Machine SchedulingMultiple-Stage SchedulingExampleNotationComplexitySolving Machine Scheduling ProblemsIP SolversPlanning as SchedulingLimitationsDiscussionIntegrating Planning and SchedulingTemporal AssertionsResource CapacitySlide 26Possibly Intersecting AssertionsConflict and ConsistencyPlanning ProblemsPIA GraphsSlide 31Finding Every Minimax Critical SetSlide 33Resolving Resource-Conflict FlawsContinuing the Previous Example …More about Over-Constraining ResolversSlide 37Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/1CMSC 722, AI PlanningPlanning and SchedulingDana S. NauUniversity of MarylandFall 2009Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/2SchedulingGiven:actions to performset of resources to usetime constraints»e.g., the ones computed by the algorithms in Chapter 14Objective:allocate times and resources to the actionsWhat is a resource?Something needed to carry out the actionUsually represented as a numeric quantityActions modify it in a relative waySeveral concurrent actions may use the same resourceDana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/3Planning and SchedulingScheduling has usually been addressed separately from planningE.g., the temporal planning in Chapter 14 didn’t include schedulingThus, will give an overview of scheduling algorithmsIn some cases, cannot decompose planning and scheduling so cleanlyThus, will discuss how to integrate themDana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/4Scheduling ProblemScheduling problemset of resources and their future availabilityactions and their resource requirementsconstraintscost functionScheduleallocations of resources and start times to actions»must meet the constraints and resource requirementsDana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/5ActionsAction aresource requirements»which resources, what quantitiesusually, upper and lower bounds on start and end times»Start time s(a) [smin(a),smax(a)]»End time e(a) [emin(a),emax(a)]Non-preemptive action: cannot be interruptedDuration d(a) = e(a) – s(a)Preemptive action: can interrupt and resumeDuration d(a) = i I di(a) ≤ e(a) – s(a)can have constraints on the intervalsDana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/6Reusable ResourcesA reusable resource is “borrowed” by an action, and released afterwarde.g., use a tool, return it when doneTotal capacity Qi for ri may be either discrete or continuousCurrent level zi(t) [0,Qi] is »zi(t) = how much of ri is currently availableIf action requires quantity q of resource ri, Then decrease zi by q at time s(a)and increase zi by q at time e(a)Example: five cranes at location li:We might represent this as Qi = 5Two of them in use at time t: zi(t) = 5 – 2 = 3Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/7Consumable ResourcesA consumable resource is used up (or in some cases produced) by an actione.g., fuelLike before, we have total capacity Qi and current level zi(t) If action requires quantity q of riDecrease zi by q at time s(a)Don’t increase zi at time e(a)Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/8An action’s resource requirement is a conjunct of assertionsconsume(a,rj,qj) & …or a disjunct if there are alternativesconsume(a,rj,qj) v …zi is called the “resource profile” for riDana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/9ConstraintsBounds on start and end points of an actionabsolute times »e.g., a deadline: e(a) ≤ u»release date: s(a) ≥ vrelative times»latency: u ≤ s(b)–e(a) ≤ v»total extent: u ≤ e(a)–s(a) ≤ vConstraints on availability of a resourcee.g., can only communicate with a satellite at certain timesDana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/10Costsmay be fixedmay be a function of quantity and duratione.g., a set-up cost to begin some activity,plus a run-time cost that’s proportional to the amount of timee.g., suppose a follows bcost cr(a,b) for aduration dr (a,b), i.e., s(b) ≥ e(a) + dr (a,b)Dana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/11Objective: minimize some function of the various costs and/or end-timesDana Nau: Lecture slides for Automated PlanningLicensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/12Types of Scheduling ProblemsMachine schedulingmachine i: unit capacity (in use or not in use)job j: partially ordered set of actions aj1, …, ajkschedule:»a machine i for each action ajk»a time interval during which i processes ajk»no two actions can use the same machine at onceactions in different jobs are completely independentactions in the same job cannot overlap»e.g., actions to be performed on the same
View Full Document