using simulation for improving the performance of a
TRANSCRIPT
The Pennsylvania State University
The Graduate School
College of Engineering
USING SIMULATION FOR IMPROVING THE PERFORMANCE OF A
MANUFACTURING SYSTEM THROUGH DYNAMIC WORKFORCE SCHEDULING
A Thesis in
Industrial Engineering
by
Pragya Bhargava
© 2012 Pragya Bhargava
Submitted in Partial Fulfillment
of the Requirements
for the Degree of
Master of Science
December 2012
ii
The thesis of Pragya Bhargava was reviewed and approved by the following:
David A. Nembhard
Associate Professor of Industrial and Manufacturing Engineering
Thesis Advisor
M. Jeya Chandra
Professor in Charge of Academic Programs & Graduate Program Coordinator
Industrial and Manufacturing Engineering
Paul Griffin
Peter and Angela Dal Pezzo Department Head Chair
Head of the Harold and Inge Marcus Department of Industrial and Manufacturing Engineering
iii
ABSTRACT
A skilled workforce is one of the expensive resources for organizations and is now extensively worked
upon from savings point of view. It poses as a challenge to utilize workforce available in an optimal
way. This study aims in evaluating the best scheduling technique for workers in terms of increase in
their utilization and overall productivity of system. In other words it proposes a framework which
assimilates worker efficiencies, simulation and job shop scheduling technique for dynamic workforce
scheduling in a manufacturing environment. Research focuses on evaluating best job-shop scheduling
technique along with workforce scheduling. This type of scheduling is extremely useful in a dynamic
manufacturing environment where there is lot of complexities involved in terms of resources available.
A simulation model is constructed using MATLAB to determine an optimal solution for the problem.
Assignment of tasks is based on MWR (Most Work Remaining) rule where tasks with more number of
jobs and which consume more time for completion are given priority. Some exceptions were considered
while applying this rule. Based on MWR rule two cases were considered for assigning tasks to workers:
when most efficient worker is assigned task first and when slowest worker is assigned task first. Second
algorithm considers slowest worker as a bottleneck and aims in evaluating efficiency of algorithm when
bottleneck activity is given preference. Results obtained show that the overall productivity is a bit more
in the former case (when most efficient worker is assigned task first) when compared with latter case
(when slowest worker is assigned task first). However worker utilization is more in the latter case.
Reason being that slow worker will consume more time in doing same task when compared to other
workers for same task. Based on results obtained we can say that depending upon number of units to be
produced and worker availability both methods can be employed for improving performance of the
overall manufacturing system. In cases where extra time is required for machine maintenance,
workforce training, quality procedures it is recommended to use the most efficient worker first. This will
also provide opportunity to other operators to learn about other tasks and eventually improve their
performance. After comparing gantt charts for each week we can say that best algorithm to be used is
first one where we assign most efficient worker first. Result generated could be used for further
improvement of the system in terms of determining to which extent cross training should be provided,
distributing workload evenly among all workers, identifying complex jobs, etc.
iv
TABLE OF CONTENTS
List of Figures .............................................................................................................. v
List of Tables ............................................................................................................... vi
Acknowledgements ...................................................................................................... viii
INTRODUCTION .................................................................................................. 1 Chapter 1
LITERATURE REVIEW ....................................................................................... 4 Chapter 2
MODEL DESCRIPTION ....................................................................................... 9 Chapter 3
3.1.Data Description ........................................................................................................ 9 3.2.Data Analysis ............................................................................................................. 12 3.3.Methodology .............................................................................................................. 14
RESULTS ............................................................................................................... 19 Chapter 4
4.1.Preliminary Results .................................................................................................... 19 4.2.Experimental Results ................................................................................................. 21
CONCLUSION ....................................................................................................... 24 Chapter 5
REFERENCES ................................................................................................................ 31 APPENDIX ..................................................................................................................... 33 Data for Analysis ............................................................................................................. 33 Codes ............................................................................................................................... 55 7.2.1. Main code for algorithm ........................................................................................ 55 7.2.2. Code for job assignment based on priority rule with exception ............................ 56 7.2.3. Code for reading data from excel file .................................................................... 57 7.2.4. Code for scheduling tasks based on cycle time ..................................................... 59 7.2.5. Code for storing final simulation results................................................................ 62 Results after running final simulation .............................................................................. 64
v
LIST OF FIGURES
Figure 3-1 Snapshot of raw data .............................................................................................. 10
Figure 3-2 Snapshot of raw data .............................................................................................. 10
Figure 5-1 Gantt chart for Algorithm1(week1) ....................................................................... 25
Figure 5-2 Gantt chart for Algorithm2(week1) ....................................................................... 25
Figure 5-3 Gantt chart for Algorithm1(week2) ....................................................................... 26
Figure 5-4 Gantt chart for Algorithm2(week2) ....................................................................... 26
Figure 5-5 Gantt chart for Algorithm1(week3) ....................................................................... 27
Figure 5-6 Gantt chart for Algorithm2(week3) ....................................................................... 27
Figure 5-7 Gantt chart for Algorithm1(week4) ....................................................................... 28
Figure 5-8 Gantt chart for Algorithm2(week4) ....................................................................... 28
vi
LIST OF TABLES
Table 2-1 Simulation Results .................................................................................................. 7
Table 3-1 Comparison of operator efficiency and number of different tasks .......................... 13
Table 4-1 Results for first Algorithm ...................................................................................... 22
Table 4-2 Results for second Algorithm.................................................................................. 22
Table 7-1 Data for week 1 ....................................................................................................... 33
Table 7-2. Data for week 1(Efficiencies of operator for each task). ....................................... 34
Table 7-3 Data for week 1(Efficiencies of operator for each task). ........................................ 35
Table 7-4. Data for week 1(Efficiencies of operator for each task). ....................................... 37
Table 7-5. Data for week 2. ..................................................................................................... 38
Table 7-6. Data for week 2(Efficiencies of operator for each task). ....................................... 39
Table 7-7. Data for week 2(Efficiencies of operator for each task). ....................................... 41
Table 7-8. Data for week 2(Efficiencies of operator for each task). ....................................... 43
Table 7-9. Data for week 3. ..................................................................................................... 44
Table 7-10. Data for week 3(Efficiencies of operator for each task). ..................................... 46
Table 7-11. Data for week 3(Efficiencies of operator for each task). ..................................... 47
Table 7-12. Data for week 3(Efficiencies of operator for each task). ..................................... 48
Table 7-13. Data for week 4. ................................................................................................... 50
Table 7-14. Data for week 4(Efficiencies of operator for each task). ..................................... 51
Table 7-15. Data for week 4(Efficiencies of operator for each task). ..................................... 52
Table 7-16. Data for week 4(Efficiencies of operator for each task). ..................................... 53
Table 7-17.Result for Algorithm 1 (week1). ........................................................................... 64
Table 7-18.Result for Algorithm 1 (week2). ........................................................................... 65
Table 7-19.Result for Algorithm 1 (week3). ........................................................................... 67
Table 7-20.Result for Algorithm 1 (week4). ........................................................................... 68
vii
Table 7-21.Result for Algorithm 2 (week1). ........................................................................... 70
Table 7-22.Result for Algorithm 2 (week2). ........................................................................... 71
Table 7-23.Result for Algorithm 2 (week3). ........................................................................... 73
Table 7-24.Result for Algorithm 2 (week4). ........................................................................... 74
viii
ACKNOWLEDGEMENTS
I would like to thank my advisor Dr.David Nembhard for his continuous support and guidance
throughout my research work. Without his input and guidance I would have not been able to complete
my research. I would like to thank Dr. M. Jeya Chandra for devoting his time in evaluating my thesis.
I would also like thank Mr.Jacob and Mr.Amit for providing me data that was useful in testing out
algorithm and carrying out simulation. I would also like to thank my friends and family members for
their support and help.
Chapter 1
INTRODUCTION
Workforce can be regarded as one of the most expensive and valuable asset for any
company especially for a manufacturing firm, where there are lot of complexities
involved in terms of product mix, due dates, assembly operations, machinery and other
equipments required. Therefore, it becomes quiet challenging to figure out the best
scheduling technique for a manufacturing company. Generally in a real manufacturing
system, it is necessary to work out job shop and workforce scheduling together as both of
them are closely related to each other. Also items to be produced are scheduled first so as
to meet customer’s demand on time. After the schedule for the products is decided,
scheduling of other resources like machines, tooling, workers, etc is needed to be done.
For efficient workforce scheduling, we need to focus on factors such as operator
efficiency, product requirement, allocation of work, etc. Therefore, scheduling is an
important aspect of the total process out of which workforce scheduling can be regarded
as one of the most important factor contributing towards the increased productivity.
If we consider a scenario from a manufacturing plant and a group of certain workers,
which are trained over various tasks, we observe that in practice each worker can’t
perform the same task by using the same skill and effort, each worker will have different
skill set which makes her/him more efficient for some tasks over other. Work by Scott
M.Shafer, David A.Nembhard, Mustafa V.Uzumeri considers learning rate and forgetting
rate for workforce scheduling[11]. It depends on various factors which can also be
referred to as performance factors. There are many challenges that are posed in
developing the models which can be used in real environment for different variety and
task complexities associated with each product line. This is because of the fact that the
model becomes more complicated when amount of cross training to be provided, worker
deployment policies to be employed are also taken into consideration and it will surely
2
represent a real work environment with the tradeoffs between worker flexibility and
production.
If the task is more complex it will have more steps and will consume more time towards
completion as compared to other tasks. In other words we can say that if complexity of
the task increases then restrictions or flexibility available decreases. This increases the
complexity in constructing the right model that will aim in maximizing the assembly line
performance. The extent to which cross training needs to be provided is a very important
factor in evaluating the performance of the assembly line. Layout of the assembly line
can also determine various aspects related to measurement of performance of the
assembly line. In the case of parallel line, if the product produced is same, then job
shuffling will not have much effect, but in the case of serial line, job shuffling is very
important, as the output of one station is dependent on the output from another station. In
serial line, if we want to maximize the output we need to make sure that the last station is
the bottleneck, as this won’t affect the other stations output. There are many other factors
which we have shown in the result section, that need to be considered for increasing the
efficiency of the line through employing different strategies for workforce flexibility.
Apart from scheduling, it is quiet important that right quantity of output is produced. If
the quantity is more, cash gets trapped in form of inventory, whereas if the quantity
produced is less, then it will result in backlogs and loss of customer’s goodwill.
Therefore, producing the desired quantity by utilizing all available resources optimally is
an appropriate method. There are many job shop scheduling or sequencing techniques
which aims to solve this problem. Some of them are Earliest Due Date (EDD), Shortest
processing time (SPT), First Come First Serve (FCFS), Longest Processing Time (LPT),
Most Work Remaining, etc. EDD schedules jobs according to their due dates, SPT gives
priority to jobs that have shortest processing time, FCFS will give preference to first job
in queue, LPT gives priority to jobs with largest processing time.
MWR prioritizes the jobs in descending order according to their most total processing
time which in this study is calculated by multiplying the total units to be produced by
time taken to produce a unit. Criteria for defining MWR may differ on the number of
3
jobs, machines, time, etc. As here we have multiple jobs with varied quantities, highest
priority is given to the job with largest production quantity and processing time. There
might be cases in which quantity is high as compared to processing time but they are on
high priority as compared to the job with highest processing time and low production
quantity. In some cases it might be vice-versa. Studies that have considered MWR have
used it as overall processing time remaining to be done on a machine or for a particular
job. There are several research papers that have shown that MWR is most of the time
most effective method for scheduling [1],[2],[3].
For a large organization with diverse and multi-skilled workforce, a good approach for
workforce scheduling can help in improving productivity effectively. In this study
empirical data has been used and an algorithm has been developed to meet the required
demand by making use of resources efficiently through scheduling. It also increases the
product and workforce efficiencies. Access to empirical data (production hours,
production quantity, expected quantity, operator efficiency, operator utilization, etc.)
provides a complete view about the information regarding workforce, enabling us to
schedule the available resources to meet the expected demand. This will ensure that the
right worker with right skills has been assigned the right task at the right time to meet the
expected demand. Results are compared with the present assignment structure for
analyzing improvement.
4
Chapter 2
LITERATURE REVIEW
There have been significant contributions in the area of workforce scheduling. Many
papers have tried to solve the issue of workforce scheduling through heuristics and other
different kind of algorithms under various environments and constraints. Workforce
scheduling problem usually has time, shifts and cost constraints. Different objective
functions have been defined for workforce scheduling like reducing labor costs,
employing minimum staff, minimizing the number of required workers, increasing
productivity, etc.
Gonzalo Mejía and Carlos Montoya (2010) tried to address the problem of resource
allocation and scheduling by using Petri Nets and heuristic search. A Petri Net model
defines the preliminary schedule by making use of simple dispatching rules like Most
work remaining (MWR), Largest processing time (LPT) , Shortest Processing time (SPT)
which aims in providing initial optimal solution, with all tasks being completed within
stipulated time by making use of available resources. The method which uses minimum
number of resources to satisfy the requirement is selected. Results showed that 75%, 10%
and 20% were the best efficiencies obtained with MWR, LPT and SPT respectively for
most of the shop instances. Next step is implementing The Resource Assignment and
Scheduling algorithm (RAAS) in which number of resources is decreased iteratively until
it violates the time constraint for a shift. An important assumption in the study was that
shift length was more or less equal to the total work time for all tasks. The methodology
developed in this study was inspired by one of the car seat cover manufacturing
company, but in reality it was not implemented owing unavailability of data. This study
give us the optimal scheduling solution for cases where resources are used optimally
under precedence constraints but do not consider operator skills while task assignment.
Alain Billionnet in his paper Integer programming to schedule a hierarchical workforce
with variable demands (1999) used integer programming for scheduling problem. The
main objective was to find an optimal schedule where a lower qualified worker can be
5
replaced by a highly qualified worker but opposite cannot happen. Workers were divided
into different categories or types based on their hierarchy. Work constraints like n days
off in a week was considered while formulation. For solving the problem, modeling
language MLP and the LP-IP solver XA were used. The model was tested on 48 random
problems with 2 to 5 worker types and 2 to 4 days-off range. In the results they have
shown that the optimal value of the continuous relaxation was less than 2%. This proved
that the integer programming was the right approach for the problem. The disadvantage
of using this technique is that integer programming formulation requires a lot of
computational time and thus need to be handled carefully.
Similarly Rangarajan Narasimhan (1997) presented an optimal algorithm for single shift
scheduling of hierarchical workforce in his paper. An algorithm was designed to achieve
the required demand through minimum workforce. The algorithm was mathematical and
simple with main objective being assignment of employees who work during successive
weekend with adjacent pair of off days. This algorithm could not be applied to multiple
shifts and different demand pattern scenario. Rudy Hung (1994) also considered the
scheduling problem for hierarchical workforce. Their objective was to obtain optimal
solution with least labor cost. This paper used branch and bound method to obtain
optimal labor mix. Rudy studied a 3-day, 4-day and 5-day work week labor requirements
for hierarchical workforce model.
The model presented by Serap Ulusam Seckiner, Hadi Gokcen, Mustafa Kurt in their
paper (2007) is based on Alain Billionnet model. The main difference is that in Alain
Billionnet model workers can be assigned only to a single shift while in this model
workers can be assigned to alternative shifts. Main objective of the paper was to save
worker costs by using compressed workweeks. Branch and Bound algorithm was used to
find the optimal solution. Results obtained were compared with Alain Billionnet model
and it showed that the integer programming solution for this paper yield lower cost when
compared with Alain Billionnet model. In Alain Billionnet model workers of each type,
worked for the same duration in a week. However in this paper only worker requirements
was considered, which provides flexibility in meeting those requirements through
alternative shifts resulting in lower cost compared to Alain Billionnet model.
6
Gary and John in their paper (2006) divided employees in to various groups depending
upon their productivity to form workforce schedules. The model they proposed was
designed for pure services environment. Traditionally problems for pure services
environment was formed as a general set covering problem with labor cost minimization
as the objective. In this paper main objective was to attain cost efficient schedule and
ensuring right availability of employees in each period. However the main constraint
being that each group of workers with different productivity levels will have minimum
percentage of certain type of employees. Queuing model was used for determining
minimum number of employees in each group to attain required service level. The model
was tested with linear equations but it displayed inaccurate results. The real problem of
workforce scheduling with different productivity levels is non-linear in nature. Heuristic
approach like simulated annealing which was used earlier for solving tour scheduling
problem were used for solving problem followed by lookup table approach. Different
groups with various productivity levels, hourly labor cost, employee types, days off were
considered resulting in different 3240 test environments. Results showed that average
savings and productivity of employees were related which means if a certain group is
more productive then other group, average savings of former group will be equivalent to
productivity levels.
There are some papers which deal with determining most optimal job shop scheduling
technique through algorithms. Chrisitan Bierwirth, Herbert Kopfer, Dirk C. Mattfeld and
Ivo Rixen (1995) used genetic algorithm for dynamic job shop problem. They carried out
their research in two steps, first developing a genetic algorithm for job shop scheduling
and then improving algorithm further through simulations. They considered a set of
machines and jobs, where each job consists of a series of operation which can be
performed only on dedicated machines. One of the other main criteria along with these
assumptions was that the release time of each job should be known in advance. It
compares priority based algorithms with genetic algorithm. Genetic algorithm in their
research is referred as PGA. In manufacturing environment there are many
nondeterministic situations that arise like machine breakdown, etc. Therefore a
decomposition technique described by Narayan Raman, Ram V. Rachamadugu and
7
F.Brian Talbot (1989) which basically decomposes non deterministic problem into a
sequence of deterministic problems was used to improve present algorithm. This
algorithm was tested on single 100 jobs and 5 machines using release times which were
uniformly distributed over interval of 0 to 1000. For testin,g considering non
deterministic environment, 100 jobs were considered. It was observed that results
obtained from PGA were closed to FIFO (First In First Out) simulation. Table shown
below provides comparison between priority base rules and genetic algorithm. ̅ refers to
the mean flow time of job in system. It can be clearly seen that combination of genetic
algorithm and decomposition is best combination. Priority rules consider only one
machine at a time but genetic algorithms consider entire manufacturing system for
scheduling jobs.
Table 2-1 Simulation Results
Heuristic ̅(best) ̅(mean) sec.
MWR (most work remaining) 352 359.7 13
FIFO (first in – first out) 252 256.5 6
SPT(shortest processing time) 191 196.6 8
PGA (genuine) 236 247.6 145
PGA+IS(initial seeding) 215 218.2 148
PGA+ TD(temporal decomposition) 182 187.1 229
Performance of priority rules may differ for different manufacturing environments. This
paper considers problem of only job shop scheduling. But combination of workforce
scheduling makes it more complex.
In a real manufacturing environment there might be various constraints which need to be
considered while defining a preliminary schedule. Workforce scheduling is not only
important in manufacturing industry but in other areas like restaurants, hotel, retail,
software industries, etc. L.-E. Drezet and J.-C. Billaut presented a project scheduling
problem (2008) considering employee as resources and their activity as time-dependent
activities. They considered employee skills and other legal constraints like maximum and
minimum hours of work while assigning projects. The main objective was to assign
8
projects in such a way that maximal lateness is minimized. A linear programming
formulation was initially given for the problem which was solved by using greedy
algorithm. It can be seen that how every paper mentioned above have aimed in solving
workforce scheduling problem based on various constraints. This study also tries to solve
the same problem by using a job shop scheduling technique combined with operator
efficiencies to obtain an optimal solution.
9
Chapter 3
MODEL DESCRIPTION
3.1.Data Description
Data used in the analysis was obtained from Fairfield Manufacturing Inc. located in
Lafayette, Indiana. Fairfield has collaboration with Oerlikon and therefore it is also
referred as Oerlikon Fairfield. It is one of the leading manufacturer of transmission gears
and drive products like torque hub. They also provide solutions regarding design,
manufacturing and product support [12]. Fairfield has manufacturing plants in other parts
of the world like China, India. This data is taken from their plant in India. There they
produce parts for gear assembly as well as individual gear parts for other purposes.
Therefore each task in the analysis is a part that will either be used in an assembly or as
an individual. Each part has to undergo through various processes to become a finish part.
This data consists of records from a single department therefore a part will undergo a
single process or operation only for this department.
Data consists of records for 29 operators and 86 tasks for a period of one month with
other details like operator name, machine name, task being done, production date, shift
details, part description, operation, production quantity, production hours, expected
quantity, operator efficiency, scrap quantity, operator utilization and other minor details.
Detailed data has non-essential information, therefore data which was used after analysis
for running final simulation is provided in appendix 7.1 for each 4 weeks. First table for
each week gives quantity that need to be produced each week along with average
processing time. Other tables give information regarding processing time of each operator
for every task. Figure 1 and 2 gives a snapshot of the raw data.
10
Figure 3-1 Snapshot of raw data
Figure 3-2 Snapshot of raw data
Notations in the raw data are explained below :
Production hrs: Time when operator is physically present to do a task.
Production qty: Actual quantity produced by an operator.
Expected qty: According to master schedule it is quantity that should be produced for a
specific defined period.
Operator Efficiency: It is measured as production hours by total production hours
available. For example if operator worked for 7 hours vs total 8 hours available then
operator efficiency will be 87.5%.
11
Scrap qty: Quantity that does not meet quality standard is either rejected or may be
reworked later.
Rw qty: Quantity that is lying in queue to be worked upon.
SET : It refers to time required in setting up machine or in short it is set-up time.
N/L: It is time lost when worker needs to wait until raw material arrives and is idle during
this time.
N/O: It is time lost when job is waiting in queue and there is no worker available to attend
it.
N/T: It is time lost when operator has to wait or remain idle until new tools was are made
available to carry out the operation.
N/P: It is time lost when both operator and machine has to remain idle during power
failure.
B/D: It is time lost when both operator and machine has to remain idle until equipment
starts functioning properly.
TOL: It is time required in changing the tool either for a new one or different one for each
operation.
MIS: It is loss of time due to any minor incident.
SUL: It is loss of time during dry run of equipment to attain its desired momentum.
RSL: It is loss of time when equipment works at lower efficiency then it usually
works. Sometimes feed rates or part parameters are changed on machine to meet quality of
part.
SC: It is time lost when defective pieces are produced.
RW: It is time lost when reworking over defective pieces.
PM: It is time lost during preventive maintenance.
NPL: It is time lost when machine is not planned for production.
CLE: It is time lost during cleaning of equipment.
OMC: It is time lost due to operator movement.
LOL: It is time lost because machines are situated distance apart .
LOG: It is time lost due to material/product movement.
12
MAL: It is time required for inspection during tool change.
HNA: It refers to time lost devoted for a certain operation which was to be assigned to
another task.
3.2.Data Analysis
Most important part to carry out initial research was to extract out important information
that will be used for generating results and later on for comparison. As explained in
section before there were many variables present in raw data. Therefore, first step was to
eliminate variables which were not important. When we examined data carefully it was
observed that variables like Scrap qty, Rw qty, SET, N/L, etc had value as zero, blank or
very small. Therefore these variables were eliminated from further research work. Now
the left over variables like Operator Name, Production Date, Machine Name, Shift, Part
Name, Operation, Production Hours, Production Qty, Expected Qty, Operator Efficiency
and Operator Utilization were used for generating results. Statistical analysis was carried
out to identify correlation between variables but no correlation was observed. In some
cases there is a possibility that if an operator is doing more number of tasks his efficiency
will be less. But no such observation came out to be true as shown in graph below. In
graph x-axis corresponds to operator number, red bars refer to total count of tasks that an
operator performs and blue bars refer to operator efficiency. It is clearly visible from
graph that there is no correlation between total number of tasks done and operator
efficiency.
13
Some initial calculation was required for applying algorithm mentioned in the next
section. Our first aim was to define worker efficiency which in this case is completion
time. If an operator consumes less time to do a task when compared to other operators, he
can be regarded as most efficient worker for that particular task. This will be defined by
production hours and total quantity produced during that time. Production hours as
described earlier refers to time when operator is performing the task or in other words we
can say that it is time required by an operator to produce required quantity. Now a worker
will be handling multiple jobs/tasks in a single day and therefore for example if
production hour is mentioned as 7 for both jobs in raw data, we need to find completion
time by that operator for each task. If for both the tasks, same production hour is
mentioned, then production hours for each task will be production hours divided by task.
For example let there be 2 tasks with production hour as 7 for an operator on a single
given day then we can say that actual production hour per task is 3.5 hours which is
obtained by dividing production hours (7 in this case) by total tasks (2 for this case). But
there are situations where operator is performing multiple tasks on a single day and has
production hours as 3 for first task and 7 for another task. In this case we need to find out
the maximum value of production hour for a single day by that particular operator. For
the example mentioned above it is 7 (7 is greater than 3). After that we need to find the
0
10
20
30
40
50
60
70
80
90
100
O1 O3 O5 O7 O9 O11 O13 O15 O17 O19 O21 O23 O25 O27 O29
Table 3-1 Comparison of operator efficiency and number of different tasks
14
proportion of time devoted to each job with reference to maximum production time and
equate it to maximum production time which will give us a linear equation. If we solve
this linear equation we will get actual time consumption for each task. For this example
equation will be
0.428x + x = 7 which gives x = 4.9
Therefore task with production hour 7 is consuming 4.9 hours and other task is
consuming 2.1 hours (obtained by multiplying 0.428 by 4.9). This calculation was carried
out in MS-excel for each task to generate actual consumption time. Another important
term is Production quantities, which are basically actual quantities produced by operator
during actual consumption time calculated above. Therefore after this, efficiency for each
operator was calculated as defined above. Data was divided week wise and resultant data
is shown in appendix as Table 5-1, Table 7-2, Table 7-3 and Table 7-4 for week 1 and
thereafter from week 2 to week 4. Based on assumptions mentioned in the next section
data was further filtered out.
3.3.Methodology
Deployment of the workforce among the company plays an important role in determining
its overall effectiveness. Our main objective of carrying out this research is to increase
productivity and worker utilization by using simulation through dynamic workforce
scheduling. First step of the study was to carry out data analysis with raw data to identify
significant variables which has already been explained in previous section. Data provided
consisted of monthly records which was further classified on weekly basis to get a more
clear picture. Main variables that were considered for analysis were operator number,
task number, production hours, production quantity, expected quantity. Based on these
variables efficiency of each worker for each task was calculated as defined above. More
efficient worker means that he will be able to do task at a much faster pace as compared
to other workers or in other words we can say that he will consume less time to complete
that task when compared with other workers. Similarly average processing time was
calculated for each task based on total time taken by number of units produced during
15
that period. Workers efficiency and processing time were important variables in
determining the strength of algorithm developed.
Second step was implementing job-shop scheduling technique for which highest priority
job was selected. Job priority was based on unit obtained by multiplying average
processing time for a task by expected quantity and then arranging it in descending order.
This technique is called MWR and it gives priority to jobs with large processing times
and high production quantity. Data was taken from a manufacturing company and their
main aim is to produce quantities that have been decided based on demand forecast and is
updated in master production schedule. One objective of our algorithm is to produce
quantities mentioned in master production schedule which is best satisfied by using
MWR rule. Thus by selecting MWR we will be able to meet the demand requirement
more closely than any other job-shop scheduling technique. Certain assumptions were
considered while carrying out simulation for finding out optimal schedule which are:
Company operators on a single shift.
Schedule takes all production hours in a single week together as a whole period
for determining final schedule.
Maintenance activities are done separately and do not count into production hours
per week.
Quality of jobs produced is high with minimal rejections.
Walking time between jobs was not considered.
Machines and other tools are always available when a task has to be scheduled.
Company operates for 6 days a week and working hours for each operator excluding
break is 8 hours which makes cycle time for each week as 2880 minutes. Tasks were
assigned to workers based on MWR and their efficiency in performing that particular task
with some exceptions which are mentioned below:
If there is a task which can be performed only by an operator then that task has
highest priority.
If an operator can perform only that particular task then that task is assigned first
and given highest priority.
16
Tasks with above mentioned exceptions were given higher priority and were assigned
first followed by tasks arranged according to MWR rule. Two different algorithms were
used for generating results. In first algorithm, most efficient worker is assigned task first,
while in second, least efficient worker is assigned task first. Algorithm for task
assignment is mentioned below and in this if during assignment multiple workers are
available it will select most efficient worker. Algorithm consists of following steps:
Read data from excel file and store it in a matrix called Plant data [7.2.3].
Tasks with exceptions are selected first and corresponding worker is assigned to
it. Assignment of tasks is based on priority rule defined above [7.2.3.Line 14-32
selects workers with one job and job with one worker].
After assigning task according to above step algorithm will move to tasks where
multiple operators will be able to perform task. In this case most efficient worker
is assigned task otherwise proceed to last second step [7.2.3.Line 37-40].
When the highest priority task is assigned, results get stored in an array with
operator number, task number, start time and end time details [7.2.3.Line 128 of
stores all the information using the function in 7.2.4].
If the next task in the task schedule list cannot be performed because operators
who can perform that task are currently doing some other tasks then next task in
the list is scheduled and the previous task becomes next task in the list. This
process is similar to bubble sort algorithm [9] [7.2.3.Line 63-73].
Whenever a task is assigned it is checked for cycle time. If the total time required
to complete the task exceeds cycle time then go to next step else proceed with the
assignment of next task in the list [7.2.3.Line 90-99].
Quantities remaining for that task are stored in a different array called remaining
quantity and quantities that are produced within cycle time are updated and stored
in the result array as Qty Produced [7.2.3.Line 96-98 and line 107 where line 107
store remaining quantities].
For remaining quantity most efficient available worker is selected to finish the
task. End time for such tasks becomes start time when it is assigned to most
efficient available worker [7.2.3.Line 30-35].
17
If for a task the operator who is most efficient in performing the task is not
available, next available efficient operator is assigned to that task [7.2.3.Line 57-
60 search for free and efficient worker depending on fast or slow worker
assignment].
Above steps are repeated until all tasks are assigned [7.2.3.Line 101-104 breaks
from programs until no more tasks are available or cannot be assigned, it store
remaining parameters in a 'Balance' variable].
Other algorithm consists of following steps
Read data from excel file and store it in a matrix called Plant data [7.2.3].
Tasks with exceptions are selected first and corresponding worker is assigned to
it. Assignment of tasks is based on priority rule defined above [7.2.3.Line 14-32
selects workers with one job and job with one worker].
After assigning task according to above step algorithm will move to tasks where
multiple operators will be able to perform task. In this case task is assigned to
bottleneck operator or in other words least efficient worker (consumes highest
time for completion of a task when compared to other operators) [7.2.3.Line 37-
40].
When the highest priority task is assigned, results get stored in an array with
operator number, task number, start time and end time details [7.2.3.Line 128 of
stores all the information using the function in 7.2.4].
If the next task in the task schedule list cannot be performed because operators
who can perform that task are currently doing some other tasks then next task in
the list is scheduled and the previous task becomes next task in the list. This
process is similar to bubble sort algorithm [9] [7.2.3.Line 63-73].
Whenever a task is assigned it is checked for cycle time. If the total time required
to complete the task exceeds cycle time then go to next step else proceed with the
assignment of next task in the list [7.2.3.Line 90-99].
Quantities remaining for that task are stored in a different array called remaining
quantity and quantities that are produced within cycle time are updated and stored
18
in the result array as Qty Produced [7.2.3.Line 96-98 and line 107 where line 107
store remaining quantities].
For remaining quantity least efficient available worker is selected to finish the
task. End time for such tasks becomes start time when it is assigned to least
efficient available worker [7.2.3.Line 30-35].
If for a task operator who is least efficient in performing the task is not available,
next least efficient available operator is assigned to that task [7.2.3.Line 57-60
search for free and efficient worker depending on fast or slow worker
assignment].
Above steps are repeated until all tasks are assigned [7.2.3.Line 101-104 breaks
from programs until no more tasks are available or cannot be assigned, it store
remaining parameters in a 'Balance' variable].
If we compare above two algorithms we will see that only difference between
them is that while assigning task instead of considering most efficient worker in
first algorithm, least efficient worker is selected for second algorithm. A
simulation is developed in MATLAB to test both the algorithm. Results generated
in MATLAB are exported to excel for further analysis which is discussed in next
section.
Chapter 4
RESULTS
4.1.Preliminary Results
As the main objective of carrying out this research is to improve overall productivity of
system, therefore first target was to maximize production. For maximizing production we
need to produce more quantities which are more close to expected quantity than
production quantity (given in empirical data from company). Therefore before
implementing any job shop scheduling priority was given to tasks which have more
number of quantities to produce. This means if there are multiple tasks to be done then
highest priority will be given to tasks with highest expected quantity in present schedule.
After prioritizing task based on quantities workers were scheduled according to their
efficiencies. Results generated by employing this method did not show significant
improvement when compared to present model and hence was rejected. As the problem
was decomposed into weeks to perform simulation improvement was not observed for all
weeks. For some workers utilization percentage was high and for some it was quiet low
as zero. Now after analyzing results it was observed that however there was a slight
increase in productivity but there were lot of tasks with smaller quantities that were not
performed at all and also some operators were idle during whole production period.
Mainly operators with higher efficiencies were performing tasks and slow workers were
idle in this method.
Now a technique was needed that will eliminate above mentioned problem and will also
improve productivity to a larger extent. In a manufacturing company if a task has more
operations or if it consumes more time for completion when compared with other tasks it
is considered to be more complex task. Therefore if we assign complex tasks first there is
a possibility that it will improve the present structure. To test this, a job shop scheduling
technique called LPT (Largest Processing time) was implemented which gives priority to
20
jobs with largest processing time per unit. This means that if a task consumes more time
for completion it will be assigned first. Results generated through this were not justified
when compared with their present schedule. After analyzing result it was observed that
there were quiet a lot number of tasks that remain unassigned. These tasks were the one
which consumes less time for completion. Therefore it was clear that if we use a
technique that will consider both quantities and processing time, it will definitely
improve the results generated. This lead to search for other job shop scheduling
techniques that can be applied to present system. After referring literature for it, MWR
was considered because results showed that it has got higher efficiency in different
manufacturing environment when compared to other job-shop scheduling techniques and
other that this scheduling gave more importance to tasks with both highest quantity and
largest processing time remaining which was our target.
Initially algorithm designed for workforce scheduling did not prioritize the exceptions
where a single operator is capable of performing only a particular task and other where a
task can be performed only by a single operator. Therefore when results were analyzed it
was observed that there were few operators and tasks that were not assigned at all for
cases discussed above. Implementation of these exceptions further improved results.
Another important aspect considered while scheduling was cycle time. An operator can
perform tasks till end of his shift but if there are more quantities that need to be produced
for that task, then increasing productivity further for remaining quantities by assigning
them needs to be considered. For this a new element was added into algorithm where if a
worker is not able to complete task within cycle time, remaining task will be completed
by next available worker and so on until task is completed or cycle time for operators that
can perform that task is reached. Results generated by implementing this extra element
were better than previous results. Thus reason behind non assignment was found out and
improved algorithm gave highest priority to tasks with above mentioned exceptions
which improved allocation of resources and results as discussed in next section.
Initial results generated through final updated algorithm defined in above section
consisted of five fields mainly task number, quantity produced, operator number, start
21
time and end time. They are shown in Appendix from table 7-17 to table 7-24 for both
algorithms and for each week.
4.2.Experimental Results
Results generated by both algorithms were analyzed and compared with the initial
empirical data provided. First data was analyzed on monthly basis and it was observed
that it was difficult to simulate that much data together and the results generated were a
bit difficult to analyze. Therefore, data was divided on weekly basis and then simulation
was run for 4 weeks together which increased CPU time and enhanced results also.
Algorithm was tested for 4 weeks data with 29 operators and total 86 tasks. After having
close observation of results it was found that there are cases where all operators would
not be working in each period and that each task was not performed each week. For
example consider results for week 1 and week 3 of algorithm 1 where we will observe
that three operators were not performing any task which is similar to information
provided in empirical data. Thus algorithm used same amount of resources which were
present in initial data, only difference was arrangement of resources. Simulation was
carried out in MATLAB and the data was transformed from excel format to MATLAB
readable format. Therefore a separate code was run to read data from excel initially
[7.2.3]. Main code for generating result shown as Code 1 [7.2.1] in appendix calls
function for obtaining task priority [7.2.2], scheduling tasks with reference to cycle time
[7.2.4] and doing reassignment based on it and finally storing results [7.2.5]. If we refer
to algorithm in section 3 we will know when these functions are called.
Results generated were compared with respect to two variables. First variable is overall
productivity and other variable is operator utilization. Overall productivity is defined as
quantity that is produced by making use of available resources versus expected quantity.
In empirical data or in data provided by the company we will see that in most of the cases
production quantity was less than expected quantity which resulted in lots of backlog.
Therefore we can say that our result generated improved overall productivity and will
produce quantities that are more close to expected quantity. Other variable was operator
22
utilization which is calculated by dividing production hours for operator by the
production hours available per day. When we compare results for both algorithms we will
see that for first algorithm where most efficient worker is assigned task first, overall
productivity saw an increment of 15% while operator utilization increased by 14%. For
other algorithm where least efficient worker is assigned task first, overall productivity
increased by 12% and operator utilization by 26%. Increase in percentage of variables
(Quantity and Utilization) are measured with respect to the initial data. For example in
table shown below quantity before refers to quantity that was produced before
implementation of algorithm and quantity after refers to quantity after implementation of
algorithm. Table 4-1 gives summary of results for first algorithm where most efficient or
fastest worker was assigned task first while Table 4-2 gives summary of results for
second algorithm where least efficient or slowest worker was assigned task first. Detailed
gantt charts for both algorithms and for each week is discussed in next section.
Table 4-1 Results for first Algorithm
Week No. Qty before Qty after Increase Utilization before Utilization after Increase
Week1 21932 25109.44 14.49 63.36 68.89 8.72
Week2 23908 26832.92 12.23 65.62 76.34 16.34
Week3 22586 26876.08 18.99 64.72 77.02 19.01
Week4 21367 24516.68 14.74 57.18 64.70 13.15
Average 22448 25833.78 15.11 62.72 71.74 14.31
Table 4-2 Results for second Algorithm
Week No. Qty before Qty after Increase Utilization before Utilization after Increase
Week1 21932 25109.44 14.49 62.74 81.46 29.83
Week2 23908 26748.21 11.88 65.62 81.14 23.65
Week3 22586 24622.23 9.02 64.72 77.02 19.01
Week4 21367 23958.91 12.13 56.61 74.13 30.95
Average 22448 25109.70 11.88 62.42 78.44 25.86
If we compare the results from both the algorithms we will see that overall productivity is
almost same for both the algorithms may be a bit higher for algorithm 1 but worker
utilization is more for the second algorithm. Worker utilization is measured in terms of
23
the production hours for which an operator performs task. Therefore if slowest worker is
assigned task first it will consume more time in completing that task as compared with
other workers. This results in higher worker utilization. However in the first algorithm
less time is consumed in performing the tasks as most efficient worker is doing that task
resulting in lower worker utilization. As both algorithms shows overall improvement
when compared to present system, implementation of any one algorithm will be useful in
determining the overall effect on system. But in practical we want to produce more
quantities for increasing our overall productivity rather than focusing more on workforce
utilization because workforce can have a certain threshold but task is done on machine
and machine threshold can be increased to a certain extent. Detailed analysis of result is
discussed in next section which will give different scenarios where one algorithm will
perform better than another in what respect.
Chapter 5
CONCLUSION
From results we got it can be concluded that both the algorithms can be applied to
dynamic working environment. However if there is a need to provide training to
operators we recommend use of first algorithm as it will provide some extra hours to
operators for their development. It will also provide opportunity to slow workers to
enhance their skill set. But if we use second algorithm it may increase efficiencies of
slow operators for tasks they perform in long run because learning will be more initially.
But if we compare completion times for both algorithms we will observe that for first
algorithm completion time is less in most cases when compared to cycle time however
for second algorithm completion time is usually same as cycle time. Therefore overall
productivity is bound to be lower in second algorithm when compared with first
algorithm. Another reason for suggesting use of first algorithm is that in most cases
because increasing productivity will be more important than operator utilization because
there are quiet lot of factors involved when we want to improve operator utilization
which are not considered in this study. But if there are some areas which require highly
skilled workforce and operators in that area are paid more when compared to other
operators then use of second algorithm might be more beneficial.
Results generated could also be used for further improvement as they provide clear
picture of operators workload. So in case if a worker is overloaded other operators can be
trained in that particular job for balanced workload throughout the system. Some cases
were observed in the study where a single operator has to perform multiple tasks because
other operators do not have the skills to do that task. This study was useful in identifying
such tasks. Gantt charts below further supports this explanation. Each chart has been
divided into two parts for ease in understanding as shown below. Figures 5-1 and 5-2
provides comparison between algorithm 1 and 2 for week 1. Similarly other graphs from
Figure 5-3 to 5-8 gives comparison between two algorithm for each week.
25
Figure 5-1 Gantt chart for Algorithm1(week1) Figure 5-2 Gantt chart for Algorithm2(week1)
0 500 1000 1500 2000 2500
1222334455566889
10111213141415161818192022222323242424252526272828282828282829
0 500 1000 1500 2000 2500
12334455567889
1010101112131415161616181920202122232323242424252525262727282828282828282929
26
Figure 5-3 Gantt chart for Algorithm1(week2) Figure 5-4 Gantt chart for Algorithm2(week2)
0 500 1000 1500 2000 2500
111122234566677778899
101011111112121213131314151516161617181819191919202020212121212223232424242526272829
0 500 1000 1500 2000 2500
111122234566777778899
10101111111212121313131414141516161617181819191919202020212122232323232424242526272829
27
Figure 5-5 Gantt chart for Algorithm1(week3) Figure 5-6 Gantt chart for Algorithm2(week3)
0 500 1000 1500 2000 2500
1223444555567899
1010111212131415151516161617181919192021212222232323232324242424252728282829
0 500 1000 1500 2000 2500
1122344567789
101010111212131414151515151516161616171717181919192021222223232323242527272828282829
28
Figure 5-7 Gantt chart for Algorithm1(week4) Figure 5-8 Gantt chart for Algorithm2(week4)
0 500 1000 1500 2000 2500
122345566778999
1011111112131314141516161718191920212123232323242425252628292929
0 500 1000 1500 2000 2500
12345567778999
1010101111111212121314151616171819191920212121222323232324242525262728292929
29
In gantt charts shown above y-axis gives operator number while x-axis corresponds to
time taken for completion of task for an operator. For example if we take figure 5-1 into
consideration it will be observed that operator number is repeated which is because of the
fact that a single operator performs multiple tasks. After careful observation it can be
seen that in figure 5-1 and figure 5-2 operator 28 is performing 7 tasks because number of
tasks that can be performed only by him is high or we can say that he is capable of
performing a set of tasks which cannot be done by any other operator. When we compare
gantt charts for both algorithm we will see that results almost seem similar for some
cases, main difference is in their completion time and task reassignment to workers. In
some cases more workload is observed on operators when task is assigned based on
second algorithm. For example if we compare information for operator 12 in figure 5-7
and 5-8 we will see that operator 12 is performing only a single task if assignment is
based on algorithm 1 but same operator is performing three different tasks till completion
time of period for algorithm 2. Thus we can conclude that if assignment is based on
second algorithm workload on an operator increases which might hamper their individual
productivity. Same case can be observed for operator 19 and 21 in figure 5-7 and 5-8.
For some tasks we can see that even if multiple operators can operate a particular task,
that task is not assigned for second algorithm due to change in worker selection policy
when compared with first algorithm. For some situations which considered exceptions of
one worker for a particular task and a task only for a particular worker results were
almost same for both algorithms. Detail analysis reveals that there are cases in both
algorithms where a particular operator is performing more number of tasks compared
with other algorithm. For such cases it will be best to observe tasks based on their
complexities and then observe which algorithm will suit their requirements. There might
be some non-deterministic situation arising in a manufacturing environment therefore
using first algorithm will be more beneficial over second in those cases as operators can
devote some extra hours for it. Considering above examples we will recommend use of
first algorithm for a dynamic manufacturing environment.
At last we can conclude that if we only consider scheduling workforce we might not be
able to improve overall productivity of the system. Because while considering scheduling
30
for workforce it will only considers aspects related to workforce which may be his
skillset, efficiency, learning and forgetting effects, etc and will neglect the way in which
jobs were scheduled to be assigned. Same will be the case when we consider scheduling
only tasks and not operators. Scheduling tasks might increase productivity to a certain
level but to maximize it we need to optimize all resources associated with it. One of most
important resource associated with it is workforce who eventually performing those tasks.
Thus if we combine both job shop and workforce scheduling we will not only get
improved results but it will definitely improve overall productivity of the system as it will
synchronize both components together.
Future research in this area can include machine availability, walking distance between
tasks, etc. as constraints. Some other job shop scheduling technique or genetic algorithm
could be used to observe their effect on present manufacturing system. In terms of
workforce scheduling study can include operators learning and forgetting effects which
plays a crucial role in long run. If an operator is performing multiple tasks repeatedly
than considering their learning and forgetting effects will be really useful. Further study
can be carried out on results derived above to find a better optimal solution which will
consider other parameters like operator workload, walking distance between tasks, etc.
This might also help in determining optimal operator utilization.
REFERENCES
1. Applications of resource assignment and scheduling with Petri Nets and heuristic
search by Gonzalo Mejía and Carlos Montoya, Annals of Operations Research,
Volume 181, Number 1 (2010), 795-812.
2. Efficient dispatching rules for dynamic job shop scheduling by P. D. D. Dominic,
S. Kaliyamoorthy, M. Saravana Kumar, The International Journal of Advanced
Manufacturing Technology, Volume 24, Numbers 1-2 (2004), 70-75.
3. Optimization of Job-Shop Scheduling Using Fuzzy Heuristic Algorithm for
Discrete Manufacturing Enterprise by Fu Xiuli, Wanghui, Zhang chengxiang and
Zhao lin, (2010) International Conference on Computing, Control and Industrial
Engineering, Pages 182-185.
4. Integer programming to schedule a hierarchical workforce with variable demands
by Alain Billionnet, European Journal of Operational Research, 1999, vol. 114,
issue 1, pages 105-114.
5. An integer programming model for hierarchical workforce scheduling problem by
Serap Ulusam Seckiner, Hadi Gokcen, Mustafa Kurt, European Journal of
Operational Research vol. 183 issue 2 December 1, 2007. p. 694-699.
6. Single–shift off-day scheduling of a hierarchical workforce with variable
demands by Rudy Hung, European Journal of Operational Research, 1994, vol.
78, issue 1, pages 49-57.
7. An algorithm for single shift scheduling of hierarchical workforce by Rangarajan
Narasimhan, European Journal of Operational Research, 1997, vol. 96, issue 1,
pages 113-121.
8. A project scheduling problem with labour constraints and time-dependent
activities requirements by L.-E. Drezet and J.-C. Billaut, International Journal of
Production Economics, 2008, vol. 112, issue 1, pages 217-225.
32
9. Variable employee productivity in workforce scheduling by Gary M.Thompson,
John C. Goodale, European Journal of Operational Research 170(2): 376-390
(2006).
10. Improving performance using workforce flexibility in an assembly environment
with learning and forgetting effects by John.K.McCreery and Lee.J.Krajewski,
Int. J. Prod. Res. 37, No.9, 2031-2058 (1999).
11. The Effects of Worker Learning, Forgetting and Heterogeneity on Assembly Line
Productivity by Scott M.Shafer, David A.Nembhard, Mustafa V.Uzumeri,
Management Science, Vol. 47, No. 12 (Dec., 2001), pp. 1639-1653.
12. Genetic Algorithm based Scheduling in a Dynamic Manufacturing Environment
by Chrisitan Bierwirth, Herbert Kopfer, Dirk C. Mattfeld and Ivo Rixen,
Proceedings of the Second Conference on Evolutionary
Computation(1995), pages 439—443.
13. Real-time scheduling of an automated manufacturing center by Narayan Raman,
Ram V. Rachamadugu and F.Brian Talbot, European Journal of Operational
Research 40(1989) 222-242.
14. http://www.oerlikon.com/fairfield/en/home/.
15. http://mathbits.com/MathBits/CompSci/Arrays/Bubble.htm.
16. Workplace Flexibility: A Guide for Companies By Dana E. Friedman.
17. Strategies and measurement for workforce flexibility: an application of functional
flexibility in a service setting By Riley, Michael; Lockwood, Andrew.
International Journal of Operations & Production Management, International
Journal of Operations & Production Management, Vol. 17 Iss: 4, pp.413 – 41
33
APPENDIX
Data for Analysis
Table 5-1 Data for week 1
Task No. Total Qty Avg. Processing time
1 83 2.81
5 406 2.34
6 242 2.77
7 378 2.84
10 726 2.41
12 461 2.29
13 406 4.02
15 1744 2.16
17 1600 2.50
18 1368 2.99
21 587 2.08
22 1689 2.22
25 1058 2.39
27 37 2.14
28 685 2.07
29 1467 2.50
31 166 3.28
34 104 4.68
35 198 2.31
36 0 2.96
37 571 3.58
38 215 3.71
39 512 2.52
41 203 4.89
42 568 4.20
43 0 2.56
44 89 3.33
45 0 5.25
46 0 4.35
47 587 2.08
48 235 2.65
52 376 2.07
34
Task No. Total Qty Avg. Processing time
55 0 2.96
56 733 2.47
58 607 2.18
59 1472 3.47
66 1684 2.99
68 674 2.78
72 570 2.56
73 1189 3.57
77 353 3.59
78 82 3.13
80 173 2.07
81 103 3.60
82 48 2.00
83 385 3.72
85 273 3.06
Table 5-2. Data for week 1(Efficiencies of operator for each task).
Task No. O1 O2 O3 O4 O5 O6 O7 O8 O9
1 5 2.73
3.06
6 7 10 12 2.73
3.06
13
6.75
2.31
15 3.50
3.50
2.03
1.22
17 18
3.38
1.93 21
1.76
22 3.50
3.50
2.03
1.22
25
2.50 2.04
3.50 27
2.14
28
2.46
1.83
2.67
29 31
3.07 34
35
2.00
3.00
36 3.06 3.00 2.72
35
Task No. O1 O2 O3 O4 O5 O6 O7 O8 O9
37 38
3.71 39 2.00 2.00
41
4.89 42
3.15
6.50
43 44 45 46
4.00 1.56 47
1.76
48
1.22 52 2.00 2.00
1.33
55 3.06
2.72 56
2.60 2.28 2.61
2.20
2.06
58
2.50 1.38 59 1.05
7.50 2.00
2.11
4.02
66
3.38
1.93 68
3.00
72
3.00 73
3.75
77
3.75 2.71 78
80 81 82 83
3.00 2.00
5.50
3.00
85
3.15
Table 5-3 Data for week 1(Efficiencies of operator for each task).
Task No. O10 O11 O12 O13 O14 O15 O16 O18 O19
1 5 1.50
2.63
6 7
2.56
2.22 3.62 2.98 10
2.00
2.50
12 1.50
2.42
13 15 1.25
1.13
2.76
36
Task No. O10 O11 O12 O13 O14 O15 O16 O18 O19
17
2.00
2.69 18
3.00
2.88
3.00 3.50 2.88
21
1.19
2.25 22
1.13
2.76
25
1.83
2.50 27
28
1.93
2.00
29
2.71
2.38 31
3.75
34 35 36 37
2.14 38
39
3.00
41 42 43
2.56 44
45
3.00
46 47
1.19
2.25 48
5.50
52
3.00
55
3.00
56
2.17
2.00
58
1.83
2.50 59 2.88
3.00
66
3.00
2.88
3.00 3.50 2.88 68
72 73
3.42
3.36
2.89 3.88 3.52 77
5.00
3.75
78 80 81 82 83
6.75
2.00
85
37
Table 5-4. Data for week 1(Efficiencies of operator for each task).
Task No.
O20 O21 O22 O23 O24 O25 O26 O27 O28 O29
1
2.81
5
6
2.77
7
2.81
10
2.02 4.17
12
13
3.00
15
1.08
17
2.47
18
3.38
2.33
2.50
21
3.75
22
1.08
25
3.00
1.83
27
28
29
2.47
31
3.37
3.13
34
4.68
35
2.00
2.25
36
37
3.92 4.68
38
39 2.00 3.60
41
42
4.00
43
44
3.33
45
7.50
46
7.50
47
3.75
48
52 2.00
55
56
4.70
58
3.00
1.83
59
4.63 3.00
66
3.38
2.33
2.50
38
Task No.
O20 O21 O22 O23 O24 O25 O26 O27 O28 O29
68
6.00
2.52
2.13
72
2.52
2.50 2.40
73
1.40
7.00
77
3.63
78
3.13
80
2.07
81
3.60
82
2.00
83
4.50
2.25
85
2.87
Table 5-5. Data for week 2.
Task No. Total Qty Avg. Processing time
6 219 2.88
7 643 2.42
10 304 2.11
11 296 8.00
13 52 3.00
14 69 1.60
15 1532 2.91
17 619 3.98
18 1413 3.53
19 200 2.35
20 111 5.00
22 1769 2.66
25 1648 3.00
26 583 2.97
28 850 3.33
29 700 3.24
31 301 3.65
32 164 2.68
36 1489 3.12
38 369 5.63
39 167 3.75
40 16 1.70
44 300 3.38
45 167 2.22
39
Task No. Total Qty Avg. Processing time
46 952 2.98
48 386 3.16
49 102 3.70
50 339 3.47
51 37 2.10
53 409 3.37
55 1300 2.68
56 1593 3.36
57 917 3.32
58 519 2.73
59 1461 3.26
60 13 1.40
62 78 3.00
63 290 3.43
65 0 1.07
66 722 2.28
67 87 2.75
68 637 2.26
69 331 2.03
70 172 3.42
71 290 3.72
72 526 2.87
73 719 4.59
75 169 3.71
76 167 7.50
77 88 2.20
79 106 3.94
80 300 5.13
82 38 2.25
83 554 1.62
84 67 1.13
86 68 1.88
Table 5-6. Data for week 2(Efficiencies of operator for each task).
Task No. O1 O2 O3 O4 O5 O6 O7 O8 O9
6 7 10
40
Task No. O1 O2 O3 O4 O5 O6 O7 O8 O9
11 13 14 15 17
3.00 18
3.00
19
3.00 20
22
2.21 25
2.50
2.75
26
2.00 28
3.00
29
3.58 31
32 36
3.50
3.75 38
3.75
39
3.75 40
44
3.40 3.75 45
46
3.03 48
3.50
49 50
4.90 2.75 51
2.10
53
3.50 55
2.51 2.70
3.13
56
7.50 4.33 57
3.50 4.90
3.50
58 59
7.00 7.00 60
62 63
3.12 65
66
3.38 67
68
1.19
41
Task No. O1 O2 O3 O4 O5 O6 O7 O8 O9
69 70
1.83 71
3.75
2.40
72
2.61 73
3.75
5.70
75
0.92 76
7.50
77 79
0.38
80
5.13
82 2.25 83 1.84
0.38
84 1.13 86 1.88
Table 5-7. Data for week 2(Efficiencies of operator for each task).
Task No. O10 O11 O12 O13 O14 O15 O16 O17 O18 O19
6
2.00 7
2.30
10
2.00 11
8.00
13
3.00 14
1.60
15
2.80
3.50 2.58 17
3.84 5.50
18
3.25 1.80 5.00 19
1.70
20
5.00 22
3.67
1.70 6.00
25
3.50
3.00 26
3.75
2.90
28 29
3.10 31
32 36 38
42
Task No. O10 O11 O12 O13 O14 O15 O16 O17 O18 O19
39 40 44 45 46
3.17 48
49 50 51 53
3.00 55
2.96
56
3.00 2.78 57 1.80
3.50
58
3.00 3.50 59 2.69
60 1.40 62
3.00
63 65
1.07 66
1.79 2.33
67 68
3.00 69 1.24
6.00
70
5.00 71
5.00
72 1.81
5.50 73
3.77
75
6.50
76 77
2.20
79
7.50
80 82 83 84 86
43
Table 5-8. Data for week 2(Efficiencies of operator for each task).
Task No. O20 O21 O22 O23 O24 O25 O26 O27 O28 O29
6
3.75 7
2.46
10
2.17 11
13 14 15
4.10
3.23
17 18
3.91
19 20 22
2.50 3.75
25 2.60
3.07 26
3.40
28 5.47 2.67
1.60 29
2.00
3.60
31 3.65 32 2.70 1.00
3.50
36 2.50 2.00
3.50 3.50 38 7.50
39 40
1.70 44
3.00
45
1.90
2.38 46
1.90
3.15 3.00
48
3.45 2.25 49
3.70
50 51 53
3.60 55
2.33
1.88
56
3.00
1.88 57
2.33
58
2.75 2.37 59
2.50
2.75 2.45 3.75
60 62
44
Task No. O20 O21 O22 O23 O24 O25 O26 O27 O28 O29
63
3.75 65
66
2.75
3.00 67
2.75
68
2.83 69
70 71 72 73 75 76 77 79 80 82 83 84 86
Table 5-9. Data for week 3.
Task No. Total Qty Avg. Processing time
7 217 1.84
10 108 1.07
11 51 0.60
15 1245 2.05
16 133 3.00
17 185 3.30
18 829 2.73
19 289 4.63
20 188 4.38
22 1730 3.09
23 94 2.01
24 94 2.01
25 977 2.78
26 287 2.58
27 508 3.73
45
Task No. Total Qty Avg. Processing time
28 40 2.60
29 189 4.35
30 316 2.65
31 302 3.23
32 887 2.53
36 1897 2.93
38 307 2.63
45 296 2.90
46 1688 2.23
48 178 4.05
49 503 2.41
50 927 3.57
51 776 2.78
55 1686 2.66
56 234 4.80
57 1014 2.03
58 415 2.50
59 1893 3.20
61 391 3.93
64 95 7.00
65 248 4.88
66 1009 4.09
68 133 6.00
69 87 2.35
71 984 4.08
72 33 1.30
73 947 2.90
74 23 3.40
77 568 3.53
79 810 2.49
80 185 1.87
83 1498 2.82
46
Table 5-10. Data for week 3(Efficiencies of operator for each task).
Task No. O1 O2 O3 O4 O5 O6 O7 O8 O9
7
10 11 15 16 17 18 19 20 22
1.69 23
24 25
4.63 26
2.50
27
2.50 28
29
1.70
7.00 30
31
3.00
6.50 32
3.00
36
3.30
3.50 38
3.25
45 46
2.79 48
6.00
49
50
3.00 7.00 51
3.00
2.88
55
1.50 1.95
3.00 56
4.00
57
1.88 1.96
3.00 58
2.00 4.00
59
2.00 61
64 65 66 68
47
Task No. O1 O2 O3 O4 O5 O6 O7 O8 O9
69
1.90 71
3.13
72
1.30 73
3.34
74 77
2.43
2.20
79 1.40 2.35
2.60
80 1.40
2.33
83 2.14
3.12
Table 5-11. Data for week 3(Efficiencies of operator for each task).
Task No. O10 O11 O12 O13 O14 O15 O16 O17 O18
7
10 11 15
2.69
2.25 16
3.00
17
6.00 18
2.50
2.58
19
3.75 5.50 20
3.75
22
3.00 3.71 23
2.01
24
2.01 25
1.20
26 2.00
27 2.00
28
29
30 2.00
31 2.75 1.80
32 0.88
36 0.88 3.50
38
45
46
48
49
48
Task No. O10 O11 O12 O13 O14 O15 O16 O17 O18
50 3.00
51
55 2.70
56 5.60
57
58
59
61 6.00 3.80
64
65 2.25 7.50
66 3.08 3.73
68 6.00
69 2.80
71 2.25
7.17 3.75 72
73 2.00
7.00 74
77
7.00 79
80 83
Table 5-12. Data for week 3(Efficiencies of operator for each task).
Task No. O19 O20 O21 O22 O23 O24 O25 O27 O28 O29
7 1.84
10
1.07 11
0.60
15
1.40 16
17
0.60 18
3.50
19 20
5.00
22
3.25
23 24 25
3.05
49
Task No. O19 O20 O21 O22 O23 O24 O25 O27 O28 O29
26
3.80 27
7.00
3.40
28
2.60 29
30
2.87 31
2.60
32
4.45 2.39 36
6.25 2.26
38
2.00 45
2.00
3.80
46
2.30
1.94
1.35 48
2.10
49
4.90 1.79 50
6.50
3.17 1.83
51
3.50 2.00 55
3.50 3.75
56 57
2.13 58
59
4.38
3.08 61
2.00
64
7.00 65
66 6.50 3.75
68 69 71
2.00 72
73 1.56 74 3.40 77 3.60 79 2.70 80
83 2.94
50
Table 5-13. Data for week 4.
Task No. Total Qty Avg. Processing time
3 289 3.25
4 26 0.75
7 237 2.67
8 52 2.00
9 185 1.88
10 370 1.60
11 133 3.00
15 802 2.49
17 460 1.40
18 561 1.66
19 173 4.05
20 129 2.14
21 501 3.92
22 1190 2.84
25 2153 2.65
26 821 3.63
27 102 3.70
28 1045 2.99
29 443 2.71
31 69 1.80
36 1308 3.10
38 564 4.20
44 197 2.66
46 1101 2.89
47 470 3.14
48 151 2.07
54 133 3.00
55 1348 3.00
56 1768 3.93
58 795 3.37
59 1087 3.07
61 234 2.60
64 156 3.50
66 768 2.52
68 687 2.59
69 385 3.13
72 627 2.45
73 1032 3.02
51
Task No. Total Qty Avg. Processing time
74 88 2.50
77 215 2.57
80 102 2.50
83 1560 3.34
Table 5-14. Data for week 4(Efficiencies of operator for each task).
Task No. O1 O2 O3 O4 O5 O6 O7 O8 O9
3 4 7 8 9 10 11 15 17 18
2.00 19
20 21 22
3.60 25
7.00
26
3.31 27
3.70
28
2.51 29
31 36
7.50 2.26 38
7.50 1.00
44
3.50 46
3.75
1.90
47
6.00 48
4.00
54
3.00 55
3.75 3.31
6.50
56
3.26 2.03 58
2.47 3.20
59
52
Task No. O1 O2 O3 O4 O5 O6 O7 O8 O9
61 64 66
2.06 68
2.56
69
3.55 72
2.00
73
2.55
74 77
2.57
80
2.50
83 3.20
3.62
Table 5-15. Data for week 4(Efficiencies of operator for each task).
Task No. O10 O11 O12 O13 O14 O15 O16 O17 O18 O19
3 4 7
2.67 8
2.00
9 10
1.60 11
15
4.53
1.90 17
1.20
1.28 1.88
18
1.63 19
2.10
20 21
2.45 5.33 22
2.60
1.88
25
2.07
2.67 26
27 28 29 31 36 38
2.50 44
53
Task No. O10 O11 O12 O13 O14 O15 O16 O17 O18 O19
46
3.17 47
48
1.10 54
55
1.53 56 3.50
3.25 3.50
58 1.70
3.50 59 3.26
2.75 2.50
61
3.50 1.70 64 3.50
66 3.50
2.75 1.50 68 2.50
2.50
69
2.30
72
3.00
2.43
73
3.00
3.50
74
2.50
77 80 83
Table 5-16. Data for week 4(Efficiencies of operator for each task).
Task No. O20 O21 O22 O23 O24 O25 O26 O27 O28 O29
3
3.25 4
0.75
7 8 9
1.88 10
11
3.00 15
1.88
1.20
17
1.60
18
1.38
19
6.00
20
2.14
21
1.17
22
54
Task No. O20 O21 O22 O23 O24 O25 O26 O27 O28 O29
25
2.55 26 7.50
2.98
27 28 3.30 3.00
3.15
29 3.50 2.31 31 2.50 1.10 36
3.08
4.28
38
7.50 44
2.24
46
4.05 1.89 47
3.45 1.40
48 54 55
1.70 56
6.33
6.50
58
5.00
6.00 59
2.50
5.00
61 64 66
3.00 68
3.00
69 72 73 74 77 80 83
55
Codes
7.2.1. Main code for algorithm
1 %Program to compute task priority for n week
2 clear all; clc;
3 %% Load the data
4 read_file = './matfiles/PlantData.mat';
5 load(read_file)
6 %% Set parameters
7 read_week = {1,2,3,4};
8 % read_week = {1,2};
9 CycleTime = 2880;
10 %% Get task priority
11 nWeek = length(read_week);
12 TaskSchedule = cell(nWeek,1);
13 TaskAssignment = cell(nWeek,1);
14 Balance = cell(nWeek,1);
15 for iWeek = 1:nWeek
16 Week = read_week{iWeek};
17
18 Quantity = ProdData{Week}{1};
19 WorkerID = ProdData{Week}{2};
20 WorkerProd = ProdData{Week}{3};
21
22 TaskPriority = Obtain_Task_Priority(Quantity(:,[2 3]),WorkerProd);
23 % [TaskSchedule{iWeek},TaskAssignment{iWeek}] =
Schedule_Priority_Task(TaskPriority,Quantity,WorkerID,WorkerProd);
24 [TaskSchedule{iWeek},Balance{iWeek},TaskAssignment{iWeek}] =
Schedule_Task_CycleTime(TaskPriority,Quantity,WorkerID,WorkerProd,CycleTime,'sl
ow');
25 end
56
7.2.2. Code for job assignment based on priority rule with exception
1 function [TaskPriority] = Obtain_Task_Priority(Quantity,WorkerProd)
2 % TaskPiroity is 3x1 cell
3 nPriority=3; %Number of priorities
4 TaskPriority=cell(nPriority,1);
5 %Create a Task List
6 nTask = size(Quantity,1);
7 nWorker = size(WorkerProd,2);
8 TaskIndex = (1:nTask)';
9 %Remove non-positive quantities and production
10 IND = find(prod(Quantity,2) <= 0);
11 WorkerProd(IND,:) = [];
12 TaskIndex(IND) = [];
13 %% Find workers with one task
14 CountWorker = [];
15 for j = 1:nWorker
16 iTask = find(~isnan(WorkerProd(:,j)) & WorkerProd(:,j) ~= 0);
17 if length(iTask) == 1
18 CountWorker = [CountWorker; iTask];
19 TaskPriority{2} = [TaskPriority{2};TaskIndex(iTask)];
20 end
21 end
22 TaskIndex(CountWorker) = [];
23 WorkerProd(CountWorker,:) = [];
24 %% Find tasks with one worker
25 nTask = length(TaskIndex);
26 CountWorker = zeros(nTask,1);
27 for j=1:nTask
28 CountWorker(j) = numel(find(~isnan(WorkerProd(j,:)) & WorkerProd(j,:) ~=
0));
29 end
30 IND = find(CountWorker == 1);
31 TaskPriority{1} = TaskIndex(IND);
32 TaskIndex(IND) = [];
33 % WorkerProd(IND,:) = [];
34 %% Rest of the Tasks
35 TaskPriority{3} = TaskIndex;
57
36 %% Sort out the tasks priority
37 [A,IX] = sort(Quantity(TaskPriority{1},1),'descend');
38 TaskPriority{1} = TaskPriority{1}(IX);
39 [A,IX] = sort(prod(Quantity(TaskPriority{3},:),2),'descend');
40 TaskPriority{3} = TaskPriority{3}(IX);
7.2.3. Code for reading data from excel file
1 %Load week report and data
2 clear all;clc
3 %% General parameters
4 read_file = './files/Updated_report.xls';
5 save_file = './matfiles/PlantData.mat';
6 max_Task = 86;
7 read_week = {1,2,3,4};
8 % read_week = {1,2};
9 %% Allocate space
10 nWeek = length(read_week);
11 PlantInfo = cell(2,1);
12 ProdData = cell(nWeek,1);
13 %% Get plant info
14 PlantInfo{1} = (1:max_Task)'; %Task list
15 %Read operator name list
16 Sheet = 'Operators';
17 [data,txt,raw] = xlsread(read_file,Sheet);
18 PlantInfo{2} = txt(2:end); %Operator list
19 %% Get Production Data
20 for iWeek = 1:nWeek
21 ProdData{iWeek} = cell(3,1);
22 Sheet = ['Week',num2str(read_week{iWeek})];
23 [data,txt,raw] = xlsread(read_file,Sheet);
24
25 %Get task list
58
26 [nRows,nCols] = size(txt);
27
28 TaskList = [];
29 RowList = [];
30 for iRow = 2:nRows
31 C = textscan(txt{iRow,1},'%s %n');
32 if ~isempty(C{2})
33 TaskList = [TaskList; C{2}];
34 RowList = [RowList; iRow];
35 end
36 end
37
38 RowList = RowList - 1;
39 ProdData{iWeek}{1} = [TaskList data(RowList,1:2)];
40
41 %Get Worker ID
42 WorkerID=[];
43 for iCol = 4:nCols
44 tf = strcmpi(txt{1,iCol},PlantInfo{2});
45 ind = find(tf);
46
47 if length(ind) == 1
48 WorkerID = [WorkerID; ind];
49 elseif length(ind) > 1
50 error('More than one worker matches')
51 elseif isempty(ind)
52 error('No worker matches')
53 end
54 end
55
56 ProdData{iWeek}{2} = WorkerID;
57
58 %Get Worker Productivity
59 % nWorker = length(WorkerID);
60 ProdData{iWeek}{3} = data(RowList,3:end);
61 end
62 save(save_file,'ProdData','PlantInfo');
59
63 %}
7.2.4. Code for scheduling tasks based on cycle time
1 function [TaskSchedule,Balance,TaskAssignment] =
Schedule_Task_CycleTime(TaskPriority,Quantity,WorkerID,Worker,CycleTime,FastOrS
low)
2 % TaskSchedule -> Matrix nRowsx4
3 %% Create initial data
4 TaskToDo = cell2mat(TaskPriority);
5 nTask = length(TaskToDo);
6 nWorker = size(Worker,2);
7 TaskValues = Quantity(:,1);
8 Quantity(:,1) = [];
9 %% Allocate space
10 TaskSchedule = []; %Zero because, we need to switch tasks
11 TaskAssignment=[];
12 Balance=[];
13 TaskTime = zeros(1,nWorker);
14 %% Allot tasks
15 Clock = 0;
16 PriorityJob = 0;
17 PurgeCycle = 0;
18 nCycle = 0;
19 iTask = 1;
20 isIdle = false;
21 while ~isempty(TaskToDo)
22 nCycle = nCycle + 1;
23 taskNo = TaskToDo(1);
24
25 if Quantity(taskNo,1) <= 0
26 display('Stuck here')
27 continue;
28 end
29
30 switch FastOrSlow
31 case 'fast'
60
32 [A,EfficientWorker] = sort(Worker(taskNo,:));
33 case 'slow'
34 [A,EfficientWorker] = sort(Worker(taskNo,:),'descend');
35 end
36
37 %Remove NaNs and zeros
38 RemoveID = isnan(A) | A == 0;
39 EfficientWorker(RemoveID) = [];
40
41 %Clock assignments
42 FreeTime = find(TaskTime <= 0);
43 if isempty(FreeTime) || isIdle
44 %Change time
45 FreeTime = find(TaskTime > 0);
46
47 TimeElapsed = min(TaskTime(FreeTime));
48 TaskTime(FreeTime) = TaskTime(FreeTime) - TimeElapsed;
49 FreeTime = find(TaskTime <= 0);
50
51 Clock = Clock + TimeElapsed;
52 isIdle = false;
53 end
54
55 if any(TaskTime < 0); error('Time out of bound'); end
56
57 %Sort intersection with EfficientWorker order
58 [InterSection,iW,iT] = intersect(EfficientWorker,FreeTime);
59 [B,IX] = sort(iW);
60 InterSection = InterSection(IX);
61
62 %If task can not be assigned
63 if isempty(InterSection)
64 PriorityJob = PriorityJob + 1;
65
66 if PriorityJob == length(TaskToDo);
67 TaskToDo(1:(end-1)) = TaskToDo(2:end);
68 TaskToDo(end) = taskNo;
69 isIdle = true;
61
70 % display(['Purging time ',num2str(nCycle)]);
71 PriorityJob = 0;
72 PurgeCycle = PurgeCycle + 1;
73 continue;
74 end
75
76 TaskToDo(1) = TaskToDo(PriorityJob+1);
77 TaskToDo(PriorityJob+1) = taskNo;
78 continue;
79 elseif PriorityJob > 0
80 PriorityJob = 0;
81 end
82
83
84 FreeWorker = InterSection(1);
85 WorkerEfficiency = Worker(taskNo,FreeWorker);
86
87 %Add time to the work hours
88 TimeTaken = WorkerEfficiency * Quantity(taskNo,1);
89
90 if TimeTaken + Clock > CycleTime
91 TimeTaken = (CycleTime - Clock);
92 QtyProduced = TimeTaken/WorkerEfficiency;
93 QtyRemain = Quantity(taskNo,1) - QtyProduced;
94
95 else
96 QtyProduced = Quantity(taskNo,1);
97 QtyRemain = 0;
98 TaskToDo(1) =[];
99 end
100
101 if TimeTaken <= 1
102 display('No more tasks can be assigned')
103 Balance = [TaskValues(TaskToDo) Quantity(TaskToDo,:)];
104 break;
105 end
106 TaskTime(FreeWorker) = TimeTaken;
107 Quantity(taskNo,1) = QtyRemain;
62
108 % Save result
109 TaskSchedule(iTask,1) = taskNo; %store task number
110 TaskSchedule(iTask,2) = QtyProduced;
111
112 %Assign the task to FreeWorker
113 TaskSchedule(iTask,3) = WorkerID(FreeWorker);
114
115
116
117 TaskSchedule(iTask,4) = Clock;
118 TaskSchedule(iTask,5) = Clock + TimeTaken;
119 iTask = iTask + 1;
120 if iTask == 100
121 pause;
122 end
123 if (Clock > CycleTime)
124 display('Sorry! could not assign tasks')
125 end
126 end
127 display([num2str(nCycle),' number of cycles, ',num2str(PurgeCycle),' purge
cycles, ',num2str(iTask-1),' no. of tasks']);
128 TaskAssignment = Store_TaskSchedule(TaskValues,TaskSchedule);
129 end
7.2.5. Code for storing final simulation results
1 function TaskAssigned = Store_TaskSchedule(TaskValues,TaskSchedule)
2 %Save data to task assignments
3 [nRows,nCols] = size(TaskSchedule);
4 TaskAssigned = cell(nRows,nCols);
5 for iCol = 1:nCols
6 switch iCol
7 case 1
8 for iRow = 1:nRows
9 values = TaskValues(TaskSchedule(iRow,iCol));
10 TaskAssigned{iRow,iCol} = ['Task ',num2str(values)];
63
11 end
12 case {2, 3, 4, 5}
13 values = mat2cell(TaskSchedule(:,iCol),ones(nRows,1));
14 TaskAssigned(:,iCol) = values;
15 % case 3
16 % for iRow = 1:nRows
17 % values = WorkerID{TaskSchedule(iRow,iCol)};
18 % TaskAssigned{iRow,iCol} = values;
19 % end
20 end
21 end
22 end
64
Results after running final simulation
Table 5-17.Result for Algorithm 1 (week1).
Task No. Qty Produced Operator No. Start Time End Time
'Task 1' 83 28 1941.09 2136.15
'Task 5' 406 6 260.84 1038.58
'Task 6' 242 28 0.00 515.78
'Task 7' 378 18 278.21 1302.22
'Task 10' 726 24 148.15 1876.53
'Task 12' 461 10 0.00 986.81
'Task 13' 330 3 1442.46 2880.00
'Task 13' 76 22 2116.72 2443.19
'Task 15' 1744 12 0.00 1962.53
'Task 17' 1600 11 0.00 1959.17
'Task 18' 1248 15 0.00 2880.00
'Task 18' 120 18 0.00 278.21
'Task 21' 587 14 0.00 559.78
'Task 22' 1689 9 0.00 2256.55
'Task 25' 1058 22 0.00 2116.72
'Task 27' 37 5 0.00 125.32
'Task 28' 685 3 0.00 1442.46
'Task 29' 1467 23 0.00 1971.26
'Task 31' 166 5 125.32 824.78
'Task 34' 104 28 1308.26 1633.41
'Task 35' 198 25 1726.79 2239.53
'Task 37' 375 24 1876.53 2880.00
'Task 37' 196 23 1971.26 2521.14
'Task 38' 215 8 0.00 685.31
'Task 38' 215 8 0.00 685.31
'Task 39' 512 20 0.00 1182.58
'Task 41' 203 4 0.00 594.88
'Task 42' 527 4 594.88 2880.00
'Task 42' 40 2 948.38 1001.92
'Task 44' 89 24 0.00 148.15
'Task 47' 587 14 559.78 1119.55
'Task 48' 235 8 685.31 1204.45
'Task 52' 376 2 1001.92 1526.68
'Task 56' 674 19 0.00 2880.00
65
Task No. Qty Produced Operator No. Start Time End Time
'Task 56' 60 6 0.00 260.84
'Task 58' 607 29 0.00 927.13
'Task 59' 1472 1 0.00 1780.94
'Task 66' 1684 26 0.00 2807.05
'Task 68' 674 27 0.00 1992.87
'Task 72' 570 25 0.00 1726.79
'Task 73' 1189 16 0.00 1845.21
'Task 77' 353 13 0.00 2115.84
'Task 78' 82 28 2136.15 2351.15
'Task 80' 173 28 515.78 1308.26
'Task 81' 103 28 1633.41 1941.09
'Task 82' 48 28 2351.15 2519.22
'Task 83' 385 2 0.00 948.38
'Task 85' 273 5 824.78 1451.46
Table 5-18.Result for Algorithm 1 (week2).
Task No. Qty Produced Operator No. Start Time End Time
'Task 6' 219 11 806.17 1431.23
'Task 7' 643 23 0.00 1120.44
'Task 10' 304 23 1120.44 1561.95
'Task 11' 296 11 0.00 582.89
'Task 13' 52 11 582.89 806.17
'Task 14' 69 16 0.00 83.33
'Task 15' 1532 15 0.00 2089.35
'Task 17' 619 16 291.10 2417.72
'Task 18' 1286 29 0.00 2880.00
'Task 18' 127 16 83.33 291.10
'Task 19' 200 8 1170.24 1442.97
'Task 20' 111 18 0.00 266.66
'Task 22' 1281 17 0.00 2880.00
'Task 22' 488 8 0.00 1170.24
'Task 25' 1266 18 266.66 2880.00
'Task 25' 382 20 714.89 1211.73
'Task 26' 288 15 2089.35 2880.00
'Task 28' 720 28 0.00 2880.00
'Task 28' 130 21 83.33 700.64
'Task 29' 700 7 250.01 1253.42
'Task 31' 301 20 0.00 714.89
66
Task No. Qty Produced Operator No. Start Time End Time
'Task 32' 164 21 700.64 946.71
'Task 36' 1053 5 0.00 2880.00
'Task 36' 436 25 0.00 1407.36
'Task 38' 369 20 1211.73 2042.81
'Task 39' 167 7 0.00 250.01
'Task 40' 16 21 0.00 83.33
'Task 44' 300 7 1253.42 1703.42
'Task 45' 167 21 946.71 1582.11
'Task 46' 952 6 223.74 2628.37
'Task 48' 386 24 347.79 1194.74
'Task 49' 102 24 0.00 347.79
'Task 50' 339 7 1703.42 2169.89
'Task 51' 37 6 0.00 155.57
'Task 53' 409 24 1194.74 1825.08
'Task 55' 853 27 0.00 2880.00
'Task 55' 419 4 0.00 2880.00
'Task 55' 27 6 155.57 223.74
'Task 56' 1593 14 0.00 2692.73
'Task 57' 917 10 54.89 2035.59
'Task 58' 519 13 196.08 1611.69
'Task 59' 1461 26 0.00 2191.68
'Task 60' 13 10 0.00 54.89
'Task 62' 78 13 0.00 196.08
'Task 66' 722 12 0.00 1751.76
'Task 67' 87 22 0.00 288.09
'Task 68' 580 13 1611.69 2880.00
'Task 68' 56 2 1618.56 1731.58
'Task 69' 331 19 143.47 1560.33
'Task 70' 172 12 2144.86 2613.03
'Task 71' 290 9 1082.26 2151.59
'Task 72' 382 2 1731.58 2880.00
'Task 72' 144 12 1751.76 2144.86
'Task 73' 719 2 0.00 1618.56
'Task 75' 169 19 1560.33 1966.17
'Task 76' 167 3 0.00 477.72
'Task 77' 88 19 0.00 143.47
'Task 79' 106 19 1966.17 2445.33
'Task 80' 300 9 0.00 1082.26
'Task 82' 38 1 253.58 396.45
67
Task No. Qty Produced Operator No. Start Time End Time
'Task 83' 554 1 396.45 1553.54
'Task 84' 67 1 117.21 253.58
'Task 86' 68 1 0.00 117.21
Table 5-19.Result for Algorithm 1 (week3).
Task No. Qty Produced Operator No. Start Time End Time
'Task 7' 217 23 0.00 404.22
'Task 10' 108 23 882.04 1035.37
'Task 11' 51 23 1035.37 1082.71
'Task 15' 922 11 0.00 2880.00
'Task 15' 323 23 404.22 882.04
'Task 16' 133 16 0.00 181.81
'Task 17' 185 23 1082.71 1272.59
'Task 18' 669 29 0.00 2880.00
'Task 18' 160 16 181.81 549.25
'Task 19' 289 17 0.00 716.79
'Task 20' 188 16 549.25 1360.94
'Task 22' 1730 8 0.00 2736.60
'Task 23' 94 15 0.00 157.48
'Task 24' 94 15 157.48 314.97
'Task 25' 977 28 195.00 2195.43
'Task 26' 287 5 1547.46 2775.40
'Task 27' 508 20 0.00 1421.84
'Task 28' 40 28 0.00 195.00
'Task 29' 189 5 906.12 1547.46
'Task 30' 316 15 314.97 1044.27
'Task 31' 302 5 0.00 906.12
'Task 32' 887 21 0.00 1414.88
'Task 36' 1897 18 0.00 2586.42
'Task 38' 307 21 1414.88 1892.70
'Task 45' 294 28 2195.43 2880.00
'Task 46' 1688 7 0.00 2305.18
'Task 48' 43 5 2775.40 2880.00
'Task 48' 36 24 2787.65 2880.00
'Task 49' 503 24 1731.47 2787.65
'Task 50' 909 25 0.00 2880.00
'Task 50' 18 24 0.00 69.64
'Task 51' 776 24 69.64 1731.47
68
Task No. Qty Produced Operator No. Start Time End Time
'Task 55' 1686 14 0.00 2342.06
'Task 56' 234 4 568.03 969.55
'Task 57' 864 6 0.00 2880.00
'Task 57' 150 4 0.00 568.03
'Task 58' 415 4 969.55 1680.62
'Task 59' 1448 27 0.00 2880.00
'Task 59' 445 3 0.00 1365.19
'Task 61' 211 10 2373.08 2880.00
'Task 64' 95 22 0.00 428.17
'Task 66' 988 13 0.00 2880.00
'Task 66' 22 22 428.17 529.79
'Task 68' 133 12 0.00 363.63
'Task 71' 984 10 0.00 2373.08
'Task 72' 33 2 0.00 85.88
'Task 73' 854 2 85.88 2880.00
'Task 73' 93 19 166.70 293.11
'Task 74' 23 19 0.00 166.70
'Task 77' 568 12 363.63 1893.58
'Task 79' 810 19 293.11 2444.77
'Task 80' 185 9 1363.44 1952.65
'Task 83' 1108 1 0.00 2880.00
'Task 83' 389 9 0.00 1363.44
Table 5-20.Result for Algorithm 1 (week4).
Task No. Qty Produced Operator No. Start Time End Time
'Task 3' 289 23 0.00 391.19
'Task 4' 26 23 805.38 861.20
'Task 7' 237 11 0.00 555.47
'Task 8' 52 11 555.47 644.35
'Task 9' 185 23 391.19 623.57
'Task 10' 370 16 0.00 495.57
'Task 11' 133 23 623.57 805.38
'Task 15' 802 29 331.18 1559.07
'Task 17' 460 11 644.35 1428.97
'Task 18' 561 8 0.00 701.45
'Task 19' 173 29 1559.07 2501.73
'Task 20' 129 29 0.00 331.18
'Task 21' 501 16 495.57 1296.50
69
Task No. Qty Produced Operator No. Start Time End Time
'Task 22' 1190 17 0.00 1773.98
'Task 25' 1450 15 0.00 2880.00
'Task 25' 703 18 0.00 1655.46
'Task 26' 640 20 0.00 2880.00
'Task 26' 181 5 347.79 826.19
'Task 27' 102 5 0.00 347.79
'Task 28' 1045 28 0.00 1945.26
'Task 29' 443 21 0.00 1208.37
'Task 31' 69 21 1208.37 1462.98
'Task 36' 1308 7 0.00 2424.07
'Task 38' 564 6 0.00 2514.12
'Task 44' 99 25 2408.23 2880.00
'Task 44' 98 7 2424.07 2570.97
'Task 46' 1101 25 0.00 2408.23
'Task 47' 470 24 1620.26 2295.05
'Task 48' 61 6 2514.12 2880.00
'Task 48' 90 14 2614.93 2748.83
'Task 54' 133 4 0.00 177.77
'Task 55' 1348 24 0.00 1620.26
'Task 56' 1768 14 0.00 2614.93
'Task 58' 795 3 0.00 1463.24
'Task 59' 1087 12 0.00 1949.70
'Task 61' 234 13 566.88 964.66
'Task 64' 156 10 0.00 212.13
'Task 66' 768 13 0.00 566.88
'Task 68' 687 26 0.00 1211.88
'Task 69' 385 2 1254.74 2506.77
'Task 72' 627 2 0.00 1254.74
'Task 73' 1032 19 145.12 2682.47
'Task 74' 88 19 0.00 145.12
'Task 77' 215 9 0.00 462.48
'Task 80' 102 9 2519.61 2671.98
'Task 83' 899 1 0.00 2880.00
'Task 83' 661 9 462.48 2519.61
70
Table 5-21.Result for Algorithm 2 (week1).
Task No. Qty Produced Operator No. Start Time End Time
'Task 1' 83 28 1941.09 2136.15
'Task 5' 406 10 1334.66 2205.37
'Task 6' 242 28 0.00 515.78
'Task 7' 378 18 0.00 1024.01
'Task 10' 726 24 148.15 1876.53
'Task 12' 461 10 347.85 1334.66
'Task 13' 406 3 743.08 2512.31
'Task 15' 1744 7 0.00 2833.44
'Task 17' 1600 15 0.00 2345.44
'Task 18' 1139 13 0.00 2880.00
'Task 18' 229 16 0.00 569.82
'Task 21' 587 16 569.82 1599.71
'Task 22' 1689 1 0.00 2533.37
'Task 25' 719 6 0.00 2880.00
'Task 25' 339 3 0.00 743.08
'Task 27' 37 5 0.00 125.32
'Task 28' 685 19 0.00 1393.91
'Task 29' 1467 23 223.31 2194.57
'Task 31' 166 29 1681.47 2425.95
'Task 34' 104 28 1308.26 1633.41
'Task 35' 198 25 1605.66 2118.40
'Task 37' 375 24 1876.53 2880.00
'Task 37' 196 23 2194.57 2744.45
'Task 38' 215 8 0.00 685.31
'Task 39' 512 20 0.00 1182.58
'Task 41' 203 4 0.00 594.88
'Task 42' 527 4 594.88 2880.00
'Task 42' 40 27 1661.46 1747.70
'Task 44' 89 24 0.00 148.15
'Task 47' 587 8 685.31 1637.01
'Task 48' 235 16 1599.71 2774.11
'Task 52' 376 20 1182.58 2050.45
'Task 56' 245 21 0.00 2880.00
'Task 56' 382 2 0.00 2880.00
'Task 56' 106 12 0.00 600.49
'Task 58' 607 14 0.00 928.85
'Task 59' 1301 9 0.00 2880.00
'Task 59' 171 10 0.00 347.85
71
Task No. Qty Produced Operator No. Start Time End Time
'Task 66' 1056 11 0.00 2880.00
'Task 66' 628 29 0.00 1681.47
'Task 68' 480 22 0.00 2880.00
'Task 68' 194 25 0.00 587.54
'Task 72' 570 27 0.00 1661.46
'Task 73' 1056 26 0.00 2880.00
'Task 73' 133 23 0.00 223.31
'Task 77' 353 5 125.32 1867.41
'Task 78' 82 28 2136.15 2351.15
'Task 80' 173 28 515.78 1308.26
'Task 81' 103 28 1633.41 1941.09
'Task 82' 48 28 2351.15 2519.22
'Task 83' 385 25 587.54 1605.66
'Task 85' 273 5 1867.41 2494.09
Table 5-22.Result for Algorithm 2 (week2).
Task No. Qty Produced Operator No. Start Time End Time
'Task 6' 219 23 1362.34 1662.48
'Task 7' 617 11 806.17 2880.00
'Task 7' 26 23 1317.27 1362.34
'Task 10' 304 23 1662.48 2104.00
'Task 11' 296 11 0.00 582.89
'Task 13' 52 11 582.89 806.17
'Task 14' 69 16 0.00 83.33
'Task 15' 708 29 0.00 2880.00
'Task 15' 825 23 0.00 1317.27
'Task 17' 619 16 432.10 2558.73
'Task 18' 1200 17 0.00 2880.00
'Task 18' 213 16 83.33 432.10
'Task 19' 200 8 1811.22 2083.95
'Task 20' 111 18 0.00 266.66
'Task 22' 1014 28 0.00 2880.00
'Task 22' 755 8 0.00 1811.22
'Task 25' 1648 15 0.00 2471.99
'Task 26' 583 18 266.66 1803.51
'Task 28' 590 21 83.33 2880.00
'Task 28' 260 20 714.89 1771.29
72
Task No. Qty Produced Operator No. Start Time End Time
'Task 29' 700 7 250.01 1253.42
'Task 31' 301 20 0.00 714.89
'Task 32' 137 20 1771.29 2880.00
'Task 36' 892 25 0.00 2880.00
'Task 36' 597 5 0.00 1632.33
'Task 38' 369 7 2169.89 2676.65
'Task 39' 167 7 0.00 250.01
'Task 40' 16 21 0.00 83.33
'Task 44' 300 7 1253.42 1703.42
'Task 46' 952 24 347.79 2440.28
'Task 48' 201 24 2440.28 2880.00
'Task 49' 102 24 0.00 347.79
'Task 50' 339 7 1703.42 2169.89
'Task 51' 37 6 0.00 155.57
'Task 53' 409 14 624.93 1237.76
'Task 55' 1098 6 155.57 2880.00
'Task 55' 202 14 203.59 624.93
'Task 56' 619 4 0.00 2880.00
'Task 56' 853 27 0.00 2880.00
'Task 56' 120 14 0.00 203.59
'Task 57' 917 10 54.89 2035.59
'Task 58' 519 13 196.08 1611.69
'Task 59' 1461 26 0.00 2191.68
'Task 60' 13 10 0.00 54.89
'Task 62' 78 13 0.00 196.08
'Task 66' 722 12 0.00 1751.76
'Task 67' 87 22 0.00 288.09
'Task 68' 580 13 1611.69 2880.00
'Task 68' 56 2 1618.56 1731.58
'Task 69' 331 19 143.47 1560.33
'Task 70' 172 12 2144.86 2613.03
'Task 71' 290 9 1082.26 2151.59
'Task 72' 382 2 1731.58 2880.00
'Task 72' 144 12 1751.76 2144.86
'Task 73' 719 2 0.00 1618.56
'Task 75' 169 19 1560.33 1966.17
'Task 76' 167 3 0.00 477.72
'Task 77' 88 19 0.00 143.47
'Task 79' 106 19 1966.17 2445.33
73
Task No. Qty Produced Operator No. Start Time End Time
'Task 80' 300 9 0.00 1082.26
'Task 82' 38 1 253.58 396.45
'Task 83' 554 1 396.45 1553.54
'Task 84' 67 1 117.21 253.58
'Task 86' 68 1 0.00 117.21
Table 5-23.Result for Algorithm 2 (week3).
Task No. Qty Produced Operator No. Start Time End Time
'Task 7' 217 23 0.00 404.22
'Task 10' 108 23 404.22 557.55
'Task 11' 51 23 557.55 604.89
'Task 15' 922 11 0.00 2880.00
'Task 15' 323 16 181.81 932.90
'Task 16' 133 16 0.00 181.81
'Task 17' 185 23 604.89 794.77
'Task 18' 829 16 932.90 2842.01
'Task 19' 100 17 2631.13 2880.00
'Task 19' 25 16 2842.01 2880.00
'Task 22' 962 29 0.00 2880.00
'Task 22' 768 17 0.00 2035.73
'Task 23' 94 15 0.00 157.48
'Task 24' 94 15 366.76 524.25
'Task 25' 847 8 0.00 2880.00
'Task 25' 130 15 157.48 366.76
'Task 26' 287 18 0.00 661.20
'Task 27' 508 28 195.00 1274.08
'Task 28' 40 28 0.00 195.00
'Task 30' 316 28 1274.08 2254.14
'Task 31' 192 15 1980.10 2880.00
'Task 31' 110 17 2035.73 2631.13
'Task 32' 887 15 524.25 1980.10
'Task 36' 762 20 0.00 2880.00
'Task 36' 873 5 0.00 2880.00
'Task 36' 262 7 0.00 357.74
'Task 38' 307 7 357.74 778.77
'Task 45' 269 28 2254.14 2880.00
'Task 46' 1030 25 0.00 2880.00
74
Task No. Qty Produced Operator No. Start Time End Time
'Task 46' 659 21 0.00 1002.86
'Task 50' 927 14 0.00 1283.79
'Task 55' 698 24 0.00 2880.00
'Task 55' 895 6 0.00 2880.00
'Task 55' 93 4 0.00 257.62
'Task 56' 234 14 1283.79 2797.21
'Task 57' 694 4 257.62 2880.00
'Task 57' 270 27 1898.12 2880.00
'Task 59' 939 3 0.00 2880.00
'Task 59' 954 27 0.00 1898.12
'Task 61' 345 10 2052.63 2880.00
'Task 64' 95 22 0.00 428.17
'Task 66' 519 22 428.17 2880.00
'Task 66' 490 10 477.92 2052.63
'Task 68' 133 12 0.00 363.63
'Task 71' 786 13 0.00 2880.00
'Task 71' 198 10 0.00 477.92
'Task 72' 33 2 0.00 85.88
'Task 73' 854 2 85.88 2880.00
'Task 73' 93 19 166.70 293.11
'Task 74' 23 19 0.00 166.70
'Task 77' 568 12 363.63 1893.58
'Task 79' 810 19 293.11 2444.77
'Task 80' 185 1 1754.77 2100.44
'Task 83' 822 9 0.00 2880.00
'Task 83' 675 1 0.00 1754.77
Table 5-24.Result for Algorithm 2 (week4).
Task No. Qty Produced Operator No. Start Time End Time
'Task 3' 289 23 0.00 391.19
'Task 4' 26 23 805.38 861.20
'Task 7' 237 11 0.00 555.47
'Task 8' 52 11 555.47 644.35
'Task 9' 185 23 391.19 623.57
'Task 10' 370 16 0.00 495.57
'Task 11' 133 23 623.57 805.38
'Task 15' 802 29 331.18 1559.07
75
Task No. Qty Produced Operator No. Start Time End Time
'Task 17' 460 11 644.35 1428.97
'Task 18' 561 16 495.57 1477.17
'Task 19' 173 29 1559.07 2501.73
'Task 20' 129 29 0.00 331.18
'Task 21' 501 17 0.00 1295.29
'Task 22' 1190 15 0.00 1839.86
'Task 25' 528 8 0.00 2880.00
'Task 25' 981 28 0.00 2880.00
'Task 25' 644 18 0.00 1516.34
'Task 26' 821 5 347.79 2515.84
'Task 27' 102 5 0.00 347.79
'Task 28' 953 20 0.00 2880.00
'Task 28' 92 21 0.00 275.74
'Task 29' 443 21 275.74 1484.11
'Task 31' 69 21 1484.11 1738.72
'Task 36' 640 6 0.00 2880.00
'Task 36' 668 25 0.00 2176.00
'Task 38' 564 7 1931.20 2444.18
'Task 44' 148 25 2176.00 2880.00
'Task 44' 49 7 2444.18 2518.06
'Task 46' 1101 7 0.00 1931.20
'Task 47' 470 24 343.16 1017.96
'Task 54' 133 4 0.00 177.77
'Task 55' 1062 14 0.00 2880.00
'Task 55' 285 24 0.00 343.16
'Task 56' 656 22 0.00 2880.00
'Task 56' 901 13 0.00 2880.00
'Task 56' 211 27 0.00 587.50
'Task 58' 336 26 0.00 2880.00
'Task 58' 459 3 0.00 844.84
'Task 59' 1087 12 0.00 1949.70
'Task 61' 55 12 2805.21 2880.00
'Task 64' 156 10 0.00 212.13
'Task 66' 512 2 0.00 2880.00
'Task 66' 256 10 212.13 561.82
'Task 68' 687 10 561.82 1481.55
'Task 69' 157 19 2682.47 2880.00
'Task 72' 627 12 1949.70 2805.21
'Task 73' 1032 19 145.12 2682.47
76
Task No. Qty Produced Operator No. Start Time End Time
'Task 74' 88 19 0.00 145.12
'Task 77' 215 9 0.00 462.48
'Task 80' 102 9 2519.61 2671.98
'Task 83' 899 1 0.00 2880.00
'Task 83' 661 9 462.48 2519.61