Top Banner
Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI [email protected]
46

Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI [email protected].

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Scheduling:Overview of Concepts and Methods

Amgen

March 30, 2005

Bill Wolfe, CSUCI

[email protected]

Page 2: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.
Page 3: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Scheduling: Definition

• Assigning resources to activities over time• Satisfy constraints

– feasible schedules

• Create “good” schedules– criteria/objective

Page 4: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Scheduling

• Activities: job, task, delivery, transportation, machining, milling, grinding, painting, sanding, chemical bath, ..

• Resources: machines, operators, power, etc.• Constraints: capacity, precedence, cost, due dates,

nonpreemptive, power, size/shape, union rules, ..• Criteria: profit/cost, priorities, preferences, make

span, utilization, customer satisfaction, opportunity, ..

Page 5: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Example Domains

• Universities• Satellites• Factories• Transportation• Traffic• Home Construction• Military Logistics

• Vehicle Routing• Facility Maintenance• Sports Leagues• Courts• Hospitals• etc.• etc.

Page 6: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Factory Scheduling

• Activities:

• Resources:

• Constraints:

• Objectives:

Page 7: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Satellite Scheduling

• Activities:

• Resources:

• Constraints:

• Objectives:

Page 8: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

University Scheduling

• Activities:

• Resources:

• Constraints:

• Objectives:

Page 9: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Scheduling is difficult

• Modeling: real-world domains are hard to model.

• Complexity: large # options, combin. explosion, NP.

• Criteria/Objectives: vague, ambiguous, difficult to quantify, multiple objectives, conflicting objectives.

• Uncertainty: unexpected events, new orders, cancellations, changing costs/priorities, failures, ..

• Domain-Specific Dependencies: unique heuristics and rules of thumb -- makes it hard to transfer results from one domain to another.

Page 10: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Example: Distribution Criteria

• Different types of:– Customers– Priorities– Tasks

• Might want the resulting schedule to satisfy distribution of job types:– 50 % Type A, 25% Type B, 25% Type C

• Might want the resulting schedule to have:– 100% of type A jobs (i.e.: all type A jobs make the schedule)– 100% of priority 10 jobs (i.e.: all the jobs with the top priority

make the schedule.

Page 11: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Multiple Conflicting Criteria

• Request:– High quality product– On time– Low cost

• Response:– Pick any two!

Page 12: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Levels of Scheduling (Morten)

• Long Range Planning– Plant expansion, layout, design

• Middle Range Planning– Production smoothing, logistics

• Short Range Planning– Requirements, shop bidding, due date setting

• Scheduling– Shop routing, line balancing, batch sizing

• Reactive Scheduling– Hot jobs, down machines, late material

Page 13: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.
Page 14: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Approaches to Scheduling

• Manual

• OR/Mathematical/Exact

• Heuristic Search

• Advanced Algorithms

• Expert Systems & AI

• Mix

• Scheduling “System”

Page 15: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

OR Methods

• Mathematical Programming– Linear/nonlinear programming

– Dynamic, programming

– Integer/mixed programming

– Network Analysis

• Probabilistic Modeling– Inventory Theory

– Queuing Theory

– Markov Chains

Page 16: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Heuristic Methods

• Generate schedules that are “good enough”• Constructive vs. Repair• Search

– Limited depth/breath first search– Look ahead methods, A*– Neighborhood search, Hill Climbing

• Bottleneck-driven, Constraint-driven• Min-Conflicts• Priority Dispatch

– Priority sort, resource allocation rules• Task assignment rules

– Rules for resource allocation, conflict resolution, bump

Page 17: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Advanced Methods

• Genetic Algorithms• Neural Networks• Simulated Annealing

– Exploitation vs. Exploration

– Intensification vs. Diversification

• Expert Systems• Fuzzy Systems• Mixes of any/all methods

Page 18: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Desirable Algorithm Attributes

• Fast

• Accurate– Produces high quality schedules

• Simple– Easy to understand– Operators, users, customers

Page 19: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Classic Problems

• Linear Programming– Resources, activities, constraints.– Linear constraints/objective function

• Transportation Problem• Assignment Problem• Maximum Flow• Shortest Paths in Weighted Graphs• Knapsack• Traveling Salesman• Weighted Shortest Processing Time• Weighted Early-Tardy Processing Time• PERT-CPM

Page 20: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Example: Knapsack Problem

• Knapsack– n items with weight wi and value vi.

– Constraint: wi <= w

– Maximize: vi

• Example:– Set of projects pi with cost ci and value vi

– Constraint: ci <= c

– Maximize: vi

Page 21: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Example: Activity Selection

• n activities– start time = si

– stop time = fi

• Select the maximum number of non-overlapping activities

• Optimal solution: – Greedy algorithm:

• sort by finish time: f1<= f2 <= ..... <= fn

• allocate and remove conflicting activities.

Page 22: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Time

Competing Activities

Resource:

Page 23: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Assignment Problem

• Let cij = cost of assigning resourcei to taskj

• Find xij that minimizes: i j cij xij

• Constraints: j xij = 1 for all i

• every resource has one task.

i xij = 1 for all j• every task has one resource.

– xij = 0 or 1 (the decision variable)• permutation matrix

Page 24: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

course1 course2 course3 course4 course5

Teacher1

Teacher2

Teacher3

Teacher4

Teacher5

2 9 10 3 1

5 2 8 7 6

5 5 6 6 6

7 1 8 7 9

4 1 7 8 5

Page 25: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Transportation Problem

• Probably the most important special case of linear programming.

• Source i supplies si units.• Destination j has demand for dj units.• Let cij denote the cost per unit distributed.• Let xij denote the number of units distributed from source i to

destination j.• Minimize: i j cij xij

• Constraints: j xij = si

i xij = dj

– xij >= 0.

Page 26: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Traveling Salesman Problem

• Classic problem, NP-Complete.• Find the shortest closed path through a set of “cities”.

– visit each city once and only once.– return to the start city.

• Heuristics:– nearest city (constructive)– 2-opt (improvement/hill climbing)– neural networks (Hopfield)– genetic algorithms– etc.

Page 27: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.
Page 28: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

System Approach

• Human operators

• Tools for managing complexity, uncertainty

• GUI, visualization techniques

• Domain Specific support– Information Systems/Database support– Decision/Advisory support

• Communications/messaging

Page 29: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.
Page 30: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Dynamic Environments

• Scheduling in a rapidly changing environment can be an exercise in futility.

Uncertainty

Task Complexity

real-time control

easy

hard

ripe

Page 31: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Uncertainty vs. Task Complexity

Uncertainty

Task Complexity

real-time control

easy

hard

ripe

Page 32: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Nervous Scheduling

• Refining a schedule in response to “noise” can lead to nervous scheduling– Lots of changes in a short time– Confused operators, customers– Overreaction to meaningless differences

• “Noise” comes from modeling inaccuracies, and poor estimates of scheduling criteria.

• Noisy environments control systems.

Page 33: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Example: Thermostat

72

73

71

Time

Temperature

(Set)

Page 34: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

No Scheduling System is an Island

• Scheduling systems interact with, and depend on, other systems, both inside and outside the plant.

• Changes become more costly as time progresses.• Priority Aging: when a task is “put on the

schedule”, it creates expectations and spawns related subtasks (i.e.: grows “roots”), making it more and more costly to cancel as time goes on.

Page 35: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Progressive Refinement

• Outday (e.g.: a month out)– Most important/costly

constraints considered– Constraints may be violated

(e.g.: Overbooking)– Allow new tasks, cancellations– Get supplier commitments

• Stabilization (e.g.: a week out)– Most hard constraints satisfied– Check intersystem

commitments– Look for schedule

improvements– Cancellations are now costly

• Near real time (e.g.: a day out)

– All hard constraints satisfied.

– Look for last minute opportunities

• Real time– Implementation

– Safety checks

– Monitoring operations

– Data collection

Page 36: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Hard vs. Soft Constraints

• Hard rigid, unbending– Must be satisfied– Define the search space

• Soft pliable, flexible, relaxable– Measured in degrees– Define the quality of a schedule

• Feasible schedule:– Satisfies all hard constraints

• Optimal schedule:– Feasible, and has best possible score on soft constraints

Page 37: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Window of Opportunity

• Period of time (t0, tf) when a task can be done

– Hard constraint: must be inside the window

– Soft constraint: middle of the window is best

t0 tf

Utility Function

t

Task

score

Page 38: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.
Page 39: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

General Rule of ThumbTask Value

Task Laxity

First

Last

Low Laxity, High Value, tasks shouldbe scheduled first.

High Laxity, Low Value, tasks shouldbe scheduled last.

Page 40: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Another Rule of Thumb

• Schedule the shorter, higher value, jobs as soon as possible.

• Applies primarily to highly uncertain environments.

• A complex schedule has little chance of success in a highly uncertain environment.– so, get the easy, high value, jobs done as soon

as they pop up.

Page 41: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Factory Scheduling

• Machines• Tasks with:

– processing times– value (or “weights”)– due dates– precedence constraints (routing constraints)– preemptive or nonpreemptive constraints– release times– completion times

• Schedule “goodness” measures such as:– Makespan, weighted flowtime, weighted lateness, # tardy jobs, ..– Maximum lateness, maximum tardiness, – Weighted earliness + weighted tardiness

Page 42: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Weighted Shortest Processing Time

• n jobs, single machine• pi = processing time for job i• wi = weight (or value) of job i• Objective: Minimize:

– weighted flow time: wi (Ci – ri)– weighted completion time: wi Ci

– weighted lateness: wi (Ci – di)• Optimal ordering of jobs is:

w1/p1 >= w2/p2 >= .........>=wn/pn • “Importance per unit time”

Page 43: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

WSPT Example

• 3 jobs: – job1: worth $1000, takes 50 hours– job2: worth $200, takes 5 hours– job3: worth $2000, takes 120 hours

• Sort by:– job1: priority = $20.00/hr.– job2: priority = $40.00/hr.– job3: priority = $16.67/hr.

• Solution: job2 job1 job3

Page 44: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

WSPT Example 2

• n jobs:– jobi has processing time pi

– jobi has due date d (same due date for all jobs)

– jobi has weight 1 (equal value jobs)

• Minimize the number of late jobs.

• Solution:– order by 1/pi shortest jobs first.

Page 45: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

Weighted Early-Tardy Problem

• Jobs with due dates and weights• Penalty for being late (wT)• Penalty for being early (wE)• NP hard

Due date

Earlinesspenalty

Latenesspenalty

Task

Slope = wE

Slope = wT

Time

Page 46: Scheduling: Overview of Concepts and Methods Amgen March 30, 2005 Bill Wolfe, CSUCI william.wolfe@csuci.edu.

References

• Heuristic Scheduling Systems– T. E. Morton, D. W. Pentico, Wiley, 1993.– ISBN: 0471578193.

• Intelligent Scheduling– M. Zweben, M. Fox. Morgan Kaufmann, 1998. – ISBN: 1558602607

• Introduction to Algorithms– T. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein– The MIT Press; 2nd edition, 2001.– ISBN: 0262032937

• Introduction to Operations Research– F. Hiller, G. Lieberman– McGraw-Hill Science/Engineering/Math; 7 edition, 2002.– ISBN: 0072535105