EHSAN KHODDAM MOHAMMADI MILAD GANJALIZADEH BABAK YADEGARI First Steps to Study SCHEDULING ن م ح ر ل له ا ل م اس ب م ي ح ر ل ا
Dec 29, 2015
EHSAN KHODDAM MOHAMMADIMILAD GANJALIZADEH
BABAK YADEGARI
First Steps to Study SCHEDULING
بسم الله الرحمن الرحيم
DEFINITION allocation of scarce resources to activities
with the objective of optimizing one or more performance measures
Example of RESOURCES
assembly plant
CPU memory and I/O
devices
runways at an airport
mechanics in an automobile repair shop
• operations in a manufacturing process
• execution of a computer program
• landings and take-offs at an airport
• car repairs in an automobile repair shop
Example of ACTIVITIES
SOME NECESSARY PARAMETERS (1/2) Number of jobs : n Number machines: m subscript j refers to a job subscript i refers to a machine Processing Time (pi j ):
job j requires processing on machine i Release Date (r j ) :
the time the job arrives at the system, which is theearliest time at which job j can start its processing.
Due Date (dj ) : The due date dj of job j represents the date the job is expected
to complete. Completion of a job after its due date is allowed, but it will incur a cost.
Deadline (d¯ j ): The deadline d¯ j of job j represents the hard deadline that the
job must respect Weight (w j ):
The weight w j of job j reflects the importance of the job
SOME NECESSARY PARAMETERS (2/2)C j denote the completion time of job j. The lateness of job j is defined as: L j = C
j − djThe tardiness of job j is defined as : Tj =
max(L j , 0)The unit penalty of job j is defined as Uj =
1 if C j > dj otherwise, Uj = 0.
Introduction to Scheduling Scientific Notation
PART1
NOTATION3-field notation α|β|γ α : describes the machine environment and
contains a single entry β : provides details of job characteristics and
scheduling constraints. It may contain multiple entries or no entry
γ : contains the objective function to optimize. It usually contains a single entry
α (Machine Field) Single Machine (1) : There is only one machine in the system.
Parallel and Identical Machines (Pm): There are m identical machines in parallel
Uniform Machines (Qm) : There are m machines in parallel, but the machines have different speeds
Unrelated Machines (Rm): There are m machines in parallel, but each machine can process the jobs in different paces
Job Shop (Jm): In a job shop with m machines, each job has its own predetermined route to follow. It may visit
some machines more than once and it may not visit some machines at all
Flow Shop (Fm): In a flow shop with m machines, the machines are linearly ordered and the jobs all follow the same route (from the first machine to the last machine)
Open Shop (Om) : In an open shop with m machines, each job needs to be processed exactly once on each of the
machines. But the order of processing is immaterial
β (Job Characteristics) Preemptions (pmtn) No-Wait (nwt) Precedence Constraints (prec)Release Dates (rj)Restrictions on the Number of Jobs (nbr ) Restrictions on the Number of Operations
in Jobs (nj)Restrictions on the Processing Times (pj )Deadlines (d^ j )
γ (Objective Function)The objective to be minimized is always a function
of the completion times of the jobs.
Makespan (Cmax): The makespan is defined as max(C1, . . ., Cn).
Maximum Lateness (Lmax):The maximum lateness is defined as max(L1, . . ., Ln).
TotalWeighted Completion Time (wjC j ):The total (unweighted) completion time is denoted by C j .
TotalWeighted Tardiness (w j Tj ):The total (unweighted) tardiness is denoted byTj .
WeightedNumber ofTardy Jobs (wjUj ):The total (unweighted) number of tardy jobs is denoted byUj .
A Tutorial on Complexity
PART2
Complexity Theory,WHY?Complexity theory is an important tool in scheduling
research.When we are confronted with a new scheduling
problem, the very first thing we try is to develop efficient algorithms for solving the problem.
Unfortunately, very often, we could not come up with any algorithm more efficient than essentially an enumerative search, even though a considerable amount of time had been spent on the problem.
In situations like this, the theory of NP-hardness may be useful to pinpoint that no efficient algorithms could possibly exist for the problem in hand.
Therefore, knowledge of NP-hardness is absolutely essential for anyone interested in scheduling research.
P=NP ? (1/2)Class P : consists of those problems that
are solvable in polynomial timeClass NP : consists of those problems that
are "verifiable" in polynomial time. What we mean here is that if we were somehow given a "certificate" of a solution, then we could verify that the certificate is correct in time polynomial in the size of the input to the problem.
Class NPC (NP - complete) : if it is in NP and is as "hard" as any problem in NP
P=NP ? (2/2)if any NP-complete problem can be solved
in polynomial time, then every NP-complete problem has a polynomial-time algorithm.
If you can establish a problem as NP-complete, you provide good evidence for its intractability.
As an engineer, you would then do better spending your time developing an approximation algorithm or solving a tractable special case (RELATION TO SCHEDULING)
Two main kind of problem (1/2)Decision Problem: the answer is simply
"yes" or "no”
Optimization Problem: each feasible (i.e., "legal") solution has an associated value, and we wish to find the feasible solution with the best value
Two main kind of problem (2/2)We usually can cast a given optimization
problem as a related decision problem by imposing a bound on the value to be optimized.
if a decision problem is hard , then related optimization problem is hard.
PartitionGiven a list A = (a1, a2, . . . , an) of n
integers, can A be partitioned into A1 and A2 such that ?
DECISION PROBLEM
0/1-Knapsack OptimizationGiven a set U of n items, U = {u1, u2, . . . , un}, each item uj (sj=size, vj = value) a knapsack with size KFind a subset U ⊆ U such that all the items in U
can be packed into the knapsack and such that the total value of the items in U is maximum.
0/1-Knapsack DecisionGiven a set U of n items,U = {u1, u2, . . . ,
un} each item uj
(sj=size, vj = value) a knapsack with size K and a bound B Is there a subset U` ⊆ U such that
and ?
polynomial reducibility (1/2) Definition: Let P and Q be two decision problems.P is polynomially reducible Q ( P ∝ Q)
1. if there is a function f that maps every instance IP of P into an instance IQ of Q such that:
IP is a Yes-instance IQ is a Yes-instance.
2. f can be computed in polynomial time.
polynomial reducibility (2/2) f does not have to be one-to-one
the status of IP is unknown to f
P ∝ Q does not imply that Q ∝ P
reducibility is transitive: P ∝ Q , Q ∝ R P ∝ R.
Proof:Let A = (a1, a2, . . . , an) be a given instance of Partition. We create an instance of the decision version Of P2 || Cmax as follows. Let there be n jobs, with jobi having processing time ai . In essence, each job corresponds to an integer in A. Let the bound B be such .Clearly, the mapping can be done in polynomial time. It is easy to see that there is a partition of A if and only if there is a schedule with makespan no larger than B. ✷
Some SCHEDULING at last!Theorem : The Partition problem is reducible to the
decision version of P2 || Cmax
In the above reduction, 1.we create a job with processing time equal to an integer in the instance of the Partition problem. 2.The given integers can be partitioned into two equal groups if and only if the jobs can be scheduled on two parallel and identical machines with makespan equal to one half of the total processing time.
More SCHEDULING!Theorem : The 0/1-Knapsack Decision problem is
reducible to the decision version of 1 | dj = d | .
Proof: WHAT DO YOU THINK???IF YOU CAN’T PROVE THIS, EMAIL TO ME ✷
HINT: In the above reduction, we create, for each item uj in the 0/1-Knapsack Decision, a job with a processing time equal to the size of uj and a weight equal to the value of uj . We make the knapsack size K to be the common due date of all the jobs. The idea is that if an item is packed into the knapsack, then the corresponding job is an on-time job; otherwise, it is a tardy job. Thus, there is a packing into the Knapsack with value greater than or equal to B if and only if there is a schedule with the total weight of all the tardy jobs less than or equal ✷
JUST KIDDING about E-mail! HINT IS ANSWER!
No More Scheduling!!!
THANKS FOR YOUR ATTENTION
REFRENCESHandbook of Scheduling: Algorithms,
Models and Performance Analysis, Joseph Y-T. Leung, CHAPMAN & HALL/CRC
© 2004
Introduction to Algorithms, Second Edition by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein ,The MIT Press © 2001