1 / 66

Finite Capacity Scheduling

Finite Capacity Scheduling. 6.834J, 16.412J. Overview of Presentation. What is Finite Capacity Scheduling? Types of Scheduling Problems Background and History of Work Representation of Schedules Representation of Scheduling Problems Solution Algorithms Summary.

Download Presentation

Finite Capacity Scheduling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Finite Capacity Scheduling 6.834J, 16.412J

  2. Overview of Presentation • What is Finite Capacity Scheduling? • Types of Scheduling Problems • Background and History of Work • Representation of Schedules • Representation of Scheduling Problems • Solution Algorithms • Summary

  3. What is Finite Capacity Scheduling? • Informal and Partial Definitions • Determining the best sequence of tasks on a resource • Optimal assignment of limited resources to tasks to fulfill a set of orders • Elimination of factory bottlenecks • Formal Definition • The allocation of resources over time to perform a set of tasks • such that task precedence constraints and resource capacity constraints are not violated, and overall deadline goals are met to the best extent possible

  4. Example Schedule • Gantt chart

  5. Types of Scheduling Problems • Energy • Job Shop • Batch Process • Discrete Manufacturing • Servicing of Complex Equipment • Scheduling of a Unique Resource • Military Logistics

  6. Energy Scheduling • Electrical utility generator scheduling to meet anticipated demand • Ex. – Utility with 3 Generators

  7. Energy Scheduling (cont.) • Demand Profile

  8. Energy Scheduling (cont.) • Best Schedule:

  9. Let if generator i is on during time j, 0 otherwise be the energy generated by generator i during time j Cost can then be expressed as From the previous schedule, non-zero values of B and E are: So cost = 70 + 88 + 60 + 24 = 242

  10. Constraints for this problem can be expressed as Where is demand at time j, and is the capacity of generator i. Note how this forces Eij to be 0 if Bij is. This, combined with the constraint that the B variables must be binary, and the previously defined cost function, yields an optimization problem with discrete and continuous constraints. Such problems are often solved by Mixed Integer Linear Programming algorithms (more on this later).

  11. Variations on Problem • Suppose utility has 100 kwh energy storage device (battery that has no hourly or incremental cost) • Could run generator 2 during 1st hour to charge battery • Could then discharge battery to meet demand in 3rd hour • Eliminates need to use generator 3 • Suppose another consumer would like to buy energy • New consumer has their own demand profile • Utility must evaluate whether it is profitable to sell to this new customer • This is a function of base demand profile, consumer’s demand profile, generation costs, and what the new consumer is willing to pay • Suppose generator 3 has high hourly cost but low energy cost • It may make sense to run it and shut off generators 1 and 2

  12. Variations on Problem – Co-generation • Co-generation introduces a new set of complex considerations • Ex. – Refinery that uses waste heat from process to make steam to generate electricity • Refinery may schedule production to simultaneously meet production goals and demand for electricity, thus maximizing profit • Two kinds of demand • Refinery’s main products (gasoline of various grades, etc.) • Electricity (demand profile as shown previously) • Also complicated by the fact that electricity prices vary based on demand, and on time of day • Contracts between factories, utilities, and customers can be extremely complicated

  13. Job Shop Scheduling • Schedule n jobs on m machines • Each job requires processing on each machine in a particular order • This order differs from one job to another • Often formulated as constraint satisfaction problem with binary temporal constraints among the mn tasks • Eliminating bottleneck resources is an important goal

  14. Batch Process Scheduling • Tasks have “size” that is a continuous and/or discrete function of the amount of material to be produced to fulfill an order • Task size can affect task duration, resource requirements • Resource utilization represented with a combination of discrete and continuous variables • Often, and important goal is to find ways to combine similar tasks into larger “batches” in order to minimize changeover costs

  15. Example – Beer Production • After brewing and aging, beer must be filtered, prior to packaging.

  16. Discrete Manufacturing Scheduling • Semiconductor • Auto assembly • Heavy equipment • Aircraft assembly • Electronic parts assembly

  17. Discrete Manufacturing Scheduling (cont.) • Characteristics • Similar, in some ways, to job shop, and to batch process scheduling • Process plan instantiated based on order • Process plans for similar types of orders are similar • Fewer continuous variables and constraints • Task sizes are discrete functions of order • Ex. – a car needs 4 tires • Resource allocations are typically binary • Resource is utilized or not • Resources typically allocated to tasks for individual orders • Typically, no batching of tasks

  18. Scheduling Service of Complex Equipment • Ex. – Space Shuttle Ground Processing • Approximately 40,000 hours of technician labor between flights.

  19. Space Shuttle Service (cont.) • About 50% same for each flight. Rest is function of • payloads, • maintenance based on age of components • orbiter modifications • Very dynamic environment • Arrival date subject to change (and affected by weather) • Resource requirements – parts, supplies, people • State (configuration) of system being repaired is important • State constraints (requirements and effects), very important • Use of changeover tasks to get system into correct state

  20. Scheduling of a Unique Resource • Ex. – Hubble Telescope

  21. Scheduling of Hubble Telescope (cont.) • 10,000 to 30,000 observations scheduled per year • Primary resource constraint is available observing time • Affected by orbital position • Required orientation to keep sunlight on solar panels • Many constraints periodic • Disruptions • Targets of opportunity (new supernova) • Spacecraft anomalies • Changes in observing programs

  22. Military Logistics • Transportation of troops and supplies • Resources to be scheduled are transport vessels and cargo planes • Groups of troops and supplies represent tasks • Resource capacity constraints significant • Deadline constraints significant • Precedence constraints significant • Equipment must be delivered in appropriate sequence

  23. Background of Work on Scheduling(a representative, but not exhaustive list) • MRP (Material Requirements Planning), MRP II (1970’s) • Demand for end-products expanded into time-phased requirements for parts • Timing based on operation leadtimes • No accounting of resource loading • Schedules often un-realistic • Mark Fox, CMU, ISIS (1980’s) • Each order scheduled one at a time • Constructive approach, incrementally extends partial schedule solution until complete • Simple best-first search with backtracking • Formulation as CSP, hard and soft constraints, continuous and discrete • Some constraint propagation (forward chaining) capability

  24. Background of Work on Scheduling (cont.) • Monte Zweben, NASA, Gerry (1990’s) • Iterative repair algorithm • Modifies complete schedule to repair constraints, or to make more optimal • Hill-climbing, search states are complete solutions • Pantelides, Imperial College (1990’s) • Chemical Process Scheduling • RTN, MILP algorithm • Discrete time formulation • Branch and bound, branch and cut

  25. Areas of Work Related to Scheduling • Assignment Problem • Assign n tasks to n resources (no time rep.) • Specialized algorithm solves this efficiently • Transportation Problem • Transfer material between nodes in a graph • Traveling Salesman Problem • Resource “visits” n tasks (optimal sequencing of tasks on a resource) • Graph theory, flow networks (used in TSP) • Long-Range Planning • using Dynamic Programming • Combinatoric Optimization, CSP, A* search, MILP

  26. Representation of Schedules • Task • Start time • Finish time • Duration • Resource assignments • Resource • Renewable (equipment for example) • Non-renewable (material or product, for example) • Useful to think of task as consuming one set of resources, and producing another set • For equipment, the task “consumes” the resource at the start time, and “produces” it (makes it available again) at the finish time.

  27. Representation of Schedules (cont.) • Attributes of materials (non-renewable) resources - amount and state • Amount of flour, number of loaves of bread – related to task size • State – temperature of bread, freshness • Attributes of equipment (renewable) resources – state • Oven at input is clean (required state), oven at output is dirty (effect) • Cleaning oven is “changeover” task • Baker at output is tired (taking a knap might be changeover) • Attributes of tasks related to those of resources

  28. Representation of Schedules:Discrete vs. Continuous Time Representations • Discrete • Scheduling horizon divided into discrete, equal intervals • Task start, finish times expressed in terms of these increments • Advantageous for certain scheduling algorithms • Easy to check for resource capacity violations • Disadvantage is that if fine time granularity over longer scheduling horizon is required, then many intervals • Problem size becomes un-manageable • Continuous • Task start, finish times expressed as real numbers • Smaller number of variables • Discrete event vs. discrete time • Disadvantage is that checking resource capacity violations is more complicated • Rules out use of certain scheduling algorithms

  29. Representation of SchedulesGantt Chart

  30. Representation of Scheduling Problems • Resource-Operation Network (RON) • Inspired by Imperial College RTN • Consists of Operations and Resource Requirements • Operation • Class of task • Duration may be constant, or may be function of other things • Other attributes (amount, type of material to be produced) • Resource Requirement • Renewable and non-renewable resources • Incorporates notion of state (of a material or a resource) • Task is an instantiation of an operation • Resource assignment is an instantiation of a resource requirement

  31. Representation of Scheduling Problems (cont.) • - Note similarity to schedule representation • Attributes of operations and resource requirements similar • to attributes of tasks and resources

  32. Representation of Scheduling Problems:Constraints • Resource requirements, Operations have attributes • Some general (like duration, start-time, etc.) • Some problem specific (state of a particular resource type) • Attributes can have discrete or continuous values • Combination of algebraic and logical constraints used to constrain values of attributes • Kneading.finish_time < Baking.start_time • Baking.OvenInput.Status = clean • Baking.Dough.amount = f(Baking.size) • RON architecture is general enough to support just about any kind of constraint (algebraic, logical, even functions) • However, there are a number of important basic types of constraints that are often used in scheduling

  33. Representation of Scheduling Problems:Common Constraint Types • Constraints associated with resources • Resource utilization (how much of a resource a task needs) • Resource capacity (resource utilization should not exceed this) • Resource state • Task may require resource to be in particular state at beginning of task • Task may leave resource in particular state at end of task (effect) • Motivation for changeover tasks • Resource availability (calendar) • Resource (labor for example) may not be available on weekends • Constraints associated with tasks • Duration (may be constant, or may be function of task size) • Start, finish (related by duration) • Precedence (kneading before baking) • Usually not necessary when using RON formulation (falls out) • Due dates (ultimately, the reason for doing scheduling)

  34. Resource Utilization Constraints • Operation usually determines amount of resource required, and amount produced • May be simple constant: • Baking.Oven_Input.amount = 1 (need one oven) • Baking.Oven_Output.amount = 1 (oven not consumed by process) • May be integer function of task size • Baking.Size = Baking.Break.Loaves (task size = number of loaves) • Baking.Flour.amount = 12 x Baking.Size • May be continuous function of task size • HoldingTank.level = 50 x Filtering.Size • May even be a complex, non-linear function • Lubricant.amount = f(Drilling.Size)

  35. Resource Capacity Constraints • Resource utilization should not exceed maximum capacity for a resource • Resource utilization becomes function of time over scheduling horizon

  36. Resource State Constraints • Constraint on state of input resource requirement • Analogous to requirement part of planning operation (Graphplan, etc.) • Baking.Oven_Input.status = clean • Constraint on state of output resource requirement • Analogous to effects part of planning operation • Baking.Oven_Output.status = dirty • Changeover operation used to restore resource to required state • Cleaning operation converts dirty oven to clean one • State requirements, changeover operations, often the key issue in generating good schedule • Reason: changeover operations take time (setup time) • Goal is often to minimize changeovers • This can be achieved by batching similar tasks • There is a limit to this, however, imposed by limits of inventory (resource capacity constraints)

  37. Soft Constraints and Cost • It is often advantageous to think of scheduling as a constrained (or even un-constrained) optimization problem, rather than a constraint satisfaction problem • Analogous to notion of Lagrange multipliers in non-linear constrained optimization • Allow some constraints to be relaxed (make them soft) • However, relaxation has a cost penalty • Relaxation of deadline constraint results in lateness penalty • Relaxation of resource capacity constraint results in overtime pay requirement • Production costs usually directly associated with resource utilization • Thus, cost function is sum of • Resource utilization costs • Constraint relaxation penalties

  38. Process Plan Instantiation • Instantiate tasks for process plan (operations) for each order • Ex. 3 orders for bread

  39. Instantiated Tasks (Based on Process Plan) Also, Cleaning1, Cleaning2, and Cleaning3 (size not an issue for these)

  40. Process Plan Instantiation (cont.) • Initial resource assignment based on resource requirements using very simple dispatch heuristics • Sequence tasks on resource based on order

  41. Process Plan Instantiation (cont.) • This actually is not a bad schedule in some circumstances • Probably is a good schedule for this example • On the other hand, if the baker doesn’t care about freshness, and wants to take Tues. off • Batch orders together to improve efficiency • Requires inventory capacity • Refrigerated storage space • Tolerance to reduction in quality (quality is a state variable that decays over time)

  42. Solution of Scheduling Problems • Unlike representation, which is relatively universal, solution algorithm is problem-dependent • Most real-world problems also require heuristics, specialized for the particular type of problem

  43. Solution Algorithms • Dispatch Algorithms • MILP • Relation to A*, constructive constraint-based • Constructive Constraint-Based • Iterative Repair • Simulated Annealing • How A* heuristics can be used here (relaxation of deadline constraints) • Genetic Algorithms

  44. Dispatch Algorithms • Process plan instantiated (as described previously) • Tasks put into queues, one for each order • (Preserves task precedence constraints)

  45. Dispatch Algorithms (cont.) • Tasks released one at a time from queues • Assigned to first available resource • Which queue is popped depends on task priorities • Queue with highest priority task at top gets popped • Task priority based on variety of factors • Mainly order importance and urgency • Apex system is a dispatch system • Flight controller assistant, described by Rob Kochman

  46. Dispatch Algorithms (cont.) • Advantages • Simple to implement • Can easily handle changing requirements by updating priorities • Disadvantages • When task is popped, it is assigned to first available resource • If none available, it just waits, and nothing further can be done • Thus, susceptible to bottlenecks • Doesn’t really set schedule times • Can’t guarantee when things will get done • No look-ahead, so no optimization • No capability for JIT • Tasks “shifted to the left”

  47. Dispatch Algorithms (cont.) • However • Much, if not most, real-world scheduling is done in this way • Manual scheduling is often done in this way

  48. MILP (Mixed Integer Linear Programming) • Used for energy scheduling • Chemical process scheduling • Pantelides, et. al., Imperial College • Sometimes used in discrete manufacturing • Pekny, Miller, Traveling Salesman Problems • For scheduling, requires discrete time formulation

  49. MILP Basics • Constraints represented as linear equalities and inequalities • A is constant matrix, b is constant vector, x is vector of variables • X vector has lower and upper bounds • X consists of real and integer variables • Cost represented as weighted sum of x

  50. MILP Basics • Energy scheduling example presented previously is an example of an MILP

More Related