reynard arlow final year project

58
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

Upload: reynard-arlow

Post on 11-Jan-2017

27 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Reynard Arlow Final Year Project

BPJ 420

Final Report

Single machine production scheduling with

sequence dependant setup times at an Aluminium

powder coating plant

Reynard ArlowIndustrial & Systems Engineering

U 13002679Project Mentor: Dr Olufemi Adetunji

September 28, 2016

Page 2: Reynard Arlow Final Year Project

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 verband2. Ek verklaar dat hierdie my eie oorspronklike werk is3. 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 gedoen4. Ek het nie 'n ander student se vorige werk gebruik en as my eie ingedien nie5. 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 work3. 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 requirements4. I have not used another student's past work to hand in as my own5. 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

Page 3: Reynard Arlow Final Year Project

Executive Summary

Wispeco Aluminium is the top aluminium extrusion company in Africa and is competingto be the best Powder coating company in Africa as well.Wispeco Aluminium opened theirdoors 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 theproblem. After the outlines of the project was established, literature was done in relationto the problem experienced at Wispeco Aluminium, which is in this case a Single MachineScheduling Problem (SMSP) with sequence dependent setup times. The literature shows thevarious ways in which previous articles addressed this type of problem. This literature wasused 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 theproject. The concept model and the solution model do differ significantly. The heuristictechnique chosen for the project was a Genetic Algorithm Search technique. Although themodel was applied in a very different manner. The base of the model will be that of a randomsearch technique, but the steps followed will be that of a Genetic Algorithm.

This solution model was tested against various other scheduling techniques to determinethe stability and validity of the model. At the end the project turned out to be more of aResearch Project than an improvement project, although this technique can be applied inWispeco Aluminium. Throughout the project ECSA and BPJ 420 standards were followedto provide a well stated project conforming to the requirements.

[Please note that this work has been sent for Academic Publication. The article is nowbeing reviewed. Please find the article submitted for publication in Appendix F]

ii

Page 4: Reynard Arlow Final Year Project

Abbreviations and Definitions

Abbreviation DescriptionTSP Traveling Salesperson ProblemGA Generic AlgorithmSA Simulated AnnealingPSO Particle Swarm OptimizationACO Ant Colony OptimizationGP Genetic ProgrammingTS Tabu SearchGA Genetic AlgorithmAI Artificial IntelligenceSPT Shortest Processing TimeWSPT Weighted Shortest Processing TimeEDD Earliest Due DateWEDD Weighted Earliest Due DateJSSP Job Shop Scheduling ProblemJSP Job Shop ProblemRCPSP Resource Constrained Project Scheduling Problem

Table 1: Abbreviations

iii

Page 5: Reynard Arlow Final Year Project

Contents

Executive Summary ii

List of Figures v

List of Tables vi

I 1

1 Background & Introduction 11.1 Company Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Project Aim/Rational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.4 Project Approach, Scope & Deliverables . . . . . . . . . . . . . . . . . . . . 3

1.4.1 Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.4.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.4.3 Deliverables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

II 5

2 Literature Review & Problem Investigation 52.1 Single Machine Scheduling Problem (SMSP) . . . . . . . . . . . . . . . . . . 52.2 Sequence Dependent Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . 72.3 Heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.3.1 Simulated Annealing . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3.2 Particle Swarm Optimization . . . . . . . . . . . . . . . . . . . . . . 92.3.3 Ant Colony Optimization . . . . . . . . . . . . . . . . . . . . . . . . 102.3.4 Genetic Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.3.5 Tabu Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.4 Problem Investigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.4.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.4.2 Current planning process . . . . . . . . . . . . . . . . . . . . . . . . . 14

III 15

3 Data Analysis & Concept Design 153.1 Plant Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2 Model Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.3 Conceptual Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.3.1 Concept Model Introduction . . . . . . . . . . . . . . . . . . . . . . . 183.3.2 Algorithm development in MATLAB . . . . . . . . . . . . . . . . . . 19

IV 21

iv

Page 6: Reynard Arlow Final Year Project

4 Solution 214.1 Solution Model Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.2 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.3 Model Design in MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.3.1 Model Pseudo Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.3.2 Model Pseudo Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.4 Solution Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.4.1 Model Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.4.2 Solution Model vs. Other Models . . . . . . . . . . . . . . . . . . . . 30

4.5 Proposed Cost Savings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.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 . . . . . . . . . . . . . . . . . . . 92 PSO algorithmic approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 ACO algorithmic approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 PreSchedule file created by TOPP system . . . . . . . . . . . . . . . . . . . 155 Daily production for the Parow plant . . . . . . . . . . . . . . . . . . . . . . 166 Colour changes per day for Parow . . . . . . . . . . . . . . . . . . . . . . . . 167 Order size distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 GA Solution Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Cost Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2710 Time Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2811 Average Population Cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2912 Best Cost Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2914 Repeating Various Initial Solution Sizes 10,000 times . . . . . . . . . . . . . 39

List of Tables

1 Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii2 Operations of Wispeco Aluminium . . . . . . . . . . . . . . . . . . . . . . . 13 Complexity growth for polynomial and exponential algorithms . . . . . . . . 8

v

Page 7: Reynard Arlow Final Year Project

4 Sample input data for model . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Sample setup time matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Example of a Binary Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Before Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 After Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Example of a Possible Population Generated . . . . . . . . . . . . . . . . . . 2310 m Populations with their corresponding costs . . . . . . . . . . . . . . . . . 2311 Reference guide for Figures 9 and 10 . . . . . . . . . . . . . . . . . . . . . . 2612 Best Cost Data for Figure 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . 2713 Computational Time Data for Figure 10 . . . . . . . . . . . . . . . . . . . . 2814 Various test conditions with A = 10,000 . . . . . . . . . . . . . . . . . . . . 2815 Best Costs and Jobs Overdue for various different models . . . . . . . . . . . 3016 Data for Best Cost and Computational time testing (1) . . . . . . . . . . . . 3717 Data for Best Cost and Computational time testing (2) . . . . . . . . . . . . 38

vi

Page 8: Reynard Arlow Final Year Project

Part I

1 Background & Introduction

1.1 Company Background

Wispeco was established in 1920. They first produced Nails, Diamond Mesh, Fencing, Gatesand Wire Screening from 1920 - 1950’s. In the early 1930s they entered the market forarchitectural Steel windows and doors and were active until the mid 1980’s. In 1960 theystarted with architectural Aluminium products to date. In 1981 the MD and five of hisdirectors/managers died in an airplane accident. A few years later, Remgro Ltd introducednew management staff from the outside due to a lack of good internal management. Thestructure of the company was rearranged to ensure the ongoing of the company. Unfortunately80% 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 leadingextrusion company in Africa. After the introduction of a new vertical plant for powdercoating 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 threedifferent locations across South Africa. These three plants are situated in Alberton, Parowand Vereeniging. Alberton is also where the main offices and management are situated.

Plant Operations QuantityAlrode (Alberton) Scrap receiving 1

Re-melt & billet casting 2Hydraulic extrusion press 6Die shop 1Powder coating department 1Anodizing department 1Stockist warehouse 1

Parow (Cape Town) Scrap receiving 1Hydraulic extrusion press 1Powder 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 anAnodizing plant. A few years ago due to economic reasons they had to shut down theAnodizing plant and relocate the powder coating plant to its current location in Parow. Thisproject is conducted in the powder coating department in Parow for Wispeco Aluminium.

1

Page 9: Reynard Arlow Final Year Project

1.2 Introduction

A few years ago Wispeco was under a lot of strain to stay afloat due to the economic crisis in2008/9. They had to compete with countries such as China and Europe. The effect was thatWispeco Aluminium lost a big portion of their work to other countries, due to a weakenedrand. Larger plants like Alrode, managed to pull through this crisis more easily than smallerplants such as Parow. Still to this day the plant in Parow experience a lot of resistanceespecially with the South African market opening up to foreign businesses.Unfortunately the financial statements of the Parow plant shows discouraging news, fromboth the Extrusion and Powder coating departments. Various projects have been undertakenin the Extrusion department to reduce costs and to look at an increase in efficiency. For thisproject the focus was on the powder coating department and the systems regarding severaloperations. There are also other projects running within this department to reduce costsand increase efficiency.Currently the plant consists of: Two Hydraulic presses (which will be reduced to one later thisyear as determined by previous projects), one scrap receiving department, one pre-treatmentline (part of Powder coating) and then two Powder coating lines. Due to the high overheadcosts the Parow plant projects were undertaken to reduce these costs. As a result of oneof these projects, Parow’s two powder coating lines will be reduced to one. In addition, atthe end of this year there will be a change in the shift system. This reduces the number ofmachines operating to one. The machine will be operating twelve hours a day, seven days aweek.Due to reduction in the number of Powder coating lines, the planning/scheduling of productionfor the powder coating line have been identified for improvement. Planning is still donemanually on a regular basis depending on the arrival of work. Planning now needs to bedone daily, or upon arrival of new work. This problem can now be seen as a SMSP (singlemachine scheduling problem) with setup dependent times and due dates. Various projectshave been undertaken by various sectors, and the material regarding solving such problemsis freely available.This project was identified because of market sensitivity to lead time. Wispeco ensuresthat the powder coating supplied conforms to the highest requirements and that they carrythe mark of SANS 1796: 2008. Unfortunately, their market in Cape Town is much moresensitive 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 albeita lower quality. Wispeco needs to supply service faster, but still at a higher quality thancompetition. Inefficient planning/scheduling leads to increased lead time, which dissatisfiescustomers.

”Customers may forget what you said but they’ll never forget how you madethem feel. ”

Unknown

2

Page 10: Reynard Arlow Final Year Project

1.3 Project Aim/Rational

The aim of the project is to achieve an optimal or near optimal method to schedule workso that the least amount of orders are delivered past their due dates. Thus scheduling workfor minimum lead time and make span, but still at an affordable cost to Wispeco. Thescheduling will also try and keep the finished goods inventory as low as possible. Togetherwith the low finished goods inventory, a customer’s work will not become damaged after thepowder coating is applied. The project wants to address the mixing of orders due to thefacility layout and also prevent human intervention, such as favouring certain orders aboveothers when production is planned.The goal is to complete orders within the promised completion time (Due Date) and stillfulfil customer requirements regarding quality etc. Distinction should not be made betweenimportant and less important customers. All customers are important, however, some workmay 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 thedifferent techniques related to such problems experienced in various industries. The literaturereview will look at the nature of these techniques and how they work. The decision will thenbe 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 aconcrete argument on the technique used.

1.4.2 Scope

This project will take place in the powder coating plant of Wispeco’s Parow plant. Adescription of the current production scheduling process will be provided together with theimproved process. The current process will be dissected and each step will be analysed tounderstand the process and spot various improvement opportunities.Information of different scheduling techniques obtained from the literature review will beused to construct a model, to improve the opportunities identified after analysis of theprocess. The model will be created in MATLAB.

3

Page 11: Reynard Arlow Final Year Project

A heuristic approach will be used for the development of the model. Several differenttechniques for a heuristic approach will be discussed in the next section. Some aspectshave to be excluded from the project, these include:

• The methods they use to hang the profiles on the conveyor (Different methods changethe 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 oneof 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 timeframe.

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

Page 12: Reynard Arlow Final Year Project

Part II

2 Literature Review & Problem Investigation

The following sections contain various tools and techniques used for production schedulingin different industries as well a description of the problem at hand. Different methodologieswere researched and compared in order to obtain the best possible method for modelling theproject. Various sources have been used to gather information.This part of the project will consist of two sections and each of these sections will befurther divided into different subjects. The first section consists of various techniquesthat are available for use. The second section will contain the problem investigation. Thisinvestigation will decide which technique will be used and if a technique has to be developedspecifically for this problem. The relationship between the problem and the technique willbe highlighted and clearly indicated.

2.1 Single Machine Scheduling Problem (SMSP)

For us to understand and develop solutions for multi-machine process scheduling one mustfirst look at single machine scheduling. For this project the student will stay with singlemachine scheduling, but just so that you know where it fits in. Many companies have theproblem of scheduling their work on only one machine as the capital, to gain another machinethat may not be available or sometimes (in Wispeco’s case), it is financially better to reducethe number of machines, assuming that the scheduling is possible.Single machine scheduling problems state that only one machine is available for the processingof all the work. It doesn’t matter if the process consists of more than one procedure. If theprocedures have to take place sequentially, the processes following the first process needs notbe considered, because all the products need to follow the same process and all of them haveto enter and exit the first process first. SMSP’s are sometimes theoretically seen as problemswith a simple structure in comparison to other scheduling problems, although when observedfrom a practical point of view, these problems can become quite large when companies haveto adapt to the single machine/set of machines. SMSP’s have been researched by quite afew 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 SMSPwith 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 spraybooth needs to be cleaned. Please refer to (Biskup 1999) for an in depth study of SingleMachine Scheduling. Basic sequencing rules that can be used in single machine schedulingare as follow:

1. Shortest Processing Time (SPT) - Shorter jobs are scheduled first.

2. Weighted Shortest Processing Time (WSPT) - Schedules in order of weightedshortest 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 duedate (Each job is assigned a weight/priority beforehand).

5

Page 13: Reynard Arlow Final Year Project

5. Largest Processing Time (LPT) - Larger jobs are scheduled first.

6. Weighted Largest Processing Time (WLPT) - Schedules in order of weightedlargest processing time (Each job is assigned a weight/priority beforehand).

The objective of this project will be discussed in the Conceptional Design section. Thefollowing lists provides the basic framework and notation for scheduling. The application ofthese parameters, variables and objectives will be discussed in the following sections. Thenotation used in this project will be the same as in the following pages, just to ensure thatthis project conforms to the common practice of scheduling projects. The notation used forthe problem at Wispeco is (1|Sjk(i)|

∑n−1j=1

∑nk=j+1 γSjk +

∑nj=1(αEj + βTj))

Notation

n number of jobsm number of machinespij processing time of job j on machine iCj completion time of job jwj weight/priority of job jdj due date of job jαj earliness penalty for job jβj tardiness penalty for job jLj = Cj − dj lateness of job jEj = |min(Lj, 0)| earliness of job jTj = max(Lj, 0) tardiness of job j

Uj =

{1 ifCj > dj0 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 ProblemEnvironment. This field is concerned with the environment of the machine and or the flowpattern of jobs. In other words, how are the machines laid out and how many of each one isthere, resources required and what processes can each machine handle etc.

1 one machineP or Pm identical parallel machinesQ or Qm parallel machines with different speedsR or Rm unrelated parallel machinesF or Fm flow shop: m machines in series:

each job is processed on each machine in orderJ or Jm job shop: each job is processed

on a job-dependent sequence of machinesO or Om open shop: processing order of machines for each job

is determined by the scheduler

6

Page 14: Reynard Arlow Final Year Project

Constraints & Characteristics β : The constraints are the factors that have an influenceon 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 laterstage while precedence is when certain processes must first happen before a specific processcan take place.

rj non-trivial release timessjk(i) setup-times of a machine i between jobs j and kpmtn pre-emptions are allowed: a job may be removed from a machine mid processprec jobs have precedence constraints

Objectives γ : This is considered as the objective of them model, what the user what outof 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∑nj=1 wjCj weighted sum of completion times∑nj=1 Tj sum of tardiness∑nj=1 wjCj weighted sum of tardiness

Cmax = maxj{Cj} make span/schedule lengthLmax = maxj{Lj} maximum lateness∑n

j=1 Uj number of late jobs∑nj=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 needto change colours, the time taken to change the colours differs. Setup time is for examplelarger between white and black than between black and bronze. This plays an enormous rolein 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 inconsideration for a sequence dependent SMSP. Their problem was (1|Sjk|

∑nj=1(αEj +βTj)).

Their setup costs was taken into account as part of their processing times.(Velez-Gallego, Maya, and Montoya-Torres 2016) used a beam search heuristic technique todevelop 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 definedas (1|rj, Sjk|Cmax).(Dayama et al. 2015) developed a History-dependent scheduling model. This model includesalgorithms 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 setupstimes 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. Whenproblems tend to be an optimization problem and the solving of an optimal value is difficult

7

Page 15: Reynard Arlow Final Year Project

these heuristic methods have the ability to exploit the structure of the optimization problemto arrive at a good solution (Winston 2003). Note that it is a good solution and notalways the best, as the time it would take to calculate the best solution, is not alwaysreasonable, depending on the problem size. Classic problems where the application ofheuristic techniques apply are those of the traveling salesperson problem (TSP).Heuristic approaches are used when the solving of an optimization problem would take anenormous amount of computational time to solve. If a problem can be optimally solved inpolynomial time using efficient algorithms, and a powerful computer it is not considered hardto solve. However when there isn’t a polynomial algorithm for a problem, it is consideredhard to solve and these problems are called nondeterministic (NP) class problems. Withinthe 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 aNP-hard problem.If we can prove that an algorithm will converge to an optimal solution in a finite number ofiterations, 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 until10, but by then the problem is so time consuming, that it is not feasible to solve. Themoment the complexity becomes O(2n) it is completely inefficient to try and solve becauseof the exponential growth of the problem. Table 3 shows how complexity, together withproblem size, influences the computational time. Various different techniques are shownbelow:

n 10 20 50 100n2 100 400 2500 10000n3 1000 8000 125000 1000000n5 100000 3200000 312500000 10000000000n10 10000000000 1.024E+13 9.76863E+16 1E+202n 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 heatedabove its melting point and then left to gradually cool down. This cooling process minimizesits total energy probability distribution. This is a beautiful example where nature finds theoptimal crystal structure (Haupt 2004). In the article of (Bouleimen and Lecocq 2003) theyuse Simulated Annealing for a job shop scheduling problem (JSSP). They prove how theiralgorithm converges to a global minimal solution despite the fact that the Markov chainsthey generated are generally not irreducible.This algorithm begins with random guesses of variable values in the cost function. After thefirst step the algorithm follows a set of predetermined rules to decrease the cost function asfar as possible. Figure 1 shows the approach used with SA. (Anonymous n.d.)

8

Page 16: Reynard Arlow Final Year Project

Figure 1: Simulated Annealing algorithmic approach

2.3.2 Particle Swarm Optimization

In 1995 Edward and Kennedy formulated Particle Swarm Optimization (PSO). Social behavioursuch as schools of fish or bird flocking inspired the PSO thought process. PSO works ina very similar way than continuous Generic Algorithm in that it starts with a randompopulation matrix (Haupt 2004). However PSO does not contain operators such as crossoverand mutation.The rows in these matrices are called particles hence the term particle swarmoptimization. These particles contain variable values which are not binary. The cost functionis a surface on which these particles move about with a velocity. Particles update theirpositions and velocities based on best local and global solutions. Using a PSO approach willenable the user to tackle tough cost functions with more than one local minimum. In thearticle of (Sha and Hsu 2006) they tailored their particle position, movement and velocityto fit their job shop problem (JSP). Figure 2 shows a PSO approach (Patnaik 2012).

9

Page 17: Reynard Arlow Final Year Project

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 achievedby a pheromone which they lay down as they walk. Other ants then find this trail and followsit to the food source. Each time an ant walks on this path they also lay down a pheromonetrail. As the shortest path becomes more travelled, the pheromone trail gets stronger andmore 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. TheACO approach for a TSP begin with a number of ants/agents that follow a path around thecities. Each agent lays its own pheromone trail as it travels along its path. The agents areat first randomly assigned to a city. The next destination is usually decided upon by using aweighted probability that is a function of its pheromone trail strength, and the distance tothe next destination. A factor for pheromone evaporation is built assigned to the model to

10

Page 18: Reynard Arlow Final Year Project

dispose of the trails that are less travelled, otherwise the model will still see them as goodsolutions. The pheromone along the best possible route is described per function whichdepends on the problem and user. This function is then used to decide on the model criteriaand when the model should stop. (Merkle, Middendorf, and Schmeck 2002) used ACO fora RCPSP in their article. This will however not be used in this project because this projectdoes not have constraints to resources. (Huang and Liao 2008) displayed a very interestingarticle on how they combined ACO together with TS to solve a classic Job Shop SchedulingProblem (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. Survivalof the fittest and the process of natural selection are considered important aspects in theprocess of evolution. GA works are based on the process of evolution. GA’s uses popular ideasof biology such as: Chromosome population, mating selection, producing offspring throughcrossover techniques, and mutation to ensure diversity in the population. The starting pointfor a GA is the initial population. Once the initial population is generated GA techniquescan 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 populationrepresent possible solutions for the problem. Each solution is calculated and evaluated usinga predetermined fitness function. A new population is then generated using the initial

11

Page 19: Reynard Arlow Final Year Project

population function and then these populations are mated with the strongest populationsfrom the previous population generation. The populations that are used in the matingprocess are chosen by the fitness function. The higher a population’s fitness the more likelyit 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 oreven 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 ornot). 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 thegeneration of the new population. The parents/solutions with a higher or better fitnessstands a better chance to be chosen for reproduction.Step 4: Reproduction. The parents are used to generate a new population that contains aportion of each parent.Step 5: Mutation. The genetic makeup of the offspring are randomly altered to avoidreaching a local optima. Thus the offspring are now the new generation/populations ofsolutions.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 lotin common with this project, whereas it searches for a local best and then tries to improvethat 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, alsoknown as Tabu Search(TS), was developed in 1986 by a fellow by the name of Glover. Tabusearch is not a process that imitates any natural processes such as Simulated Annealingor Genetic search, but rather makes use of memory (Winston 2003). This process consistsof short and long term memory properties that helps the algorithm to calculate the bestpossible solution. The short term memory helps the model to avoid circling around localneighbourhoods, whereas the long term memory helps the model to conduct searches forsolutions in locations that previously prevailed promising results. Although Tabu Searchalgorithms sound simple, they can become quite difficult because of the memory functionthey possess.The following steps that present the procedure for a Tabu Search algorithm were extractedfrom (ibid.):

12

Page 20: Reynard Arlow Final Year Project

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), doCreate a move from the candidate list to create a solution xcount from xcurrent

If the solution satisfies the tabu criteria test: Create tabu evaluationElse If aspirations test is not met: Create penalized tabu evaluation

Else create tabu evaluationEnd IfEnd If

If xcount is best move so far, xbest = xcurrentUpdate counter by 1End 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 Trubian1993). 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 totry and save the plant. One of these changes is to reduce the number of powder coating linesfrom two to one. The remaining powder coating line will not be kept as is. There is a separateproject that tackles the redesign and to improve the capacity of this line. For this projectthe student assumes that the project regarding the efficiency of the powder coating line isfinished. The core of this project lies within the fact that the company is now reducing thenumber of machines they have available for production. Previously they used one machinefor the larger orders, which usually entailed colours such as white, charcoal, bronze andblack. 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 ofview, although the planning schedule was still not the optimal schedule. The schedule wasdeveloped by one person’s intuition and if that person was not available anymore, the wholeplanning process was changed to the insight of the new person. They now have to scheduleall of the work on one machine, and with an average of 100 orders per day, this problem canbecome quite complex. With a predetermined set of rules to follow for scheduling this canbe easier, and with a model that automatically follows these rules this can become mucheasier. The process which each Aluminium profile follows is as follow:

1Gathered from Preliminary studies or history, for the long term memory use

13

Page 21: Reynard Arlow Final Year Project

1. Delivered by customer with own fleet or received from the hydraulic press. (If customersdo not have their own material they can order from the press, which will be sent topowder 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 specialmaterial 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 materialreceived 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. Thisis done by taking the job cards and entering it into TOPP (TOPP is the ERP systemthey are using).

3. After the job cards are entered into the system a PreSchedule.xls file is created. The fileshows the product number, order number, colour, quantity, amount of square metersto 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 ”Scheduleaccording to the big work”. In other words, they rearrange the PreSched file so thatthe 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 paragraphof Problem Investigation.

6. After scheduling has taken place they print a sheet showing the order in which thework should be done.

7. Finally the job cards are then placed back into the skips so that floor managers knowthe colour, client etc.

Following this procedure of scheduling we can see that it is easy for a customer’s work to getbehind schedule. The reason for this planning, is to increase machine efficiency, longer runsmean less downtime. Unfortunately, customers do not pay for an efficient machine. Theypay for their work to be done on time.

14

Page 22: Reynard Arlow Final Year Project

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 projectdoes not rely on lots of data, but rather a sample that will be used inside the modelupon development. This sample data, however, contains most of the variations that canbe observed in the data, so that all variations are tested in the model design phase. Thedata 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 mostimportant one was the Daily production of the Parow plant. Figure 5 shows the distributionof the daily production. With this new model we would like to increase the daily productionby simply just organizing the way in which we do our work.

15

Page 23: Reynard Arlow Final Year Project

Figure 5: Daily production for the Parow plant

Another important area was to look at the number of colour changes per day that they areperforming. Figure 6 shows the distribution of the colour changes. The average is aroundfive colour changes per day, but sometimes this rises to 15. This is the effect of improperplanning. This happens when small orders are not scheduled as they arrive, because theyput big orders first, and are then left until the customer starts calling etc. On days likethis they have to do a lot of small orders and between each order a colour change. Theyeven sometimes change to the same colour twice a day. The order size distribution was alsocalculated, shown in figure 7, and it clearly states the fact that they have a lot of frequentsmall orders.

Figure 6: Colour changes per day for Parow

16

Page 24: Reynard Arlow Final Year Project

Figure 7: Order size distribution

For more charts regarding the distribution of order sizes per colour please refer to AppendixB.

3.2 Model Data

In section 2.4.2 we already looked at the PreShedule.xls file that they are using for theirproduction scheduling currently. For the model the student will use the same data butonly in another format. The PreSchedule.xls file presents data that are not of any use inthe model, so to keep everything simple and organized this data will be removed. Table 4shows an example of the input data that is going to be used in the model. This data willbe extracted by the model via a text file that is created from the PreSched.xls file that isalready generated by the ERP system.

Order number Colour m2 Processing time [Min] Due dateG16MAR PCR5 20.47 4.09 160404R77208 PBK2 12.12 2.42 160329R77200 PCR5 20.54 4.11 160326R77206 PWT1 10.66 2.13 160329A83582 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 infigure 5. Or in the case of this project it will be the time required to change from one colourto another (colour of order i to the colour of order j ). As mentioned before, there are projectscurrently running that in an attempt to improve the changeover times. In this project thestudent 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 setuptime matrix can simply be changed and the model will accommodate those changes. The

17

Page 25: Reynard Arlow Final Year Project

changes are possible because the model will extract the setup time matrix data from a CSVfile, 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 PPW1PBA3 0 11 10 15 10 10 200PCW1 15 0 10 10 10 10 10PCW2 20 10 0 10 10 10 10PCW4 10 10 10 0 10 10 10PGW2 0 10 10 20 0 15 10PHW1 10 10 10 10 10 0 10PPW1 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 inwhich the work needs to be done. Together with the schedule sheet, will be some statisticsregarding 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 problemduring BPJ 410. Please note that the design changed and the solution is displayed in thefollowing 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 techniquebecause of the complexity and nature of this problem. We want a model that builds us thebest solution, the same way nature uses Genetic Mutation to create stronger offspring. Thistype of scheduling problem is considered as a NP-Hard problem because of the computationaltime needed to solve the problem. This is also why the student uses a GA, because themethod in which the model will search, will be faster and more efficient. The model will alsosearch a larger area of the solution space. The complexity of this problem will be betweenO(n2) & O(n4). With a slight chance of it being O(n5). A problem with this complexitysize can still be computed within a reasonable time.The entire solution space may look like the one presented in figure 8. This solution spacerepresents the fitness function of the model. The model will start at a random point in thesolution space, as the model builds new solutions, costs for each possible solution will becalculated. It will search the space until it founds the minimum value or if the stoppingcriteria is met, where after it will take the best solution . In this case it will be the minimumcost for the company.

18

Page 26: Reynard Arlow Final Year Project

Figure 8: GA Solution Space

3.3.2 Algorithm development in MATLAB

The following section will provide details regarding the implementation of the mathematicalmodel in MATLAB to form the Generic Algorithm. Please note: This section will onlycontain 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 populationis basically a possible solution for the production schedule. The Binary Matrix that isgenerated, conforms to the constraints in the Mathematical Model. Table 6 shows anexample of a Binary Matrix. The size of the matrix is nxn with n = number of jobs. Duringthe 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 51 0 1 0 0 02 0 0 1 0 03 0 0 0 0 14 1 0 0 0 05 0 0 0 1 0

Table 6: Example of a Binary Matrix

19

Page 27: Reynard Arlow Final Year Project

Evaluation: Equation 1 are used as the fitness function in the model. The evaluationfunction calculates the cost function for all m populations generated. These costs are thenstored 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 itsmatching matrix and stores it as the best option/schedule. After the best one is chosen the(m2− 1) next best values & matrices are stored.

Reproduction: The Reproduction function generates m2

new random populations. Thesepopulations will be used together with the populations Mutated in the Mutation function.

Mutation: The Mutation function alters the populations that was stored in the Selectionfunction. This function swaps all the values of the matrices, e.g if X12 = 1 then X21 willbecome 1. Table 7 & 8 shows an example of this mutation.

Order 1 2 3 4 51 0 1 0 0 02 0 0 1 0 03 0 0 0 0 14 1 0 0 0 05 0 0 0 1 0

Table 7: Before Mutation

Order 1 2 3 4 51 0 0 0 1 02 1 0 0 0 03 0 1 0 0 04 0 0 0 0 15 0 0 1 0 0

Table 8: After Mutation

Repeat: The new populations generated in the Reproduction function are added to theMutated populations from the Mutation function and the process repeats from the Evaluationfunction. So the costs are calculated and the best ones are kept and mutated while new onesare generated and model continues like this until stopping criteria is met. The stoppingcriteria must still be decided.

20

Page 28: Reynard Arlow Final Year Project

Part IV

4 Solution

[This section contains the solution model developed for the problem. Please note that thisdesign 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 thisproject. Latter sections will show the Mathematical Model, the Model design in MATLABas well as the validation of the model. The model developed for the project can be calleda ”Random Generated Genetic Algorithm”. The model is basically trying thousands ofrandomly generated schedules, and determines their cost in terms of Setup and Overduecosts. The execution of the Model was approached in a different manner and simplified afterthe design of the conceptual model.

4.2 Mathematical Model

The Mathematical Model for the solution differs slightly from the Mathematical Model of theConceptual design. The mathematical outline used for the solution model can be summarizedas (1|Sjk(i)|γ

∑n−1j=1

∑nk=j+1 SjkXjk + β

∑nj=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

ParametersDj = Due date for job j, j ∈ JSjk = Setup time between job j and job k, j ∈ J, k ∈ Kpk = Processing time for job k, j ∈ Jβ = Over due date penaltyγ = Setup cost per minute

Variablestk = Start time of job k, k ∈ KCk = Completion time of job k, k ∈ K

Xjk =

{1 if job k is immediately preceeded by job j0 otherwise

j ∈ J, k ∈ K

yk =

{1 Cj - Dj if Ck > Dk

0 otherwisej ∈ J, k ∈ K

Objective Function

MinZ = γn−1∑j=1

n∑k=j+1

SjkXjk + βn∑

j=1

yk (1)

21

Page 29: Reynard Arlow Final Year Project

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 tardinesscost is minimised. Equation 2 ensures that every job precedes only one job. Equation 3ensures that every job is preceded by only one job. Equation 4 is to guarantee that thetime allocation of each scheduled job includes the setup and processing time and is notgreater than the completion time of the job. The inequality could have been written as anequation, but this should make no difference since the minimisation objective is also expectedto make the completion time not larger than the minimum required. Equation 5 is to ensurethe precedence necessity amongst the jobs scheduled, so that any job scheduled before aparticular job would be completed before the subsequent job would be started. Equations6 and 7 are to guarantee non-negativity and the binary constraints of the decision variablesas 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 tkshould help to eliminate the presence of subtours in this case (R. and M. 2008) so, othersubtour elimination constraints are not added. This problem is known to degenerate intoexponential search in the worst case, and hence the application of metaheuristics to find itssolution in cases where the number of variables is large, as is the case herein, and thus theapplication 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 solutionmodel differ from the functions used in the conceptual design model, because of the flawsthat were addressed. The outline of the steps are still the same in both the solution modelas well as the conceptual model. The steps are:

22

Page 30: Reynard Arlow Final Year Project

Generation: The model starts off with the Pre-Schedule as shown in Table 9. The modelthen 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 theorder is n with n = number of jobs. During the Generation phase m number of populationsare randomly generated, e.q. m = 50, 100 etc (Table 10).

Order number Colour Code Number assigned Randomly Generatedby Model Schedule

R 77 208 PBK2 1 1R 77 217 PSI1 2 7R 77 200 PCR5 3 10R 77 206 PWT1 4 2721019 PWT1 5 3721038 PBK0 6 9721042 PBZ0 7 5721044 PBZ0 8 4721057 PBZ0 9 8721050 PCR3 10 6

Table 9: Example of a Possible Population Generated

Evaluation: Equation 1 is used as the fitness function in the model. The evaluationfunction calculates the costs for all m schedules generated (Table 10). These costs are thenstored in a vector together with their corresponding populations/schedules in order to berecalled later.

2 7 7 7 7 1 9 6 2 96 5 5 9 1 9 1 7 5 88 4 4 2 6 3 5 2 10 31 2 2 5 8 4 6 1 7 25 6 6 4 2 8 4 5 6 64 1 1 10 3 6 7 9 9 73 10 10 8 10 10 3 3 4 59 8 8 1 9 7 8 4 1 1010 9 9 6 5 5 10 10 3 47 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 regardingtheir costs. During the selection process the model takes the best cost value together withits matching schedule and stores it as the best option/schedule. After the best one is chosenthe (m

2− 1) next best values & schedules are stored.

Reproduction: The Reproduction function generates m2

new random schedules. Theseschedules will be used together with the schedules Mutated in the Mutation function to form

23

Page 31: Reynard Arlow Final Year Project

a new population.

Mutation: The Mutation function alters the schedules that were stored in the Selectionfunction. This function just flips the schedule from back to front.

Repeat: The new schedules generated in the Reproduction function are added to theMutated schedules from the Mutation function and the process repeats from the Evaluationfunction. So the costs are calculated and the best ones are kept and mutated while new onesare 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 fromrandomly generated populations and it then plays them off against each other, and aftera while it determines the best model for that time period. Normal Genetic Algorithmshave a mutation and crossover rate where the model determines, using probabilities, whichschedules to use at the next evaluation stage. This model takes the best half and flips themaround. However this model showed that by only generating random populations you canachieve 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 theoutline and basic working of the model.

Random Generated Genetic Algorithm

Section AA← Number of Repetitions/Runsm← Initial Population Sizen← Number of Orders to sequenceInitialize;Generate Initial Population of m Schedules

Section Bfor i = 1→ m do

Evaluate InitialPopulation(i) CostAppend to InitialPopulationCost

end for

Sort Initial Population Cost Small to Large

Best Cost ← InitialPopulationCost(1)Best Population ← InitialPopulation(1)

Section Cfor j = 1→ A do

NewPopulation(j) ← Best Population

24

Page 32: Reynard Arlow Final Year Project

for q = 2→ m2

doNewPopulation(q) ← Mutated 2 InitialPopulation(q)

end for

for r = m2

+ 1→ m doNewPopulation(q) ← Randomly Generated Schedule3

end for

for s = 1→ m doEvaluate NewPopulation(s) CostAppend to NewPopulationCost

end for

Sort New Population Cost Small to Large

if NewPopulationCost(1) < Best Cost thenBest Cost ← NewPopulationCost(1)Best Population ← NewPopulation(1)

elseBest Cost ← Best CostBest 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 initialpopulation 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 theleast to the highest cost. The best cost found is then stored along with the sequence thatgenerated the minimum cost. The sequence associated with the best cost is stored as thebest population.In section C, once the best values are stored as part of the new population, the algorithmstarts to iterate for the number of generations specified during initialisation, while the plot ofthe minimum cost is tracked for convergence. Next is the cross over and mutation operationto generate a new population. To do that, (J.E. and B.C. 1996) fusion cross algorithmwas applied. This algorithm works well in situations where normal genetic cross over doesnot work well, like with binary variables which are extreme values of their set as opposedto continuous variables, whose cross creates something within the values of the parentsextremes. The fusion algorithm works in a destructive manner. It takes two parent genesand create a single child from them. This helps to search further within the neighbourhoodof the good solutions found up until the current iteration. The genes within the currentpopulation of the iteration are paired up to produce half the new population. The remaininggenes (half of the new population) are then randomly generated all over the solution space to

2Mutation function in Section 4.33Generation function in Section 4.3.

25

Page 33: Reynard Arlow Final Year Project

prevent premature convergence so that the solution space is well explored. The model thencontinues to iterate until the specified number of iterations is reached, then best cost withits corresponding sequence found as at the end of final iteration is stored. However, in thismodel the mutation/selection is a bit different. After the cost together with their schedulesare sorted the model takes the top half as the best schedules for reproduction. The otherhalf 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 weshow 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 Generationphase 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 Size1 10 22 20 43 30 64 40 105 50 206 100 507 500 1008 10009 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 atthe lowest point, we see that A is 9 and Initial Solution Size is 2. Together with Table 11we see that A was 10,000 and Initial Solution Size was 4. (This was done to make Figures9 and 10 more presentable)

4.4.1 Model Testing

Best Cost testingFigure 9 shows the cost curve for various testing conditions. The testing conditions consistedof two variables changing. These variable were the Initial Solution Size and A. The InitialSolution Size is the amount of Random schedules the model evaluates at each time, and A isnumber of times the model will repeat itself. For example, the model will test four differentschedules 10,000 times. These four schedules will be randomly generated each time. Table12 shows the values which were used in the plotting of the Best Cost curve. Please use Table11 as a guide to read Figure 9.

26

Page 34: Reynard Arlow Final Year Project

Figure 9: Cost Curve

Best Cost [R]A

10 20 30 40 50 100 500 1000 10000

InitialSolution

Size

2 4480 4430 4470 4490 4500 4345 4330 4340 42954 4475 4405 4455 4475 4355 4430 4300 4340 41656 4430 4415 4395 4395 4390 4380 4370 4295 427010 4390 4390 4375 4420 4395 4330 4315 4295 426520 4370 4395 4380 4400 4335 4330 4295 4330 421050 4415 4375 4345 4365 4325 4325 4315 4270 4225100 4355 4280 4305 4320 4340 4315 4300 4260 4225

Table 12: Best Cost Data for Figure 9

Computation Time testingFigure 10 shows the Computation Time curve for various testing conditions. These testconditions are the same as the conditions used in section 4.4.1. Table 13 shows the dataused for the Computation Time Curve. Please use Table 11 to read Figure 10.

27

Page 35: Reynard Arlow Final Year Project

Figure 10: Time Curve

ComputationalTime [s]

A10 20 30 40 50 100 500 1000 10000

InitialSolution

Size

2 0.086 0.086 0.091 0.097 0.095 0.114 0.26 0.442 3.9894 0.081 0.09 0.106 0.11 0.12 0.145 0.454 0.757 8.2686 0.092 0.098 0.11 0.121 0.129 0.176 0.574 1.089 14.09710 0.097 0.112 0.134 0.143 0.161 0.248 0.907 1.801 28.12520 0.118 0.148 0.179 0.212 0.247 0.425 1.754 3.555 89.47650 0.161 0.242 0.337 0.399 0.492 0.89 4.404 10.599 540.12100 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 TestingTable 14 shows the different Population sizes that were tested. The model was repeated50 times with A = 10, 000 and the Initial Solution Size changing. From here distributionswere drawn to determine the range of the best cost values for each population. Please seeAppendix D for the graphs.

TestConditions

Population size A Lowest Best Highest Best CPU Time [s]

1 4 10000 4240 4320 8.2682 6 10000 4220 4320 14.0973 8 10000 4170 4320 21.4294 10 10000 4220 4300 28.1255 50 10000 4160 4280 540.12

Table 14: Various test conditions with A = 10,000

28

Page 36: Reynard Arlow Final Year Project

Furthermore the model was repeated five times, with the conditions being A = 10, 000 andInitialSolutionSize = 4, to test the variation of the model. Figure 11 shows the averagepopulation cost that was gathered during the testing. The figure shows that the model doesnot vary a lot even though it is a Random Generated Genetic Algorithm. Figure 12 showsthe best cost for life cycle for each run. The figure shows the best cost almost follows thesame pattern every time. With the slight chance of it decreasing after the model repeateditself 9,000 times. This shows the stability of the model even though it is actually a randommodel.

Figure 11: Average Population Cost

Figure 12: Best Cost Life Cycle

29

Page 37: Reynard Arlow Final Year Project

Testing ConclusionSection 4.4.1 shows the cost curve figure. This figure shows the 63 different scenarios thatwere tested. We can see that the larger the Initial Solution Size and the more the modelis repeated, the better the results were obtained. But time is an issue. Section 4.4.1 showsa figure that corresponds with Figure 9. This figure indicates that the bigger the InitialSolution 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 InitialSolution Sizes.Table 14 in Section 4.4.1 shows the various scenarios where the model was repeated 10,000times, but with different Initial Solution Sizes. The Initial Solution Sizes that were testedwas, 4, 6, 8, 10 and 50. Two was not tested because the population size is too small and 100was also not tested because of the computational time. Finally the conclusion was made thatrepeating 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 theoptimal 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 discussedin the Literature Review in Part 2. The first model tested was the EDD model, which isknown as the Earliest Due Date Model. This model is only concerned with the due dates ofeach order and it is scheduled according to that. This model would be perfect if the setuptimes 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 ordersfirst. Unfortunately, because the larger orders are shifted to the back , these becomes verylong overdue. The third model that was tested, was the LPT model, known as the LargestProcessing Time model. This model schedules the larger orders first. The largest orders aredone first which can cause some smaller orders to wait very long and become overdue. All ofthese models were tested against the Random Generated Genetic Algorithm model, and theEDD Model has proven to be a better model to use at this stage. The Random GeneratedGenetic Algorithm has proven to be better than the SPT and LPT model at this stage onthe number of jobs overdue and the best cost. Please refer to Table 15. 4

Solution Model EDD Model SPT Model LPT ModelBest Cost 4160 3090 4330 4380Jobs Overdue 48 48 48 49Average JobCompletion Time [s] 1092.81 1156.35 450.16 2239.42

Table 15: Best Costs and Jobs Overdue for various different models

4The data that has been used for the Solution Model is the best data found with a few test runs. Pleaserefer to Appendix E for the distributions of the data

30

Page 38: Reynard Arlow Final Year Project

4.5 Proposed Cost Savings

Even though the model already tries to decrease the cost with every iteration, there is afurther cost saving for the company. As mentioned the company appointed a person whoschedules 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.TechIndustrial degree. If we assume that she works at a rate of R120 per hour for 3-4 hours eachday, 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 peryear.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 AlgorithmModel at this stage of the project. It is recommended that further testing takes place beforea conclusion on the Random Generated Genetic Algorithm can be drawn. It is believed thatthe data that was used as input data in the model, could have affected the performance ofthe model. This is why further testing is recommended with a variation of input data. Forexample, random due dates together with random order sizes and colours can be used. Untilfurther testing is done no concrete conclusion can be given.

5 Conclusion

In conclusion, the problem currently experienced by the company was identified and a methodfor the approach of a solution has been established. Throughout this document severalmethods have been researched and explained, from the Simulated Annealing (SA) techniquethrough to the Tabu Search (TS) technique. After all of the techniques have been researchedand considered the decision was made to develop a model with a base of a Random SearchTechnique, but with the execution steps of a Generic Search Technique. This techniqueshowed a lot of potential as it enabled the model to build a better solution with each stepwithin a reasonable amount of time. Although further testing is strongly recommendedbefore 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 theprojects 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 themto save time and money.Finally, the student hopes to deliver a project of importance, but also with the ability tohave an impact on the company. Because of the nature of this project the student also hopesto aid future project executors in their project development.

Give me six hours to chop down a tree and I will spend the first four sharpeningthe axe.

Abraham Lincoln

31

Page 39: Reynard Arlow Final Year Project

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-shopscheduling problem”. In: Annals of Operations Research 41.3, pp. 231–252.

Goncalves, Jose Fernando (2005). “A hybrid genetic algorithm for the job shop schedulingproblem”. 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 Research35.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) andMeta heuristic (Ant Colony Optimization) Algorithms for Symbol Detection in MIMOSystems”. In:

Kır, Sena and Harun Resit Yazgan (2016). “A sequence dependent single machine schedulingproblem with fuzzy axiomatic design for the penalty costs”. In: Computers & IndustrialEngineering 92, pp. 95–104.

Merkle, Daniel, Martin Middendorf, and Hartmut Schmeck (2002). “Ant colony optimizationfor resource-constrained project scheduling”. In: Evolutionary Computation, IEEE Transactionson 6.4, pp. 333–346.

Patnaik, Panda (2012). “Particle Swarm Optimization and Bacterial Foraging OptimizationTechniques for Optimal Current Harmonic Mitigation by Employing Active Power Filter”.In:

R., Moghaddas and Houshmand M. (2008). “Job-Shop Scheduling Problem With SequenceDependent Setup Times”. In: Proceedings of the International MultiConference of Engineersand Computer Scientists 2.

Rubin, Paul A and Gary L Ragatz (1995). “Scheduling in a sequence dependent setupenvironment with genetic search”. In: Computers & Operations Research 22.1, pp. 85–99.

Sena Kir, Harun Resit Yazgan (2015). “A sequence dependent single machine schedulingproblem with fuzzy axiomatic design for the penalty costs”. In:

Sha, DY and Cheng-Yu Hsu (2006). “A hybrid particle swarm optimization for job shopscheduling problem”. In: Computers & Industrial Engineering 51.4, pp. 791–808.

32

Page 40: Reynard Arlow Final Year Project

Velez-Gallego, Mario C, Jairo Maya, and Jairo R Montoya-Torres (2016). “A beam searchheuristic for scheduling a single machine with release dates and sequence dependent setuptimes to minimize the makespan”. In: Computers & Operations Research 73, pp. 132–140.

Winston, Wayne L (2003). “Introduction to mathematical programming.: operations research.”In:

33

Page 41: Reynard Arlow Final Year Project

Appendix A: Industry Sponsorship form

34

Page 42: Reynard Arlow Final Year Project
Page 43: Reynard Arlow Final Year Project

Appendix B: Data Analysis

(a) Black (b) Bronze

(c) Charcoal (d) New Silver

(e) Alu White (f) White

36

Page 44: Reynard Arlow Final Year Project

Appendix C: Model Validation Data

n : This is the index in which the model ran e.g 1st run, 2nd run etcInitial Solution Size m : This is the amount of populations generated during the Generationphase 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.0862 4 10 4475 0.0813 6 10 4430 0.0924 10 10 4390 0.0975 20 10 4370 0.1186 50 10 4415 0.1617 100 10 4355 0.2488 2 20 4430 0.0869 4 20 4405 0.0910 6 20 4415 0.09811 10 20 4390 0.11212 20 20 4395 0.14813 50 20 4375 0.24214 100 20 4280 0.40715 2 30 4470 0.09116 4 30 4455 0.10617 6 30 4395 0.1118 10 30 4375 0.13419 20 30 4380 0.17920 50 30 4345 0.33721 100 30 4305 0.5722 2 40 4490 0.09723 4 40 4475 0.1124 6 40 4395 0.12125 10 40 4420 0.14326 20 40 4400 0.21227 50 40 4365 0.39928 100 40 4320 0.72429 2 50 4500 0.09530 4 50 4355 0.1231 6 50 4390 0.12932 10 50 4395 0.16133 20 50 4335 0.24734 50 50 4325 0.49235 100 50 4340 0.901

Table 16: Data for Best Cost and Computational time testing (1)

37

Page 45: Reynard Arlow Final Year Project

n Initial Sol Size A Best Cost[R] Computation Time[s]36 2 100 4345 0.11437 4 100 4430 0.14538 6 100 4380 0.17639 10 100 4330 0.24840 20 100 4330 0.42541 50 100 4325 0.8942 100 100 4315 1.73843 2 500 4330 0.2644 4 500 4300 0.45445 6 500 4370 0.57446 10 500 4315 0.90747 20 500 4295 1.75448 50 500 4315 4.40449 100 500 4300 10.40250 2 1000 4340 0.44251 4 1000 4340 0.75752 6 1000 4295 1.08953 10 1000 4295 1.80154 20 1000 4330 3.55555 50 1000 4270 10.59956 100 1000 4260 27.88857 2 10000 4295 3.98958 4 10000 4165 8.26859 6 10000 4270 14.09760 10 10000 4265 28.12561 20 10000 4210 89.47662 50 10000 4225 540.1263 100 10000 4225 2396.206

Table 17: Data for Best Cost and Computational time testing (2)

38

Page 46: Reynard Arlow Final Year Project

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

Page 47: Reynard Arlow Final Year Project

Appendix E: Solution Model vs. Other Models Data

(a) Average Job Completion Time (b) Best Cost Distribution

40

Page 48: Reynard Arlow Final Year Project

Appendix F: Article submitted for publication

41

Page 49: Reynard Arlow Final Year Project

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

Page 50: Reynard Arlow Final Year Project

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.

Page 51: Reynard Arlow Final Year Project

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

Page 52: Reynard Arlow Final Year Project

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

Page 53: Reynard Arlow Final Year Project

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)

Page 54: Reynard Arlow Final Year Project

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

Page 55: Reynard Arlow Final Year Project

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

Page 56: Reynard Arlow Final Year Project

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

Page 57: Reynard Arlow Final Year Project

9

algorithm produces results that are consistent with the expected result. It may, therefore, be expected that if the values of 𝛾 and β are adjusted accordingly in the objective function (equation 1), then, the model could produce results that would be in harmony with expectations, and this would be done in polynomial time. This result was obtained scheduling between one hundred and two hundred jobs using real data from Wispeco.

Figure 3: Best Cost lifecycle The Genetic Algorithm model proves to be better than the SPT and LPT rules on the amount of jobs overdue and the best cost as seen on Table 3.

Table 3: Solution Model vs. Dispatch Rules

Solution Model EDD Model SPT Model LPT Model

Best Cost 4160 3090 4330 4380

Jobs Over Due 48 48 48 49

Average Job Completion Time [s]

1092.81 1156.35 450.16 2239.42

4. CONCLUSION

The Genetic algorithm can be said to have produced desired results for the different data streams supplied in good time. While the EDD rule has produced better result than the Genetic Algorithm model along the dimension of due date, it does not seem to consider achieving a make span as good as the GA. Also, the SPT produced good result based on the dimension of make span only. The GA model is able to attain a good result on all dimensions, taking into account the relative cost of setup to job tardiness. Further test scenarios may be defined to thoroughly evaluate the performance of the GA model along other dimensions and operating conditions, including different types of data stream inputs. 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. The GA model seems to have, however, produced results

Page 58: Reynard Arlow Final Year Project

10

that could make it useful for the purpose of good job schedules for Wispeco and within acceptable time limits for its daily operations.

5. REFERENCES

[1] Biskup, D. 1999, Single-machine scheduling with learning considerations, European Journal of Operational Research, 115.1, pp. 173-178.

[2] Kir S., Yazgan H.R. 2016, A sequence dependent single machine scheduling problem with fuzzy axiomatic design for the penalty costs, Computers & Industrial Engineering, 92, 95–104

[3] Vélez-Gallego, Mario C, Montoya-Torres J.R. 2016, A beam search heuristic for scheduling a single machine with release dates and sequence dependent setup times to minimize the makespan, Computers & Operations Research, 73, 132–140

[4] Shahvari O. and Logendran R. 2016, Hybrid flow shop batching and scheduling with a bi-criteria objective, International Journal of Production Economics, 179, 239–258

[5] Nikabadia M.S. and Naderi R. 2016, A hybrid algorithm for unrelated parallel machines scheduling, International Journal of Industrial Engineering Computations, 7, 681–702

[6] Lu C., Xiao S., Li X. and Gao L. 2016, An effective multi-objective discrete grey wolf optimizer for a real-world scheduling problem in welding production, Advances in Engineering Software, 99, 161–176

[7] Dayama N.R., Krishnamoorthy M., Ernst A., Rangaraj N. and Narayanan V. 2016, History-dependent scheduling: Models and algorithms for scheduling, with general precedence and sequence dependence Computers & Operations Research, 64, 245–261

[8] Mir M.S.S. and Rezaeian J. 2016, A robust hybrid approach based on particle swarm optimization and genetic algorithm to minimize the total machine load on unrelated parallel machines, Applied Soft Computing, 41, 488–504

[9] Merkle D., Middendorf M. and Schmeck H. Ant Colony optimisation for resource controlled project scheduling. In D. Whitley, D Goldberg, E. Cantu-Paz, L Spector, I Parmee & H.G. Beyer (eds), Proceedings of Genetic and Evolutionary Computation Conference, San Francisco, 2002, 893-900

[10] Afzalirad M. and Rezaeian J. 2016, Resource-constrained unrelated parallel machine scheduling problem with sequence dependent setup times, precedence constraints and machine eligibility restrictions, Computers & Industrial Engineering, 98, 40–52

[11] Gedik R., Rainwater C., Nachtmann H. and Pohl E. A. 2016, Analysis of a parallel machine scheduling problem with sequence dependent setup times and job availability intervals, European Journal of Operational Research 251, 640–650

[12] An Y-J, Kim Y-D, Choi S-W. 2016, Minimizing makespan in a two-machine flowshop with a limited waiting time constraint and sequence-dependent setup times, Computers & Operations Research, 71, 127–136

[13] Xanthopoulos A.S., Koulouriotis D.E., Gasteratos A. and Ioannidis S. 2016, Efficient priority rules for dynamic sequencing with sequence-dependent setups, International Journal of Industrial Engineering Computations, 7, 367–384

[14] Gholami-Zanjani S.M., Hakimifar M., Nazemi N. and Jolai F. 2016, Robust and Fuzzy Optimisation Models for a Flow shop Scheduling Problem with Sequence Dependent Setup Times: A real case study on a PCB assembly company, International Journal of Computer Integrated Manufacturing

[15] Goncalves, J.F. 2005, A hybrid genetic algorithm for the job shop scheduling problem, European Journal of operational research, 167.1, pp. 77-95.

[16] Haupt R.L. and Haupt S.E. 2004, Practical genetic algorithms, John Wiley & Sons. [17] Winston,W. L. and Venkataramanan M. 2004, Introduction to mathematical

programming: operations research, Thomson [18] Moghaddas R. and Houshmand M. Job-Shop Scheduling Problem With Sequence

Dependent Setup Times, Proceedings of the International MultiConference of Engineers and Computer Scientists 2008 Vol II, IMECS 2008, 19-21 March, 2008, Hong Kong

[19] Beasley J.E. and Chu B.C. 1996, A genetic algorithm for the set covering problem, European Journal of Operations Research, 94, 394-404.