Job-shop scheduling explained

Job-shop scheduling, the job-shop problem (JSP) or job-shop scheduling problem (JSSP) is an optimization problem in computer science and operations research. It is a variant of optimal job scheduling. In a general job scheduling problem, we are given n jobs J1J2, ..., Jn of varying processing times, which need to be scheduled on m machines with varying processing power, while trying to minimize the makespan – the total length of the schedule (that is, when all the jobs have finished processing). In the specific variant known as job-shop scheduling, each job consists of a set of operations O1O2, ..., On which need to be processed in a specific order (known as precedence constraints). Each operation has a specific machine that it needs to be processed on and only one operation in a job can be processed at a given time. A common relaxation is the flexible job shop, where each operation can be processed on any machine of a given set (the machines in each set are identical).

The name originally came from the scheduling of jobs in a job shop, but the theme has wide applications beyond that type of instance. This problem is one of the best known combinatorial optimization problems, and was the first problem for which competitive analysis was presented, by Graham in 1966.[1] The best problem instances for a basic model with a makespan objective are due to Taillard.[2]

In the standard three-field notation for optimal job scheduling problems, the job-shop variant is denoted by J in the first field. For example, the problem denoted by "

J3|pij|Cmax

" is a 3-machines job-shop problem with unit processing times, where the goal is to minimize the maximum completion time.

Problem variations

Many variations of the problem exist, including the following:

NP-hardness

Since the traveling salesman problem is NP-hard, the job-shop problem with sequence-dependent setup is clearly also NP-hard since the TSP is a special case of the JSP with a single job (the cities are the machines and the salesman is the job).

Problem representation

The disjunctive graph[5] is one of the popular models used for describing the job-shop scheduling problem instances.[6]

A mathematical statement of the problem can be made as follows:

Let

M=\{M1,M2,...,Mm\}

and

J=\{J1,J2,...,Jn\}

be two finite sets. On account of the industrial origins of the problem, the

\displaystyleMi

are called machines and the

\displaystyleJj

are called jobs.

Let

\displaystylel{X}

denote the set of all sequential assignments of jobs to machines, such that every job is done by every machine exactly once; elements

x\inl{X}

may be written as

n x m

matrices, in which column

\displaystylei

lists the jobs that machine

\displaystyleMi

will do, in order. For example, the matrix

x=\begin{pmatrix}1&2\ 2&3\ 3&1\end{pmatrix}

means that machine

\displaystyleM1

will do the three jobs

\displaystyleJ1,J2,J3

in the order

\displaystyleJ1,J2,J3

, while machine

\displaystyleM2

will do the jobs in the order

\displaystyleJ2,J3,J1

.

Suppose also that there is some cost function

C:l{X}\to[0,+infty]

. The cost function may be interpreted as a "total processing time", and may have some expression in terms of times

Cij:M x J\to[0,+infty]

, the cost/time for machine

\displaystyleMi

to do job

\displaystyleJj

.

The job-shop problem is to find an assignment of jobs

x\inl{X}

such that

\displaystyleC(x)

is a minimum, that is, there is no

y\inl{X}

such that

\displaystyleC(x)>C(y)

.

Scheduling efficiency

Scheduling efficiency can be defined for a schedule through the ratio of total machine idle time to the total processing time as below:

C'=1+{\sumili\over\sumj,kpjk

}=

Here

li

is the idle time of machine, is the makespan and is the number of machines. Notice that with the above definition, scheduling efficiency is simply the makespan normalized to the number of machines and the total processing time. This makes it possible to compare the usage of resources across JSP instances of different size.[7]

The problem of infinite cost

One of the first problems that must be dealt with in the JSP is that many proposed solutions have infinite cost: i.e., there exists

xinfty\inl{X}

such that

C(xinfty)=+infty

. In fact, it is quite simple to concoct examples of such

xinfty

by ensuring that two machines will deadlock, so that each waits for the output of the other's next step.

Major results

Graham had already provided the List scheduling algorithm in 1966, which is -competitive, where m is the number of machines.[1] Also, it was proved that List scheduling is optimum online algorithm for 2 and 3 machines. The Coffman–Graham algorithm (1972) for uniform-length jobs is also optimum for two machines, and is -competitive.[8] [9] In 1992, Bartal, Fiat, Karloff and Vohra presented an algorithm that is 1.986 competitive.[10] A 1.945-competitive algorithm was presented by Karger, Philips and Torng in 1994.[11] In 1992, Albers provided a different algorithm that is 1.923-competitive.[12] Currently, the best known result is an algorithm given by Fleischer and Wahl, which achieves a competitive ratio of 1.9201.[13]

A lower bound of 1.852 was presented by Albers.[14] Taillard instances has an important role in developing job-shop scheduling with makespan objective.

In 1976 Garey provided a proof[15] that this problem is NP-complete for m>2, that is, no optimal solution can be computed in deterministic polynomial time for three or more machines (unless P=NP).

In 2011 Xin Chen et al. provided optimal algorithms for online scheduling on two related machines[16] improving previous results.[17]

Offline makespan minimization

Atomic jobs

See also: Multiprocessor scheduling. The simplest form of the offline makespan minimisation problem deals with atomic jobs, that is, jobs that are not subdivided into multiple operations. It is equivalent to packing a number of items of various different sizes into a fixed number of bins, such that the maximum bin size needed is as small as possible. (If instead the number of bins is to be minimised, and the bin size is fixed, the problem becomes a different problem, known as the bin packing problem.)

Dorit S. Hochbaum and David Shmoys presented a polynomial-time approximation scheme in 1987 that finds an approximate solution to the offline makespan minimisation problem with atomic jobs to any desired degree of accuracy.[18]

Jobs consisting of multiple operations

The basic form of the problem of scheduling jobs with multiple (M) operations, over M machines, such that all of the first operations must be done on the first machine, all of the second operations on the second, etc., and a single job cannot be performed in parallel, is known as the flow-shop scheduling problem. Various algorithms exist, including genetic algorithms.[19]

Johnson's algorithm

See also: Johnson's rule.

A heuristic algorithm by S. M. Johnson can be used to solve the case of a 2 machine N job problem when all jobs are to be processed in the same order.[20] The steps of algorithm are as follows:

Job Pi has two operations, of duration Pi1, Pi2, to be done on Machine M1, M2 in that sequence.

If the minimum belongs to Pk1,

Remove K from list A; Add K to end of List L1.

If minimum belongs to Pk2,

Remove K from list A; Add K to beginning of List L2.

Johnson's method only works optimally for two machines. However, since it is optimal, and easy to compute, some researchers have tried to adopt it for M machines, (M > 2.)

The idea is as follows: Imagine that each job requires m operations in sequence, on M1, M2 … Mm. We combine the first m/2 machines into an (imaginary) Machining center, MC1, and the remaining Machines into a Machining Center MC2. Then the total processing time for a Job P on MC1 = sum(operation times on first m/2 machines), and processing time for Job P on MC2 = sum(operation times on last m/2 machines).

By doing so, we have reduced the m-Machine problem into a Two Machining center scheduling problem. We can solve this using Johnson's method.

Makespan prediction

Machine learning has been recently used to predict the optimal makespan of a JSP instance without actually producing the optimal schedule. Preliminary results show an accuracy of around 80% when supervised machine learning methods were applied to classify small randomly generated JSP instances based on their optimal scheduling efficiency compared to the average.

Example

Here is an example of a job-shop scheduling problem formulated in AMPL as a mixed-integer programming problem with indicator constraints:param N_JOBS;param N_MACHINES;

set JOBS ordered = 1..N_JOBS;set MACHINES ordered = 1..N_MACHINES;

param ProcessingTime > 0;

param CumulativeTime = sum ProcessingTime[i,jj];

param TimeOffset = max (CumulativeTime[i1,j] - CumulativeTime[i2,j] + ProcessingTime[i2,j]);

var end >= 0;var start >= 0;var precedes binary;

minimize makespan: end;

subj to makespan_def: end >= start[i] + sum ProcessingTime[i,j];

subj to no12_conflict: precedes[i1,i2]

> start[i2] >= start[i1] + TimeOffset[i1,i2];

subj to no21_conflict: !precedes[i1,i2]

> start[i1] >= start[i2] + TimeOffset[i2,i1];

data;

param N_JOBS := 4;param N_MACHINES := 4;

param ProcessingTime: 1 2 3 4 :=1 5 4 2 12 8 3 6 23 9 7 2 34 3 1 5 8;

Related problems

See also

External links

Notes and References

  1. R.. Graham. Bounds for certain multiprocessing anomalies. Bell System Technical Journal. 45. 9. 1563–1581. 1966 . 10.1002/j.1538-7305.1966.tb01709.x.
  2. Web site: Taillard Instances.
  3. News: Maccarthy. Addressing the gap in scheduling research: a review of optimization and heuristic methods in production scheduling. 1993.
  4. Book: Malakooti. B. Operations and Production Systems with Multiple Objectives. 2013. John Wiley & Sons. 978-1-118-58537-5.
  5. B. Roy, B. Sussmann, Les problèmes d’ordonnancement avec constraintes disjonctives, SEMA, Note D.S., No. 9, Paris, 1964.
  6. Jacek Błażewicz, Erwin Pesch, Małgorzata Sterna, The disjunctive graph machine representation of the job shop scheduling problem, European Journal of Operational Research, Volume 127, Issue 2, 1 December 2000, Pages 317-331, ISSN 0377-2217, 10.1016/S0377-2217(99)00486-5.
  7. Mirshekarian. Sadegh. Šormaz. Dušan N.. 2016. Correlation of job-shop scheduling problem features with scheduling efficiency. Expert Systems with Applications. 62. 131–147. 10.1016/j.eswa.2016.06.014.
  8. .
  9. .
  10. Y.. Bartal. A. Fiat . H. Karloff . R. Vohra . 1992. New Algorithms for an Ancient Scheduling Problem. Proc. 24th ACM Symp.. Theory of Computing. 51–58. 10.1145/129712.129718.
  11. D.. Karger. David Karger. S. Phillips . E. Torng . A Better Algorithm for an Ancient Scheduling Problem. Proc. Fifth ACM Symp.. Discrete Algorithms. 1994.
  12. Improved parallel integer sorting without concurrent writing. Symposium on Discrete Algorithms archive. Proceedings of the third annual ACM-SIAM symposium on Discrete algorithms. 463–472. 1992. Susanne. Albers. Susanne Albers. Torben Hagerup.
  13. Book: Fleischer, Rudolf. Algorithms – ESA 2000. 2000. Springer. Berlin / Heidelberg. 978-3-540-41004-1. 202–210. 10.1007/3-540-45253-2_19.
  14. Albers. Susanne. Susanne Albers. Better bounds for online scheduling. SIAM Journal on Computing. 29. 459–473. 1999. 10.1137/S0097539797324874. 2. 10.1.1.685.8756.
  15. 10.1287/moor.1.2.117. Garey . M. R.. Johnson . D. S.. Sethi . Ravi. The Complexity of Flowshop and Jobshop Scheduling. Mathematics of Operations Research. 1. 2. 117–129. 1976. 3689278.
  16. Xin . Chen . Optimal algorithms for online scheduling with bounded rearrangement at the end . Lan . Yan . Benkő . Attila . Theoretical Computer Science . 2011 . 412 . 45 . 6269–6278 . 10.1016/j.tcs.2011.07.014 . György . Dósa . Xin . Han. free .
  17. Liu . M. . Xu . Y. . Chu . C. . Zheng . F. . 2009 . Online scheduling on two uniform machines to minimize the makespan . Theoret. Comput. Sci. . 410 . 21–23. 2099–2109 . 10.1016/j.tcs.2009.01.007. free .
  18. Dorit. Hochbaum. Dorit S. Hochbaum. David. Shmoys. David Shmoys. Using dual approximation algorithms for scheduling problems: theoretical and practical results. Journal of the ACM. 34. 1. 144–162. 1987. 10.1145/7531.7535. 10.1.1.125.5753. 9739129.
  19. 10.1.1.29.4699. Genetic Algorithms for Solving Open Shop Scheduling Problems. Khuri, Sami. Miryala, Sowmya Rao . 1999. Proceedings of the 9th Portuguese Conference on Artificial Intelligence: Progress in Artificial Intelligence. Springer Verlag. London.
  20. S.M. Johnson, Optimal two- and three-stage production schedules with setup times included, Naval Res. Log. Quart. I(1954)61-68.