SlideShare une entreprise Scribd logo
1  sur  58
Télécharger pour lire hors ligne
BPJ 420
Final Report
Single machine production scheduling with
sequence dependant setup times at an Aluminium
powder coating plant
Reynard Arlow
Industrial & Systems Engineering
U 13002679
Project Mentor: Dr Olufemi Adetunji
September 28, 2016
DEPARTEMENT BEDRYFS- EN SISTEEMINGENIEURSWESE
DEPARTMENT OF INDUSTRIAL AND SYSTEMS ENGINEERING
VOORBLAD VIR INDIVIDUELE WERKOPDRAGTE - 2016
FRONT PAGE FOR INDIVIDUAL ASSIGNMENTS - 2016
Persoonlike besonderhede / Personal details
Studentenommer
Student number
Voorletters en van
Initials and surname
Titel
Title
Selnommer
Cell number
Werkopdrag / Assignment
Modulekode
Module Code
Werkopdragnommer
Assignment number
Onderwerp
Subject
Dosent
Lecturer
Datum
Date
Verklaring / Declaration
1. Ek begryp wat plagiaat is en is bewus van Universiteitsbeleid in hierdie verband
2. Ek verklaar dat hierdie my eie oorspronklike werk is
3. Waar iemand anders se werk gebruik is (hetsy uit 'n gedrukte bron, die internet of enige ander bron), is
dit behoorlik erken en die verwysings ooreenkomstig departementele vereistes gedoen
4. Ek het nie 'n ander student se vorige werk gebruik en as my eie ingedien nie
5. Ek het niemand toegelaat en sal niemand toelaat om my werk te kopieer met die doel om dit as sy of
haar eie werk voor te hou nie
1. I understand what plagiarism is and I am aware of the University's policy in this regard.
2. I declare that this is my own original work
3. Where other people's work has been used (either from a printed source, internet or any other source)
this has been carefully acknowledged and referenced in accordance with departmental requirements
4. I have not used another student's past work to hand in as my own
5. I have not allowed and will not allow, anyone to copy my work with the intention of handing it in as
his/her own work
Handtekening
Signature
Datum van inhandiging
Date of submission
Kantoorgebruik / For office use:
Dosent
Lecturer
Kommentaar / Comments:
Uitslag
Result
Datum
Date
13002679
R Arlow
Mnr
084 059 45 99
BPJ 420
Single Machine Production Scheduling
Dr Olufemi Adetunji
2016 - 09 - 28
2016 - 09 -28
ReynardArlow
Executive Summary
Wispeco Aluminium is the top aluminium extrusion company in Africa and is competing
to be the best Powder coating company in Africa as well.Wispeco Aluminium opened their
doors in the 1920’s and they are still producing to this day.
This document starts off with the aim of the project and how the student will approach the
problem. After the outlines of the project was established, literature was done in relation
to the problem experienced at Wispeco Aluminium, which is in this case a Single Machine
Scheduling Problem (SMSP) with sequence dependent setup times. The literature shows the
various ways in which previous articles addressed this type of problem. This literature was
used to develop a new method to address the problem atWispeco’s.
After the Literature Review and the Problem Investigation a concept model was designed.
This model was tested and it evolved into the solution model presented at the end of the
project. The concept model and the solution model do differ significantly. The heuristic
technique chosen for the project was a Genetic Algorithm Search technique. Although the
model was applied in a very different manner. The base of the model will be that of a random
search technique, but the steps followed will be that of a Genetic Algorithm.
This solution model was tested against various other scheduling techniques to determine
the stability and validity of the model. At the end the project turned out to be more of a
Research Project than an improvement project, although this technique can be applied in
Wispeco Aluminium. Throughout the project ECSA and BPJ 420 standards were followed
to provide a well stated project conforming to the requirements.
[Please note that this work has been sent for Academic Publication. The article is now
being reviewed. Please find the article submitted for publication in Appendix F]
ii
Abbreviations and Definitions
Abbreviation Description
TSP Traveling Salesperson Problem
GA Generic Algorithm
SA Simulated Annealing
PSO Particle Swarm Optimization
ACO Ant Colony Optimization
GP Genetic Programming
TS Tabu Search
GA Genetic Algorithm
AI Artificial Intelligence
SPT Shortest Processing Time
WSPT Weighted Shortest Processing Time
EDD Earliest Due Date
WEDD Weighted Earliest Due Date
JSSP Job Shop Scheduling Problem
JSP Job Shop Problem
RCPSP Resource Constrained Project Scheduling Problem
Table 1: Abbreviations
iii
Contents
Executive Summary ii
List of Figures v
List of Tables vi
I 1
1 Background & Introduction 1
1.1 Company Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Project Aim/Rational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Project Approach, Scope & Deliverables . . . . . . . . . . . . . . . . . . . . 3
1.4.1 Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4.3 Deliverables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
II 5
2 Literature Review & Problem Investigation 5
2.1 Single Machine Scheduling Problem (SMSP) . . . . . . . . . . . . . . . . . . 5
2.2 Sequence Dependent Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.1 Simulated Annealing . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.2 Particle Swarm Optimization . . . . . . . . . . . . . . . . . . . . . . 9
2.3.3 Ant Colony Optimization . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.4 Genetic Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.5 Tabu Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Problem Investigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.2 Current planning process . . . . . . . . . . . . . . . . . . . . . . . . . 14
III 15
3 Data Analysis & Concept Design 15
3.1 Plant Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 Model Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3 Conceptual Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3.1 Concept Model Introduction . . . . . . . . . . . . . . . . . . . . . . . 18
3.3.2 Algorithm development in MATLAB . . . . . . . . . . . . . . . . . . 19
IV 21
iv
4 Solution 21
4.1 Solution Model Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3 Model Design in MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.3.1 Model Pseudo Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.3.2 Model Pseudo Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.4 Solution Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.4.1 Model Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.4.2 Solution Model vs. Other Models . . . . . . . . . . . . . . . . . . . . 30
4.5 Proposed Cost Savings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.6 Future Solution Model Development . . . . . . . . . . . . . . . . . . . . . . 31
5 Conclusion 31
Appendix A: Industry Sponsorship form 34
Appendix B: Data Analysis 36
Appendix C: Model Validation Data 37
Appendix D: Solution Model Testing 39
Appendix E: Solution Model vs. Other Models Data 40
Appendix F: Article submitted for publication 41
List of Figures
1 Simulated Annealing algorithmic approach . . . . . . . . . . . . . . . . . . . 9
2 PSO algorithmic approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 ACO algorithmic approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 PreSchedule file created by TOPP system . . . . . . . . . . . . . . . . . . . 15
5 Daily production for the Parow plant . . . . . . . . . . . . . . . . . . . . . . 16
6 Colour changes per day for Parow . . . . . . . . . . . . . . . . . . . . . . . . 16
7 Order size distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8 GA Solution Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9 Cost Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
10 Time Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
11 Average Population Cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
12 Best Cost Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
14 Repeating Various Initial Solution Sizes 10,000 times . . . . . . . . . . . . . 39
List of Tables
1 Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
2 Operations of Wispeco Aluminium . . . . . . . . . . . . . . . . . . . . . . . 1
3 Complexity growth for polynomial and exponential algorithms . . . . . . . . 8
v
4 Sample input data for model . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5 Sample setup time matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6 Example of a Binary Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7 Before Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
8 After Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
9 Example of a Possible Population Generated . . . . . . . . . . . . . . . . . . 23
10 m Populations with their corresponding costs . . . . . . . . . . . . . . . . . 23
11 Reference guide for Figures 9 and 10 . . . . . . . . . . . . . . . . . . . . . . 26
12 Best Cost Data for Figure 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
13 Computational Time Data for Figure 10 . . . . . . . . . . . . . . . . . . . . 28
14 Various test conditions with A = 10,000 . . . . . . . . . . . . . . . . . . . . 28
15 Best Costs and Jobs Overdue for various different models . . . . . . . . . . . 30
16 Data for Best Cost and Computational time testing (1) . . . . . . . . . . . . 37
17 Data for Best Cost and Computational time testing (2) . . . . . . . . . . . . 38
vi
Part I
1 Background & Introduction
1.1 Company Background
Wispeco was established in 1920. They first produced Nails, Diamond Mesh, Fencing, Gates
and Wire Screening from 1920 - 1950’s. In the early 1930s they entered the market for
architectural Steel windows and doors and were active until the mid 1980’s. In 1960 they
started with architectural Aluminium products to date. In 1981 the MD and five of his
directors/managers died in an airplane accident. A few years later, Remgro Ltd introduced
new management staff from the outside due to a lack of good internal management. The
structure of the company was rearranged to ensure the ongoing of the company. Unfortunately
80% of the workers were retrenched, with most of these being office personnal.
Today Wispeco is successful and a leading company in its domain. They are the leading
extrusion company in Africa. After the introduction of a new vertical plant for powder
coating they are competing, to be the leading extrusion powder coating company in Africa.
Since their success after the restructuring, the company has managed to spread out to three
different locations across South Africa. These three plants are situated in Alberton, Parow
and Vereeniging. Alberton is also where the main offices and management are situated.
Plant Operations Quantity
Alrode (Alberton) Scrap receiving 1
Re-melt & billet casting 2
Hydraulic extrusion press 6
Die shop 1
Powder coating department 1
Anodizing department 1
Stockist warehouse 1
Parow (Cape Town) Scrap receiving 1
Hydraulic extrusion press 1
Powder coating department 1 (2)
South (Vereeniging) Hydraulic extrusion press 1
Table 2: Operations of Wispeco Aluminium
In 1992 Wispeco erected a powder coating plant in Epping (Cape Town) as well as an
Anodizing plant. A few years ago due to economic reasons they had to shut down the
Anodizing plant and relocate the powder coating plant to its current location in Parow. This
project is conducted in the powder coating department in Parow for Wispeco Aluminium.
1
1.2 Introduction
A few years ago Wispeco was under a lot of strain to stay afloat due to the economic crisis in
2008/9. They had to compete with countries such as China and Europe. The effect was that
Wispeco Aluminium lost a big portion of their work to other countries, due to a weakened
rand. Larger plants like Alrode, managed to pull through this crisis more easily than smaller
plants such as Parow. Still to this day the plant in Parow experience a lot of resistance
especially with the South African market opening up to foreign businesses.
Unfortunately the financial statements of the Parow plant shows discouraging news, from
both the Extrusion and Powder coating departments. Various projects have been undertaken
in the Extrusion department to reduce costs and to look at an increase in efficiency. For this
project the focus was on the powder coating department and the systems regarding several
operations. There are also other projects running within this department to reduce costs
and increase efficiency.
Currently the plant consists of: Two Hydraulic presses (which will be reduced to one later this
year as determined by previous projects), one scrap receiving department, one pre-treatment
line (part of Powder coating) and then two Powder coating lines. Due to the high overhead
costs the Parow plant projects were undertaken to reduce these costs. As a result of one
of these projects, Parow’s two powder coating lines will be reduced to one. In addition, at
the end of this year there will be a change in the shift system. This reduces the number of
machines operating to one. The machine will be operating twelve hours a day, seven days a
week.
Due to reduction in the number of Powder coating lines, the planning/scheduling of production
for the powder coating line have been identified for improvement. Planning is still done
manually on a regular basis depending on the arrival of work. Planning now needs to be
done daily, or upon arrival of new work. This problem can now be seen as a SMSP (single
machine scheduling problem) with setup dependent times and due dates. Various projects
have been undertaken by various sectors, and the material regarding solving such problems
is freely available.
This project was identified because of market sensitivity to lead time. Wispeco ensures
that the powder coating supplied conforms to the highest requirements and that they carry
the mark of SANS 1796: 2008. Unfortunately, their market in Cape Town is much more
sensitive to lead time and total make span of work, than the quality supplied by Wispeco.
Customers switched to other suppliers, because competitors could supply work faster albeit
a lower quality. Wispeco needs to supply service faster, but still at a higher quality than
competition. Inefficient planning/scheduling leads to increased lead time, which dissatisfies
customers.
”Customers may forget what you said but they’ll never forget how you made
them feel. ”
Unknown
2
1.3 Project Aim/Rational
The aim of the project is to achieve an optimal or near optimal method to schedule work
so that the least amount of orders are delivered past their due dates. Thus scheduling work
for minimum lead time and make span, but still at an affordable cost to Wispeco. The
scheduling will also try and keep the finished goods inventory as low as possible. Together
with the low finished goods inventory, a customer’s work will not become damaged after the
powder coating is applied. The project wants to address the mixing of orders due to the
facility layout and also prevent human intervention, such as favouring certain orders above
others when production is planned.
The goal is to complete orders within the promised completion time (Due Date) and still
fulfil customer requirements regarding quality etc. Distinction should not be made between
important and less important customers. All customers are important, however, some work
may carry a greater priority, which will be taken into account.
Desired objectives include:
• Creating a method to plan an optimal or at least near optimal production schedule.
• Minimizing the total make span of the work.
• Meet customer requirements regarding lead time and quality.
• Allow the method of scheduling to deliver an optimal change over schedule.
• To minimize human intervention.
• To establish a standard operating procedure for scheduling production.
• To implement a system easy to use.
1.4 Project Approach, Scope & Deliverables
1.4.1 Approach
The project will start off with in depth literature review of production scheduling and the
different techniques related to such problems experienced in various industries. The literature
review will look at the nature of these techniques and how they work. The decision will then
be to choose the technique best suited and modify the technique for the specific problem.
After selecting the preferred method, the reason will be stated and then used to provide a
concrete argument on the technique used.
1.4.2 Scope
This project will take place in the powder coating plant of Wispeco’s Parow plant. A
description of the current production scheduling process will be provided together with the
improved process. The current process will be dissected and each step will be analysed to
understand the process and spot various improvement opportunities.
Information of different scheduling techniques obtained from the literature review will be
used to construct a model, to improve the opportunities identified after analysis of the
process. The model will be created in MATLAB.
3
A heuristic approach will be used for the development of the model. Several different
techniques for a heuristic approach will be discussed in the next section. Some aspects
have to be excluded from the project, these include:
• The methods they use to hang the profiles on the conveyor (Different methods change
the utilization of the machine).
• The type of powder they use.
• The storage of these aluminium profiles (painted and unpainted).
• The individual machines (All the machines are seen as one, because there is only one
of each and each profile needs to go through the process sequentially).
As with any other project this project also has some limitations. The limitations are:
• The processing time of the model to find an optimal or near optimal schedule.
• The number of orders the model can handle to find a solution within a reasonable time
frame.
1.4.3 Deliverables
Deliverables include:
1. A newly developed model to schedule production.
2. An overview of the different models considered for the project.
3. A standard operating procedure document for the model (for the company).
4. Project documentation for the company as well as the university.
5. A detailed analysis of the model’s performance.
6. A presentation presenting the solution to the company as well as the University.
4
Part II
2 Literature Review & Problem Investigation
The following sections contain various tools and techniques used for production scheduling
in different industries as well a description of the problem at hand. Different methodologies
were researched and compared in order to obtain the best possible method for modelling the
project. Various sources have been used to gather information.
This part of the project will consist of two sections and each of these sections will be
further divided into different subjects. The first section consists of various techniques
that are available for use. The second section will contain the problem investigation. This
investigation will decide which technique will be used and if a technique has to be developed
specifically for this problem. The relationship between the problem and the technique will
be highlighted and clearly indicated.
2.1 Single Machine Scheduling Problem (SMSP)
For us to understand and develop solutions for multi-machine process scheduling one must
first look at single machine scheduling. For this project the student will stay with single
machine scheduling, but just so that you know where it fits in. Many companies have the
problem of scheduling their work on only one machine as the capital, to gain another machine
that may not be available or sometimes (in Wispeco’s case), it is financially better to reduce
the number of machines, assuming that the scheduling is possible.
Single machine scheduling problems state that only one machine is available for the processing
of all the work. It doesn’t matter if the process consists of more than one procedure. If the
procedures have to take place sequentially, the processes following the first process needs not
be considered, because all the products need to follow the same process and all of them have
to enter and exit the first process first. SMSP’s are sometimes theoretically seen as problems
with a simple structure in comparison to other scheduling problems, although when observed
from a practical point of view, these problems can become quite large when companies have
to adapt to the single machine/set of machines. SMSP’s have been researched by quite a
few people. (Sena Kir 2015) have done a very good article on single machine scheduling.
Their environment was a dairy product production plant. Their sequence dependent SMSP
with constraints such as the setup times are very similar to the problem found at Wispeco.
Instead of different dairy products, Wispeco will be painting different colours and the spray
booth needs to be cleaned. Please refer to (Biskup 1999) for an in depth study of Single
Machine Scheduling. Basic sequencing rules that can be used in single machine scheduling
are as follow:
1. Shortest Processing Time (SPT) - Shorter jobs are scheduled first.
2. Weighted Shortest Processing Time (WSPT) - Schedules in order of weighted
shortest processing time (Each job is assigned a weight/priority beforehand).
3. Earliest Due Date (EDD) - Earlier due date jobs are scheduled first.
4. Weighted Earliest Due Date (WEDD) - Schedules in order of weighted earliest due
date (Each job is assigned a weight/priority beforehand).
5
5. Largest Processing Time (LPT) - Larger jobs are scheduled first.
6. Weighted Largest Processing Time (WLPT) - Schedules in order of weighted
largest processing time (Each job is assigned a weight/priority beforehand).
The objective of this project will be discussed in the Conceptional Design section. The
following lists provides the basic framework and notation for scheduling. The application of
these parameters, variables and objectives will be discussed in the following sections. The
notation used in this project will be the same as in the following pages, just to ensure that
this project conforms to the common practice of scheduling projects. The notation used for
the problem at Wispeco is (1|Sjk(i)| n−1
j=1
n
k=j+1 γSjk + n
j=1(αEj + βTj))
Notation
n number of jobs
m number of machines
pij processing time of job j on machine i
Cj completion time of job j
wj weight/priority of job j
dj due date of job j
αj earliness penalty for job j
βj tardiness penalty for job j
Lj = Cj − dj lateness of job j
Ej = |min(Lj, 0)| earliness of job j
Tj = max(Lj, 0) tardiness of job j
Uj =
1 ifCj > dj
0 otherwise
lateness indicator of job j
(α|β|γ) scheduling problem with the machine environment α,
constraints and characteristics β, and the objective being γ
Machine Environments α : The Machine Environment can also be seen as the Problem
Environment. This field is concerned with the environment of the machine and or the flow
pattern of jobs. In other words, how are the machines laid out and how many of each one is
there, resources required and what processes can each machine handle etc.
1 one machine
P or Pm identical parallel machines
Q or Qm parallel machines with different speeds
R or Rm unrelated parallel machines
F or Fm flow shop: m machines in series:
each job is processed on each machine in order
J or Jm job shop: each job is processed
on a job-dependent sequence of machines
O or Om open shop: processing order of machines for each job
is determined by the scheduler
6
Constraints & Characteristics β : The constraints are the factors that have an influence
on the execution of the jobs/scheduling. These include pre-emption, precedence relations,
setup dependence etc. Pre-emption is when a job may be removed and completed at a later
stage while precedence is when certain processes must first happen before a specific process
can take place.
rj non-trivial release times
sjk(i) setup-times of a machine i between jobs j and k
pmtn pre-emptions are allowed: a job may be removed from a machine mid process
prec jobs have precedence constraints
Objectives γ : This is considered as the objective of them model, what the user what out
of the model. In the category objectives like minimum make span, minimum setup time,
minimum cost, minimum tardiness and many more are found.
n
j=1 Cj sum of completion times
n
j=1 wjCj weighted sum of completion times
n
j=1 Tj sum of tardiness
n
j=1 wjCj weighted sum of tardiness
Cmax = maxj{Cj} make span/schedule length
Lmax = maxj{Lj} maximum lateness
n
j=1 Uj number of late jobs
n
j=1 wjUj weighted number of late jobs
2.2 Sequence Dependent Scheduling
When Wispeco schedules work they need to take into account that between orders they need
to change colours, the time taken to change the colours differs. Setup time is for example
larger between white and black than between black and bronze. This plays an enormous role
in the total setup time per day, which has an effect on the make span of the work.
(Kır and Yazgan 2016) developed a fuzzy axiomatic design that takes penalty costs in
consideration for a sequence dependent SMSP. Their problem was (1|Sjk| n
j=1(αEj +βTj)).
Their setup costs was taken into account as part of their processing times.
(V´elez-Gallego, Maya, and Montoya-Torres 2016) used a beam search heuristic technique to
develop a model for a single machine with release dates and sequence dependent setup times.
Their objective was to minimize the total make span of the work. Their problem was defined
as (1|rj, Sjk|Cmax).
(Dayama et al. 2015) developed a History-dependent scheduling model. This model includes
algorithms that can be used for scheduling with general precedence and sequence dependence.
Instead of minimizing the total setup time(cost) or the make span, (Rubin and Ragatz 1995)
developed a model that sequences jobs to minimize the total tardiness of jobs whose setups
times are sequence dependent. For this model they used a Genetic Algorithm.
2.3 Heuristics
Heuristic techniques have been used for a long time to solve difficult problems. When
problems tend to be an optimization problem and the solving of an optimal value is difficult
7
these heuristic methods have the ability to exploit the structure of the optimization problem
to arrive at a good solution (Winston 2003). Note that it is a good solution and not
always the best, as the time it would take to calculate the best solution, is not always
reasonable, depending on the problem size. Classic problems where the application of
heuristic techniques apply are those of the traveling salesperson problem (TSP).
Heuristic approaches are used when the solving of an optimization problem would take an
enormous amount of computational time to solve. If a problem can be optimally solved in
polynomial time using efficient algorithms, and a powerful computer it is not considered hard
to solve. However when there isn’t a polynomial algorithm for a problem, it is considered
hard to solve and these problems are called nondeterministic (NP) class problems. Within
the NP class problems several subsets of problems are identified as NP-complete problems
(ibid.). If a problem requires a large amount of computational time it is considered as a
NP-hard problem.
If we can prove that an algorithm will converge to an optimal solution in a finite number of
iterations, we also want to know how long it would take for this algorithm to solve (converge)
various instances of the problem (ibid.). The complexity of the problem is displayed by O(nx
)
where x = 1, 2, 3, ..., n = number of jobs and O = Order of time. Usually n can go up until
10, but by then the problem is so time consuming, that it is not feasible to solve. The
moment the complexity becomes O(2n
) it is completely inefficient to try and solve because
of the exponential growth of the problem. Table 3 shows how complexity, together with
problem size, influences the computational time. Various different techniques are shown
below:
n 10 20 50 100
n2
100 400 2500 10000
n3
1000 8000 125000 1000000
n5
100000 3200000 312500000 10000000000
n10
10000000000 1.024E+13 9.76863E+16 1E+20
2n
1024 1048576 1.13E+15 1.27E+30
Table 3: Complexity growth for polynomial and exponential algorithms
2.3.1 Simulated Annealing
In 1983 Kirkpatrick and co-workers introduced the method of Simulated Annealing (SA).
The method is based on simulation of the annealing processes found when substance is heated
above its melting point and then left to gradually cool down. This cooling process minimizes
its total energy probability distribution. This is a beautiful example where nature finds the
optimal crystal structure (Haupt 2004). In the article of (Bouleimen and Lecocq 2003) they
use Simulated Annealing for a job shop scheduling problem (JSSP). They prove how their
algorithm converges to a global minimal solution despite the fact that the Markov chains
they generated are generally not irreducible.
This algorithm begins with random guesses of variable values in the cost function. After the
first step the algorithm follows a set of predetermined rules to decrease the cost function as
far as possible. Figure 1 shows the approach used with SA. (Anonymous n.d.)
8
Figure 1: Simulated Annealing algorithmic approach
2.3.2 Particle Swarm Optimization
In 1995 Edward and Kennedy formulated Particle Swarm Optimization (PSO). Social behaviour
such as schools of fish or bird flocking inspired the PSO thought process. PSO works in
a very similar way than continuous Generic Algorithm in that it starts with a random
population matrix (Haupt 2004). However PSO does not contain operators such as crossover
and mutation.The rows in these matrices are called particles hence the term particle swarm
optimization. These particles contain variable values which are not binary. The cost function
is a surface on which these particles move about with a velocity. Particles update their
positions and velocities based on best local and global solutions. Using a PSO approach will
enable the user to tackle tough cost functions with more than one local minimum. In the
article of (Sha and Hsu 2006) they tailored their particle position, movement and velocity
to fit their job shop problem (JSP). Figure 2 shows a PSO approach (Patnaik 2012).
9
Figure 2: PSO algorithmic approach
2.3.3 Ant Colony Optimization
Ants seem to have the ability to always find the shortest path to their food. This is achieved
by a pheromone which they lay down as they walk. Other ants then find this trail and follows
it to the food source. Each time an ant walks on this path they also lay down a pheromone
trail. As the shortest path becomes more travelled, the pheromone trail gets stronger and
more ants follow that path again (Haupt 2004).
At first Ant Colony Optimization (ACO) algorithms were developed to optimize TSP’s,
because of its close resemblance to the ants that are trying to find the shortest path. The
ACO approach for a TSP begin with a number of ants/agents that follow a path around the
cities. Each agent lays its own pheromone trail as it travels along its path. The agents are
at first randomly assigned to a city. The next destination is usually decided upon by using a
weighted probability that is a function of its pheromone trail strength, and the distance to
the next destination. A factor for pheromone evaporation is built assigned to the model to
10
dispose of the trails that are less travelled, otherwise the model will still see them as good
solutions. The pheromone along the best possible route is described per function which
depends on the problem and user. This function is then used to decide on the model criteria
and when the model should stop. (Merkle, Middendorf, and Schmeck 2002) used ACO for
a RCPSP in their article. This will however not be used in this project because this project
does not have constraints to resources. (Huang and Liao 2008) displayed a very interesting
article on how they combined ACO together with TS to solve a classic Job Shop Scheduling
Problem (JSSP). Figure 3 shows an ACO approach (Khurshid and Shah 2011).
Figure 3: ACO algorithmic approach
2.3.4 Genetic Search
Genetic algorithms (GA) belongs to the class of AI (Artificial Intelligence) techniques.
Organisms have biologically evolved over many years to survive and thrive in nature. Survival
of the fittest and the process of natural selection are considered important aspects in the
process of evolution. GA works are based on the process of evolution. GA’s uses popular ideas
of biology such as: Chromosome population, mating selection, producing offspring through
crossover techniques, and mutation to ensure diversity in the population. The starting point
for a GA is the initial population. Once the initial population is generated GA techniques
can be applied to solve the problem and arrive at a good solution (Winston 2003).
GA’s start of by randomly generating the initial population. Strings in the initial population
represent possible solutions for the problem. Each solution is calculated and evaluated using
a predetermined fitness function. A new population is then generated using the initial
11
population function and then these populations are mated with the strongest populations
from the previous population generation. The populations that are used in the mating
process are chosen by the fitness function. The higher a population’s fitness the more likely
it is that population will be chosen to reproduce.
Advantages of the Genetic Algorithm include:
• The fitness function that evaluates solutions doesn’t need to be linear, differential or
even Continuous.
• The parameters (initial population, fitness function, mutation rate and breeding method)
of the approach are all under the control of the user.
• GA’s works on more than one solution at a time.
The conventional GA algorithm process is as follow:
Step 1: Generation. Starting off by generating an initial population of choice (random or
not). The population size is usually determined by a value of n.
Step 2: Evaluation. Each solution is measured using a fitness function determined beforehand.
If a solution is in feasible, it is penalized.
Step 3: Selection. Choosing probabilistic from the current solution the parents for the
generation of the new population. The parents/solutions with a higher or better fitness
stands a better chance to be chosen for reproduction.
Step 4: Reproduction. The parents are used to generate a new population that contains a
portion of each parent.
Step 5: Mutation. The genetic makeup of the offspring are randomly altered to avoid
reaching a local optima. Thus the offspring are now the new generation/populations of
solutions.
Step 6: Repeat. Repeat steps 2-5 until stopping criteria is met or if an optimum is reached.
(Goncalves 2005) have a very good article on Genetic Algorithms. This article also has a lot
in common with this project, whereas it searches for a local best and then tries to improve
that solution. For more information on Genetic Algorithms please refer to (Davis 1991).
2.3.5 Tabu Search
The heuristic procedure based on strategies that are used in intelligent decision making, also
known as Tabu Search(TS), was developed in 1986 by a fellow by the name of Glover. Tabu
search is not a process that imitates any natural processes such as Simulated Annealing
or Genetic search, but rather makes use of memory (Winston 2003). This process consists
of short and long term memory properties that helps the algorithm to calculate the best
possible solution. The short term memory helps the model to avoid circling around local
neighbourhoods, whereas the long term memory helps the model to conduct searches for
solutions in locations that previously prevailed promising results. Although Tabu Search
algorithms sound simple, they can become quite difficult because of the memory function
they possess.
The following steps that present the procedure for a Tabu Search algorithm were extracted
from (ibid.):
12
1. Start off with an initial solution x0 and an elite list of candidates 1
. Set tabu criteria,
tenure, list size and the short term memory iteration count n.
2. From the elite list of candidates, pick one (any method).
3. Create the short term memory candidate list and set the count = 0.
4. While (count <= n), do
Create a move from the candidate list to create a solution xcount from xcurrent
If the solution satisfies the tabu criteria test: Create tabu evaluation
Else If aspirations test is not met: Create penalized tabu evaluation
Else create tabu evaluation
End If
End If
If xcount is best move so far, xbest = xcurrent
Update counter by 1
End while
5. If elite list has more candidates, go to step 3
6. Report best solution
For a detailed project regarding the Tabu search please refer to (Dell’Amico and Trubian
1993). They use a Tabu search algorithm for a Job Shop Scheduling Problem (JSSP).
2.4 Problem Investigation
2.4.1 Problem
As mentioned in previous sections, Wispeco’s Parow plant is undergoing many changes to
try and save the plant. One of these changes is to reduce the number of powder coating lines
from two to one. The remaining powder coating line will not be kept as is. There is a separate
project that tackles the redesign and to improve the capacity of this line. For this project
the student assumes that the project regarding the efficiency of the powder coating line is
finished. The core of this project lies within the fact that the company is now reducing the
number of machines they have available for production. Previously they used one machine
for the larger orders, which usually entailed colours such as white, charcoal, bronze and
black. The other machine was used for the smaller orders with unusual colours such as grey,
yellow, blue etc. This made the planning process a bit easier from the schedulers point of
view, although the planning schedule was still not the optimal schedule. The schedule was
developed by one person’s intuition and if that person was not available anymore, the whole
planning process was changed to the insight of the new person. They now have to schedule
all of the work on one machine, and with an average of 100 orders per day, this problem can
become quite complex. With a predetermined set of rules to follow for scheduling this can
be easier, and with a model that automatically follows these rules this can become much
easier. The process which each Aluminium profile follows is as follow:
1
Gathered from Preliminary studies or history, for the long term memory use
13
1. Delivered by customer with own fleet or received from the hydraulic press. (If customers
do not have their own material they can order from the press, which will be sent to
powder coating after production).
2. The material is then received by the powder coating department.
3. Orders are packed inside Pre-Treatment skips (These skips are made of a special
material that can handle the Pre-Treatment chemicals).
4. The skips are put through the Pre-Treatment process.
5. After Pre-Treatment the profiles are powder coated.
6. When painted profiles are cooled down it will be wrapped in plastic.
7. The profiles are then stored in the warehouse, ready to be either collected or delivered.
2.4.2 Current planning process
The current planning scheduling process for Wispeco’s powder coating department entails:
1. If the work is received from the Press department:
The office clerk creates an invoice, for the press department, for the material
received and takes the job card.
Else if the customer brings his/her own work:
The customer is invoiced and a job card is created.
2. After material is received the scheduler allocate the material to the warehouse. This
is done by taking the job cards and entering it into TOPP (TOPP is the ERP system
they are using).
3. After the job cards are entered into the system a PreSchedule.xls file is created. The file
shows the product number, order number, colour, quantity, amount of square meters
to be sprayed as well the due date. Figure 4 shows an example of the PreSchedule file.
4. This file is then used to schedule the work. Their motto for scheduling is ”Schedule
according to the big work”. In other words, they rearrange the PreSched file so that
the work with the longer processing times/more square meters are done first.
5. The scheduling takes place on two machines currently. Please refer to the first paragraph
of Problem Investigation.
6. After scheduling has taken place they print a sheet showing the order in which the
work should be done.
7. Finally the job cards are then placed back into the skips so that floor managers know
the colour, client etc.
Following this procedure of scheduling we can see that it is easy for a customer’s work to get
behind schedule. The reason for this planning, is to increase machine efficiency, longer runs
mean less downtime. Unfortunately, customers do not pay for an efficient machine. They
pay for their work to be done on time.
14
Figure 4: PreSchedule file created by TOPP system
Part III
3 Data Analysis & Concept Design
The data that is going to be used in this project, has already been gathered. The project
does not rely on lots of data, but rather a sample that will be used inside the model
upon development. This sample data, however, contains most of the variations that can
be observed in the data, so that all variations are tested in the model design phase. The
data that will be used in the project is very much the same as the data they currently use.
3.1 Plant Data
Several aspects were considered when the data was taken for this project. The most
important one was the Daily production of the Parow plant. Figure 5 shows the distribution
of the daily production. With this new model we would like to increase the daily production
by simply just organizing the way in which we do our work.
15
Figure 5: Daily production for the Parow plant
Another important area was to look at the number of colour changes per day that they are
performing. Figure 6 shows the distribution of the colour changes. The average is around
five colour changes per day, but sometimes this rises to 15. This is the effect of improper
planning. This happens when small orders are not scheduled as they arrive, because they
put big orders first, and are then left until the customer starts calling etc. On days like
this they have to do a lot of small orders and between each order a colour change. They
even sometimes change to the same colour twice a day. The order size distribution was also
calculated, shown in figure 7, and it clearly states the fact that they have a lot of frequent
small orders.
Figure 6: Colour changes per day for Parow
16
Figure 7: Order size distribution
For more charts regarding the distribution of order sizes per colour please refer to Appendix
B.
3.2 Model Data
In section 2.4.2 we already looked at the PreShedule.xls file that they are using for their
production scheduling currently. For the model the student will use the same data but
only in another format. The PreSchedule.xls file presents data that are not of any use in
the model, so to keep everything simple and organized this data will be removed. Table 4
shows an example of the input data that is going to be used in the model. This data will
be extracted by the model via a text file that is created from the PreSched.xls file that is
already generated by the ERP system.
Order number Colour m2
Processing time [Min] Due date
G16MAR PCR5 20.47 4.09 160404
R77208 PBK2 12.12 2.42 160329
R77200 PCR5 20.54 4.11 160326
R77206 PWT1 10.66 2.13 160329
A83582 PWT5 243.47 48.69 160329
Table 4: Sample input data for model
Together with the input data the model will use something that is called a setup time matrix.
This matrix represent the time it takes to move from product i to product j, displayed in
figure 5. Or in the case of this project it will be the time required to change from one colour
to another (colour of order i to the colour of order j). As mentioned before, there are projects
currently running that in an attempt to improve the changeover times. In this project the
student will use the setup times as measured before the changeover project was initiated.
After the completion of the project regarding the changeover times, the times in the setup
time matrix can simply be changed and the model will accommodate those changes. The
17
changes are possible because the model will extract the setup time matrix data from a CSV
file, thus the scheduler does not need to go into the model itself and hard code the data in..
Colour Code PBA3 PCW1 PCW2 PCW4 PGW2 PHW1 PPW1
PBA3 0 11 10 15 10 10 200
PCW1 15 0 10 10 10 10 10
PCW2 20 10 0 10 10 10 10
PCW4 10 10 10 0 10 10 10
PGW2 0 10 10 20 0 15 10
PHW1 10 10 10 10 10 0 10
PPW1 15 10 15 10 20 10 0
Table 5: Sample setup time matrix
From all of this input data the goal is to provide an output sheet that gives the schedule in
which the work needs to be done. Together with the schedule sheet, will be some statistics
regarding the average total setup time, average queuing time, number of orders overdue etc.
3.3 Conceptual Design
[This section contains a conceptual design of the model that was developed for the problem
during BPJ 410. Please note that the design changed and the solution is displayed in the
following section.]
3.3.1 Concept Model Introduction
During the literature study the decision was made to use a Genetic Search (GS) technique.
For the project a genetic algorithm will be developed. The student chose the GS technique
because of the complexity and nature of this problem. We want a model that builds us the
best solution, the same way nature uses Genetic Mutation to create stronger offspring. This
type of scheduling problem is considered as a NP-Hard problem because of the computational
time needed to solve the problem. This is also why the student uses a GA, because the
method in which the model will search, will be faster and more efficient. The model will also
search a larger area of the solution space. The complexity of this problem will be between
O(n2
) & O(n4
). With a slight chance of it being O(n5
). A problem with this complexity
size can still be computed within a reasonable time.
The entire solution space may look like the one presented in figure 8. This solution space
represents the fitness function of the model. The model will start at a random point in the
solution space, as the model builds new solutions, costs for each possible solution will be
calculated. It will search the space until it founds the minimum value or if the stopping
criteria is met, where after it will take the best solution . In this case it will be the minimum
cost for the company.
18
Figure 8: GA Solution Space
3.3.2 Algorithm development in MATLAB
The following section will provide details regarding the implementation of the mathematical
model in MATLAB to form the Generic Algorithm. Please note: This section will only
contain the Pseudo code and not the entire code in MATLAB syntax.
The following provides the methods how the steps mentioned in section 2.3.4 are addressed
(all of these steps are written as functions in MATLAB):
Generation: The model starts of by generating an initial population. This initial population
is basically a possible solution for the production schedule. The Binary Matrix that is
generated, conforms to the constraints in the Mathematical Model. Table 6 shows an
example of a Binary Matrix. The size of the matrix is nxn with n = number of jobs. During
the Generation phase m number of populations are randomly created, e.q. m = 50, 100 etc.
Xjk are represented by 0’s and 1’s.
Order 1 2 3 4 5
1 0 1 0 0 0
2 0 0 1 0 0
3 0 0 0 0 1
4 1 0 0 0 0
5 0 0 0 1 0
Table 6: Example of a Binary Matrix
19
Evaluation: Equation 1 are used as the fitness function in the model. The evaluation
function calculates the cost function for all m populations generated. These costs are then
stored in a vector together with the corresponding matrix in order to be later recalled.
Selection: During the selection process the model takes the best value together with its
matching matrix and stores it as the best option/schedule. After the best one is chosen the
(m
2
− 1) next best values & matrices are stored.
Reproduction: The Reproduction function generates m
2
new random populations. These
populations will be used together with the populations Mutated in the Mutation function.
Mutation: The Mutation function alters the populations that was stored in the Selection
function. This function swaps all the values of the matrices, e.g if X12 = 1 then X21 will
become 1. Table 7 & 8 shows an example of this mutation.
Order 1 2 3 4 5
1 0 1 0 0 0
2 0 0 1 0 0
3 0 0 0 0 1
4 1 0 0 0 0
5 0 0 0 1 0
Table 7: Before Mutation
Order 1 2 3 4 5
1 0 0 0 1 0
2 1 0 0 0 0
3 0 1 0 0 0
4 0 0 0 0 1
5 0 0 1 0 0
Table 8: After Mutation
Repeat: The new populations generated in the Reproduction function are added to the
Mutated populations from the Mutation function and the process repeats from the Evaluation
function. So the costs are calculated and the best ones are kept and mutated while new ones
are generated and model continues like this until stopping criteria is met. The stopping
criteria must still be decided.
20
Part IV
4 Solution
[This section contains the solution model developed for the problem. Please note that this
design differs from the design in the conceptual design.]
4.1 Solution Model Introduction
In section 3.3.1 we looked at the type of model that the student wanted to develop for this
project. Latter sections will show the Mathematical Model, the Model design in MATLAB
as well as the validation of the model. The model developed for the project can be called
a ”Random Generated Genetic Algorithm”. The model is basically trying thousands of
randomly generated schedules, and determines their cost in terms of Setup and Overdue
costs. The execution of the Model was approached in a different manner and simplified after
the design of the conceptual model.
4.2 Mathematical Model
The Mathematical Model for the solution differs slightly from the Mathematical Model of the
Conceptual design. The mathematical outline used for the solution model can be summarized
as (1|Sjk(i)|γ n−1
j=1
n
k=j+1 SjkXjk + β n
j=1 yk). The entire mathematical model together
with the constraints and the descriptions are shown below.
j ∈ J = (1, 2, 3, 4, ..., n − 1), k ∈ K = (j + 1, j + 2, j + 3, ..., n) and n = number of jobs
Parameters
Dj = Due date for job j, j ∈ J
Sjk = Setup time between job j and job k, j ∈ J, k ∈ K
pk = Processing time for job k, j ∈ J
β = Over due date penalty
γ = Setup cost per minute
Variables
tk = Start time of job k, k ∈ K
Ck = Completion time of job k, k ∈ K
Xjk =
1 if job k is immediately preceeded by job j
0 otherwise
j ∈ J, k ∈ K
yk =
1 Cj - Dj if Ck > Dk
0 otherwise
j ∈ J, k ∈ K
Objective Function
MinZ = γ
n−1
j=1
n
k=j+1
SjkXjk + β
n
j=1
yk (1)
21
Subject to:
n−1
j=1
Xjk = 1 ∀j ∈ J (2)
n
k=j+1
Xjk = 1 ∀j ∈ J (3)
tk + Sjk + pk ≤ Cj ∀j ∈ J ∀k ∈ K (4)
tk + Sjk + pk ≤ tk+1 ∀j ∈ J ∀k ∈ K (5)
Ck, tk, yk ≥ 0 ∀k ∈ K (6)
Xj ∈ {0, 1} ∀j ∈ J (7)
Equation 1, the objective function, states that the weighted sum of total setup and tardiness
cost is minimised. Equation 2 ensures that every job precedes only one job. Equation 3
ensures that every job is preceded by only one job. Equation 4 is to guarantee that the
time allocation of each scheduled job includes the setup and processing time and is not
greater than the completion time of the job. The inequality could have been written as an
equation, but this should make no difference since the minimisation objective is also expected
to make the completion time not larger than the minimum required. Equation 5 is to ensure
the precedence necessity amongst the jobs scheduled, so that any job scheduled before a
particular job would be completed before the subsequent job would be started. Equations
6 and 7 are to guarantee non-negativity and the binary constraints of the decision variables
as necessary.
The sequence dependent setup problem is an instance of the travelling salesman problem,
and is known to have the weakness of having subtours. But the inclusion of variable tk
should help to eliminate the presence of subtours in this case (R. and M. 2008) so, other
subtour elimination constraints are not added. This problem is known to degenerate into
exponential search in the worst case, and hence the application of metaheuristics to find its
solution in cases where the number of variables is large, as is the case herein, and thus the
application of genetic algorithm as the solution approach.
4.3 Model Design in MATLAB
Section 3.3.2 refers to the six steps that are normally used in the genetic algorithm approach.
The solution model follows the same six steps. The functions used in the steps for the solution
model differ from the functions used in the conceptual design model, because of the flaws
that were addressed. The outline of the steps are still the same in both the solution model
as well as the conceptual model. The steps are:
22
Generation: The model starts off with the Pre-Schedule as shown in Table 9. The model
then assigns a number to each order (Table 9). The Model generates an initial population.
The initial population is just a random permutation of the schedule order. The size of the
order is n with n = number of jobs. During the Generation phase m number of populations
are randomly generated, e.q. m = 50, 100 etc (Table 10).
Order number Colour Code Number assigned Randomly Generated
by Model Schedule
R 77 208 PBK2 1 1
R 77 217 PSI1 2 7
R 77 200 PCR5 3 10
R 77 206 PWT1 4 2
721019 PWT1 5 3
721038 PBK0 6 9
721042 PBZ0 7 5
721044 PBZ0 8 4
721057 PBZ0 9 8
721050 PCR3 10 6
Table 9: Example of a Possible Population Generated
Evaluation: Equation 1 is used as the fitness function in the model. The evaluation
function calculates the costs for all m schedules generated (Table 10). These costs are then
stored in a vector together with their corresponding populations/schedules in order to be
recalled later.
2 7 7 7 7 1 9 6 2 9
6 5 5 9 1 9 1 7 5 8
8 4 4 2 6 3 5 2 10 3
1 2 2 5 8 4 6 1 7 2
5 6 6 4 2 8 4 5 6 6
4 1 1 10 3 6 7 9 9 7
3 10 10 8 10 10 3 3 4 5
9 8 8 1 9 7 8 4 1 10
10 9 9 6 5 5 10 10 3 4
7 3 3 3 4 2 2 8 8 1
Population Cost 3660 4000 4150 3165 5080 3220 3450 3660 4150 3160
Table 10: m Populations with their corresponding costs
Selection: A sort function sorts all m generated schedules from small to large regarding
their costs. During the selection process the model takes the best cost value together with
its matching schedule and stores it as the best option/schedule. After the best one is chosen
the (m
2
− 1) next best values & schedules are stored.
Reproduction: The Reproduction function generates m
2
new random schedules. These
schedules will be used together with the schedules Mutated in the Mutation function to form
23
a new population.
Mutation: The Mutation function alters the schedules that were stored in the Selection
function. This function just flips the schedule from back to front.
Repeat: The new schedules generated in the Reproduction function are added to the
Mutated schedules from the Mutation function and the process repeats from the Evaluation
function. So the costs are calculated and the best ones are kept and mutated while new ones
are generated and model continues like this until the cost converges.
The model follows the basic steps of a Genetic Algorithm except that it only works from
randomly generated populations and it then plays them off against each other, and after
a while it determines the best model for that time period. Normal Genetic Algorithms
have a mutation and crossover rate where the model determines, using probabilities, which
schedules to use at the next evaluation stage. This model takes the best half and flips them
around. However this model showed that by only generating random populations you can
achieve a valid solution. Please refer to the next section for the validation of the model.
4.3.1 Model Pseudo Code
Below is the Pseudo Code for the model that was developed for the project. This is only the
outline and basic working of the model.
Random Generated Genetic Algorithm
Section A
A ← Number of Repetitions/Runs
m ← Initial Population Size
n ← Number of Orders to sequence
Initialize;
Generate Initial Population of m Schedules
Section B
for i = 1 → m do
Evaluate InitialPopulation(i) Cost
Append to InitialPopulationCost
end for
Sort Initial Population Cost Small to Large
Best Cost ← InitialPopulationCost(1)
Best Population ← InitialPopulation(1)
Section C
for j = 1 → A do
NewPopulation(j) ← Best Population
24
for q = 2 → m
2
do
NewPopulation(q) ← Mutated 2
InitialPopulation(q)
end for
for r = m
2
+ 1 → m do
NewPopulation(q) ← Randomly Generated Schedule3
end for
for s = 1 → m do
Evaluate NewPopulation(s) Cost
Append to NewPopulationCost
end for
Sort New Population Cost Small to Large
if NewPopulationCost(1) < Best Cost then
Best Cost ← NewPopulationCost(1)
Best Population ← NewPopulation(1)
else
Best Cost ← Best Cost
Best Population ← Best Population
end if
end for
4.3.2 Model Pseudo Discussion
In section A of the pseudo code, the parameters of the model are initialised. The initial
population matrix is also generated, each column as a different schedule.
In section B, the initial matrix is analysed using the cost function and sorted from the
least to the highest cost. The best cost found is then stored along with the sequence that
generated the minimum cost. The sequence associated with the best cost is stored as the
best population.
In section C, once the best values are stored as part of the new population, the algorithm
starts to iterate for the number of generations specified during initialisation, while the plot of
the minimum cost is tracked for convergence. Next is the cross over and mutation operation
to generate a new population. To do that, (J.E. and B.C. 1996) fusion cross algorithm
was applied. This algorithm works well in situations where normal genetic cross over does
not work well, like with binary variables which are extreme values of their set as opposed
to continuous variables, whose cross creates something within the values of the parents
extremes. The fusion algorithm works in a destructive manner. It takes two parent genes
and create a single child from them. This helps to search further within the neighbourhood
of the good solutions found up until the current iteration. The genes within the current
population of the iteration are paired up to produce half the new population. The remaining
genes (half of the new population) are then randomly generated all over the solution space to
2
Mutation function in Section 4.3
3
Generation function in Section 4.3.
25
prevent premature convergence so that the solution space is well explored. The model then
continues to iterate until the specified number of iterations is reached, then best cost with
its corresponding sequence found as at the end of final iteration is stored. However, in this
model the mutation/selection is a bit different. After the cost together with their schedules
are sorted the model takes the top half as the best schedules for reproduction. The other
half are then randomly re-scheduled.
4.4 Solution Validation
In this section we look at the model that was developed in the previous section. Here we
show why this model is valid. Below is an index of the terms used throughout this section.
Initial Solution Size m : This is the amount of populations generated during the Generation
phase of the model (How much populations the model evaluates at a time).
A : This is the number of times the model repeated itself.
Best Cost : This is the best cost after the model repeated A times.
Computation Time : This is the time it took the model to repeat A times.
A Initial Solution Size
1 10 2
2 20 4
3 30 6
4 40 10
5 50 20
6 100 50
7 500 100
8 1000
9 10000
Table 11: Reference guide for Figures 9 and 10
Table 11 is a guideline to understand Figures 9 and 10. If we look at Figure 9 and look at
the lowest point, we see that A is 9 and Initial Solution Size is 2. Together with Table 11
we see that A was 10,000 and Initial Solution Size was 4. (This was done to make Figures
9 and 10 more presentable)
4.4.1 Model Testing
Best Cost testing
Figure 9 shows the cost curve for various testing conditions. The testing conditions consisted
of two variables changing. These variable were the Initial Solution Size and A. The Initial
Solution Size is the amount of Random schedules the model evaluates at each time, and A is
number of times the model will repeat itself. For example, the model will test four different
schedules 10,000 times. These four schedules will be randomly generated each time. Table
12 shows the values which were used in the plotting of the Best Cost curve. Please use Table
11 as a guide to read Figure 9.
26
Figure 9: Cost Curve
Best Cost [R]
A
10 20 30 40 50 100 500 1000 10000
Initial
Solution
Size
2 4480 4430 4470 4490 4500 4345 4330 4340 4295
4 4475 4405 4455 4475 4355 4430 4300 4340 4165
6 4430 4415 4395 4395 4390 4380 4370 4295 4270
10 4390 4390 4375 4420 4395 4330 4315 4295 4265
20 4370 4395 4380 4400 4335 4330 4295 4330 4210
50 4415 4375 4345 4365 4325 4325 4315 4270 4225
100 4355 4280 4305 4320 4340 4315 4300 4260 4225
Table 12: Best Cost Data for Figure 9
Computation Time testing
Figure 10 shows the Computation Time curve for various testing conditions. These test
conditions are the same as the conditions used in section 4.4.1. Table 13 shows the data
used for the Computation Time Curve. Please use Table 11 to read Figure 10.
27
Figure 10: Time Curve
Computational
Time [s]
A
10 20 30 40 50 100 500 1000 10000
Initial
Solution
Size
2 0.086 0.086 0.091 0.097 0.095 0.114 0.26 0.442 3.989
4 0.081 0.09 0.106 0.11 0.12 0.145 0.454 0.757 8.268
6 0.092 0.098 0.11 0.121 0.129 0.176 0.574 1.089 14.097
10 0.097 0.112 0.134 0.143 0.161 0.248 0.907 1.801 28.125
20 0.118 0.148 0.179 0.212 0.247 0.425 1.754 3.555 89.476
50 0.161 0.242 0.337 0.399 0.492 0.89 4.404 10.599 540.12
100 0.248 0.407 0.57 0.724 0.901 1.738 10.402 27.888 2396.206
Table 13: Computational Time Data for Figure 10
Population Size Testing
Table 14 shows the different Population sizes that were tested. The model was repeated
50 times with A = 10, 000 and the Initial Solution Size changing. From here distributions
were drawn to determine the range of the best cost values for each population. Please see
Appendix D for the graphs.
Test
Conditions
Population size A Lowest Best Highest Best CPU Time [s]
1 4 10000 4240 4320 8.268
2 6 10000 4220 4320 14.097
3 8 10000 4170 4320 21.429
4 10 10000 4220 4300 28.125
5 50 10000 4160 4280 540.12
Table 14: Various test conditions with A = 10,000
28
Furthermore the model was repeated five times, with the conditions being A = 10, 000 and
InitialSolutionSize = 4, to test the variation of the model. Figure 11 shows the average
population cost that was gathered during the testing. The figure shows that the model does
not vary a lot even though it is a Random Generated Genetic Algorithm. Figure 12 shows
the best cost for life cycle for each run. The figure shows the best cost almost follows the
same pattern every time. With the slight chance of it decreasing after the model repeated
itself 9,000 times. This shows the stability of the model even though it is actually a random
model.
Figure 11: Average Population Cost
Figure 12: Best Cost Life Cycle
29
Testing Conclusion
Section 4.4.1 shows the cost curve figure. This figure shows the 63 different scenarios that
were tested. We can see that the larger the Initial Solution Size and the more the model
is repeated, the better the results were obtained. But time is an issue. Section 4.4.1 shows
a figure that corresponds with Figure 9. This figure indicates that the bigger the Initial
Solution Size and the more we repeat the model, the larger the computational time become.
From Figure 9 the student chose to repeat the model 10,000 times, but with varying Initial
Solution Sizes.
Table 14 in Section 4.4.1 shows the various scenarios where the model was repeated 10,000
times, but with different Initial Solution Sizes. The Initial Solution Sizes that were tested
was, 4, 6, 8, 10 and 50. Two was not tested because the population size is too small and 100
was also not tested because of the computational time. Finally the conclusion was made that
repeating a population size of between 4 and 10 for 10,000 times was ideal model conditions,
because this provides a good solution within a reasonable time. A value much closer to the
optimal is available, but the time required to get that solution is very high.
4.4.2 Solution Model vs. Other Models
The Random Generated Generic Algorithm was further tested against various other models.
These other models have established rules to schedule work. These models were discussed
in the Literature Review in Part 2. The first model tested was the EDD model, which is
known as the Earliest Due Date Model. This model is only concerned with the due dates of
each order and it is scheduled according to that. This model would be perfect if the setup
times were constant between each order. The second model tested was the SPT model,
known as the Shortest Processing Time model. This model schedules the smaller orders
first. Unfortunately, because the larger orders are shifted to the back , these becomes very
long overdue. The third model that was tested, was the LPT model, known as the Largest
Processing Time model. This model schedules the larger orders first. The largest orders are
done first which can cause some smaller orders to wait very long and become overdue. All of
these models were tested against the Random Generated Genetic Algorithm model, and the
EDD Model has proven to be a better model to use at this stage. The Random Generated
Genetic Algorithm has proven to be better than the SPT and LPT model at this stage on
the number of jobs overdue and the best cost. Please refer to Table 15. 4
Solution Model EDD Model SPT Model LPT Model
Best Cost 4160 3090 4330 4380
Jobs Overdue 48 48 48 49
Average Job
Completion Time [s] 1092.81 1156.35 450.16 2239.42
Table 15: Best Costs and Jobs Overdue for various different models
4
The data that has been used for the Solution Model is the best data found with a few test runs. Please
refer to Appendix E for the distributions of the data
30
4.5 Proposed Cost Savings
Even though the model already tries to decrease the cost with every iteration, there is a
further cost saving for the company. As mentioned the company appointed a person who
schedules the work on a daily basis. The scheduling role is apart from her other duties,
but she spends an average of 3-4 hours per day scheduling work. This person also a B.Tech
Industrial degree. If we assume that she works at a rate of R120 per hour for 3-4 hours each
day, this project will be able to save them R480 per day. If she works 4.33 weeks per month,
this will mean that they will save R 10392 per month, which accumulates to R 124704 per
year.
These savings exclude the savings the model has made regarding the penalty costs.
4.6 Future Solution Model Development
The EDD Model has proven to be better than the Random Generated Genetic Algorithm
Model at this stage of the project. It is recommended that further testing takes place before
a conclusion on the Random Generated Genetic Algorithm can be drawn. It is believed that
the data that was used as input data in the model, could have affected the performance of
the model. This is why further testing is recommended with a variation of input data. For
example, random due dates together with random order sizes and colours can be used. Until
further testing is done no concrete conclusion can be given.
5 Conclusion
In conclusion, the problem currently experienced by the company was identified and a method
for the approach of a solution has been established. Throughout this document several
methods have been researched and explained, from the Simulated Annealing (SA) technique
through to the Tabu Search (TS) technique. After all of the techniques have been researched
and considered the decision was made to develop a model with a base of a Random Search
Technique, but with the execution steps of a Generic Search Technique. This technique
showed a lot of potential as it enabled the model to build a better solution with each step
within a reasonable amount of time. Although further testing is strongly recommended
before a clear conclusion can be drawn of the model. The model was written in MATLAB.
In the end, the model turned out to be a very viable research project, but the results of the
projects still informs Wispeco that there is an alternative scheduling technique out there,
even if it is not this model. The use of an alternative scheduling technique will enable them
to save time and money.
Finally, the student hopes to deliver a project of importance, but also with the ability to
have an impact on the company. Because of the nature of this project the student also hopes
to aid future project executors in their project development.
Give me six hours to chop down a tree and I will spend the first four sharpening
the axe.
Abraham Lincoln
31
References
Anonymous. Designing HAL, a Learning AI with Emotions and Dreams. url: http://www.
yofiel.com/writing/essays/designing-hal-a-learning-ai-with-emotions-and-
%09%09dreams.
Biskup, Dirk (1999). “Single-machine scheduling with learning considerations”. In: European
Journal of Operational Research 115.1, pp. 173–178.
Bouleimen, KLEIN and HOUSNI Lecocq (2003). “A new efficient simulated annealing algorithm
for the resource-constrained project scheduling problem and its multiple mode version”.
In: European Journal of Operational Research 149.2, pp. 268–281.
Davis, Lawrence (1991). “Handbook of genetic algorithms”. In:
Dayama, Niraj Ramesh et al. (2015). “History-dependent scheduling: Models and algorithms
for scheduling with general precedence and sequence dependence”. In: Computers &
Operations Research 64, pp. 245–261.
Dell’Amico, Mauro and Marco Trubian (1993). “Applying tabu search to the job-shop
scheduling problem”. In: Annals of Operations Research 41.3, pp. 231–252.
Goncalves, Jose Fernando (2005). “A hybrid genetic algorithm for the job shop scheduling
problem”. In: European journal of operational research 167.1, pp. 77–95.
Haupt (2004). Practical genetic algorithms. John Wiley & Sons.
Huang, Kuo-Ling and Ching-Jong Liao (2008). “Ant colony optimization combined with
taboo search for the job shop scheduling problem”. In: Computers & Operations Research
35.4, pp. 1030–1046.
J.E., Beasley and Chu B.C. (1996). “A genetic algorithm for the set covering problem”. In:
European Journal of Operations Research 94, pp. 394–404.
Khurshid Irteza, Khan and Shah (2011). “Application of Heuristic (1-Opt local Search) and
Meta heuristic (Ant Colony Optimization) Algorithms for Symbol Detection in MIMO
Systems”. In:
Kır, Sena and Harun Re¸sit Yazgan (2016). “A sequence dependent single machine scheduling
problem with fuzzy axiomatic design for the penalty costs”. In: Computers & Industrial
Engineering 92, pp. 95–104.
Merkle, Daniel, Martin Middendorf, and Hartmut Schmeck (2002). “Ant colony optimization
for resource-constrained project scheduling”. In: Evolutionary Computation, IEEE Transactions
on 6.4, pp. 333–346.
Patnaik, Panda (2012). “Particle Swarm Optimization and Bacterial Foraging Optimization
Techniques for Optimal Current Harmonic Mitigation by Employing Active Power Filter”.
In:
R., Moghaddas and Houshmand M. (2008). “Job-Shop Scheduling Problem With Sequence
Dependent Setup Times”. In: Proceedings of the International MultiConference of Engineers
and Computer Scientists 2.
Rubin, Paul A and Gary L Ragatz (1995). “Scheduling in a sequence dependent setup
environment with genetic search”. In: Computers & Operations Research 22.1, pp. 85–99.
Sena Kir, Harun Resit Yazgan (2015). “A sequence dependent single machine scheduling
problem with fuzzy axiomatic design for the penalty costs”. In:
Sha, DY and Cheng-Yu Hsu (2006). “A hybrid particle swarm optimization for job shop
scheduling problem”. In: Computers & Industrial Engineering 51.4, pp. 791–808.
32
V´elez-Gallego, Mario C, Jairo Maya, and Jairo R Montoya-Torres (2016). “A beam search
heuristic for scheduling a single machine with release dates and sequence dependent setup
times to minimize the makespan”. In: Computers & Operations Research 73, pp. 132–140.
Winston, Wayne L (2003). “Introduction to mathematical programming.: operations research.”
In:
33
Appendix A: Industry Sponsorship form
34
Appendix B: Data Analysis
(a) Black (b) Bronze
(c) Charcoal (d) New Silver
(e) Alu White (f) White
36
Appendix C: Model Validation Data
n : This is the index in which the model ran e.g 1st
run, 2nd
run etc
Initial Solution Size m : This is the amount of populations generated during the Generation
phase of the model.
A : This is the amount of time the model was repeated to fins a better cost.
Best Cost : This is the best cost after the model ran A times.
Computation Time : This is the time it took the model to ran A times.
n Initial Solution Size A Best Cost[R] Computation Time[s]
1 2 10 4480 0.086
2 4 10 4475 0.081
3 6 10 4430 0.092
4 10 10 4390 0.097
5 20 10 4370 0.118
6 50 10 4415 0.161
7 100 10 4355 0.248
8 2 20 4430 0.086
9 4 20 4405 0.09
10 6 20 4415 0.098
11 10 20 4390 0.112
12 20 20 4395 0.148
13 50 20 4375 0.242
14 100 20 4280 0.407
15 2 30 4470 0.091
16 4 30 4455 0.106
17 6 30 4395 0.11
18 10 30 4375 0.134
19 20 30 4380 0.179
20 50 30 4345 0.337
21 100 30 4305 0.57
22 2 40 4490 0.097
23 4 40 4475 0.11
24 6 40 4395 0.121
25 10 40 4420 0.143
26 20 40 4400 0.212
27 50 40 4365 0.399
28 100 40 4320 0.724
29 2 50 4500 0.095
30 4 50 4355 0.12
31 6 50 4390 0.129
32 10 50 4395 0.161
33 20 50 4335 0.247
34 50 50 4325 0.492
35 100 50 4340 0.901
Table 16: Data for Best Cost and Computational time testing (1)
37
n Initial Sol Size A Best Cost[R] Computation Time[s]
36 2 100 4345 0.114
37 4 100 4430 0.145
38 6 100 4380 0.176
39 10 100 4330 0.248
40 20 100 4330 0.425
41 50 100 4325 0.89
42 100 100 4315 1.738
43 2 500 4330 0.26
44 4 500 4300 0.454
45 6 500 4370 0.574
46 10 500 4315 0.907
47 20 500 4295 1.754
48 50 500 4315 4.404
49 100 500 4300 10.402
50 2 1000 4340 0.442
51 4 1000 4340 0.757
52 6 1000 4295 1.089
53 10 1000 4295 1.801
54 20 1000 4330 3.555
55 50 1000 4270 10.599
56 100 1000 4260 27.888
57 2 10000 4295 3.989
58 4 10000 4165 8.268
59 6 10000 4270 14.097
60 10 10000 4265 28.125
61 20 10000 4210 89.476
62 50 10000 4225 540.12
63 100 10000 4225 2396.206
Table 17: Data for Best Cost and Computational time testing (2)
38
Appendix D: Solution Model Testing
[Please refer to Table 14 in Section 4.4.1 for test conditions]
(a) Test 1 (b) Test 2
(c) Test 3 (d) Test 4
(e) Test 5
Figure 14: Repeating Various Initial Solution Sizes 10,000 times
39
Appendix E: Solution Model vs. Other Models Data
(a) Average Job Completion Time (b) Best Cost Distribution
40
Appendix F: Article submitted for publication
41
South African Journal of Industrial Engineering Month Year Vol __(_) pp
A WEIGHTED BI-CRITERIA SCHEDULING MODEL IN A SEQUENCE DEPENDENT
SETUP ENVIRONMENT FOR A POWDER COATING SHOP
ABSTRACT
Efficient scheduling of jobs in a big powder coating shop is a necessity in a competitive
business environment, especially with the South African market opened up to foreign
businesses. This is a sequence dependent setup scheduling problem because the changeover
time depends on the colour of the paint just applied before the next one is scheduled. This
problem can be reduced to a travelling salesman problem (TSP), and is therefore NP-hard.
A solution to the problem that seeks to optimise the weighted total cost, including setup
and tardiness costs in polynomial time is presented with the case of the largest Aluminium
extrusion company in South Africa, using Genetic Algorithm (GA) as the solution approach
and with some model modification to prevent the typical sub-touring problem associated
with the TSP. The performance of the model is compared to that of selected single
objective dispatch heuristics and the performance of the model is quite satisfactory.
OPSOMMING
2
1. INTRODUCTION AND STUDY BACKGROUND
1.1 Problem background
Wispeco is the leading aluminium extrusion company in Africa. Their offerings, which
started with production of nails, diamond mesh, fencing gate and wire screening, has been
diversified into many other areas today, including powder coating. Due to the competitive
pressure from some other countries like China (and some other European countries) coming
into the South African market, there is the need to make their plants more productive.
Customers demand, not only that they get products available at a very reasonable (actually
low) cost and job quality, but also that Wispeco meets their due dates as much as possible,
and they seem sensitive to lead time. Given the competitiveness of the industry, a lot more
pressure is placed on Wispeco to make profit and grow (or at least maintain) their market
share. Considering that there are usually a large number of customer orders daily,
scheduling jobs such that each customer gets its order on due date is a challenge,
especially with the recent reduction in the number of machines from two to one in order to
increase utilisation. There is little room for error, and that means job scheduling should be
well managed.
Powder coating is a process of depositing layers of colour pigments on products. There are
more than a hundred different types of colours, and jobs can pick from any of these. In
addition, the jobs mixes of different types and shades are also in different sizes (and hence
different processing times) and customer expected due dates also differ. After coating with
a type of colour, the time required to clean and prepare the machine for another product
depends on the relationship between the colour just used and the one to be used on the
next job. This is a sequence dependent job scheduling system, and it is known to be NP-
hard because it can be reduced to the travelling salesman problem, with the machine being
the salesman and the jobs being the cities.
The problem can be described as follows: The objective is the minimisation of the total
tardiness and setup penalty costs; the jobs are on a single machine, with sequence
dependent setup times. Using Graham’s notation, it can be described as: (1|𝑆𝑗𝑘( 𝑖)|𝛾 ∑ 𝑆𝑗𝑘 +
𝛽 ∑ 𝑇𝑗).
Because there is large setup time between the different colours, the scheduling becomes
more intense as the variance in colours increase. Same colour but different orders require
no time for setup. It would be ideal to schedule the order with the same colours together,
but unfortunately the jobs do arrive all at the same time and each job has a due date
depending on the customer’s preference, and taking these due dates into consideration
affects the schedule performance too.
To solve this problem, being NP-complete and considering the complexity of exact
solutions, a random search technique was used. Genetic Algorithm with some modifications
was used to find solution to the problem. The solution from the Genetic Algorithm model
was compared to those obtained from three other dispatch rules to evaluate the
performance of the model using the model.
SMSP's can be considered as problems with a simple structure in comparison to other
scheduling problems, but it may be difficult to solve due to its time complexities,
depending on the behaviour of the data. Biskup [1] covers an in depth study of Single
Machine Scheduling. Kir [2] used a single machine scheduling technique and applied it to a
dairy product plant. Their sequence dependent problem is very similar to the one found at
the aluminium powder coating plant. Vélez-Gallego, Maya, and Montoya-Torres [3]
presented a mixed integer linear programming model of a sequence dependent problem
with arbitrary release dates on a single machine. They used beam search heuristic
technique to solve the problem. Their objective was to minimize the total make span of the
work. Their problem was defined as (1|𝑟𝑗|𝑆𝑗𝑘|𝐶 𝑚𝑎𝑥). In this problem the total make span of
the work will stay the same, the average completion time will differ.
3
1.2 Recent progress
Work has continued into sequence dependent set-up and its extension models in several
ways. Such areas include multi objective models, like Shahvari and Logendran [4] which
seeks to simultaneously minimise the weighted sum of the weighted total completion time
and total weighted tardiness in a hybrid flow shop batching and sequence dependent set
up. They used Tabu search/path relinking procedures. The Path relinking procedure is used
to construct solution paths and stage based improvement procedure to evaluate move
interdependency. They reported solutions as good as CPLEX but with shorter computation
time. Nikabadi and Naderi [5] also used multi-objective genetic algorithm and simulated
annealing to schedule parallel unrelated machines with sequence dependent setup, varying
due dates and precedence relationship amongst jobs. They claimed the algorithms
outperformed GA and SA algorithms individually. Lu et al [6] also solved a multi-objective,
mixed integer Welding Scheduling Problem (WSP) with controllable processing time,
sequence dependent setup and job dependent transportation time using multi-objective
grey wolf optimiser.
History dependent setup problem is one in which the setup time is affected by the
aggregate properties of all predecessor jobs. Dayama et al [7] considered setup time with
historical precedence with time window restrictions and argued that many previous
problems in literature are instances of the general history dependent setup problem. They
proposed the general precedence scheduling problem and proposed some modelling and
solution techniques. Mir and Rezaeian [8] presented a model for sequence dependent setup,
release dates, deteriorating job and learning effects in scheduling. They used a hybrid of
simulated annealing and genetic algorithm to solve the problem.
Sequence dependent setup with time and resource constraint problem has also been
presented. Merkle, Middendorf, and Schmeck [9] used Ant Colony Optimization algorithm
for a Resource Constraint Project Scheduling Problem (RCPSP). Afzalirad and Rezaiean [10]
considered resource constraint systems with sequence dependent setup, different release
dates, machine eligibility and precedence constraint. They used genetic algorithm and
artificial immune systems to solve the problem and suggested that both models performed
well for small size problems, but the artificial immune system model performed better for
larger size problems. Gedik et al [11] considered non-identical jobs with availability
intervals and sequence dependent setup times on unrelated parallel machines in a fixed
planning horizon. They used constraint programming and logic based Benders algorithm to
solve the problem and reported the performance of the tow solution approaches. An, Kim
and Choi [12] presented a two-machine flow time problem with sequence dependent setup
and constrained waiting time. They developed some dominance properties, lower bounds,
and heuristic algorithms, and used these to develop a branch and bound algorithm to solve
some small size problems and reported the heuristic performances.
Some other models have considered uncertainty in model parameters in sequence
dependent setup problem. Xantopoulos et al [13] considered dynamic sequencing on 𝑛
identical parallel machines with stochastic arrivals, processing times, due dates and
sequence-dependent setups. They used simulation model to test seventeen dispatching
rules and discussed the performance of the various rules considering four metrics. Gholami-
Zanjani et al [14] presented a flow shop scheduling problem with sequence dependent set-
up times in an uncertain environment, where the objective is minimising weighted mean
completion time. They then solved the problem using a deterministic approach, robust
optimisation approach and fuzzy approach; and evaluated the performance of the system
using a case of a circuit board printer.
1.3 Genetic Algorithm overview
Goncalves [15] is a good reading on Genetic Algorithm for job shop scheduling. Haupt and
Haupt [16] demonstrated the use of Simulated Annealing, Ant Colony Optimization and
Particle Swarm Optimization in addressing diverse scheduling problems. Genetic algorithms
(GA) belong to the class of AI (Artificial Intelligence) techniques. Organisms have
biologically evolved over many years to survive and thrive in nature. Survival of the fittest
and the process of natural selection are considered important aspects in the process of
evolution. GA works are based on the process of evolution. GA uses popular ideas of biology
4
such as: Chromosome population, mating selection, producing offspring through crossover
techniques and mutation to ensure diversity in the population. The starting point for a GA is
the initial population. Once the initial population is generated, GA techniques can be
applied to solve the problem and arrive at a good solution [17]. GAs start off by randomly
generating the initial population. Strings in the initial population represent possible
solutions to the problem. Each solution is evaluated using a predetermined fitness function.
A new population is then generated using the initial population function and then these
populations are mated with the strongest populations from the previous population
generation. The populations that are used in the mating process are chosen by the fitness
function. The higher a population's fitness, the more likely it is that population will be
chosen to reproduce. Advantages of the Genetic Algorithm include:
 The fitness function that evaluates solutions doesn't need to be linear, differential
or even continuous.
 The parameters (initial population, fitness function, mutation rate and breeding
method) of the approach are all under the control of the user.
 GA's works on more than one solution at a time.
The conventional GA algorithm process is as follow:
Step 1: Generation. Starting off by generating an initial population of choice (random or
not). The population size is usually determined by a value of 𝑛.
Step 2: Evaluation. Each solution is measured using a fitness function determined
beforehand. If a solution is infeasible, it is penalized.
Step 3: Selection. Using some functions applied to the current genes, parents for the
generation of the new population are determined. The parents/solutions with a higher or
better fitness stand a better chance to be chosen for reproduction.
Step 4: Reproduction. The parents are used to generate a new population that contains a
portion of each parent
Step 5: Mutation. The genetic makeup of the offspring is randomly altered to avoid
reaching a local optimum. Thus the offspring are now the new generation/populations of
solutions.
Step 6: Repeat. Repeat steps 2-5 until stopping criteria is met or if an optimum is reached.
2. MODEL FORMULATION AND SOLUTION
2.1.1 Mathematical model
The sequence dependent problem discussed is presented as follows.
Let:
𝑗 ∈ 𝐽 ≜ (1, 2, 3, 4, … , 𝑛 − 1), 𝑘 ∈ 𝐾 ≜ ( 𝑗 + 1, 𝑗 + 2, 𝑗 + 3, … , 𝑛), and 𝑛 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑗𝑜𝑏𝑠
Parameters
𝐷𝑗 = 𝐷𝑢𝑒 𝑑𝑎𝑡𝑒 𝑓𝑜𝑟 𝑗𝑜𝑏 𝑗, 𝑗 ∈ 𝐽
𝑆𝑗𝑘 = 𝑆𝑒𝑡𝑢𝑝 𝑡𝑖𝑚𝑒 𝑓𝑜𝑟 𝑗𝑜𝑏 𝑘 if preceeded immediately by 𝑗𝑜𝑏 𝑗, 𝑗 ∈ 𝐽, 𝑘 ∈ 𝐾
𝑝 𝑘 = 𝑃𝑟𝑜𝑐𝑒𝑠𝑠𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 𝑓𝑜𝑟 𝑗𝑜𝑏 𝑘, 𝑘 ∈ 𝐾
𝛽 = 𝑂𝑣𝑒𝑟 𝑑𝑢𝑒 𝑑𝑎𝑡𝑒 𝑝𝑒𝑛𝑎𝑙𝑡𝑦
𝛾 = 𝑆𝑒𝑡𝑢𝑝 𝑐𝑜𝑠𝑡 𝑝𝑒𝑟 𝑚𝑖𝑛𝑢𝑡𝑒
𝑅 = 𝐿𝑎𝑟𝑔𝑒 𝑛𝑢𝑚𝑏𝑒𝑟
Variables
𝑡 𝑘 = 𝑆𝑡𝑎𝑟𝑡 𝑡𝑖𝑚𝑒 𝑜𝑓 𝑗𝑜𝑏 𝑘, 𝑘 ∈ 𝐾
𝐶 𝑘 = 𝐶𝑜𝑚𝑝𝑙𝑒𝑡𝑖𝑜𝑛 𝑡𝑖𝑚𝑒 𝑜𝑓 𝑗𝑜𝑏 𝑘, 𝑘 ∈ 𝐾
𝑋𝑗𝑘 = {
1 𝑖𝑓 𝑗𝑜𝑏 𝑘 𝑖𝑠 𝑖𝑚𝑚𝑒𝑑𝑖𝑎𝑡𝑒𝑙𝑦 𝑝𝑟𝑒𝑑𝑒𝑒𝑑𝑒𝑑 𝑏𝑦 𝑗𝑜𝑏 𝑗
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑗 ∈ 𝐽, 𝑘 ∈ 𝐾
𝑦 𝑘 = {
𝐶𝑗 − 𝐷𝑗 𝑖𝑓 𝐶 𝑘 > 𝐷 𝑘
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑘 ∈ 𝐾
Objective function
5
min 𝑍 = 𝛾 ∑ ∑ 𝑆𝑗𝑘
𝑛
𝑘=𝑗+1
𝑛−1
𝑗=1
𝑋𝑗𝑘 + 𝛽 ∑ 𝑦 𝑘
𝑛
𝑗=1
(1)
Subject to
∑ 𝑋𝑗𝑘
𝑛−1
𝑗=1
= 1 ∀ 𝑗 ∈ 𝐽 (2)
∑ 𝑋𝑗𝑘
𝑛
𝑘=𝑗+1
= 1 ∀ 𝑗 ∈ 𝐽 (3)
𝑡 𝑘 + 𝑆𝑗𝑘 + 𝑝 𝑘 ≤ 𝐶𝑗 (4)
𝑡 𝑘 + 𝑆𝑗𝑘 + 𝑝 𝑘 ≤ 𝑡 𝑘+1 (5)
𝐶 𝑘 , 𝑡 𝑘 , 𝑦 𝑘 ≥ 0 ∀ 𝑗 ∈ 𝐽 (6)
𝑋𝑗,𝑘 ∈ {0, 1} ∀ 𝑗 ∈ 𝐽, 𝑘 ∈ 𝐾 (7)
Equation (1) is the objective function, and stipulates that the weighted sum of total setup
and tardiness cost is minimised. Equation (2) is to ensure that every job precedes only one
job. Equation (3) is to ensure that every job is preceded by only one job. Equation (4) is to
guarantee that the time allocation of each scheduled job includes the setup time and
processing time and is not greater than the completion time of the job. The inequality
could have been written as an equation, but this should make no difference since the
minimisation objective is also expected to make the completion time not larger than the
minimum required. Equation (5) is to ensure the precedence necessity amongst the jobs
scheduled such that any job scheduled before a particular job would be completed before
the subsequent job would be started. Equations (6) and (7) are to guarantee non-negativity
and the binary constraints of the decision variables as necessary. The sequence dependent
setup problem is an instance of the travelling salesman problem, and is known to have the
weakness of having subtours. But the inclusion of variable 𝑇𝑘 should help to eliminate the
presence of subtours in this case [18], so, other subtour elimination constraints are not
added. This problem is known to degenerate into exponential search in the worst case, and
hence, the application of metaheuristics to find its solution in cases where the number of
variables is large, as is the case herein, and thus the application of genetic algorithm as the
solution approach.
2.1.2 Genetic Algorithm pseudo code
The pseudo code for the implementation of the Genetic Algorithmic solution is presented
next. This is followed by a brief explanation of the main sections of the code.
Section A
A ≜ Number of repetition/runs
m ≜ Initial Population Size
n ≜ Number of Orders to sequence
Initialize;
Generate Initial Population of m Schedules
Section B
for i = 1 → m do
Evaluate InitialPopulation(i) Cost
Append to InitialPopulationCost
end for
Sort InitialPopulationCost Small to Large
Best Cost ← InitialPopulationCost(1)
Best Population ← InitialPopulation(1)
Section C
for j = 1 → A do
NewPopulation(j) ← Best Population
for q = 2 →
𝑚
2
do
NewPopulation(q) ← Crossover/Mutated InitialPopulation(q)
6
end for
for r =
𝑚
2
+ 1 → m do
NewPopulation(q) ← Randomly Generated Schedule
end for
for s = 1 → m do
Evaluate NewPopulation(s) Cost
Append to NewPopulationCost
end for
Sort NewPopulationCost Small to Large
if NewPopulationCost(1) < Best Cost then
Best Cost ← NewPopulationCost(1)
Best Population ← NewPopulation(1)
else
Best Cost ← Best Cost
Best Population ← Best Population
end if
end for
2.1.3 Discussion of the GA algorithm
In section A of the pseudo code, the model parameters are initialised. The initial population
matrix is also generated as a binary variable of job sequences. The binary nature of the
population matrix makes it unnecessary to have bit encoding for the genetic algorithm as
the generated bits are used directly in the cost evaluation function. This is found to be a
generally more efficient way, and the only necessary changes would be in the cross-over
and mutation function, which would be addressed appropriately later. In section B, the
initial matrix is analysed using the cost function and sorted from the least to the highest
cost. The best cost found is then stored along with the sequence that generated the
minimum cost.
In section C, once the best values are stored, the algorithm starts to iterate for the number
of generations specified during initialisation while the plot of the minimum cost is tracked
for convergence. Next is the cross over and mutation operation to generate a new
population. To do that, the Beasley and Chu’s [19] fusion cross algorithm was applied. This
algorithm works well in situations where normal genetic cross over does not work well, like
with binary variables which are extreme values of their set as opposed to continuous
variable, whose cross creates something within the values of the parent’s extremes. The
fusion algorithm works in a destructive manner. It takes two parent genes and creates a
single child from them. This helps to search further within the neighbourhood of the good
solutions found up until the current iteration. The genes within the current population of
the iteration are paired up to produce half the new population. The remaining genes (half
of the new population) are then randomly generated all over the solution space to prevent
premature convergence so that the solution space is well explored. The model then
continues to iterate until the specified number of iterations is reached and the best cost
with its corresponding sequence found as at the end of final iteration is stored.
3. MODEL IMPLEMENTATION, SOLUTION AND RESULTS
3.1.1 Model Implementation and testing
The pseudo code was implemented using MATLAB. The model was then tested to determine
its convergence and general performance along some selected dimensions. Various testing
conditions were considered during the testing. In figure 1, A is the number of times the
model was repeated (number of generations/iterations). Initial Solution Size is the size of
the Population tested (thus the number of distinct schedules generated and tested per
generation/iteration). Table 1 shows the various scenarios created for testing the model
along these two dimensions; e.g. for the first test, A = 10 and Initial Solution Size = 2.
During the testing phase, 63 different scenarios were tested. Figure1 shows a cost curve
7
that was generated from the model testing. The data values for the cost surface presented
in Figure 1 are shown in Table 1.
Figure 1: Cost Curve
Table 1: Cost Curve Data:
Best Cost [R]
A
1-10 1-20 2-30 4-40 5-50 6-100 7-500 8-1000 9-10000
Initial Solution
Size
1-2 4480 4430 4470 4490 4500 4345 4330 4340 4295
2-4 4475 4405 4455 4475 4355 4430 4300 4340 4165
3-6 4430 4415 4395 4395 4390 4380 4370 4295 4270
4-10 4390 4390 4375 4420 4395 4330 4315 4295 4265
5-20 4370 4395 4380 4400 4335 4330 4295 4330 4210
6-50 4415 4375 4345 4365 4325 4325 4315 4270 4225
7-100 4355 4280 4305 4320 4340 4315 4300 4260 4225
Table 2 shows the CPU time recorded during the implementation of the various test
scenarios. Table 2 can be laid over Table 1 to determine better testing conditions. From
Figure 1, it can be seen that by repeating the model 10 000 times yields better results but
as the Initial Solution Size increase the computational time exponentially increases.
Thus, for further testing of the model the testing condition was selected as: Initial Solution
Size = 4 and A = 10 000, and it was repeated another 5 times. The purpose here is to test
the variation of the output parameters based on these input parameters. Figure 2 shows
the average population cost that was generated during the test. The figure shows that the
model does not vary much even though it is a Genetic Algorithm is a random search
technique. Figure 3 shows the best cost throughout the life cycle for each run. The figure
shows the best cost almost follows the same pattern every time. This shows the stability of
the model, with the difference between the cost attained after less than 100 iterations and
that attained between 9,000 and 10,000 iterations being less than 4 percent improvement,
suggesting the slight chance of it decreasing after the model repeated itself 9,000 times or
8
more. This gives suggests that there might be little benefit for longer runs of the model,
and that if the precision level desired is not too tight and there is time constraint on the
scheduler, a good solution is attainable under about 100 runs.
Table 2: Cost Curve Computational Time Data
Computation
Time [s]
A
1-10 2-20 3-30 4-40 5-50 6-100 7-500 8-1000 9-10000
Initial
Solution
Size
1-2 0.086 0.086 0.091 0.097 0.095 0.114 0.26 0.442 3.989
2-4 0.081 0.09 0.106 0.11 0.12 0.145 0.454 0.757 8.268
3-6 0.092 0.098 0.11 0.121 0.129 0.176 0.574 1.089 14.097
4-10 0.097 0.112 0.134 0.143 0.161 0.248 0.907 1.801 28.125
5-20 0.118 0.148 0.179 0.212 0.247 0.425 1.754 3.555 89.476
6-50 0.161 0.242 0.337 0.399 0.492 0.89 4.404 10.599 540.12
7-100 0.248 0.407 0.57 0.724 0.901 1.738 10.402 27.888 2396.206
Figure 2: Average cost distribution
3.1.2 Performance in comparison to selected heuristics
The performance of the solution sequence from Generic Algorithm was further tested
against the results obtained from using different dispatch rules. The GA solution was first
tested against the EDD (Earliest Due Date) rule. The rule is only concerned with the due
dates of each order and it schedules according to that. The second rule tested was the SPT
(Shortest Processing Time) rule. This rule schedules the smaller orders first. Unfortunately,
the larger orders are shifted to the back and become very long overdue. The third rule that
was tested was the LPT (Largest Processing Time). This model schedules the larger orders
first and should have a tendency to increase utilisation of machine. This can cause some
smaller orders to wait very long and become overdue. All of these models were tested
against the solution obtained from the Genetic Algorithm model, and the EDD Model has so
far proven to be better in terms of minimising tardiness and the effect on the overall cost,
while the shortest processing time model is better in terms of the average job completion
time. This is to be expected in that each of these dispatch rules focuses only on one
parameter and generally ignores the other dimensions. This suggests that the genetic
Reynard Arlow Final Year Project
Reynard Arlow Final Year Project

Contenu connexe

Tendances

Pressure Vessel Selection Sizing and Troubleshooting
Pressure Vessel Selection Sizing and Troubleshooting Pressure Vessel Selection Sizing and Troubleshooting
Pressure Vessel Selection Sizing and Troubleshooting Karl Kolmetz
 
Paul Ebbs (2011) - Can lean construction improve the irish construction industry
Paul Ebbs (2011) - Can lean construction improve the irish construction industryPaul Ebbs (2011) - Can lean construction improve the irish construction industry
Paul Ebbs (2011) - Can lean construction improve the irish construction industryPaul Ebbs
 
Software Arquitecture
Software ArquitectureSoftware Arquitecture
Software ArquitecturePedro Avila
 
C++ Templates, 2nd edition
C++ Templates, 2nd editionC++ Templates, 2nd edition
C++ Templates, 2nd editionIT Books
 
Application of the Strategic Management Theories in Uber Bangladesh
Application of the Strategic Management Theories in Uber BangladeshApplication of the Strategic Management Theories in Uber Bangladesh
Application of the Strategic Management Theories in Uber BangladeshPantho Sarker
 
CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445Amit Ramji ✈
 
MEng Report Merged - FINAL
MEng Report Merged - FINALMEng Report Merged - FINAL
MEng Report Merged - FINALAmit Ramji ✈
 
Tutorial guide
Tutorial guideTutorial guide
Tutorial guidenicobrain
 
IMechE Report Final_Fixed
IMechE Report Final_FixedIMechE Report Final_Fixed
IMechE Report Final_FixedAmit Ramji ✈
 
FATKID - A Finite Automata Toolkit - NF Huysamen
FATKID - A Finite Automata Toolkit - NF HuysamenFATKID - A Finite Automata Toolkit - NF Huysamen
FATKID - A Finite Automata Toolkit - NF HuysamenNico Huysamen
 
Final Thesis - Mitch Slack 17220213
Final Thesis - Mitch Slack 17220213Final Thesis - Mitch Slack 17220213
Final Thesis - Mitch Slack 17220213Mitch Slack
 
Deployment guide series ibm tivoli workload scheduler v8.4 and ibm tivoli dyn...
Deployment guide series ibm tivoli workload scheduler v8.4 and ibm tivoli dyn...Deployment guide series ibm tivoli workload scheduler v8.4 and ibm tivoli dyn...
Deployment guide series ibm tivoli workload scheduler v8.4 and ibm tivoli dyn...Banking at Ho Chi Minh city
 
QAD Database Definitions Technical Reference - QAD2013.1EE
 QAD Database Definitions Technical Reference - QAD2013.1EE QAD Database Definitions Technical Reference - QAD2013.1EE
QAD Database Definitions Technical Reference - QAD2013.1EEVinh Nguyen
 
Efficient Model-based 3D Tracking by Using Direct Image Registration
Efficient Model-based 3D Tracking by Using Direct Image RegistrationEfficient Model-based 3D Tracking by Using Direct Image Registration
Efficient Model-based 3D Tracking by Using Direct Image RegistrationEnrique Muñoz Corral
 

Tendances (20)

Pressure Vessel Selection Sizing and Troubleshooting
Pressure Vessel Selection Sizing and Troubleshooting Pressure Vessel Selection Sizing and Troubleshooting
Pressure Vessel Selection Sizing and Troubleshooting
 
Paul Ebbs (2011) - Can lean construction improve the irish construction industry
Paul Ebbs (2011) - Can lean construction improve the irish construction industryPaul Ebbs (2011) - Can lean construction improve the irish construction industry
Paul Ebbs (2011) - Can lean construction improve the irish construction industry
 
Software Arquitecture
Software ArquitectureSoftware Arquitecture
Software Arquitecture
 
C++ Templates, 2nd edition
C++ Templates, 2nd editionC++ Templates, 2nd edition
C++ Templates, 2nd edition
 
Master thesis
Master thesisMaster thesis
Master thesis
 
Application of the Strategic Management Theories in Uber Bangladesh
Application of the Strategic Management Theories in Uber BangladeshApplication of the Strategic Management Theories in Uber Bangladesh
Application of the Strategic Management Theories in Uber Bangladesh
 
Shu thesis
Shu thesisShu thesis
Shu thesis
 
CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445
 
Thats How We C
Thats How We CThats How We C
Thats How We C
 
MEng Report Merged - FINAL
MEng Report Merged - FINALMEng Report Merged - FINAL
MEng Report Merged - FINAL
 
Tutorial guide
Tutorial guideTutorial guide
Tutorial guide
 
IMechE Report Final_Fixed
IMechE Report Final_FixedIMechE Report Final_Fixed
IMechE Report Final_Fixed
 
10.1.1.652.4894
10.1.1.652.489410.1.1.652.4894
10.1.1.652.4894
 
FATKID - A Finite Automata Toolkit - NF Huysamen
FATKID - A Finite Automata Toolkit - NF HuysamenFATKID - A Finite Automata Toolkit - NF Huysamen
FATKID - A Finite Automata Toolkit - NF Huysamen
 
Final Thesis - Mitch Slack 17220213
Final Thesis - Mitch Slack 17220213Final Thesis - Mitch Slack 17220213
Final Thesis - Mitch Slack 17220213
 
Deployment guide series ibm tivoli workload scheduler v8.4 and ibm tivoli dyn...
Deployment guide series ibm tivoli workload scheduler v8.4 and ibm tivoli dyn...Deployment guide series ibm tivoli workload scheduler v8.4 and ibm tivoli dyn...
Deployment guide series ibm tivoli workload scheduler v8.4 and ibm tivoli dyn...
 
Master_Thesis
Master_ThesisMaster_Thesis
Master_Thesis
 
QAD Database Definitions Technical Reference - QAD2013.1EE
 QAD Database Definitions Technical Reference - QAD2013.1EE QAD Database Definitions Technical Reference - QAD2013.1EE
QAD Database Definitions Technical Reference - QAD2013.1EE
 
Offshore structures
Offshore structuresOffshore structures
Offshore structures
 
Efficient Model-based 3D Tracking by Using Direct Image Registration
Efficient Model-based 3D Tracking by Using Direct Image RegistrationEfficient Model-based 3D Tracking by Using Direct Image Registration
Efficient Model-based 3D Tracking by Using Direct Image Registration
 

Similaire à Reynard Arlow Final Year Project

Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...Artur Filipowicz
 
QBD_1464843125535 - Copy
QBD_1464843125535 - CopyQBD_1464843125535 - Copy
QBD_1464843125535 - CopyBhavesh Jangale
 
Aidan_O_Mahony_Project_Report
Aidan_O_Mahony_Project_ReportAidan_O_Mahony_Project_Report
Aidan_O_Mahony_Project_ReportAidan O Mahony
 
SocioTechnical-systems-sim
SocioTechnical-systems-simSocioTechnical-systems-sim
SocioTechnical-systems-simRub Afonso
 
UCHILE_M_Sc_Thesis_final
UCHILE_M_Sc_Thesis_finalUCHILE_M_Sc_Thesis_final
UCHILE_M_Sc_Thesis_finalGustavo Pabon
 
UCHILE_M_Sc_Thesis_final
UCHILE_M_Sc_Thesis_finalUCHILE_M_Sc_Thesis_final
UCHILE_M_Sc_Thesis_finalGustavo Pabon
 
Reading Materials for Operational Research
Reading Materials for Operational Research Reading Materials for Operational Research
Reading Materials for Operational Research Derbew Tesfa
 
Coding interview preparation
Coding interview preparationCoding interview preparation
Coding interview preparationSrinevethaAR
 
ImplementationOFDMFPGA
ImplementationOFDMFPGAImplementationOFDMFPGA
ImplementationOFDMFPGANikita Pinto
 
Optimal decision making for air traffic slot allocation in a Collaborative De...
Optimal decision making for air traffic slot allocation in a Collaborative De...Optimal decision making for air traffic slot allocation in a Collaborative De...
Optimal decision making for air traffic slot allocation in a Collaborative De...Stefano Pacchiega
 
Im-ception - An exploration into facial PAD through the use of fine tuning de...
Im-ception - An exploration into facial PAD through the use of fine tuning de...Im-ception - An exploration into facial PAD through the use of fine tuning de...
Im-ception - An exploration into facial PAD through the use of fine tuning de...Cooper Wakefield
 
Dimensional modelling sg247138
Dimensional modelling sg247138Dimensional modelling sg247138
Dimensional modelling sg247138Sourav Singh
 

Similaire à Reynard Arlow Final Year Project (20)

Agathos-PHD-uoi-2016
Agathos-PHD-uoi-2016Agathos-PHD-uoi-2016
Agathos-PHD-uoi-2016
 
Agathos-PHD-uoi-2016
Agathos-PHD-uoi-2016Agathos-PHD-uoi-2016
Agathos-PHD-uoi-2016
 
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
 
Thesis_Report
Thesis_ReportThesis_Report
Thesis_Report
 
QBD_1464843125535 - Copy
QBD_1464843125535 - CopyQBD_1464843125535 - Copy
QBD_1464843125535 - Copy
 
Aidan_O_Mahony_Project_Report
Aidan_O_Mahony_Project_ReportAidan_O_Mahony_Project_Report
Aidan_O_Mahony_Project_Report
 
SocioTechnical-systems-sim
SocioTechnical-systems-simSocioTechnical-systems-sim
SocioTechnical-systems-sim
 
diss
dissdiss
diss
 
UCHILE_M_Sc_Thesis_final
UCHILE_M_Sc_Thesis_finalUCHILE_M_Sc_Thesis_final
UCHILE_M_Sc_Thesis_final
 
UCHILE_M_Sc_Thesis_final
UCHILE_M_Sc_Thesis_finalUCHILE_M_Sc_Thesis_final
UCHILE_M_Sc_Thesis_final
 
Reading Materials for Operational Research
Reading Materials for Operational Research Reading Materials for Operational Research
Reading Materials for Operational Research
 
document
documentdocument
document
 
Fraser_William
Fraser_WilliamFraser_William
Fraser_William
 
Coding interview preparation
Coding interview preparationCoding interview preparation
Coding interview preparation
 
energia
energiaenergia
energia
 
ImplementationOFDMFPGA
ImplementationOFDMFPGAImplementationOFDMFPGA
ImplementationOFDMFPGA
 
Optimal decision making for air traffic slot allocation in a Collaborative De...
Optimal decision making for air traffic slot allocation in a Collaborative De...Optimal decision making for air traffic slot allocation in a Collaborative De...
Optimal decision making for air traffic slot allocation in a Collaborative De...
 
Oezluek_PhD_Dissertation
Oezluek_PhD_DissertationOezluek_PhD_Dissertation
Oezluek_PhD_Dissertation
 
Im-ception - An exploration into facial PAD through the use of fine tuning de...
Im-ception - An exploration into facial PAD through the use of fine tuning de...Im-ception - An exploration into facial PAD through the use of fine tuning de...
Im-ception - An exploration into facial PAD through the use of fine tuning de...
 
Dimensional modelling sg247138
Dimensional modelling sg247138Dimensional modelling sg247138
Dimensional modelling sg247138
 

Reynard Arlow Final Year Project

  • 1. BPJ 420 Final Report Single machine production scheduling with sequence dependant setup times at an Aluminium powder coating plant Reynard Arlow Industrial & Systems Engineering U 13002679 Project Mentor: Dr Olufemi Adetunji September 28, 2016
  • 2. DEPARTEMENT BEDRYFS- EN SISTEEMINGENIEURSWESE DEPARTMENT OF INDUSTRIAL AND SYSTEMS ENGINEERING VOORBLAD VIR INDIVIDUELE WERKOPDRAGTE - 2016 FRONT PAGE FOR INDIVIDUAL ASSIGNMENTS - 2016 Persoonlike besonderhede / Personal details Studentenommer Student number Voorletters en van Initials and surname Titel Title Selnommer Cell number Werkopdrag / Assignment Modulekode Module Code Werkopdragnommer Assignment number Onderwerp Subject Dosent Lecturer Datum Date Verklaring / Declaration 1. Ek begryp wat plagiaat is en is bewus van Universiteitsbeleid in hierdie verband 2. Ek verklaar dat hierdie my eie oorspronklike werk is 3. Waar iemand anders se werk gebruik is (hetsy uit 'n gedrukte bron, die internet of enige ander bron), is dit behoorlik erken en die verwysings ooreenkomstig departementele vereistes gedoen 4. Ek het nie 'n ander student se vorige werk gebruik en as my eie ingedien nie 5. Ek het niemand toegelaat en sal niemand toelaat om my werk te kopieer met die doel om dit as sy of haar eie werk voor te hou nie 1. I understand what plagiarism is and I am aware of the University's policy in this regard. 2. I declare that this is my own original work 3. Where other people's work has been used (either from a printed source, internet or any other source) this has been carefully acknowledged and referenced in accordance with departmental requirements 4. I have not used another student's past work to hand in as my own 5. I have not allowed and will not allow, anyone to copy my work with the intention of handing it in as his/her own work Handtekening Signature Datum van inhandiging Date of submission Kantoorgebruik / For office use: Dosent Lecturer Kommentaar / Comments: Uitslag Result Datum Date 13002679 R Arlow Mnr 084 059 45 99 BPJ 420 Single Machine Production Scheduling Dr Olufemi Adetunji 2016 - 09 - 28 2016 - 09 -28 ReynardArlow
  • 3. Executive Summary Wispeco Aluminium is the top aluminium extrusion company in Africa and is competing to be the best Powder coating company in Africa as well.Wispeco Aluminium opened their doors in the 1920’s and they are still producing to this day. This document starts off with the aim of the project and how the student will approach the problem. After the outlines of the project was established, literature was done in relation to the problem experienced at Wispeco Aluminium, which is in this case a Single Machine Scheduling Problem (SMSP) with sequence dependent setup times. The literature shows the various ways in which previous articles addressed this type of problem. This literature was used to develop a new method to address the problem atWispeco’s. After the Literature Review and the Problem Investigation a concept model was designed. This model was tested and it evolved into the solution model presented at the end of the project. The concept model and the solution model do differ significantly. The heuristic technique chosen for the project was a Genetic Algorithm Search technique. Although the model was applied in a very different manner. The base of the model will be that of a random search technique, but the steps followed will be that of a Genetic Algorithm. This solution model was tested against various other scheduling techniques to determine the stability and validity of the model. At the end the project turned out to be more of a Research Project than an improvement project, although this technique can be applied in Wispeco Aluminium. Throughout the project ECSA and BPJ 420 standards were followed to provide a well stated project conforming to the requirements. [Please note that this work has been sent for Academic Publication. The article is now being reviewed. Please find the article submitted for publication in Appendix F] ii
  • 4. Abbreviations and Definitions Abbreviation Description TSP Traveling Salesperson Problem GA Generic Algorithm SA Simulated Annealing PSO Particle Swarm Optimization ACO Ant Colony Optimization GP Genetic Programming TS Tabu Search GA Genetic Algorithm AI Artificial Intelligence SPT Shortest Processing Time WSPT Weighted Shortest Processing Time EDD Earliest Due Date WEDD Weighted Earliest Due Date JSSP Job Shop Scheduling Problem JSP Job Shop Problem RCPSP Resource Constrained Project Scheduling Problem Table 1: Abbreviations iii
  • 5. Contents Executive Summary ii List of Figures v List of Tables vi I 1 1 Background & Introduction 1 1.1 Company Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Project Aim/Rational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Project Approach, Scope & Deliverables . . . . . . . . . . . . . . . . . . . . 3 1.4.1 Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4.3 Deliverables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 II 5 2 Literature Review & Problem Investigation 5 2.1 Single Machine Scheduling Problem (SMSP) . . . . . . . . . . . . . . . . . . 5 2.2 Sequence Dependent Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3.1 Simulated Annealing . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3.2 Particle Swarm Optimization . . . . . . . . . . . . . . . . . . . . . . 9 2.3.3 Ant Colony Optimization . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3.4 Genetic Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.3.5 Tabu Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4 Problem Investigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.4.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.4.2 Current planning process . . . . . . . . . . . . . . . . . . . . . . . . . 14 III 15 3 Data Analysis & Concept Design 15 3.1 Plant Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2 Model Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.3 Conceptual Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.3.1 Concept Model Introduction . . . . . . . . . . . . . . . . . . . . . . . 18 3.3.2 Algorithm development in MATLAB . . . . . . . . . . . . . . . . . . 19 IV 21 iv
  • 6. 4 Solution 21 4.1 Solution Model Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3 Model Design in MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.3.1 Model Pseudo Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.3.2 Model Pseudo Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.4 Solution Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4.1 Model Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4.2 Solution Model vs. Other Models . . . . . . . . . . . . . . . . . . . . 30 4.5 Proposed Cost Savings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.6 Future Solution Model Development . . . . . . . . . . . . . . . . . . . . . . 31 5 Conclusion 31 Appendix A: Industry Sponsorship form 34 Appendix B: Data Analysis 36 Appendix C: Model Validation Data 37 Appendix D: Solution Model Testing 39 Appendix E: Solution Model vs. Other Models Data 40 Appendix F: Article submitted for publication 41 List of Figures 1 Simulated Annealing algorithmic approach . . . . . . . . . . . . . . . . . . . 9 2 PSO algorithmic approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3 ACO algorithmic approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4 PreSchedule file created by TOPP system . . . . . . . . . . . . . . . . . . . 15 5 Daily production for the Parow plant . . . . . . . . . . . . . . . . . . . . . . 16 6 Colour changes per day for Parow . . . . . . . . . . . . . . . . . . . . . . . . 16 7 Order size distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 8 GA Solution Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 9 Cost Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 10 Time Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 11 Average Population Cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 12 Best Cost Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 14 Repeating Various Initial Solution Sizes 10,000 times . . . . . . . . . . . . . 39 List of Tables 1 Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 2 Operations of Wispeco Aluminium . . . . . . . . . . . . . . . . . . . . . . . 1 3 Complexity growth for polynomial and exponential algorithms . . . . . . . . 8 v
  • 7. 4 Sample input data for model . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5 Sample setup time matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6 Example of a Binary Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 7 Before Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 8 After Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 9 Example of a Possible Population Generated . . . . . . . . . . . . . . . . . . 23 10 m Populations with their corresponding costs . . . . . . . . . . . . . . . . . 23 11 Reference guide for Figures 9 and 10 . . . . . . . . . . . . . . . . . . . . . . 26 12 Best Cost Data for Figure 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 13 Computational Time Data for Figure 10 . . . . . . . . . . . . . . . . . . . . 28 14 Various test conditions with A = 10,000 . . . . . . . . . . . . . . . . . . . . 28 15 Best Costs and Jobs Overdue for various different models . . . . . . . . . . . 30 16 Data for Best Cost and Computational time testing (1) . . . . . . . . . . . . 37 17 Data for Best Cost and Computational time testing (2) . . . . . . . . . . . . 38 vi
  • 8. Part I 1 Background & Introduction 1.1 Company Background Wispeco was established in 1920. They first produced Nails, Diamond Mesh, Fencing, Gates and Wire Screening from 1920 - 1950’s. In the early 1930s they entered the market for architectural Steel windows and doors and were active until the mid 1980’s. In 1960 they started with architectural Aluminium products to date. In 1981 the MD and five of his directors/managers died in an airplane accident. A few years later, Remgro Ltd introduced new management staff from the outside due to a lack of good internal management. The structure of the company was rearranged to ensure the ongoing of the company. Unfortunately 80% of the workers were retrenched, with most of these being office personnal. Today Wispeco is successful and a leading company in its domain. They are the leading extrusion company in Africa. After the introduction of a new vertical plant for powder coating they are competing, to be the leading extrusion powder coating company in Africa. Since their success after the restructuring, the company has managed to spread out to three different locations across South Africa. These three plants are situated in Alberton, Parow and Vereeniging. Alberton is also where the main offices and management are situated. Plant Operations Quantity Alrode (Alberton) Scrap receiving 1 Re-melt & billet casting 2 Hydraulic extrusion press 6 Die shop 1 Powder coating department 1 Anodizing department 1 Stockist warehouse 1 Parow (Cape Town) Scrap receiving 1 Hydraulic extrusion press 1 Powder coating department 1 (2) South (Vereeniging) Hydraulic extrusion press 1 Table 2: Operations of Wispeco Aluminium In 1992 Wispeco erected a powder coating plant in Epping (Cape Town) as well as an Anodizing plant. A few years ago due to economic reasons they had to shut down the Anodizing plant and relocate the powder coating plant to its current location in Parow. This project is conducted in the powder coating department in Parow for Wispeco Aluminium. 1
  • 9. 1.2 Introduction A few years ago Wispeco was under a lot of strain to stay afloat due to the economic crisis in 2008/9. They had to compete with countries such as China and Europe. The effect was that Wispeco Aluminium lost a big portion of their work to other countries, due to a weakened rand. Larger plants like Alrode, managed to pull through this crisis more easily than smaller plants such as Parow. Still to this day the plant in Parow experience a lot of resistance especially with the South African market opening up to foreign businesses. Unfortunately the financial statements of the Parow plant shows discouraging news, from both the Extrusion and Powder coating departments. Various projects have been undertaken in the Extrusion department to reduce costs and to look at an increase in efficiency. For this project the focus was on the powder coating department and the systems regarding several operations. There are also other projects running within this department to reduce costs and increase efficiency. Currently the plant consists of: Two Hydraulic presses (which will be reduced to one later this year as determined by previous projects), one scrap receiving department, one pre-treatment line (part of Powder coating) and then two Powder coating lines. Due to the high overhead costs the Parow plant projects were undertaken to reduce these costs. As a result of one of these projects, Parow’s two powder coating lines will be reduced to one. In addition, at the end of this year there will be a change in the shift system. This reduces the number of machines operating to one. The machine will be operating twelve hours a day, seven days a week. Due to reduction in the number of Powder coating lines, the planning/scheduling of production for the powder coating line have been identified for improvement. Planning is still done manually on a regular basis depending on the arrival of work. Planning now needs to be done daily, or upon arrival of new work. This problem can now be seen as a SMSP (single machine scheduling problem) with setup dependent times and due dates. Various projects have been undertaken by various sectors, and the material regarding solving such problems is freely available. This project was identified because of market sensitivity to lead time. Wispeco ensures that the powder coating supplied conforms to the highest requirements and that they carry the mark of SANS 1796: 2008. Unfortunately, their market in Cape Town is much more sensitive to lead time and total make span of work, than the quality supplied by Wispeco. Customers switched to other suppliers, because competitors could supply work faster albeit a lower quality. Wispeco needs to supply service faster, but still at a higher quality than competition. Inefficient planning/scheduling leads to increased lead time, which dissatisfies customers. ”Customers may forget what you said but they’ll never forget how you made them feel. ” Unknown 2
  • 10. 1.3 Project Aim/Rational The aim of the project is to achieve an optimal or near optimal method to schedule work so that the least amount of orders are delivered past their due dates. Thus scheduling work for minimum lead time and make span, but still at an affordable cost to Wispeco. The scheduling will also try and keep the finished goods inventory as low as possible. Together with the low finished goods inventory, a customer’s work will not become damaged after the powder coating is applied. The project wants to address the mixing of orders due to the facility layout and also prevent human intervention, such as favouring certain orders above others when production is planned. The goal is to complete orders within the promised completion time (Due Date) and still fulfil customer requirements regarding quality etc. Distinction should not be made between important and less important customers. All customers are important, however, some work may carry a greater priority, which will be taken into account. Desired objectives include: • Creating a method to plan an optimal or at least near optimal production schedule. • Minimizing the total make span of the work. • Meet customer requirements regarding lead time and quality. • Allow the method of scheduling to deliver an optimal change over schedule. • To minimize human intervention. • To establish a standard operating procedure for scheduling production. • To implement a system easy to use. 1.4 Project Approach, Scope & Deliverables 1.4.1 Approach The project will start off with in depth literature review of production scheduling and the different techniques related to such problems experienced in various industries. The literature review will look at the nature of these techniques and how they work. The decision will then be to choose the technique best suited and modify the technique for the specific problem. After selecting the preferred method, the reason will be stated and then used to provide a concrete argument on the technique used. 1.4.2 Scope This project will take place in the powder coating plant of Wispeco’s Parow plant. A description of the current production scheduling process will be provided together with the improved process. The current process will be dissected and each step will be analysed to understand the process and spot various improvement opportunities. Information of different scheduling techniques obtained from the literature review will be used to construct a model, to improve the opportunities identified after analysis of the process. The model will be created in MATLAB. 3
  • 11. A heuristic approach will be used for the development of the model. Several different techniques for a heuristic approach will be discussed in the next section. Some aspects have to be excluded from the project, these include: • The methods they use to hang the profiles on the conveyor (Different methods change the utilization of the machine). • The type of powder they use. • The storage of these aluminium profiles (painted and unpainted). • The individual machines (All the machines are seen as one, because there is only one of each and each profile needs to go through the process sequentially). As with any other project this project also has some limitations. The limitations are: • The processing time of the model to find an optimal or near optimal schedule. • The number of orders the model can handle to find a solution within a reasonable time frame. 1.4.3 Deliverables Deliverables include: 1. A newly developed model to schedule production. 2. An overview of the different models considered for the project. 3. A standard operating procedure document for the model (for the company). 4. Project documentation for the company as well as the university. 5. A detailed analysis of the model’s performance. 6. A presentation presenting the solution to the company as well as the University. 4
  • 12. Part II 2 Literature Review & Problem Investigation The following sections contain various tools and techniques used for production scheduling in different industries as well a description of the problem at hand. Different methodologies were researched and compared in order to obtain the best possible method for modelling the project. Various sources have been used to gather information. This part of the project will consist of two sections and each of these sections will be further divided into different subjects. The first section consists of various techniques that are available for use. The second section will contain the problem investigation. This investigation will decide which technique will be used and if a technique has to be developed specifically for this problem. The relationship between the problem and the technique will be highlighted and clearly indicated. 2.1 Single Machine Scheduling Problem (SMSP) For us to understand and develop solutions for multi-machine process scheduling one must first look at single machine scheduling. For this project the student will stay with single machine scheduling, but just so that you know where it fits in. Many companies have the problem of scheduling their work on only one machine as the capital, to gain another machine that may not be available or sometimes (in Wispeco’s case), it is financially better to reduce the number of machines, assuming that the scheduling is possible. Single machine scheduling problems state that only one machine is available for the processing of all the work. It doesn’t matter if the process consists of more than one procedure. If the procedures have to take place sequentially, the processes following the first process needs not be considered, because all the products need to follow the same process and all of them have to enter and exit the first process first. SMSP’s are sometimes theoretically seen as problems with a simple structure in comparison to other scheduling problems, although when observed from a practical point of view, these problems can become quite large when companies have to adapt to the single machine/set of machines. SMSP’s have been researched by quite a few people. (Sena Kir 2015) have done a very good article on single machine scheduling. Their environment was a dairy product production plant. Their sequence dependent SMSP with constraints such as the setup times are very similar to the problem found at Wispeco. Instead of different dairy products, Wispeco will be painting different colours and the spray booth needs to be cleaned. Please refer to (Biskup 1999) for an in depth study of Single Machine Scheduling. Basic sequencing rules that can be used in single machine scheduling are as follow: 1. Shortest Processing Time (SPT) - Shorter jobs are scheduled first. 2. Weighted Shortest Processing Time (WSPT) - Schedules in order of weighted shortest processing time (Each job is assigned a weight/priority beforehand). 3. Earliest Due Date (EDD) - Earlier due date jobs are scheduled first. 4. Weighted Earliest Due Date (WEDD) - Schedules in order of weighted earliest due date (Each job is assigned a weight/priority beforehand). 5
  • 13. 5. Largest Processing Time (LPT) - Larger jobs are scheduled first. 6. Weighted Largest Processing Time (WLPT) - Schedules in order of weighted largest processing time (Each job is assigned a weight/priority beforehand). The objective of this project will be discussed in the Conceptional Design section. The following lists provides the basic framework and notation for scheduling. The application of these parameters, variables and objectives will be discussed in the following sections. The notation used in this project will be the same as in the following pages, just to ensure that this project conforms to the common practice of scheduling projects. The notation used for the problem at Wispeco is (1|Sjk(i)| n−1 j=1 n k=j+1 γSjk + n j=1(αEj + βTj)) Notation n number of jobs m number of machines pij processing time of job j on machine i Cj completion time of job j wj weight/priority of job j dj due date of job j αj earliness penalty for job j βj tardiness penalty for job j Lj = Cj − dj lateness of job j Ej = |min(Lj, 0)| earliness of job j Tj = max(Lj, 0) tardiness of job j Uj = 1 ifCj > dj 0 otherwise lateness indicator of job j (α|β|γ) scheduling problem with the machine environment α, constraints and characteristics β, and the objective being γ Machine Environments α : The Machine Environment can also be seen as the Problem Environment. This field is concerned with the environment of the machine and or the flow pattern of jobs. In other words, how are the machines laid out and how many of each one is there, resources required and what processes can each machine handle etc. 1 one machine P or Pm identical parallel machines Q or Qm parallel machines with different speeds R or Rm unrelated parallel machines F or Fm flow shop: m machines in series: each job is processed on each machine in order J or Jm job shop: each job is processed on a job-dependent sequence of machines O or Om open shop: processing order of machines for each job is determined by the scheduler 6
  • 14. Constraints & Characteristics β : The constraints are the factors that have an influence on the execution of the jobs/scheduling. These include pre-emption, precedence relations, setup dependence etc. Pre-emption is when a job may be removed and completed at a later stage while precedence is when certain processes must first happen before a specific process can take place. rj non-trivial release times sjk(i) setup-times of a machine i between jobs j and k pmtn pre-emptions are allowed: a job may be removed from a machine mid process prec jobs have precedence constraints Objectives γ : This is considered as the objective of them model, what the user what out of the model. In the category objectives like minimum make span, minimum setup time, minimum cost, minimum tardiness and many more are found. n j=1 Cj sum of completion times n j=1 wjCj weighted sum of completion times n j=1 Tj sum of tardiness n j=1 wjCj weighted sum of tardiness Cmax = maxj{Cj} make span/schedule length Lmax = maxj{Lj} maximum lateness n j=1 Uj number of late jobs n j=1 wjUj weighted number of late jobs 2.2 Sequence Dependent Scheduling When Wispeco schedules work they need to take into account that between orders they need to change colours, the time taken to change the colours differs. Setup time is for example larger between white and black than between black and bronze. This plays an enormous role in the total setup time per day, which has an effect on the make span of the work. (Kır and Yazgan 2016) developed a fuzzy axiomatic design that takes penalty costs in consideration for a sequence dependent SMSP. Their problem was (1|Sjk| n j=1(αEj +βTj)). Their setup costs was taken into account as part of their processing times. (V´elez-Gallego, Maya, and Montoya-Torres 2016) used a beam search heuristic technique to develop a model for a single machine with release dates and sequence dependent setup times. Their objective was to minimize the total make span of the work. Their problem was defined as (1|rj, Sjk|Cmax). (Dayama et al. 2015) developed a History-dependent scheduling model. This model includes algorithms that can be used for scheduling with general precedence and sequence dependence. Instead of minimizing the total setup time(cost) or the make span, (Rubin and Ragatz 1995) developed a model that sequences jobs to minimize the total tardiness of jobs whose setups times are sequence dependent. For this model they used a Genetic Algorithm. 2.3 Heuristics Heuristic techniques have been used for a long time to solve difficult problems. When problems tend to be an optimization problem and the solving of an optimal value is difficult 7
  • 15. these heuristic methods have the ability to exploit the structure of the optimization problem to arrive at a good solution (Winston 2003). Note that it is a good solution and not always the best, as the time it would take to calculate the best solution, is not always reasonable, depending on the problem size. Classic problems where the application of heuristic techniques apply are those of the traveling salesperson problem (TSP). Heuristic approaches are used when the solving of an optimization problem would take an enormous amount of computational time to solve. If a problem can be optimally solved in polynomial time using efficient algorithms, and a powerful computer it is not considered hard to solve. However when there isn’t a polynomial algorithm for a problem, it is considered hard to solve and these problems are called nondeterministic (NP) class problems. Within the NP class problems several subsets of problems are identified as NP-complete problems (ibid.). If a problem requires a large amount of computational time it is considered as a NP-hard problem. If we can prove that an algorithm will converge to an optimal solution in a finite number of iterations, we also want to know how long it would take for this algorithm to solve (converge) various instances of the problem (ibid.). The complexity of the problem is displayed by O(nx ) where x = 1, 2, 3, ..., n = number of jobs and O = Order of time. Usually n can go up until 10, but by then the problem is so time consuming, that it is not feasible to solve. The moment the complexity becomes O(2n ) it is completely inefficient to try and solve because of the exponential growth of the problem. Table 3 shows how complexity, together with problem size, influences the computational time. Various different techniques are shown below: n 10 20 50 100 n2 100 400 2500 10000 n3 1000 8000 125000 1000000 n5 100000 3200000 312500000 10000000000 n10 10000000000 1.024E+13 9.76863E+16 1E+20 2n 1024 1048576 1.13E+15 1.27E+30 Table 3: Complexity growth for polynomial and exponential algorithms 2.3.1 Simulated Annealing In 1983 Kirkpatrick and co-workers introduced the method of Simulated Annealing (SA). The method is based on simulation of the annealing processes found when substance is heated above its melting point and then left to gradually cool down. This cooling process minimizes its total energy probability distribution. This is a beautiful example where nature finds the optimal crystal structure (Haupt 2004). In the article of (Bouleimen and Lecocq 2003) they use Simulated Annealing for a job shop scheduling problem (JSSP). They prove how their algorithm converges to a global minimal solution despite the fact that the Markov chains they generated are generally not irreducible. This algorithm begins with random guesses of variable values in the cost function. After the first step the algorithm follows a set of predetermined rules to decrease the cost function as far as possible. Figure 1 shows the approach used with SA. (Anonymous n.d.) 8
  • 16. Figure 1: Simulated Annealing algorithmic approach 2.3.2 Particle Swarm Optimization In 1995 Edward and Kennedy formulated Particle Swarm Optimization (PSO). Social behaviour such as schools of fish or bird flocking inspired the PSO thought process. PSO works in a very similar way than continuous Generic Algorithm in that it starts with a random population matrix (Haupt 2004). However PSO does not contain operators such as crossover and mutation.The rows in these matrices are called particles hence the term particle swarm optimization. These particles contain variable values which are not binary. The cost function is a surface on which these particles move about with a velocity. Particles update their positions and velocities based on best local and global solutions. Using a PSO approach will enable the user to tackle tough cost functions with more than one local minimum. In the article of (Sha and Hsu 2006) they tailored their particle position, movement and velocity to fit their job shop problem (JSP). Figure 2 shows a PSO approach (Patnaik 2012). 9
  • 17. Figure 2: PSO algorithmic approach 2.3.3 Ant Colony Optimization Ants seem to have the ability to always find the shortest path to their food. This is achieved by a pheromone which they lay down as they walk. Other ants then find this trail and follows it to the food source. Each time an ant walks on this path they also lay down a pheromone trail. As the shortest path becomes more travelled, the pheromone trail gets stronger and more ants follow that path again (Haupt 2004). At first Ant Colony Optimization (ACO) algorithms were developed to optimize TSP’s, because of its close resemblance to the ants that are trying to find the shortest path. The ACO approach for a TSP begin with a number of ants/agents that follow a path around the cities. Each agent lays its own pheromone trail as it travels along its path. The agents are at first randomly assigned to a city. The next destination is usually decided upon by using a weighted probability that is a function of its pheromone trail strength, and the distance to the next destination. A factor for pheromone evaporation is built assigned to the model to 10
  • 18. dispose of the trails that are less travelled, otherwise the model will still see them as good solutions. The pheromone along the best possible route is described per function which depends on the problem and user. This function is then used to decide on the model criteria and when the model should stop. (Merkle, Middendorf, and Schmeck 2002) used ACO for a RCPSP in their article. This will however not be used in this project because this project does not have constraints to resources. (Huang and Liao 2008) displayed a very interesting article on how they combined ACO together with TS to solve a classic Job Shop Scheduling Problem (JSSP). Figure 3 shows an ACO approach (Khurshid and Shah 2011). Figure 3: ACO algorithmic approach 2.3.4 Genetic Search Genetic algorithms (GA) belongs to the class of AI (Artificial Intelligence) techniques. Organisms have biologically evolved over many years to survive and thrive in nature. Survival of the fittest and the process of natural selection are considered important aspects in the process of evolution. GA works are based on the process of evolution. GA’s uses popular ideas of biology such as: Chromosome population, mating selection, producing offspring through crossover techniques, and mutation to ensure diversity in the population. The starting point for a GA is the initial population. Once the initial population is generated GA techniques can be applied to solve the problem and arrive at a good solution (Winston 2003). GA’s start of by randomly generating the initial population. Strings in the initial population represent possible solutions for the problem. Each solution is calculated and evaluated using a predetermined fitness function. A new population is then generated using the initial 11
  • 19. population function and then these populations are mated with the strongest populations from the previous population generation. The populations that are used in the mating process are chosen by the fitness function. The higher a population’s fitness the more likely it is that population will be chosen to reproduce. Advantages of the Genetic Algorithm include: • The fitness function that evaluates solutions doesn’t need to be linear, differential or even Continuous. • The parameters (initial population, fitness function, mutation rate and breeding method) of the approach are all under the control of the user. • GA’s works on more than one solution at a time. The conventional GA algorithm process is as follow: Step 1: Generation. Starting off by generating an initial population of choice (random or not). The population size is usually determined by a value of n. Step 2: Evaluation. Each solution is measured using a fitness function determined beforehand. If a solution is in feasible, it is penalized. Step 3: Selection. Choosing probabilistic from the current solution the parents for the generation of the new population. The parents/solutions with a higher or better fitness stands a better chance to be chosen for reproduction. Step 4: Reproduction. The parents are used to generate a new population that contains a portion of each parent. Step 5: Mutation. The genetic makeup of the offspring are randomly altered to avoid reaching a local optima. Thus the offspring are now the new generation/populations of solutions. Step 6: Repeat. Repeat steps 2-5 until stopping criteria is met or if an optimum is reached. (Goncalves 2005) have a very good article on Genetic Algorithms. This article also has a lot in common with this project, whereas it searches for a local best and then tries to improve that solution. For more information on Genetic Algorithms please refer to (Davis 1991). 2.3.5 Tabu Search The heuristic procedure based on strategies that are used in intelligent decision making, also known as Tabu Search(TS), was developed in 1986 by a fellow by the name of Glover. Tabu search is not a process that imitates any natural processes such as Simulated Annealing or Genetic search, but rather makes use of memory (Winston 2003). This process consists of short and long term memory properties that helps the algorithm to calculate the best possible solution. The short term memory helps the model to avoid circling around local neighbourhoods, whereas the long term memory helps the model to conduct searches for solutions in locations that previously prevailed promising results. Although Tabu Search algorithms sound simple, they can become quite difficult because of the memory function they possess. The following steps that present the procedure for a Tabu Search algorithm were extracted from (ibid.): 12
  • 20. 1. Start off with an initial solution x0 and an elite list of candidates 1 . Set tabu criteria, tenure, list size and the short term memory iteration count n. 2. From the elite list of candidates, pick one (any method). 3. Create the short term memory candidate list and set the count = 0. 4. While (count <= n), do Create a move from the candidate list to create a solution xcount from xcurrent If the solution satisfies the tabu criteria test: Create tabu evaluation Else If aspirations test is not met: Create penalized tabu evaluation Else create tabu evaluation End If End If If xcount is best move so far, xbest = xcurrent Update counter by 1 End while 5. If elite list has more candidates, go to step 3 6. Report best solution For a detailed project regarding the Tabu search please refer to (Dell’Amico and Trubian 1993). They use a Tabu search algorithm for a Job Shop Scheduling Problem (JSSP). 2.4 Problem Investigation 2.4.1 Problem As mentioned in previous sections, Wispeco’s Parow plant is undergoing many changes to try and save the plant. One of these changes is to reduce the number of powder coating lines from two to one. The remaining powder coating line will not be kept as is. There is a separate project that tackles the redesign and to improve the capacity of this line. For this project the student assumes that the project regarding the efficiency of the powder coating line is finished. The core of this project lies within the fact that the company is now reducing the number of machines they have available for production. Previously they used one machine for the larger orders, which usually entailed colours such as white, charcoal, bronze and black. The other machine was used for the smaller orders with unusual colours such as grey, yellow, blue etc. This made the planning process a bit easier from the schedulers point of view, although the planning schedule was still not the optimal schedule. The schedule was developed by one person’s intuition and if that person was not available anymore, the whole planning process was changed to the insight of the new person. They now have to schedule all of the work on one machine, and with an average of 100 orders per day, this problem can become quite complex. With a predetermined set of rules to follow for scheduling this can be easier, and with a model that automatically follows these rules this can become much easier. The process which each Aluminium profile follows is as follow: 1 Gathered from Preliminary studies or history, for the long term memory use 13
  • 21. 1. Delivered by customer with own fleet or received from the hydraulic press. (If customers do not have their own material they can order from the press, which will be sent to powder coating after production). 2. The material is then received by the powder coating department. 3. Orders are packed inside Pre-Treatment skips (These skips are made of a special material that can handle the Pre-Treatment chemicals). 4. The skips are put through the Pre-Treatment process. 5. After Pre-Treatment the profiles are powder coated. 6. When painted profiles are cooled down it will be wrapped in plastic. 7. The profiles are then stored in the warehouse, ready to be either collected or delivered. 2.4.2 Current planning process The current planning scheduling process for Wispeco’s powder coating department entails: 1. If the work is received from the Press department: The office clerk creates an invoice, for the press department, for the material received and takes the job card. Else if the customer brings his/her own work: The customer is invoiced and a job card is created. 2. After material is received the scheduler allocate the material to the warehouse. This is done by taking the job cards and entering it into TOPP (TOPP is the ERP system they are using). 3. After the job cards are entered into the system a PreSchedule.xls file is created. The file shows the product number, order number, colour, quantity, amount of square meters to be sprayed as well the due date. Figure 4 shows an example of the PreSchedule file. 4. This file is then used to schedule the work. Their motto for scheduling is ”Schedule according to the big work”. In other words, they rearrange the PreSched file so that the work with the longer processing times/more square meters are done first. 5. The scheduling takes place on two machines currently. Please refer to the first paragraph of Problem Investigation. 6. After scheduling has taken place they print a sheet showing the order in which the work should be done. 7. Finally the job cards are then placed back into the skips so that floor managers know the colour, client etc. Following this procedure of scheduling we can see that it is easy for a customer’s work to get behind schedule. The reason for this planning, is to increase machine efficiency, longer runs mean less downtime. Unfortunately, customers do not pay for an efficient machine. They pay for their work to be done on time. 14
  • 22. Figure 4: PreSchedule file created by TOPP system Part III 3 Data Analysis & Concept Design The data that is going to be used in this project, has already been gathered. The project does not rely on lots of data, but rather a sample that will be used inside the model upon development. This sample data, however, contains most of the variations that can be observed in the data, so that all variations are tested in the model design phase. The data that will be used in the project is very much the same as the data they currently use. 3.1 Plant Data Several aspects were considered when the data was taken for this project. The most important one was the Daily production of the Parow plant. Figure 5 shows the distribution of the daily production. With this new model we would like to increase the daily production by simply just organizing the way in which we do our work. 15
  • 23. Figure 5: Daily production for the Parow plant Another important area was to look at the number of colour changes per day that they are performing. Figure 6 shows the distribution of the colour changes. The average is around five colour changes per day, but sometimes this rises to 15. This is the effect of improper planning. This happens when small orders are not scheduled as they arrive, because they put big orders first, and are then left until the customer starts calling etc. On days like this they have to do a lot of small orders and between each order a colour change. They even sometimes change to the same colour twice a day. The order size distribution was also calculated, shown in figure 7, and it clearly states the fact that they have a lot of frequent small orders. Figure 6: Colour changes per day for Parow 16
  • 24. Figure 7: Order size distribution For more charts regarding the distribution of order sizes per colour please refer to Appendix B. 3.2 Model Data In section 2.4.2 we already looked at the PreShedule.xls file that they are using for their production scheduling currently. For the model the student will use the same data but only in another format. The PreSchedule.xls file presents data that are not of any use in the model, so to keep everything simple and organized this data will be removed. Table 4 shows an example of the input data that is going to be used in the model. This data will be extracted by the model via a text file that is created from the PreSched.xls file that is already generated by the ERP system. Order number Colour m2 Processing time [Min] Due date G16MAR PCR5 20.47 4.09 160404 R77208 PBK2 12.12 2.42 160329 R77200 PCR5 20.54 4.11 160326 R77206 PWT1 10.66 2.13 160329 A83582 PWT5 243.47 48.69 160329 Table 4: Sample input data for model Together with the input data the model will use something that is called a setup time matrix. This matrix represent the time it takes to move from product i to product j, displayed in figure 5. Or in the case of this project it will be the time required to change from one colour to another (colour of order i to the colour of order j). As mentioned before, there are projects currently running that in an attempt to improve the changeover times. In this project the student will use the setup times as measured before the changeover project was initiated. After the completion of the project regarding the changeover times, the times in the setup time matrix can simply be changed and the model will accommodate those changes. The 17
  • 25. changes are possible because the model will extract the setup time matrix data from a CSV file, thus the scheduler does not need to go into the model itself and hard code the data in.. Colour Code PBA3 PCW1 PCW2 PCW4 PGW2 PHW1 PPW1 PBA3 0 11 10 15 10 10 200 PCW1 15 0 10 10 10 10 10 PCW2 20 10 0 10 10 10 10 PCW4 10 10 10 0 10 10 10 PGW2 0 10 10 20 0 15 10 PHW1 10 10 10 10 10 0 10 PPW1 15 10 15 10 20 10 0 Table 5: Sample setup time matrix From all of this input data the goal is to provide an output sheet that gives the schedule in which the work needs to be done. Together with the schedule sheet, will be some statistics regarding the average total setup time, average queuing time, number of orders overdue etc. 3.3 Conceptual Design [This section contains a conceptual design of the model that was developed for the problem during BPJ 410. Please note that the design changed and the solution is displayed in the following section.] 3.3.1 Concept Model Introduction During the literature study the decision was made to use a Genetic Search (GS) technique. For the project a genetic algorithm will be developed. The student chose the GS technique because of the complexity and nature of this problem. We want a model that builds us the best solution, the same way nature uses Genetic Mutation to create stronger offspring. This type of scheduling problem is considered as a NP-Hard problem because of the computational time needed to solve the problem. This is also why the student uses a GA, because the method in which the model will search, will be faster and more efficient. The model will also search a larger area of the solution space. The complexity of this problem will be between O(n2 ) & O(n4 ). With a slight chance of it being O(n5 ). A problem with this complexity size can still be computed within a reasonable time. The entire solution space may look like the one presented in figure 8. This solution space represents the fitness function of the model. The model will start at a random point in the solution space, as the model builds new solutions, costs for each possible solution will be calculated. It will search the space until it founds the minimum value or if the stopping criteria is met, where after it will take the best solution . In this case it will be the minimum cost for the company. 18
  • 26. Figure 8: GA Solution Space 3.3.2 Algorithm development in MATLAB The following section will provide details regarding the implementation of the mathematical model in MATLAB to form the Generic Algorithm. Please note: This section will only contain the Pseudo code and not the entire code in MATLAB syntax. The following provides the methods how the steps mentioned in section 2.3.4 are addressed (all of these steps are written as functions in MATLAB): Generation: The model starts of by generating an initial population. This initial population is basically a possible solution for the production schedule. The Binary Matrix that is generated, conforms to the constraints in the Mathematical Model. Table 6 shows an example of a Binary Matrix. The size of the matrix is nxn with n = number of jobs. During the Generation phase m number of populations are randomly created, e.q. m = 50, 100 etc. Xjk are represented by 0’s and 1’s. Order 1 2 3 4 5 1 0 1 0 0 0 2 0 0 1 0 0 3 0 0 0 0 1 4 1 0 0 0 0 5 0 0 0 1 0 Table 6: Example of a Binary Matrix 19
  • 27. Evaluation: Equation 1 are used as the fitness function in the model. The evaluation function calculates the cost function for all m populations generated. These costs are then stored in a vector together with the corresponding matrix in order to be later recalled. Selection: During the selection process the model takes the best value together with its matching matrix and stores it as the best option/schedule. After the best one is chosen the (m 2 − 1) next best values & matrices are stored. Reproduction: The Reproduction function generates m 2 new random populations. These populations will be used together with the populations Mutated in the Mutation function. Mutation: The Mutation function alters the populations that was stored in the Selection function. This function swaps all the values of the matrices, e.g if X12 = 1 then X21 will become 1. Table 7 & 8 shows an example of this mutation. Order 1 2 3 4 5 1 0 1 0 0 0 2 0 0 1 0 0 3 0 0 0 0 1 4 1 0 0 0 0 5 0 0 0 1 0 Table 7: Before Mutation Order 1 2 3 4 5 1 0 0 0 1 0 2 1 0 0 0 0 3 0 1 0 0 0 4 0 0 0 0 1 5 0 0 1 0 0 Table 8: After Mutation Repeat: The new populations generated in the Reproduction function are added to the Mutated populations from the Mutation function and the process repeats from the Evaluation function. So the costs are calculated and the best ones are kept and mutated while new ones are generated and model continues like this until stopping criteria is met. The stopping criteria must still be decided. 20
  • 28. Part IV 4 Solution [This section contains the solution model developed for the problem. Please note that this design differs from the design in the conceptual design.] 4.1 Solution Model Introduction In section 3.3.1 we looked at the type of model that the student wanted to develop for this project. Latter sections will show the Mathematical Model, the Model design in MATLAB as well as the validation of the model. The model developed for the project can be called a ”Random Generated Genetic Algorithm”. The model is basically trying thousands of randomly generated schedules, and determines their cost in terms of Setup and Overdue costs. The execution of the Model was approached in a different manner and simplified after the design of the conceptual model. 4.2 Mathematical Model The Mathematical Model for the solution differs slightly from the Mathematical Model of the Conceptual design. The mathematical outline used for the solution model can be summarized as (1|Sjk(i)|γ n−1 j=1 n k=j+1 SjkXjk + β n j=1 yk). The entire mathematical model together with the constraints and the descriptions are shown below. j ∈ J = (1, 2, 3, 4, ..., n − 1), k ∈ K = (j + 1, j + 2, j + 3, ..., n) and n = number of jobs Parameters Dj = Due date for job j, j ∈ J Sjk = Setup time between job j and job k, j ∈ J, k ∈ K pk = Processing time for job k, j ∈ J β = Over due date penalty γ = Setup cost per minute Variables tk = Start time of job k, k ∈ K Ck = Completion time of job k, k ∈ K Xjk = 1 if job k is immediately preceeded by job j 0 otherwise j ∈ J, k ∈ K yk = 1 Cj - Dj if Ck > Dk 0 otherwise j ∈ J, k ∈ K Objective Function MinZ = γ n−1 j=1 n k=j+1 SjkXjk + β n j=1 yk (1) 21
  • 29. Subject to: n−1 j=1 Xjk = 1 ∀j ∈ J (2) n k=j+1 Xjk = 1 ∀j ∈ J (3) tk + Sjk + pk ≤ Cj ∀j ∈ J ∀k ∈ K (4) tk + Sjk + pk ≤ tk+1 ∀j ∈ J ∀k ∈ K (5) Ck, tk, yk ≥ 0 ∀k ∈ K (6) Xj ∈ {0, 1} ∀j ∈ J (7) Equation 1, the objective function, states that the weighted sum of total setup and tardiness cost is minimised. Equation 2 ensures that every job precedes only one job. Equation 3 ensures that every job is preceded by only one job. Equation 4 is to guarantee that the time allocation of each scheduled job includes the setup and processing time and is not greater than the completion time of the job. The inequality could have been written as an equation, but this should make no difference since the minimisation objective is also expected to make the completion time not larger than the minimum required. Equation 5 is to ensure the precedence necessity amongst the jobs scheduled, so that any job scheduled before a particular job would be completed before the subsequent job would be started. Equations 6 and 7 are to guarantee non-negativity and the binary constraints of the decision variables as necessary. The sequence dependent setup problem is an instance of the travelling salesman problem, and is known to have the weakness of having subtours. But the inclusion of variable tk should help to eliminate the presence of subtours in this case (R. and M. 2008) so, other subtour elimination constraints are not added. This problem is known to degenerate into exponential search in the worst case, and hence the application of metaheuristics to find its solution in cases where the number of variables is large, as is the case herein, and thus the application of genetic algorithm as the solution approach. 4.3 Model Design in MATLAB Section 3.3.2 refers to the six steps that are normally used in the genetic algorithm approach. The solution model follows the same six steps. The functions used in the steps for the solution model differ from the functions used in the conceptual design model, because of the flaws that were addressed. The outline of the steps are still the same in both the solution model as well as the conceptual model. The steps are: 22
  • 30. Generation: The model starts off with the Pre-Schedule as shown in Table 9. The model then assigns a number to each order (Table 9). The Model generates an initial population. The initial population is just a random permutation of the schedule order. The size of the order is n with n = number of jobs. During the Generation phase m number of populations are randomly generated, e.q. m = 50, 100 etc (Table 10). Order number Colour Code Number assigned Randomly Generated by Model Schedule R 77 208 PBK2 1 1 R 77 217 PSI1 2 7 R 77 200 PCR5 3 10 R 77 206 PWT1 4 2 721019 PWT1 5 3 721038 PBK0 6 9 721042 PBZ0 7 5 721044 PBZ0 8 4 721057 PBZ0 9 8 721050 PCR3 10 6 Table 9: Example of a Possible Population Generated Evaluation: Equation 1 is used as the fitness function in the model. The evaluation function calculates the costs for all m schedules generated (Table 10). These costs are then stored in a vector together with their corresponding populations/schedules in order to be recalled later. 2 7 7 7 7 1 9 6 2 9 6 5 5 9 1 9 1 7 5 8 8 4 4 2 6 3 5 2 10 3 1 2 2 5 8 4 6 1 7 2 5 6 6 4 2 8 4 5 6 6 4 1 1 10 3 6 7 9 9 7 3 10 10 8 10 10 3 3 4 5 9 8 8 1 9 7 8 4 1 10 10 9 9 6 5 5 10 10 3 4 7 3 3 3 4 2 2 8 8 1 Population Cost 3660 4000 4150 3165 5080 3220 3450 3660 4150 3160 Table 10: m Populations with their corresponding costs Selection: A sort function sorts all m generated schedules from small to large regarding their costs. During the selection process the model takes the best cost value together with its matching schedule and stores it as the best option/schedule. After the best one is chosen the (m 2 − 1) next best values & schedules are stored. Reproduction: The Reproduction function generates m 2 new random schedules. These schedules will be used together with the schedules Mutated in the Mutation function to form 23
  • 31. a new population. Mutation: The Mutation function alters the schedules that were stored in the Selection function. This function just flips the schedule from back to front. Repeat: The new schedules generated in the Reproduction function are added to the Mutated schedules from the Mutation function and the process repeats from the Evaluation function. So the costs are calculated and the best ones are kept and mutated while new ones are generated and model continues like this until the cost converges. The model follows the basic steps of a Genetic Algorithm except that it only works from randomly generated populations and it then plays them off against each other, and after a while it determines the best model for that time period. Normal Genetic Algorithms have a mutation and crossover rate where the model determines, using probabilities, which schedules to use at the next evaluation stage. This model takes the best half and flips them around. However this model showed that by only generating random populations you can achieve a valid solution. Please refer to the next section for the validation of the model. 4.3.1 Model Pseudo Code Below is the Pseudo Code for the model that was developed for the project. This is only the outline and basic working of the model. Random Generated Genetic Algorithm Section A A ← Number of Repetitions/Runs m ← Initial Population Size n ← Number of Orders to sequence Initialize; Generate Initial Population of m Schedules Section B for i = 1 → m do Evaluate InitialPopulation(i) Cost Append to InitialPopulationCost end for Sort Initial Population Cost Small to Large Best Cost ← InitialPopulationCost(1) Best Population ← InitialPopulation(1) Section C for j = 1 → A do NewPopulation(j) ← Best Population 24
  • 32. for q = 2 → m 2 do NewPopulation(q) ← Mutated 2 InitialPopulation(q) end for for r = m 2 + 1 → m do NewPopulation(q) ← Randomly Generated Schedule3 end for for s = 1 → m do Evaluate NewPopulation(s) Cost Append to NewPopulationCost end for Sort New Population Cost Small to Large if NewPopulationCost(1) < Best Cost then Best Cost ← NewPopulationCost(1) Best Population ← NewPopulation(1) else Best Cost ← Best Cost Best Population ← Best Population end if end for 4.3.2 Model Pseudo Discussion In section A of the pseudo code, the parameters of the model are initialised. The initial population matrix is also generated, each column as a different schedule. In section B, the initial matrix is analysed using the cost function and sorted from the least to the highest cost. The best cost found is then stored along with the sequence that generated the minimum cost. The sequence associated with the best cost is stored as the best population. In section C, once the best values are stored as part of the new population, the algorithm starts to iterate for the number of generations specified during initialisation, while the plot of the minimum cost is tracked for convergence. Next is the cross over and mutation operation to generate a new population. To do that, (J.E. and B.C. 1996) fusion cross algorithm was applied. This algorithm works well in situations where normal genetic cross over does not work well, like with binary variables which are extreme values of their set as opposed to continuous variables, whose cross creates something within the values of the parents extremes. The fusion algorithm works in a destructive manner. It takes two parent genes and create a single child from them. This helps to search further within the neighbourhood of the good solutions found up until the current iteration. The genes within the current population of the iteration are paired up to produce half the new population. The remaining genes (half of the new population) are then randomly generated all over the solution space to 2 Mutation function in Section 4.3 3 Generation function in Section 4.3. 25
  • 33. prevent premature convergence so that the solution space is well explored. The model then continues to iterate until the specified number of iterations is reached, then best cost with its corresponding sequence found as at the end of final iteration is stored. However, in this model the mutation/selection is a bit different. After the cost together with their schedules are sorted the model takes the top half as the best schedules for reproduction. The other half are then randomly re-scheduled. 4.4 Solution Validation In this section we look at the model that was developed in the previous section. Here we show why this model is valid. Below is an index of the terms used throughout this section. Initial Solution Size m : This is the amount of populations generated during the Generation phase of the model (How much populations the model evaluates at a time). A : This is the number of times the model repeated itself. Best Cost : This is the best cost after the model repeated A times. Computation Time : This is the time it took the model to repeat A times. A Initial Solution Size 1 10 2 2 20 4 3 30 6 4 40 10 5 50 20 6 100 50 7 500 100 8 1000 9 10000 Table 11: Reference guide for Figures 9 and 10 Table 11 is a guideline to understand Figures 9 and 10. If we look at Figure 9 and look at the lowest point, we see that A is 9 and Initial Solution Size is 2. Together with Table 11 we see that A was 10,000 and Initial Solution Size was 4. (This was done to make Figures 9 and 10 more presentable) 4.4.1 Model Testing Best Cost testing Figure 9 shows the cost curve for various testing conditions. The testing conditions consisted of two variables changing. These variable were the Initial Solution Size and A. The Initial Solution Size is the amount of Random schedules the model evaluates at each time, and A is number of times the model will repeat itself. For example, the model will test four different schedules 10,000 times. These four schedules will be randomly generated each time. Table 12 shows the values which were used in the plotting of the Best Cost curve. Please use Table 11 as a guide to read Figure 9. 26
  • 34. Figure 9: Cost Curve Best Cost [R] A 10 20 30 40 50 100 500 1000 10000 Initial Solution Size 2 4480 4430 4470 4490 4500 4345 4330 4340 4295 4 4475 4405 4455 4475 4355 4430 4300 4340 4165 6 4430 4415 4395 4395 4390 4380 4370 4295 4270 10 4390 4390 4375 4420 4395 4330 4315 4295 4265 20 4370 4395 4380 4400 4335 4330 4295 4330 4210 50 4415 4375 4345 4365 4325 4325 4315 4270 4225 100 4355 4280 4305 4320 4340 4315 4300 4260 4225 Table 12: Best Cost Data for Figure 9 Computation Time testing Figure 10 shows the Computation Time curve for various testing conditions. These test conditions are the same as the conditions used in section 4.4.1. Table 13 shows the data used for the Computation Time Curve. Please use Table 11 to read Figure 10. 27
  • 35. Figure 10: Time Curve Computational Time [s] A 10 20 30 40 50 100 500 1000 10000 Initial Solution Size 2 0.086 0.086 0.091 0.097 0.095 0.114 0.26 0.442 3.989 4 0.081 0.09 0.106 0.11 0.12 0.145 0.454 0.757 8.268 6 0.092 0.098 0.11 0.121 0.129 0.176 0.574 1.089 14.097 10 0.097 0.112 0.134 0.143 0.161 0.248 0.907 1.801 28.125 20 0.118 0.148 0.179 0.212 0.247 0.425 1.754 3.555 89.476 50 0.161 0.242 0.337 0.399 0.492 0.89 4.404 10.599 540.12 100 0.248 0.407 0.57 0.724 0.901 1.738 10.402 27.888 2396.206 Table 13: Computational Time Data for Figure 10 Population Size Testing Table 14 shows the different Population sizes that were tested. The model was repeated 50 times with A = 10, 000 and the Initial Solution Size changing. From here distributions were drawn to determine the range of the best cost values for each population. Please see Appendix D for the graphs. Test Conditions Population size A Lowest Best Highest Best CPU Time [s] 1 4 10000 4240 4320 8.268 2 6 10000 4220 4320 14.097 3 8 10000 4170 4320 21.429 4 10 10000 4220 4300 28.125 5 50 10000 4160 4280 540.12 Table 14: Various test conditions with A = 10,000 28
  • 36. Furthermore the model was repeated five times, with the conditions being A = 10, 000 and InitialSolutionSize = 4, to test the variation of the model. Figure 11 shows the average population cost that was gathered during the testing. The figure shows that the model does not vary a lot even though it is a Random Generated Genetic Algorithm. Figure 12 shows the best cost for life cycle for each run. The figure shows the best cost almost follows the same pattern every time. With the slight chance of it decreasing after the model repeated itself 9,000 times. This shows the stability of the model even though it is actually a random model. Figure 11: Average Population Cost Figure 12: Best Cost Life Cycle 29
  • 37. Testing Conclusion Section 4.4.1 shows the cost curve figure. This figure shows the 63 different scenarios that were tested. We can see that the larger the Initial Solution Size and the more the model is repeated, the better the results were obtained. But time is an issue. Section 4.4.1 shows a figure that corresponds with Figure 9. This figure indicates that the bigger the Initial Solution Size and the more we repeat the model, the larger the computational time become. From Figure 9 the student chose to repeat the model 10,000 times, but with varying Initial Solution Sizes. Table 14 in Section 4.4.1 shows the various scenarios where the model was repeated 10,000 times, but with different Initial Solution Sizes. The Initial Solution Sizes that were tested was, 4, 6, 8, 10 and 50. Two was not tested because the population size is too small and 100 was also not tested because of the computational time. Finally the conclusion was made that repeating a population size of between 4 and 10 for 10,000 times was ideal model conditions, because this provides a good solution within a reasonable time. A value much closer to the optimal is available, but the time required to get that solution is very high. 4.4.2 Solution Model vs. Other Models The Random Generated Generic Algorithm was further tested against various other models. These other models have established rules to schedule work. These models were discussed in the Literature Review in Part 2. The first model tested was the EDD model, which is known as the Earliest Due Date Model. This model is only concerned with the due dates of each order and it is scheduled according to that. This model would be perfect if the setup times were constant between each order. The second model tested was the SPT model, known as the Shortest Processing Time model. This model schedules the smaller orders first. Unfortunately, because the larger orders are shifted to the back , these becomes very long overdue. The third model that was tested, was the LPT model, known as the Largest Processing Time model. This model schedules the larger orders first. The largest orders are done first which can cause some smaller orders to wait very long and become overdue. All of these models were tested against the Random Generated Genetic Algorithm model, and the EDD Model has proven to be a better model to use at this stage. The Random Generated Genetic Algorithm has proven to be better than the SPT and LPT model at this stage on the number of jobs overdue and the best cost. Please refer to Table 15. 4 Solution Model EDD Model SPT Model LPT Model Best Cost 4160 3090 4330 4380 Jobs Overdue 48 48 48 49 Average Job Completion Time [s] 1092.81 1156.35 450.16 2239.42 Table 15: Best Costs and Jobs Overdue for various different models 4 The data that has been used for the Solution Model is the best data found with a few test runs. Please refer to Appendix E for the distributions of the data 30
  • 38. 4.5 Proposed Cost Savings Even though the model already tries to decrease the cost with every iteration, there is a further cost saving for the company. As mentioned the company appointed a person who schedules the work on a daily basis. The scheduling role is apart from her other duties, but she spends an average of 3-4 hours per day scheduling work. This person also a B.Tech Industrial degree. If we assume that she works at a rate of R120 per hour for 3-4 hours each day, this project will be able to save them R480 per day. If she works 4.33 weeks per month, this will mean that they will save R 10392 per month, which accumulates to R 124704 per year. These savings exclude the savings the model has made regarding the penalty costs. 4.6 Future Solution Model Development The EDD Model has proven to be better than the Random Generated Genetic Algorithm Model at this stage of the project. It is recommended that further testing takes place before a conclusion on the Random Generated Genetic Algorithm can be drawn. It is believed that the data that was used as input data in the model, could have affected the performance of the model. This is why further testing is recommended with a variation of input data. For example, random due dates together with random order sizes and colours can be used. Until further testing is done no concrete conclusion can be given. 5 Conclusion In conclusion, the problem currently experienced by the company was identified and a method for the approach of a solution has been established. Throughout this document several methods have been researched and explained, from the Simulated Annealing (SA) technique through to the Tabu Search (TS) technique. After all of the techniques have been researched and considered the decision was made to develop a model with a base of a Random Search Technique, but with the execution steps of a Generic Search Technique. This technique showed a lot of potential as it enabled the model to build a better solution with each step within a reasonable amount of time. Although further testing is strongly recommended before a clear conclusion can be drawn of the model. The model was written in MATLAB. In the end, the model turned out to be a very viable research project, but the results of the projects still informs Wispeco that there is an alternative scheduling technique out there, even if it is not this model. The use of an alternative scheduling technique will enable them to save time and money. Finally, the student hopes to deliver a project of importance, but also with the ability to have an impact on the company. Because of the nature of this project the student also hopes to aid future project executors in their project development. Give me six hours to chop down a tree and I will spend the first four sharpening the axe. Abraham Lincoln 31
  • 39. References Anonymous. Designing HAL, a Learning AI with Emotions and Dreams. url: http://www. yofiel.com/writing/essays/designing-hal-a-learning-ai-with-emotions-and- %09%09dreams. Biskup, Dirk (1999). “Single-machine scheduling with learning considerations”. In: European Journal of Operational Research 115.1, pp. 173–178. Bouleimen, KLEIN and HOUSNI Lecocq (2003). “A new efficient simulated annealing algorithm for the resource-constrained project scheduling problem and its multiple mode version”. In: European Journal of Operational Research 149.2, pp. 268–281. Davis, Lawrence (1991). “Handbook of genetic algorithms”. In: Dayama, Niraj Ramesh et al. (2015). “History-dependent scheduling: Models and algorithms for scheduling with general precedence and sequence dependence”. In: Computers & Operations Research 64, pp. 245–261. Dell’Amico, Mauro and Marco Trubian (1993). “Applying tabu search to the job-shop scheduling problem”. In: Annals of Operations Research 41.3, pp. 231–252. Goncalves, Jose Fernando (2005). “A hybrid genetic algorithm for the job shop scheduling problem”. In: European journal of operational research 167.1, pp. 77–95. Haupt (2004). Practical genetic algorithms. John Wiley & Sons. Huang, Kuo-Ling and Ching-Jong Liao (2008). “Ant colony optimization combined with taboo search for the job shop scheduling problem”. In: Computers & Operations Research 35.4, pp. 1030–1046. J.E., Beasley and Chu B.C. (1996). “A genetic algorithm for the set covering problem”. In: European Journal of Operations Research 94, pp. 394–404. Khurshid Irteza, Khan and Shah (2011). “Application of Heuristic (1-Opt local Search) and Meta heuristic (Ant Colony Optimization) Algorithms for Symbol Detection in MIMO Systems”. In: Kır, Sena and Harun Re¸sit Yazgan (2016). “A sequence dependent single machine scheduling problem with fuzzy axiomatic design for the penalty costs”. In: Computers & Industrial Engineering 92, pp. 95–104. Merkle, Daniel, Martin Middendorf, and Hartmut Schmeck (2002). “Ant colony optimization for resource-constrained project scheduling”. In: Evolutionary Computation, IEEE Transactions on 6.4, pp. 333–346. Patnaik, Panda (2012). “Particle Swarm Optimization and Bacterial Foraging Optimization Techniques for Optimal Current Harmonic Mitigation by Employing Active Power Filter”. In: R., Moghaddas and Houshmand M. (2008). “Job-Shop Scheduling Problem With Sequence Dependent Setup Times”. In: Proceedings of the International MultiConference of Engineers and Computer Scientists 2. Rubin, Paul A and Gary L Ragatz (1995). “Scheduling in a sequence dependent setup environment with genetic search”. In: Computers & Operations Research 22.1, pp. 85–99. Sena Kir, Harun Resit Yazgan (2015). “A sequence dependent single machine scheduling problem with fuzzy axiomatic design for the penalty costs”. In: Sha, DY and Cheng-Yu Hsu (2006). “A hybrid particle swarm optimization for job shop scheduling problem”. In: Computers & Industrial Engineering 51.4, pp. 791–808. 32
  • 40. V´elez-Gallego, Mario C, Jairo Maya, and Jairo R Montoya-Torres (2016). “A beam search heuristic for scheduling a single machine with release dates and sequence dependent setup times to minimize the makespan”. In: Computers & Operations Research 73, pp. 132–140. Winston, Wayne L (2003). “Introduction to mathematical programming.: operations research.” In: 33
  • 41. Appendix A: Industry Sponsorship form 34
  • 42.
  • 43. Appendix B: Data Analysis (a) Black (b) Bronze (c) Charcoal (d) New Silver (e) Alu White (f) White 36
  • 44. Appendix C: Model Validation Data n : This is the index in which the model ran e.g 1st run, 2nd run etc Initial Solution Size m : This is the amount of populations generated during the Generation phase of the model. A : This is the amount of time the model was repeated to fins a better cost. Best Cost : This is the best cost after the model ran A times. Computation Time : This is the time it took the model to ran A times. n Initial Solution Size A Best Cost[R] Computation Time[s] 1 2 10 4480 0.086 2 4 10 4475 0.081 3 6 10 4430 0.092 4 10 10 4390 0.097 5 20 10 4370 0.118 6 50 10 4415 0.161 7 100 10 4355 0.248 8 2 20 4430 0.086 9 4 20 4405 0.09 10 6 20 4415 0.098 11 10 20 4390 0.112 12 20 20 4395 0.148 13 50 20 4375 0.242 14 100 20 4280 0.407 15 2 30 4470 0.091 16 4 30 4455 0.106 17 6 30 4395 0.11 18 10 30 4375 0.134 19 20 30 4380 0.179 20 50 30 4345 0.337 21 100 30 4305 0.57 22 2 40 4490 0.097 23 4 40 4475 0.11 24 6 40 4395 0.121 25 10 40 4420 0.143 26 20 40 4400 0.212 27 50 40 4365 0.399 28 100 40 4320 0.724 29 2 50 4500 0.095 30 4 50 4355 0.12 31 6 50 4390 0.129 32 10 50 4395 0.161 33 20 50 4335 0.247 34 50 50 4325 0.492 35 100 50 4340 0.901 Table 16: Data for Best Cost and Computational time testing (1) 37
  • 45. n Initial Sol Size A Best Cost[R] Computation Time[s] 36 2 100 4345 0.114 37 4 100 4430 0.145 38 6 100 4380 0.176 39 10 100 4330 0.248 40 20 100 4330 0.425 41 50 100 4325 0.89 42 100 100 4315 1.738 43 2 500 4330 0.26 44 4 500 4300 0.454 45 6 500 4370 0.574 46 10 500 4315 0.907 47 20 500 4295 1.754 48 50 500 4315 4.404 49 100 500 4300 10.402 50 2 1000 4340 0.442 51 4 1000 4340 0.757 52 6 1000 4295 1.089 53 10 1000 4295 1.801 54 20 1000 4330 3.555 55 50 1000 4270 10.599 56 100 1000 4260 27.888 57 2 10000 4295 3.989 58 4 10000 4165 8.268 59 6 10000 4270 14.097 60 10 10000 4265 28.125 61 20 10000 4210 89.476 62 50 10000 4225 540.12 63 100 10000 4225 2396.206 Table 17: Data for Best Cost and Computational time testing (2) 38
  • 46. Appendix D: Solution Model Testing [Please refer to Table 14 in Section 4.4.1 for test conditions] (a) Test 1 (b) Test 2 (c) Test 3 (d) Test 4 (e) Test 5 Figure 14: Repeating Various Initial Solution Sizes 10,000 times 39
  • 47. Appendix E: Solution Model vs. Other Models Data (a) Average Job Completion Time (b) Best Cost Distribution 40
  • 48. Appendix F: Article submitted for publication 41
  • 49. South African Journal of Industrial Engineering Month Year Vol __(_) pp A WEIGHTED BI-CRITERIA SCHEDULING MODEL IN A SEQUENCE DEPENDENT SETUP ENVIRONMENT FOR A POWDER COATING SHOP ABSTRACT Efficient scheduling of jobs in a big powder coating shop is a necessity in a competitive business environment, especially with the South African market opened up to foreign businesses. This is a sequence dependent setup scheduling problem because the changeover time depends on the colour of the paint just applied before the next one is scheduled. This problem can be reduced to a travelling salesman problem (TSP), and is therefore NP-hard. A solution to the problem that seeks to optimise the weighted total cost, including setup and tardiness costs in polynomial time is presented with the case of the largest Aluminium extrusion company in South Africa, using Genetic Algorithm (GA) as the solution approach and with some model modification to prevent the typical sub-touring problem associated with the TSP. The performance of the model is compared to that of selected single objective dispatch heuristics and the performance of the model is quite satisfactory. OPSOMMING
  • 50. 2 1. INTRODUCTION AND STUDY BACKGROUND 1.1 Problem background Wispeco is the leading aluminium extrusion company in Africa. Their offerings, which started with production of nails, diamond mesh, fencing gate and wire screening, has been diversified into many other areas today, including powder coating. Due to the competitive pressure from some other countries like China (and some other European countries) coming into the South African market, there is the need to make their plants more productive. Customers demand, not only that they get products available at a very reasonable (actually low) cost and job quality, but also that Wispeco meets their due dates as much as possible, and they seem sensitive to lead time. Given the competitiveness of the industry, a lot more pressure is placed on Wispeco to make profit and grow (or at least maintain) their market share. Considering that there are usually a large number of customer orders daily, scheduling jobs such that each customer gets its order on due date is a challenge, especially with the recent reduction in the number of machines from two to one in order to increase utilisation. There is little room for error, and that means job scheduling should be well managed. Powder coating is a process of depositing layers of colour pigments on products. There are more than a hundred different types of colours, and jobs can pick from any of these. In addition, the jobs mixes of different types and shades are also in different sizes (and hence different processing times) and customer expected due dates also differ. After coating with a type of colour, the time required to clean and prepare the machine for another product depends on the relationship between the colour just used and the one to be used on the next job. This is a sequence dependent job scheduling system, and it is known to be NP- hard because it can be reduced to the travelling salesman problem, with the machine being the salesman and the jobs being the cities. The problem can be described as follows: The objective is the minimisation of the total tardiness and setup penalty costs; the jobs are on a single machine, with sequence dependent setup times. Using Graham’s notation, it can be described as: (1|𝑆𝑗𝑘( 𝑖)|𝛾 ∑ 𝑆𝑗𝑘 + 𝛽 ∑ 𝑇𝑗). Because there is large setup time between the different colours, the scheduling becomes more intense as the variance in colours increase. Same colour but different orders require no time for setup. It would be ideal to schedule the order with the same colours together, but unfortunately the jobs do arrive all at the same time and each job has a due date depending on the customer’s preference, and taking these due dates into consideration affects the schedule performance too. To solve this problem, being NP-complete and considering the complexity of exact solutions, a random search technique was used. Genetic Algorithm with some modifications was used to find solution to the problem. The solution from the Genetic Algorithm model was compared to those obtained from three other dispatch rules to evaluate the performance of the model using the model. SMSP's can be considered as problems with a simple structure in comparison to other scheduling problems, but it may be difficult to solve due to its time complexities, depending on the behaviour of the data. Biskup [1] covers an in depth study of Single Machine Scheduling. Kir [2] used a single machine scheduling technique and applied it to a dairy product plant. Their sequence dependent problem is very similar to the one found at the aluminium powder coating plant. Vélez-Gallego, Maya, and Montoya-Torres [3] presented a mixed integer linear programming model of a sequence dependent problem with arbitrary release dates on a single machine. They used beam search heuristic technique to solve the problem. Their objective was to minimize the total make span of the work. Their problem was defined as (1|𝑟𝑗|𝑆𝑗𝑘|𝐶 𝑚𝑎𝑥). In this problem the total make span of the work will stay the same, the average completion time will differ.
  • 51. 3 1.2 Recent progress Work has continued into sequence dependent set-up and its extension models in several ways. Such areas include multi objective models, like Shahvari and Logendran [4] which seeks to simultaneously minimise the weighted sum of the weighted total completion time and total weighted tardiness in a hybrid flow shop batching and sequence dependent set up. They used Tabu search/path relinking procedures. The Path relinking procedure is used to construct solution paths and stage based improvement procedure to evaluate move interdependency. They reported solutions as good as CPLEX but with shorter computation time. Nikabadi and Naderi [5] also used multi-objective genetic algorithm and simulated annealing to schedule parallel unrelated machines with sequence dependent setup, varying due dates and precedence relationship amongst jobs. They claimed the algorithms outperformed GA and SA algorithms individually. Lu et al [6] also solved a multi-objective, mixed integer Welding Scheduling Problem (WSP) with controllable processing time, sequence dependent setup and job dependent transportation time using multi-objective grey wolf optimiser. History dependent setup problem is one in which the setup time is affected by the aggregate properties of all predecessor jobs. Dayama et al [7] considered setup time with historical precedence with time window restrictions and argued that many previous problems in literature are instances of the general history dependent setup problem. They proposed the general precedence scheduling problem and proposed some modelling and solution techniques. Mir and Rezaeian [8] presented a model for sequence dependent setup, release dates, deteriorating job and learning effects in scheduling. They used a hybrid of simulated annealing and genetic algorithm to solve the problem. Sequence dependent setup with time and resource constraint problem has also been presented. Merkle, Middendorf, and Schmeck [9] used Ant Colony Optimization algorithm for a Resource Constraint Project Scheduling Problem (RCPSP). Afzalirad and Rezaiean [10] considered resource constraint systems with sequence dependent setup, different release dates, machine eligibility and precedence constraint. They used genetic algorithm and artificial immune systems to solve the problem and suggested that both models performed well for small size problems, but the artificial immune system model performed better for larger size problems. Gedik et al [11] considered non-identical jobs with availability intervals and sequence dependent setup times on unrelated parallel machines in a fixed planning horizon. They used constraint programming and logic based Benders algorithm to solve the problem and reported the performance of the tow solution approaches. An, Kim and Choi [12] presented a two-machine flow time problem with sequence dependent setup and constrained waiting time. They developed some dominance properties, lower bounds, and heuristic algorithms, and used these to develop a branch and bound algorithm to solve some small size problems and reported the heuristic performances. Some other models have considered uncertainty in model parameters in sequence dependent setup problem. Xantopoulos et al [13] considered dynamic sequencing on 𝑛 identical parallel machines with stochastic arrivals, processing times, due dates and sequence-dependent setups. They used simulation model to test seventeen dispatching rules and discussed the performance of the various rules considering four metrics. Gholami- Zanjani et al [14] presented a flow shop scheduling problem with sequence dependent set- up times in an uncertain environment, where the objective is minimising weighted mean completion time. They then solved the problem using a deterministic approach, robust optimisation approach and fuzzy approach; and evaluated the performance of the system using a case of a circuit board printer. 1.3 Genetic Algorithm overview Goncalves [15] is a good reading on Genetic Algorithm for job shop scheduling. Haupt and Haupt [16] demonstrated the use of Simulated Annealing, Ant Colony Optimization and Particle Swarm Optimization in addressing diverse scheduling problems. Genetic algorithms (GA) belong to the class of AI (Artificial Intelligence) techniques. Organisms have biologically evolved over many years to survive and thrive in nature. Survival of the fittest and the process of natural selection are considered important aspects in the process of evolution. GA works are based on the process of evolution. GA uses popular ideas of biology
  • 52. 4 such as: Chromosome population, mating selection, producing offspring through crossover techniques and mutation to ensure diversity in the population. The starting point for a GA is the initial population. Once the initial population is generated, GA techniques can be applied to solve the problem and arrive at a good solution [17]. GAs start off by randomly generating the initial population. Strings in the initial population represent possible solutions to the problem. Each solution is evaluated using a predetermined fitness function. A new population is then generated using the initial population function and then these populations are mated with the strongest populations from the previous population generation. The populations that are used in the mating process are chosen by the fitness function. The higher a population's fitness, the more likely it is that population will be chosen to reproduce. Advantages of the Genetic Algorithm include:  The fitness function that evaluates solutions doesn't need to be linear, differential or even continuous.  The parameters (initial population, fitness function, mutation rate and breeding method) of the approach are all under the control of the user.  GA's works on more than one solution at a time. The conventional GA algorithm process is as follow: Step 1: Generation. Starting off by generating an initial population of choice (random or not). The population size is usually determined by a value of 𝑛. Step 2: Evaluation. Each solution is measured using a fitness function determined beforehand. If a solution is infeasible, it is penalized. Step 3: Selection. Using some functions applied to the current genes, parents for the generation of the new population are determined. The parents/solutions with a higher or better fitness stand a better chance to be chosen for reproduction. Step 4: Reproduction. The parents are used to generate a new population that contains a portion of each parent Step 5: Mutation. The genetic makeup of the offspring is randomly altered to avoid reaching a local optimum. Thus the offspring are now the new generation/populations of solutions. Step 6: Repeat. Repeat steps 2-5 until stopping criteria is met or if an optimum is reached. 2. MODEL FORMULATION AND SOLUTION 2.1.1 Mathematical model The sequence dependent problem discussed is presented as follows. Let: 𝑗 ∈ 𝐽 ≜ (1, 2, 3, 4, … , 𝑛 − 1), 𝑘 ∈ 𝐾 ≜ ( 𝑗 + 1, 𝑗 + 2, 𝑗 + 3, … , 𝑛), and 𝑛 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑗𝑜𝑏𝑠 Parameters 𝐷𝑗 = 𝐷𝑢𝑒 𝑑𝑎𝑡𝑒 𝑓𝑜𝑟 𝑗𝑜𝑏 𝑗, 𝑗 ∈ 𝐽 𝑆𝑗𝑘 = 𝑆𝑒𝑡𝑢𝑝 𝑡𝑖𝑚𝑒 𝑓𝑜𝑟 𝑗𝑜𝑏 𝑘 if preceeded immediately by 𝑗𝑜𝑏 𝑗, 𝑗 ∈ 𝐽, 𝑘 ∈ 𝐾 𝑝 𝑘 = 𝑃𝑟𝑜𝑐𝑒𝑠𝑠𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 𝑓𝑜𝑟 𝑗𝑜𝑏 𝑘, 𝑘 ∈ 𝐾 𝛽 = 𝑂𝑣𝑒𝑟 𝑑𝑢𝑒 𝑑𝑎𝑡𝑒 𝑝𝑒𝑛𝑎𝑙𝑡𝑦 𝛾 = 𝑆𝑒𝑡𝑢𝑝 𝑐𝑜𝑠𝑡 𝑝𝑒𝑟 𝑚𝑖𝑛𝑢𝑡𝑒 𝑅 = 𝐿𝑎𝑟𝑔𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 Variables 𝑡 𝑘 = 𝑆𝑡𝑎𝑟𝑡 𝑡𝑖𝑚𝑒 𝑜𝑓 𝑗𝑜𝑏 𝑘, 𝑘 ∈ 𝐾 𝐶 𝑘 = 𝐶𝑜𝑚𝑝𝑙𝑒𝑡𝑖𝑜𝑛 𝑡𝑖𝑚𝑒 𝑜𝑓 𝑗𝑜𝑏 𝑘, 𝑘 ∈ 𝐾 𝑋𝑗𝑘 = { 1 𝑖𝑓 𝑗𝑜𝑏 𝑘 𝑖𝑠 𝑖𝑚𝑚𝑒𝑑𝑖𝑎𝑡𝑒𝑙𝑦 𝑝𝑟𝑒𝑑𝑒𝑒𝑑𝑒𝑑 𝑏𝑦 𝑗𝑜𝑏 𝑗 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 𝑗 ∈ 𝐽, 𝑘 ∈ 𝐾 𝑦 𝑘 = { 𝐶𝑗 − 𝐷𝑗 𝑖𝑓 𝐶 𝑘 > 𝐷 𝑘 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 𝑘 ∈ 𝐾 Objective function
  • 53. 5 min 𝑍 = 𝛾 ∑ ∑ 𝑆𝑗𝑘 𝑛 𝑘=𝑗+1 𝑛−1 𝑗=1 𝑋𝑗𝑘 + 𝛽 ∑ 𝑦 𝑘 𝑛 𝑗=1 (1) Subject to ∑ 𝑋𝑗𝑘 𝑛−1 𝑗=1 = 1 ∀ 𝑗 ∈ 𝐽 (2) ∑ 𝑋𝑗𝑘 𝑛 𝑘=𝑗+1 = 1 ∀ 𝑗 ∈ 𝐽 (3) 𝑡 𝑘 + 𝑆𝑗𝑘 + 𝑝 𝑘 ≤ 𝐶𝑗 (4) 𝑡 𝑘 + 𝑆𝑗𝑘 + 𝑝 𝑘 ≤ 𝑡 𝑘+1 (5) 𝐶 𝑘 , 𝑡 𝑘 , 𝑦 𝑘 ≥ 0 ∀ 𝑗 ∈ 𝐽 (6) 𝑋𝑗,𝑘 ∈ {0, 1} ∀ 𝑗 ∈ 𝐽, 𝑘 ∈ 𝐾 (7) Equation (1) is the objective function, and stipulates that the weighted sum of total setup and tardiness cost is minimised. Equation (2) is to ensure that every job precedes only one job. Equation (3) is to ensure that every job is preceded by only one job. Equation (4) is to guarantee that the time allocation of each scheduled job includes the setup time and processing time and is not greater than the completion time of the job. The inequality could have been written as an equation, but this should make no difference since the minimisation objective is also expected to make the completion time not larger than the minimum required. Equation (5) is to ensure the precedence necessity amongst the jobs scheduled such that any job scheduled before a particular job would be completed before the subsequent job would be started. Equations (6) and (7) are to guarantee non-negativity and the binary constraints of the decision variables as necessary. The sequence dependent setup problem is an instance of the travelling salesman problem, and is known to have the weakness of having subtours. But the inclusion of variable 𝑇𝑘 should help to eliminate the presence of subtours in this case [18], so, other subtour elimination constraints are not added. This problem is known to degenerate into exponential search in the worst case, and hence, the application of metaheuristics to find its solution in cases where the number of variables is large, as is the case herein, and thus the application of genetic algorithm as the solution approach. 2.1.2 Genetic Algorithm pseudo code The pseudo code for the implementation of the Genetic Algorithmic solution is presented next. This is followed by a brief explanation of the main sections of the code. Section A A ≜ Number of repetition/runs m ≜ Initial Population Size n ≜ Number of Orders to sequence Initialize; Generate Initial Population of m Schedules Section B for i = 1 → m do Evaluate InitialPopulation(i) Cost Append to InitialPopulationCost end for Sort InitialPopulationCost Small to Large Best Cost ← InitialPopulationCost(1) Best Population ← InitialPopulation(1) Section C for j = 1 → A do NewPopulation(j) ← Best Population for q = 2 → 𝑚 2 do NewPopulation(q) ← Crossover/Mutated InitialPopulation(q)
  • 54. 6 end for for r = 𝑚 2 + 1 → m do NewPopulation(q) ← Randomly Generated Schedule end for for s = 1 → m do Evaluate NewPopulation(s) Cost Append to NewPopulationCost end for Sort NewPopulationCost Small to Large if NewPopulationCost(1) < Best Cost then Best Cost ← NewPopulationCost(1) Best Population ← NewPopulation(1) else Best Cost ← Best Cost Best Population ← Best Population end if end for 2.1.3 Discussion of the GA algorithm In section A of the pseudo code, the model parameters are initialised. The initial population matrix is also generated as a binary variable of job sequences. The binary nature of the population matrix makes it unnecessary to have bit encoding for the genetic algorithm as the generated bits are used directly in the cost evaluation function. This is found to be a generally more efficient way, and the only necessary changes would be in the cross-over and mutation function, which would be addressed appropriately later. In section B, the initial matrix is analysed using the cost function and sorted from the least to the highest cost. The best cost found is then stored along with the sequence that generated the minimum cost. In section C, once the best values are stored, the algorithm starts to iterate for the number of generations specified during initialisation while the plot of the minimum cost is tracked for convergence. Next is the cross over and mutation operation to generate a new population. To do that, the Beasley and Chu’s [19] fusion cross algorithm was applied. This algorithm works well in situations where normal genetic cross over does not work well, like with binary variables which are extreme values of their set as opposed to continuous variable, whose cross creates something within the values of the parent’s extremes. The fusion algorithm works in a destructive manner. It takes two parent genes and creates a single child from them. This helps to search further within the neighbourhood of the good solutions found up until the current iteration. The genes within the current population of the iteration are paired up to produce half the new population. The remaining genes (half of the new population) are then randomly generated all over the solution space to prevent premature convergence so that the solution space is well explored. The model then continues to iterate until the specified number of iterations is reached and the best cost with its corresponding sequence found as at the end of final iteration is stored. 3. MODEL IMPLEMENTATION, SOLUTION AND RESULTS 3.1.1 Model Implementation and testing The pseudo code was implemented using MATLAB. The model was then tested to determine its convergence and general performance along some selected dimensions. Various testing conditions were considered during the testing. In figure 1, A is the number of times the model was repeated (number of generations/iterations). Initial Solution Size is the size of the Population tested (thus the number of distinct schedules generated and tested per generation/iteration). Table 1 shows the various scenarios created for testing the model along these two dimensions; e.g. for the first test, A = 10 and Initial Solution Size = 2. During the testing phase, 63 different scenarios were tested. Figure1 shows a cost curve
  • 55. 7 that was generated from the model testing. The data values for the cost surface presented in Figure 1 are shown in Table 1. Figure 1: Cost Curve Table 1: Cost Curve Data: Best Cost [R] A 1-10 1-20 2-30 4-40 5-50 6-100 7-500 8-1000 9-10000 Initial Solution Size 1-2 4480 4430 4470 4490 4500 4345 4330 4340 4295 2-4 4475 4405 4455 4475 4355 4430 4300 4340 4165 3-6 4430 4415 4395 4395 4390 4380 4370 4295 4270 4-10 4390 4390 4375 4420 4395 4330 4315 4295 4265 5-20 4370 4395 4380 4400 4335 4330 4295 4330 4210 6-50 4415 4375 4345 4365 4325 4325 4315 4270 4225 7-100 4355 4280 4305 4320 4340 4315 4300 4260 4225 Table 2 shows the CPU time recorded during the implementation of the various test scenarios. Table 2 can be laid over Table 1 to determine better testing conditions. From Figure 1, it can be seen that by repeating the model 10 000 times yields better results but as the Initial Solution Size increase the computational time exponentially increases. Thus, for further testing of the model the testing condition was selected as: Initial Solution Size = 4 and A = 10 000, and it was repeated another 5 times. The purpose here is to test the variation of the output parameters based on these input parameters. Figure 2 shows the average population cost that was generated during the test. The figure shows that the model does not vary much even though it is a Genetic Algorithm is a random search technique. Figure 3 shows the best cost throughout the life cycle for each run. The figure shows the best cost almost follows the same pattern every time. This shows the stability of the model, with the difference between the cost attained after less than 100 iterations and that attained between 9,000 and 10,000 iterations being less than 4 percent improvement, suggesting the slight chance of it decreasing after the model repeated itself 9,000 times or
  • 56. 8 more. This gives suggests that there might be little benefit for longer runs of the model, and that if the precision level desired is not too tight and there is time constraint on the scheduler, a good solution is attainable under about 100 runs. Table 2: Cost Curve Computational Time Data Computation Time [s] A 1-10 2-20 3-30 4-40 5-50 6-100 7-500 8-1000 9-10000 Initial Solution Size 1-2 0.086 0.086 0.091 0.097 0.095 0.114 0.26 0.442 3.989 2-4 0.081 0.09 0.106 0.11 0.12 0.145 0.454 0.757 8.268 3-6 0.092 0.098 0.11 0.121 0.129 0.176 0.574 1.089 14.097 4-10 0.097 0.112 0.134 0.143 0.161 0.248 0.907 1.801 28.125 5-20 0.118 0.148 0.179 0.212 0.247 0.425 1.754 3.555 89.476 6-50 0.161 0.242 0.337 0.399 0.492 0.89 4.404 10.599 540.12 7-100 0.248 0.407 0.57 0.724 0.901 1.738 10.402 27.888 2396.206 Figure 2: Average cost distribution 3.1.2 Performance in comparison to selected heuristics The performance of the solution sequence from Generic Algorithm was further tested against the results obtained from using different dispatch rules. The GA solution was first tested against the EDD (Earliest Due Date) rule. The rule is only concerned with the due dates of each order and it schedules according to that. The second rule tested was the SPT (Shortest Processing Time) rule. This rule schedules the smaller orders first. Unfortunately, the larger orders are shifted to the back and become very long overdue. The third rule that was tested was the LPT (Largest Processing Time). This model schedules the larger orders first and should have a tendency to increase utilisation of machine. This can cause some smaller orders to wait very long and become overdue. All of these models were tested against the solution obtained from the Genetic Algorithm model, and the EDD Model has so far proven to be better in terms of minimising tardiness and the effect on the overall cost, while the shortest processing time model is better in terms of the average job completion time. This is to be expected in that each of these dispatch rules focuses only on one parameter and generally ignores the other dimensions. This suggests that the genetic