Você está na página 1de 51

THE OPEN SHOP SCHEDULING PROBLEM

By

Karur Pavan Kishore

A project submitted in partial fulfillment of the requirements for the

Masters of Science in Computer Science

School Of Computer Science

Howard R. Hughes College of Engineering

The Graduate College

University Of Nevada, Las Vegas

December 2011
ABSTRACT

By

Karur Pavan Kishore

Dr.Wolfgang Bein, Examination Committee Chair

Professor of Computer Science

University of Nevada, Las Vegas

In an Open Shop Problem, there are m machines ,, and n Jobs j = {

,, }. Each job consists of exactly m operations. Where 1 j m. The

operation of job has to be processed on machine , and this requires time

units. The problem is to find the job orders (operations belonging to a job) and the

machine orders (orders to be processed on a machine), where preemption is allowed and

the object is to minimize the makespan. In this project we implement a polynomial

algorithm, to minimize the makespan based on a matching algorithm.


TABLE OF CONTENTS

List of Figures v

Problem Statement vi

Literature Review 2

Introduction and Background 4

O|Pmtn| 6

Methodology 7

Results and Discussion 8

References 16

Appendix A 17
LIST OF FIGURES

Figure 1 Initial Matrix 8

Figure 2 Initial Matrix with sum of rows and columns 8

Figure 3 Bipartite matching matrix 9

Figure 4 Iteration 1 of Bipartite matching 10

Figure 5 Iteration 2 of Bipartite matching 11

Figure 6 Iteration 3 of Bipartite matching 12

Figure 7 Iteration 4 of Bipartite matching 13

Figure 8 Iteration 5 of Bipartite matching 14

Figure 9 Final matrix after Bipartite matching 15


ACKNOWLEDGEMENTS

I would like to express my deepest appreciation to Dr. Wolfgang Bein for his help

and guidance in the completion of my project and throughout my graduate program. It

has been very rewarding and satisfying experience to be able to work with a person of

such vast knowledge and experience. I would like to thank my Graduate Coordinator and

a member of the committee Dr. Ajoy K Datta for his moral support and guidance through

my Masters program and help me on my project. I would also like to thank Dr. Laxmi . P.

Gewali and Dr. V. Muthukumar for serving on the committee. For this and for being

generous with their time when I needed it, I am deeply indebted to them.

Last but not the least, I would like to thank my family and friends, and all the other

people whom I have not mentioned above but have helped me in some way through the

completion of my Masters program here in University of Nevada, Las Vegas.


PROBLEM STATEMENT

In an Open Shop Problem, there are m machines ,, and n Jobs j = {

,, }. Each job consists of exactly m operations. Where 1 j m. The

operation of job has to be processed on machine , and this requires time

units. The problem is to find the job orders (operations belonging to a job) and the

machine orders (orders to be processed on a machine), where preemption is allowed and

the object is to minimize the makespan.


LITERATURE REVIEW

The review of the literature for the proposed research includes the subject areas of

Scheduling Algorithms, in Computer Science, and the capabilities and limitations of the

Open Shop Scheduling Problem. The following is a short summary of the literature on

different types of Scheduling Problems.

Peter Brucker et al (1995) (1) describes a fast branch and bound method for the

open-shop scheduling problem based on a disjunctive graph formulation of the problem is

developed. Computational results show that this method yields to excellent results.

C.Y.Liu, R.L.Buflin (1987) (2) this paper discusses about the problem of

scheduling n jobs, each of which must be processed b m machines, The computational

difficulty of solving open-shop scheduling problems is known, with majority being

NP-hard, and the computational difficulty of a few special cases is unknown. In this

paper a polynomial algorithm is given to minimize the total tardiness and the number of

tardy jobs in an open shop with identical processing time jobs.

J.O.Achugbue and Francis Y. Chin (3) this paper shows that a problem of

Scheduling a two processor n jobs open-shop non preemptively in order to minimize

mean flow time is NP-Complete even if the input length is measured by the sum f the

task lengths.

H.Brasel et al (1995) (4) an open-shop problem with unit processing times and

tree constraints (out-tree) between the jobs is the basic focus of this paper. A polynomial

algorithm is presented which decomposes the problem into sub problems by means of the

occurrence of unavoidable idle time.


T.Gonzalez and S.Sahni (5) proposed a linear time algorithm to obtain a minimum

finish time schedule for a two processor open-shop coupled with a polynomial time

algorithm to obtain a minimum finish time of preemptive schedules for open-shops with

more than two processors.

Peter Bruckers (6) Scheduling Algorithms Fifth edition chapter 2 which

describes the complete flow of solving an opens-shop scheduling problem.


INTRODUCTION AND BACKGROUND

Any scheduling problem can be denoted in the form ||, where specifies the

machine environment, specifies the Job criteria, and specifies the optimization

criteria. For the classical problem discussed in this project, the fields will take on

values; will be O that is number of machines m. We have that will be any

combination of the constraint as Preemption. The constraint Preemption specifies that

the processing of a task may be preempted at any time to be continued at a later time.

If Preemption is not present, then each task must be processed continuously until

completion once it has begun processing on some machine. Finally, we have that is

function as defined above. The objective goal of the problems studied in this

project is to find a schedule with minimal Completion Time.

Open Shop Schedules differ from Flow Shop and Job Shop Schedules, in an

Open Shop Schedule no restrictions are placed on the order in which the tasks for any

job are to be processed. It is easy to conceive of the situations where the tasks making

up a job can be performed in any order, even though it is not possible to carry out more

than on task at any particular time.

Consider the following Open Shop Scheduling Problem. There are n

independent jobs ,, and m machines ,,


. There is no restriction on

the order in which the operations of a job are to be performed, hence the term Open

Shop. Each job can be processed on at most one machine at a time, and either machine
can process at most one operation at a time. No processing can occur prior to time zero.

A schedule is said to be Preemptive if the execution of any operation may

arbitrarily often be interrupted and resumed at a later time, the periods in which the

operations of a given job are performed may be interleaved in time. A schedule is said

to be Non-Preemptive if each operation is executed continuously from start to

completion. Note that all Non-Preemptive schedules are also Preemptive, while the

reverse is not true.

Each schedule defines a completion time for each , given a due date

for each , we define its Lateness = - . Common optimality criteria

involve the minimization of the maximum Completion Time = Max 1 j n(

) or the Maximum Lateness = Max 1 j n ( ).

Open Shop Scheduling Problems are also interesting from theoretical point of

view; they arise in many industrial situations. For example, consider a large aircraft

garage with specialized work centers. An airplane may require repairs on its engine and

electrical circuit system. These two tasks may be carried out in any order but it is not

possible to do these tasks on the same plane simultaneously. Other applications of

Open Shop Scheduling Problems in automobile repair, quality control centers,

semiconductor manufacturing, teacher-class assignments, examination scheduling and


satellite communications as described by Liu (2) , Buflin (2) . It is well known that

determining optimal preemptive Schedules for Flow Shop and Job Shop is

NP-Complete.
O|PMTN|

This preemptive open shop problem can be formulated in the following way, n

jobs J1, Jn are given to be processed on m machines M1, . . , Mm. Each job Ji consists of

m operations Oij (j = 1, . . ., m) where Oij must be processed on machine Mj for time

units. Preemption is allowed and the order in which the operations of Ji are processed is

arbitrary. The only restriction is that a machine cannot process two jobs simultaneously

and a job cannot be processed by two machines at the same time. We have to find a

schedule with minimal Completion Time.

For each machine Mj (j = 1, . . . , m) and each job Ji(i = 1, . . . , n) define

n m

Tj := and Li := .

i=1 j=1

Tj is the total time needed on machine Mj , and Li is the length of job

Clearly,

n m

T = max{ max Li , max Tj }

i=1 j=1
is a lower bound for the Cmax value. Now we will use an algorithm which always

matches the lower bound.


METHODOLOGY

Suppose that there are n jobs and m machines, also given are the processing

times of the processes. These form the initial inputs of the matrix, where the

columns of the matrix will be machines and the rows of the matrix will be jobs and the

cells of the matrix take the values of. With the available values we then

calculated which is the maximum value of sum of rows or sum of columns of the

matrix. We, then construct an n+m by n+m matrix. The rows and columns of this newly

constructed matrix are jobs and machines respectively, there will be extra machines and

extra jobs since its larger than the original n by m matrix.

To these extra rows and columns, we assign those cells a value such that if each

row and each column is added, it will equal tod. Then we pick a cell in each row and

each column such that the row index and the column index do no match and put them

into appropriate machine. If a cell is picked which is in an extra row or extra column,

then we do not place them in the schedule, this completes the first iteration , we now

subtract 1 to all the cells which have been picked, including the cells of the extra rows

and extra columns. Then this process is repeated until the n+m by n+m matrix has no

more processing times remaining.


RESULTS AND DISCUSSION

In this example we have 4 jobs and 3 machines with processing times = 1,

= 0 , = 3 , = 2, = 1, = 0, = 1, = 0, = 1, = 0, =

2, =1.

Step 1 : we construct the initial matrix shown below.

M1 M2 M3

1 1 0 3

2 2 1 0

3 1 0 1

4 0 2 1

Figure 1 Initial Matrix


Step 2 : We then calculated which is 5 in this case. This will also be the lower bound for

Cmax Value
in the schedule.

M1 M2 M3

j1 1 0 3 4

j2 2 1 0 3

j3 1 0 1 2

j4 0 2 1 3

4 3 5

Figure 2 Initial Matrix with sum of rows and columns

Step 3: We then construct the 7 by 7 matrix shown below as follows, the 7 by 7 matrix is

split into 4 regions namely Top Left (TL), Top Right (TR), Bottom Left (BL), Bottom

Right (BR) by the thick horizontal and vertical lines. The TL of the matrix is the initial

input of the matrix. The portions TR and BL are only diagonal matrices, where the

diagonals of the matrix are filled by subtracting thed value from the sum of rows and

sum of columns of the TL matrix respectively. The most complex part of the problem is

filling the BR matrix, for filling this matrix we use the North west corner rule and we call

this problem as the Assignment Problem.

M M M M M
1 M2 3 4 5 M6 7
j1 1 0 3 1 0 0 0
j2 2 1 0 0 2 0 0
j3 1 0 1 0 0 3 0
j4 0 2 1 0 0 0 2
j5 1 0 0 4 0 0 0
j6 0 2 0 0 3 0 0
j7 0 0 0 0 0 2 3

Figure 3 Bipartite matching matrix

Step 4 : Now we select 7 jobs on 7 different machines, keeping in mind the constraint that

the row index and column index do not match, we then place them in the schedule which

completes the first iteration. Now we have to subtract 1 to all the cells which are marked.

Then repeat this process until the 7 by 7 matrix has no more processing times left.

Iteration 1 :

M M M M M M M
1 2 3 4 5 6 7
j1 1 0 3 1 0 0 0
j2 2 1 0 0 2 0 0
j3 1 0 1 0 0 3 0
j4 0 2 1 0 0 0 2
j5 1 0 0 4 0 0 0
j6 0 2 0 0 3 0 0
j7 0 0 0 0 0 2 3

M
1 j1
M
2 j2
M
3 j3

M
j1 1
M
j2 2
M
j3 3
j4

Figure 4 Iteration 1 of Bipartite matching


Iteration 2:

M M M M M M M
1 2 3 4 5 6 7
j1 0 0 3 1 0 0 0
j2 2 0 0 0 2 0 0
j3 1 0 0 0 0 3 0
j4 0 2 1 0 0 0 1
j5 1 0 0 3 0 0 0
j6 0 2 0 0 2 0 0
j7 0 0 0 0 0 1 3

M
1 j1
M
2 j2
M
3 j3 j4

M
j1 1
M
j2 2
M
j3 3
M
j4 3

Figure 5 Iteration 2 of Bipartite matching

Iteration 3:

M M M M M M M
1 2 3 4 5 6 7
j1 0 0 3 0 0 0 0
j2 2 0 0 0 1 0 0
j3 1 0 0 0 0 2 0
j4 0 2 0 0 0 0 1
j5 0 0 0 3 0 0 0
j6 0 1 0 0 2 0 0
j7 0 0 0 0 0 1 2

M
1 j1 j3
M
2 j2
M
3 j3 j4 j1

M M
j1 1 3
M
j2 2
M M
j3 3 1
M
j4 3

Figure 6 Iteration 3 of Bipartite matching

Iteration 4:

M M M M M M M
1 2 3 4 5 6 7
j1 0 0 2 0 0 0 0
j2 2 0 0 0 0 0 0
j3 0 0 0 0 0 2 0
j4 0 2 0 0 0 0 0
j5 0 0 0 2 0 0 0
j6 0 0 0 0 2 0 0
j7 0 0 0 0 0 0 2

M
1 j1 j3 j2
M
2 j2 j4
M
3 j3 j4 j1 j1

M M M
j1 1 3 3
M M
j2 2 1
M M
j3 3 1
M M
j4 3 2

Figure 7 Iteration 4 of Bipartite matching

Iteration 5:
M M M M M M M
1 2 3 4 5 6 7
j1 0 0 1 0 0 0 0
j2 1 0 0 0 0 0 0
j3 0 0 0 0 0 1 0
j4 0 1 0 0 0 0 0
j5 0 0 0 1 0 0 0
j6 0 0 0 0 1 0 0
j7 0 0 0 0 0 0 1

M
1 j1 j3 j2 j2
M
2 j2 j4 j4
M
3 j3 j4 j1 j1 j1

M M M M
j1 1 3 3 3
M M M
j2 2 1 1
M M
j3 3 1
M M M
j4 3 2 2

Figure 8 Iteration 5 of Bipartite matching

Final Matrix reduced to zero:

M M M M M M M
1 2 3 4 5 6 7
j1 0 0 0 0 0 0 0
j2 0 0 0 0 0 0 0
j3 0 0 0 0 0 0 0
j4 0 0 0 0 0 0 0
j5 0 0 0 0 0 0 0
j6 0 0 0 0 0 0 0
j7 0 0 0 0 0 0 0

Final Schedule:

M
1 j1 j3 j2 j2
M
2 j2 j4 j4
M
3 j3 j4 j1 j1 j1

M M M M
j1 1 3 3 3
M M M
j2 2 1 1
M M
j3 3 1
M M M
j4 3 2 2

Figure 9 Final matrix after Bipartite matching

REFERENCES

1. Peter Brucker et al

A Branch and Bound algorithm for open-shop problem

Discrete Applied Mathematics, 76 (1997) 43-59.

2. C.Y. Liu and R.L. Bulfin.

Scheduling open shops with unit execution times to minimize functions of due dates.

Oper. Res., 36(4):553-559, 1988.


3. J.O. Achugbue and F.Y. Chin.

Scheduling the open shop to minimize mean flow time.

SIAM J. Comput., 11:709-720, 1982.

4. H. Brsel, D. Kluge, and F. Werner.

A polynomial algorithm for an open shop problem with unit processing times and tree

constraints.

Discrete Appl. Math., 59(1):11-21, 1995.

5. T. Gonzalez and S. Sahni.

Open shop scheduling to minimize finish time.

J. Assoc. Comput. Mach., 23(4):665-679, 1976.

6. Peter Bruckers Scheduling Algorithms

Springer Berlin Heidelberg New york ISBN 978-3-540-69515


APPENDIX A

/*OPEN SHOP SCHEDULING PROBLEM*/

#include<stdio.h>

#include<conio.h>

void main()

int m,n,x,y,i,j,i1,j1,maxvalue;

float s[10][10] = {0,0};

int s2[10][10] = {0,0};

float f[20][20] = {0,0};

float f1[20][20] = {0,0};

float f2[20][20] = {0,0};

printf("\nEnter Number of Jobs(rows) and Machines(columns) of Matrix:\n");

scanf_s("%d%d",&m,&n);

printf("\nEnter the Pij elements of matrix:\n");

for(x=1;x<m+1;++x)

for(y=1;y<n+1;++y)

scanf("%f", &s[x][y]);

//Find sum of each row

for(x=1;x<m+1;++x)

s[x][n+1]=0;
for(y=1;y<n+1;++y)
s[x][n+1]=s[x][n+1]+s[x][y];

//Find sum of each column

for(y=1;y<n+1;++y)

s[m+1][y]=0;

for(x=1;x<m+1;++x)

s[m+1][y]+=s[x][y];

printf("\nMatrix s, Row Sum (Last Column) and Column Sum (Last Row) : \n");

printf("\ns:\n");

for(x=1;x<m+2;++x)

for(y=1;y<n+2;++y)

printf(" %2.0f " , s[x][y]);

printf("\n");

//Print sum of each column

/*x=n+1;

for(y=1;y<m+1;++y)

printf(" %2.0f " , s[x][y]);*/

printf("\n");

maxvalue = s[1][1];

for(x=1; x<m+2; ++x)

for(y=1; y<n+2; ++y)


{
if(maxvalue < s[x+1][y+1])

maxvalue = s[x+1][y+1];

printf("\n");

printf("maxvalue = %d" , maxvalue);

printf("\nd1:\n");

float d1[20][20] = {0,0};

for(i=1;i<=m;++i)

for(j=1;j<=m;++j)

if(i==j)

d1[i][j] = maxvalue - s[i][n+1];

printf(" %2.0f " , d1[i][j]);

printf("\n");

printf("\nd2\n");

float d2[20][20] = {0,0};

for(i=1;i<=n;++i)

for(j=1;j<=n;++j)

{
if(i==j)

d2[i][j] = maxvalue - s[m+1][j];

printf(" %2.0f " , d2[i][j]);


}

printf("\n");

//row diff:

printf("\n\nRow diff:\n");

float r[20]= {0};

for(i=1;i<=n;i++)

for(j=1;j<=n;j++)

if(i == j)

r[i] = maxvalue - d2[i][j];

printf("%f ",r[i]);

//col diff:

printf("\n\nCol diff:\n");

float c[20]= {0};

for(i=1;i<=m;i++)

for(j=1;j<=m;j++)

if(i == j)

c[i] = maxvalue - d1[i][j];


printf("%f ",c[i]);

}
}

//assignment matrix:

float am[20][20]={0};

i=j=1;

ITERATION1:

if((c[i]<r[j]) && i<=m && j<=n)

am[j][i]=c[i];

r[j]=r[j]-c[i];

c[i]=0;

i++;

else if((c[i]>r[j]) && i<=m && j<=n)

am[j][i]=r[j];

c[i]=c[i]-r[j];

r[j]=0;

j++;

else if((c[i]==r[j]) && i<=m && j<=n)

am[j][i]=r[j];

c[i]=r[j]=0;
i++;j++;

else
goto END;

for(int z=0;z<=n;z++)

if(c[z]==0)

continue;

else

goto ITERATION1;

for(int b=0;b<=m;b++)

if(r[b]==0)

continue;

else

goto ITERATION1;

END:

printf("\n\nASSIGNMENT MATRIX:\n");

for(i=1;i<=n;i++)

for(j=1;j<=m;j++)

printf(" %2.0f ",am[i][j]);

}
printf("\n");

}
printf("\n\nf:\n");

for(i=1; i<(m+n)+1;++i)

for(j=1;j<(m+n)+1;++j)

if((i<=m) && (j<=n))

f[i][j]=s[i][j];

if((i<=m)&&(j>n))

f[i][j] = d1[i][j-n];

if((i>m)&&(j<=n))

f[i][j] = d2[i-m][j];

if((i>m)&&(j>n))

f[i][j] = am[i-m][j-n];

printf(" %2.0f " , f[i][j]);

printf("\n");
}
//printf("\n\nf1:\n");

for(i=1; i<(m+n)+1;++i)

for(j=1;j<(m+n)+1;++j)

f1[i][j]=f[i][j];

//printf(" %2.0f " , f1[i][j]);

//printf("\n");

int cnt = 0;

ITERATION2:

for(i=1; i<(m+n)+1;++i)

for(j=1;j<(m+n)+1;++j)

f2[i][j] = -1;

for(i=1; i<(m+n)+1;++i)

{
for(j=1;j<(m+n)+1;++j)

{
if(f1[i][j]!=0 && f2[i][j]!=0)

f2[i][j] = f1[i][j];

for(j1=j+1;j1<(m+n)+1;++j1)

f2[i][j1] = 0;

for(i1=i+1;i1<(m+n)+1;++i1)

f2[i1][j] = 0;

//printf("\n\nf2:\n");

for(i=1; i<(m+n)+1;++i)

for(j=1;j<(m+n)+1;++j)

if(f2[i][j] == -1)

f2[i][j] = 0;

//printf(" %2.0f " , f2[i][j]);

//printf("\n");

//printf("\n\nf1:\n");
for(i=1; i<(m+n)+1;++i)

for(j=1;j<(m+n)+1;++j)
{

if(f2[i][j] != 0)

f1[i][j] = f1[i][j] - 1;

//printf(" %2.0f " , f1[i][j]);

//printf("\n");

cnt++;

printf("\nITERATION - %d", cnt);

printf("\n\Gant Chart:\n");

for(i=1; i<=m;++i)

for(j=1;j<=n;++j)

if(f2[i][j] != 0)

s2[i][cnt] = j;

printf(" J%d -> M%d", i,j);

printf("\n");

}
int sum = 1;

for(i=1; i<(m+n)+1;++i)

{
for(j=1;j<(m+n)+1;++j)

sum = sum + f1[i][j];

if(sum>1)

goto ITERATION2;

else

goto END2;

END2:

printf("\n\Final Gant Chart:\n");

for(i=1; i<=m;++i)

for(j=0;j<=cnt;++j)

if(j == 0 )

printf(" J%d -> ", i);

else

if(s2[i][j] !=0)

printf(" M%d ", s2[i][j]);

else

printf(" %2c ", ' ') ;

}
}

printf("\n");

getch();

}
VITA

Degrees:

Bachelor of Computer Science, 2008

Vignan Institute of Technology and Science, JNTU, India

Masters of Computer Science, 2011

University of Las Vegas, Nevada

Thesis Title: The Open Shop Scheduling problem

Thesis Examination Committee:

Chairperson, Dr. Wolfgang Bein, Ph.D.

Committee Member, Dr. Ajoy K Datta, Ph.D.

Committee Member, Dr. Laxmi P. Gewali, Ph.D.

Graduate College Representative, Dr. V. Muthukumar, Ph.D.

Você também pode gostar