V-shop scheduling

V-shop scheduling

51 V-shop scheduling * V. L E V a n d I. A D I R I Technion-lsrael Institute of Technology, Faculty of Industrial Engineering and Management, Technio...

332KB Sizes 0 Downloads 41 Views

51

V-shop scheduling * V. L E V a n d I. A D I R I Technion-lsrael Institute of Technology, Faculty of Industrial Engineering and Management, Technion City, Haifa 32 000, Israel

Abstract. This paper deals with V-shop scheduling where the route by which a job passes through the machines is: M 1 --* M 2 ~ . . . . M,,_ t ~ M,, - ' M,,_ t . . . . ~ M 2 --* M t. Flowshop scheduling is a special case of V-shop. The two-machine, minim u m schedule length V-shop scheduling problem is proved to be binary NP-complete. Efficient solvable algorithms are presented for some simple special cases of NP-complete V-shop problems; specifically n / 2 / V / C m a ~ with a dominating machine and n / m / V , ti , - 1 / ( C m a x n EC,). n / m / V / C m a ~, m >~ 2, with an increasing series of dominating machines is discussed.

of 2 m - 1 operations, Oij ( j = l , 2 . . . . . 2 m - l ) . Operation O,j ( j = 1, 2 . . . . . m) is processed uninterrupted for t,s time units on Mj, and O,.m+j ( j = 1, 2 . . . . . m - 1) for ~'i,,,-j time units on M,,_j. Processing of operation O,.j÷ t may start only after 0,~ has been completed. Two operations of the same job cannot be processed simultaneously, and a machine cannot process more than one job at a time. The problem is to find the schedule of operations on each machine, that obeys the constraints and optimizes a given objective function. The route covered by a job through the machines, MI ~ M2 ~ . . . -~ M m _ 1 ~ M m ~ M,,_t ~ . . .

Received November 1982; revised September 1983

M2---~M t is V-shaped, hence the term 'V-shop'. The problem is designated n / m / V , F / 8 1, where V denotes V-shop scheduling; F denotes assumptions dropped a n d / o r added (for example t u = 1 signifies that all operations have the same processing time); 8 denotes the objective function, for the cases dealt with in this p a p e r - - m i n i m u m schedule length, or minimum sum of completion times: min C m a x = min max Ci, or min EC,, respectively, where C, is the completion time of job J,. In Section 2 we demonstrate that n / m / F / 8 is a special case of n / m / V / 8 ; thus, if a flowshop problem is NP-complete its corresponding V-shop is NP-complete as well, while if a flowshop problem belongs to P its corresponding V-shop either belongs to P or is NP-complete. Johnson [2] developed an O(n log n) algorithm for t t / 2 / F / C m a x. We prove that n / 2 / V / C m a ~ is binary NP-complete. Garey et al. [1] proved that n / 3 / F / C m a x and n/2/F/F..C, are unary NP-complete. Thus, n / 2 / V / & 8 ~ (Cm~x, 3~C,), is NP-complete. This brings up the need for study of special cases of n / m / V / 6 , 8 ~ (('max, ]~C, }, where restrictions are imposed on the processing times and the number of machines, such that efficiently solvable algorithms can be developed. This is taken up in Section 3; specifically, we present O(n) algorithms for n / 2 / V / C m a ~ with a dominating machine and

North-Holland European Journal of Operational Research 18 (1984) 51-56

For notation and classification of scheduling problems, we follow Lenstra [3] and Rinnooy Kan [4].

Keywords: scheduling

Deterministic

scheduling,

V-shop

1. Introduction

The V-shop schedule, a common enough occurrence in real-life situations is defined in this paper for the first time. In general terms, it refers to a certain 'pivot operation' preceded by a sequence of preliminary operations and followed, after its completion, by the same sequence in reversed order. An example is replacement of a damaged internal part in a complex piece of equipment: parts blocking access are removed, the damaged part is replaced, and the removed parts are restored in reversed order. The formulation of V-shop scheduling is: There are n jobs (./1, J2 . . . . . J . ) and m machines ( M 1, M 2. . . . . Mm). Job J, (i = 1, 2 . . . . . n) consists * The research was supported by Technion VPR F u n d - Lawrence Deutsch Research Fund.

0377-2217/84/$3.00 © 1984, Elsevier Science Publishers B.V. (North-Holland)

V. Lev, L Adiri / V. shop scheduling

52

for n / 3 / V / C ~ . ~ with a strictly d o m i n a t i n g machine. F o r n / m / V , g / = 1 / ( C m . ~ n EC,) ( b o t h criteria--Cm~ x a n d E C ~ - - t a k e on their m i n i m a l values) a n O ( m n ) a l g o r i t h m is d e v e l o p e d . n / m / V / C m a x w i t h a n i n c r e a s i n g series of d o m i n a t i n g m a c h i n e s a n d n / 2 / V A / C m a ~ are discussed in Section 4.

3. Efficiently solvable special c a s e s

2. C o m p l e x i t y

M a c h i n e M k dominates M, ( M, is d o m i n a t e d b y M k) iff

T h e o r e m 1. For f i x e d m >1 2 and any objective function &

n/m/F/8

rnin ( t il,. , rik ) >~ m a x ( t i,, ri, ), i

Vi, 1 <~j <~ m ,

z,, = 0,

Vi, l < ~ j ~ m - - 1 ,

i

3.1. n / 2 / V / C r , ~ ,

processing

times

of

k=m.

min tik >i m a x ( t , , , r,,),

In a b b r e v i a t e d n o t a t i o n M k . > M r M a c h i n e M k strictly dominates iff l <~r<~m,r~k.

P r o o f . Trivial, by the s t r a i g h t f o r w a r d r e d u c t i o n

tie = ti'j,

l~k~m-1,

i

i

~ n/m/V/&

where {t,'j} are the flowshop p r o b l e m .

S u p p o s e p a r t i t i o n exists. A schedule as p e r Fig. 1 has a schedule length y. S u p p o s e p a r t i t i o n does not exist. F o r every S c H, ) 2 , ~ s a i ~ A / 2 , a n d Cma x > y .

for

M k •> M r

M 2 "> M,

Let us d e s i g n a t e the set o f all j o b s b y A =

the

(a, 2 . . . . . . ) .

Since n / 2 / F / C m ~ ~ is solvable b y J o h n s o n ' s Alg o r i t h m in O ( n log n) steps, n / 2 / V / C m ~ x either belongs to P or is N P - c o m p l e t e . T h e o r e m 2. n / 2 / V / C m ~ ~ is binary NP-complete. Proof. The p r o b l e m belongs to NP. W e p r o v e that Partition cx n / 2 / V / C m a ~. Partition: given positive integers, a] . . . . . ah, is there a subset S c H = {1, 2 . . . . . h } such that Y~,~sai = Y~i~._s a, = A / 2 ? T h e following n / 2 / V / C m a ~ is c o n s t r u c t e d :

Algorithm 1. Step 1. C h o o s e two different j o b s J , a n d Ja such that

to +

= min (t,1 + 5,)" iq'j

Step 2. C o n s t r u c t the o p t i m a l schedule as p e r Fig. 2 where A ' = A - { a , fl} a n d a r b i t r a r i l y ordered. T h e o r e m 3. Algorithm 1 constructs an optimal schedule for n / 2 / V / C m ~ x , M 2 • > M1.

n=h+l, t,l = 0 , lh +

Ii2 = a i,

z,1 = O,

i = 1, 2 . . . . . h.

1.1 = th + 1.2 = % + 1.1 = A / 2 .



T h r e s h o l d value y = 3 A / 2 . T h e c o n s t r u c t i o n takes a linear time in h. It has to be shown that P a r t i t i o n has a solution iff the c o n s t r u c t e d instance of n / 2 / V / C m a x has a feasible solution with schedule length smaller than or equal to the threshold value y.

ml I

h. t

1

I

s

I

M2

Proof. A lower b o u n d on the schedule length is Cm*.x >/ m a x

ti2 + min (tit + i=

AI2

h.1

1

M1 lal

I

H-s

I

Mzl lal

A

3AI2

1

51

(1)

.

i~'j

Since M 2 • > M 1 there are n o idle intervals on M 2. If there are idle intervals on M~ the c o n s t r u c t e d

[

Fig. 1. Optimal schedule supposing that partition exists.

( t a + Ta ),

\i=l

I

h.1

(i

X

I fll txl ~'

Fig. 2. Optimal schedule.

A'

I I fl I

V. Lev, I. Adiri / V-shop scheduling M~ lal

~'

IPl

M~ I¢tl

lal

~'

Ma

lfll(xl

I~1

A'

A'

a'

3.4. n / m / V ,

1131

53

t~ = 1/(Cm~ x N )-"C)

1131 Algorithm 3 presented below constructs a schedule where b o t h criteria--schedule length and sum of completion t i m e s - - t a k e on their minimal values.

1131

Fig. 3. Optimal schedule. schedule length is E,~=tt~ + t~ + ~'~, in the complementary event the schedule length is E,~_ t(t~] + ~',~). Thus, the schedule constructed by Algorithm 1 meets the lower b o u n d (1) and is optimal.

Algorithm 3. Step 1. i ~-1. Step 2. Schedule j o b J, through the route

Mt----~ M 2 . . . . 3.2. n / 2 / V / C m ~ ~, M 2 < ' M ~

---, M 2 ---,M~,

Trivial. The following schedule M]:

for the earliest possible time on each machine. Step 3. If i = n stop, else i ~ i + l ; return to Step 2.

1, 2 . . . . . n, 1, 2 . . . . . n,

M2:

1,2 . . . . . n The complexity of the algorithm is O ( m n ) . For example, the schedule constructed by Algorithm 3 for 1 2 / 5 / V , t~j= 1 / ( C m ~ n E C ~ ) takes the form as per Fig. 4. Before proving the optimality of Algorithm 3, we demonstrate

meets the lower b o u n d E,"_t(t,~ + ~-,~), thus is optimal.

3.3.

---~M,~_I---~ M, -..~ M,,,_]---~ . . .

n/3/l/'fCrnax

where M 2 strictly dominates

Algorithm 2. Step 1. Choose two jobs J~ and Ja such that t,~1 = min t,l t

and

L e m m a 1. Algorithm 3 constructs a feasible schedule where for an even number of jobs Aim_ 1 works continuously, while for an odd number of jobs M,,_ ] works continuously except for an interval between the first and second process of the last job. The completion time of job Ji is:

~'m = min r,]. i

Step 2. Construct the optimal schedule as per Fig. 3 where A" = A (a, fl) and arbitrarily ordered.

2i + 2 ( m - 2 ) ,

i=2,4,6

.....

(2)

C , + , - 1,

i=],3,5

.....

(3)

Note. If a = fl then omit Opj, j = 1, 2, 3, and O,l, j = 4 , 5.

C,=

Since M 1 < - M 2 .> M 3, M 2 works continuously without idle intervals. Clearly a schedule as per Fig. 3 meets the lower b o u n d (t,1 + E','=~(t,2 + r,2) + ~'/~]), thus is optimal.

Proof. We denote by S,k[R,k ] starting time of J, on M~ in its first pass ( M 1 . . . . . M k .... ~M,,) [second pass (Mm_l ~ " ' " ~ M~. ~ . . - ~ M t)].

MI '12131'151617181112191'0131'1"1'215161 ~ 1' I 2131~1316 I' 1217 181 31~19 I101S1611111217181 M2 M3 M4

M5

~ ~

I1 121 31~i 11213161 31~1718131 619 110171811q12191~01

17q'~

II1 ~1~121 zl~131~lslrl s161 71 sl71al g 11o191101111121111121 9 10

13 1/.

17 18

21

22

2526

29 ;0

Fig. 4. Schedule constructed by Algorithm 3 for 12/5/V. t,~=l/(Cmax~-C,), where minCmax= 30 and minTC,= 234.

V. Lev, 1. Adiri / V-shop scheduling

54 We have

Theorem 4. Algorithm 3 constructs an optimal schedule for n / m / V , t u = 1/(Cm.x ~ Y~Ci).

s,.~-j m - 1 + 2 i - 3j

for odd i,

i>2j, _lm-2+2i-3j

for even i,

i>2j, i<~2j,

m-2+i-j

j=1,2

(4)

..... m--1

and S,, = { : - 3 + 2 ' i -4+2i

foroddi, for eveni.

(5)

R, ,,_j -•

for o d d i , for eveni.

(6)

An alternative formulation of Algorithm 3 reads: Schedule job ~ ( i - - 1 , 2 . . . . . n) on M k ( k = 1, 2 . . . . . m - 1) at Sik and Rik, on M,, at S~,,. It is readily shown that S,j and R . . . . j are increasing functions in i and j, moreover S~ 4= R/k Vilk, k ~ m (Su < Rik Vk, k ~ m and S,m= R,,,). Thus, there is no conflict. Careful examination yields that the schedule is constructed repeatedly in pairs. Equations (4) and (5) yield that on M,,_ 1 the first party of a pair leaves an idle interval between its first and second processes, and the second party is scheduled at that idle interval. Thus, on M,,_~ for an even number of jobs there are no idle intervals, while for an odd" number of jobs there is an idle interval between the two processes of the last job (Fig. 5). For odd i (i > 1), job J, is scheduled on its way back on machines (M,,_ 2 -" M,,_ 3 -* "" " ~ M1) leaving two idle time units on each machine; for even i, job J, is schedules upon completion of J,_ lSince C, = R n + 1, substitution o f j = m - 1 in (6) and adding 1, yields (2) and (3).

first pair second pair

Mm

17171 (i)

rrlT1

Ec,). The 'modified' flowshop results from n / m / V , tij = 1/(Cmax C3EC,), where the last two machines

Similarly m-3+2i+j m-4+2i+j

Proof. We construct the following imaginary 'modified' flowshop problem: There are n jobs and 2 m - 3 machines. Except for machine M,,_ 1, the processing times of the jobs on the machines are equal ( t u = 1, V/j, j a m - 1 ) . On machine M,,_ 1 each job requires two time units; processing of the second time unit may start only after at least one time unit has passed after completion of the first. Find a schedule that minimizes (Cmax n

last pair

...

Even number of jobs

Fig. 5. Schedulesconstructed by Algorithm 3.

are combined and their combined effect is simulated through the special service requirement on M,,_ 1, and the last m - 2 operations of a job are processed o n m - 2 additional machines. A feasible schedule for the V-shop problem defines uniquely a feasible schedule for the modified flowshop with the same values of the objective functions, while conversely a feasible schedule for the modified flowshop may be unfeasible f o r the V-shop. Thus, an optimal solution for the modified flowshop is a lower bound for the V-shop. Clearly, an optimal schedule for the modified flowshop is as per Fig. 6. It is easily verified that the completion times, C,, for the optimal schedule of the modified flowshop are the same as those of the schedule constructed by Algorithm 3 (Lemma 1). Thus, the schedule constructed by Algorithm 3 is optimal since it meets the lower bound. The values of the optimal objective functions are readily obtained from (2) and (3).

- Minimum schedule length:

C~*,,=C,=

firstpoir

m'-I

2(n + m - 2) 2(n+m)-3

.sccondl:X2ir

tast pair

( i i ) Odd number of jobs

for even n, for o d d n .

(7)

V. Le~, 1. Adiri / V-shop scheduling

•••

;12131M5161

MI

and

.-

h121M4151el

M2



k=l Mm.

55

1,112hD131+.131+.l

• ' "

(£t

'

~k=l

Algorithm 5. m >/3. J~ and J# satisfy

tak = rain k=l

i

][2 Cak = m!n

- Minimum sum of completion times:

k=l

{n(2m+n-5/2) C'=

n(2m+n

for even n,

5/2) + ½

tik ,

(n)

r,k .

(12)

k~l

and

F i g . 6. O p t i m a l s c h e d u l e f o r t h e m o d i f i e d f l o w s h o p .

i~l

(10) )

for odd n

k=l

(8)

4. E x t e n s i o n s

(i) Algorithms 4 and 5 construct feasible schedules for n / m / V / C m a ~ with an increasing series of d o m i n a t i n g machines, namely M 1 < - M 2 < . . . . < . M , , _ 1 < . M ~ , of which model 3.1 ( M 2 •> M~ ) is a special case.

Note, if (9) and (10), or (11) and (12) yield ct = B, then omit Ol~j,j = 1, 2 . . . . . m, and O~j, j = m+l ..... 2m-1. Using standard arguments it is readily demonstrated the Algorithm 4 is optimal if 7"., >1 T i n _ ,

-

t ....

(13)

-

where Tk is the total processing times required on

M , , formally n

Tk=E(t,k+~;k),

A l g o r i t h m s 4 and 5. Step 1. Choose J,~. Step 2. Choose Jt~"

A'=A-{a,~)=

n

{1,2 ..... n)-(a,

i=l

fl}.

Step 4. Construct a schedule as per Fig, 7, where A' is arbitrarily ordered. A l g o r i t h m 4. J~ and Jp are chosen such that

(9)

t,k ,

Gk=min

k~l

~k=l

MI M2

lal

..... m-l,

T,,=Et,,,.

Step 3.

E

k=l,2

t=l

~

Mm4 Mm

la I

Inl

fa

I ~ I al

I alal x

F i g . 7. Feasible s c h e d u l e f o r n / m / V / C m ~ , <. M , , , _ 1 < - M , n .

I

x Iml

x 1%1 I} I M 1 < ' M 2 <" •

If (13) is not satisfied, we construct a schedule as per Algorithm 5 that is optimal if M,,_~ works continuously without idle intervals. For m - - - 2 (Model 2.1) Algorithms 4 and 1 are equivalent, thus the former is optimal even if (13) is not satisfied, However, in a case where optimality is not guaranteed, the constructed feasible schedules can serve as approximations or initial schedules for a branch and b o u n d search. (ii) A possible expansion of V-shop scheduling is the double V, designated VA. For example, two identical workers have to process n jobs. A j o b starts with a worker, moves to the other for a check and then back to the first for the final operation. Namely, the route of a j o b is either M 1--*M z ~ M a or M 2--*M 1---,M 2. It is readily demonstrated that n / 2 / V A / C m . . is binary N P complete. The reduction is to partition where the

56

V. Lev, L Adiri / V-shop schedufing

constructed instance is t,1 = li3 = 0 and t~2 = ai; tij is the processing time of the j t h operation of job

J,. References [1] Garey, M.R., Johnson, D.S. and Sethi, R., "The complexity of flowshop and jobshop scheduling", Mathematics of Operations Research 1 (1976) 117-129.

[2] Johnson, S.M., "Optimal two- and three-stage production schedules with setup times included", Naval Research Logistics Quarterly 1 (1954) 61-68. [3] Lenstra, J.K., "Sequencing by Enumerative Methods", Mathematical Center, Amsterdam, 1977. [4] Rinnooy Kan, A.H.G., Machine Scheduling Problems --Classification Complexity and Computation, Nijhoff, The Hague, 1976.