scieee AI-readable full text Open interactive document viewer

Metaheuristics for the Weighted Squared Tardiness Permutation Flowshop Scheduling Problem

Andreia Fernandes da Silva

Full text

METAHEURISTICS FOR THE WEIGHTED SQUARED TARDINESS PERMUTATION FLOWSHOP SCHEDULING PROBLEM by Andreia Fernandes da Silva Dissertation for Master in Modeling, Data Analysis and Decision Support System in Optimization Supervised by Jorge Valente Jeffrey Schaller 2016 1 2 Biographical introduction of the candidate My name is Andreia Silva and I was born in1992. My home town is Porto and I lived all my life in the city where I was born. When I was a kid I wanted to be an architect. I liked to draw and make plants of my dream house but then I met Math’s and I fell in love. Since then, my dream was to make money. Who doesn’t have the same dream? I wanted to deal with money and come up with strategies that could save companies’ lives. I finished high school and I tried out for Sport University, I wasn’t always so sure of what I wanted. I passed the try-outs and I signed up to College in management course. That doesn’t make sense, I know, but then something happened. I fell in love again. That was definitely what I wanted to do. I finished my course knowing that I was in the right place. I decided then to continue my studies and reach a new accomplishment so I entered in MADSAD course to become more aware of what I could do to save companies’ lives. 3 Biografia introdutória do candidato O meu nome é Andreia Silva e nasci em 1992. Nasci no Porto, em Massarelos e sempre vivi, toda a minha vida no Porto, na Maia. Quando era mais nova, sonhava em ser arquitecta. Chegava mesmo a desenhar e a fazer plantas da minha casa de sonho mas depois conheci a Matemática e apaixonei-me. A partir desse momento, o meu sonho foi ganhar dinheiro. Quem não tem o mesmo sonho? Eu queria lidar com dinheiro e arranjar estratégias ou alternativas que pudessem salvar a vida das empresas. Quando terminei o secundário, fiz os pré-requisitos na Faculdade de Desporto da Universidade do Porto, nem sempre tive a certeza do que realmente queria seguir. Passei nos pré-requisitos mas quando chegou a altura de me candidatar à faculdade, candidatei-me no curso de Gestão. Não faz qualquer sentido, mas algo aconteceu. Apaixonei-me novamente. Era sem dúvida alguma ali que eu queria estar. Acabei o meu curso sabendo que estava no lugar certo. Decidi depois continuar os meus estudos e entrei num mestrado, no curso MADSAD (Modelação Análise de Dados e Sistemas de Apoio à Decisão) na Faculdade de Economia da Universidade do Porto para conseguir ter outra sensibilidade do que poderia fazer para salvar algumas empresas. 4 Acknowledgements Well, I am so grateful for having so many people to thank for. Obviously not everyone here mentioned helped me directly in this process but they do part of my life and, in one way or another, they encouraged me one this academic phase. First of all, I would like to thank my adviser, Professor Jorge Valente for the support, stimulus and for the sense of humor. It would all be much difficult without his help and guidance. I thank also to Jeffey Schaller who was involved in all process. I would like to thank next to my course director, Professor João Gama for the incentive to keep working. To finish my academic acknowledgments, I would like to thank Professor Hugo Alonso who inspired me as a student. Always watchful, perfectionist and with whom I had the pleasure to work and learn. Professor Alonso, a big thank to you. Then, to my family, my support and where I refuged every time I needed and who never let me down. To my bests friends for the companionship, for the moments of fun, for the hardest moments and for letting me believe that friendships can last a life time. To Morais, Néné, Paulinha, Tono, Luís, Pombo and Top. I thank too Pipa for the chats, for the support and for the sincere friendship. To my paternal family for the craziness. To my grandfather for the infinitive intelligence, for showed me what real strength was and whose I am tremendously proud. To my grandmother for the happiness. To my uncles and cousin, Tété, Tone and Didi for the sympathy. To Nuno for the example and inspiration. To my Godfather for the genuine craziness and good mood. To Jú and Bi for the concern and constant presence. To my maternal family for the love, union e for helped me growing. To my grandmother, my queen not only for the generosity as for the philosophy of life that characterizes her. To my great-aunt for her young spirit. To my uncle Paulinho for the jokes and for my aunt Rosa for the humility. To my little cousin Mariana for the innocence and genuineness. To my Godmother for everything, for being the best and for 5 always being there. To my uncle Jaime for the music, for the sense of humor e for our chats. To my little cousin Pedrinho, for the jokes, hugs and intelligence. To my cousin Dani who was always like a sister to me, for the chats and concern. To my aunt Elsa who always believed in me and made me persuade my way, for the companionship and for being amazing. To my uncle Paulo, for the help, advices and guidance. To my cousin Sara for the best sense of humor ever, for the innocence and cuteness. To my goddaughter and cousin Elsinha for being the cute person in the world and for the affectionate hugs. To my best friend, confident and boyfriend, Pedro Nuno. To you, I thank everything, you were always there. You lift me up every time and advised when necessary. I admire you e thank you for never doubt of me. To his parents for the house and for the affection. Finally to my parents. To them, I dedicate everything. People with amazing values. Better parents is not possible. I own them everything. To my mom Anabela, for being the best person in the world. For giving the best hugs and for believing be. For making me the person I am today. To my father José, for the stubbornness, affection and for the constructive flaks that made me try to be better every day. For the support and infinitive knowledge. To you both, the biggest thank ever! 6 Agradecimentos Bem, estou grata por ter tanta gente a quem agradecer. Obviamente que nem todos os que aqui são mencionados me ajudaram directamente na concretização desta etapa mas fazem parte da minha vida e, de uma maneira ou de outra, incentivaram-me nesta fase do meu percurso académico. Em primeiro lugar gostaria de agradecer ao meu orientador, Professor Jorge Valente pelo apoio, pelo estímulo e pelo sentido de humor. Tudo teria sido bem mais complicado sem a sua ajuda e orientação. Agradeço também ao Jeffrey Schaller que esteve também envolvido em todo o processo. De seguida, gostaria de agradecer ao meu director de curso, Professor João Gama pelo incentivo constante em continuar a trabalhar. Para terminar os agradecimentos académicos, gostaria de agradecer ao Professor Hugo Alonso que me marcou muito como aluna. Professor sempre atento, perfeccionista e com quem tive o prazer de aprender e trabalhar. Professor Alonso, um grande obrigada. Depois, à minha família, o meu suporte e onde sempre que necessário me refugiei e que nunca me falhou com nada. Aos meus melhores amigos pelo companheirismo, pelos momentos de diversão, pelo apoio nos momentos mais complicados e por me fazerem acreditar que há amizades que podem durar uma vida inteira. Ao Nuno, ao Néné, à Paulinha, ao Tono, ao Luís, ao Pombo e ao Top. Agradeço também à Pipa pelas conversas, pelo apoio, pelos desabafos e pela amizade sincera. Depois, à minha família, o meu suporte e onde sempre que necessário me refugiei e que nunca me falhou com nada. À minha família paterna pela maluqueira. Ao meu avô pela inteligência infinita, por me ter mostrado o que realmente é ter força e de quem estou tremendamente orgulhosa. À minha avó pela alegria. Aos meus tios e primo, Tété, Toni e Didi pela simpatia. Ao 7 Nuno pelo exemplo e inspiração. Ao meu Padrinho pela genuína maluqueira e boa disposição. Aos meus tios Jú e Bi pela preocupação e presença constante. À minha família materna pelo amor, pela união e por me ter ajudado a crescer. À minha avó que é a minha rainha não só pela generosidade como pela filosofia de vida que tanto a caracteriza. À minha tia-avó Rosete pelo seu espírito jovem. Ao meu tio Paulinho pelas brincadeiras e à minha tia Rosa pela humildade. À minha priminha Mariana pela inocência e genuinidade que tanto me cativam. À minha Madrinha por tudo, por ser a melhor do mundo e por ter sempre estado presente. Ao meu tio Jaime pela música, pelo sentido de humor e pelas nossas conversas. Ao meu priminho do coração Pedrinho, pelas brincadeiras, abraços e inteligência. À minha prima Dani que sempre foi como uma irmã para mim, pelas conversas e pela preocupação. À minha tia Elsa que sempre acreditou em mim e me fez seguir um caminho que acreditava ser o melhor, pelo companheirismo e por aquela maneira de ser fantástica. Ao meu tio Paulo, pelas explicações, pelos conselhos e orientações. À minha prima Sara pelo sentido de humor mais apurado que conheci, pela inocência e pela fofura. À minha afilhada e prima Elsinha por ser a pessoa mais querida do mundo e pelos abraços mais carinhosos de sempre. Ao meu melhor amigo, confidente e namorado Pedro Nuno. A ti agradeço-te por tudo, sempre estiveste lá e nunca me falhaste com nada. Levantaste-me do chão quando foi preciso mas também me soubeste chamar à atenção nas alturas certas. Admiro a excelente pessoa que és e obrigada por nunca teres duvidado de mim e por me teres feito seguir em frente, obrigada. Aos pais dele por me terem dado uma segunda casa e pelo carinho. E finalmente aos meus pais. A eles dedico tudo. Pessoas de valores extraordinários e que admiro acima de tudo. Posso dizer com toda a certeza que me saiu a sorte grande e que melhores pais seria impossível. Devo-lhes tudo. À minha mãe Anabela por ser a melhor pessoa à face da terra. Por dar os melhores abraços do mundo. Por acreditar em mim. Por fazer de mim a pessoa que sou. Por me dar a oportunidade de ter um modelo a seguir. Ao meu pai José, por ser como é. Pela teimosia. Pelo carinho. Pelas críticas construtivas que me fizeram tentar ser melhor todos os dias. Pelo apoio e pelo conhecimento infinito. A vocês os dois, o maior obrigada de sempre! 8 Abstract The main issue for a company to endure is the profit. However, the processes to achieve profit are quite complex. The essential is to leave all the clients satisfied and see them as a weapon to the company’s success. Making the clients satisfied isn’t only to provide them a service or a product with the highest quality, but also to provide that same service or product as fast as it is possible. This work deals with the cost associated with time. Metaheuristics were used to generate a schedule for a set of jobs, considering a certain number of machines, in order to minimize the costs associated with delayed deliveries. After analyzing the computational results, we concluded that the two metaheuristic proposed achieved solutions with high quality in feasible computational run time. Small and medium sized problems were considered, and for these the metaheuristics used proved to be very efficient. Key-words: Permutation flowshop, weighted squared tardiness, metaheuristics, iterated local search, steady-state genetic algorithm. 15 of jobs on the machines. Since we want this to be as applicable as possible, we adjust the procedure to real life. We will be present and analyze efficient metaheuristics. The metaheuristics that will be used are Iterated Local Search (ILS) and Steady-State Genetic Algorithm (SSGA). 16 1.3- Contents As it was said before, this work deals with a permutation flowshop problem with weighted squared tardiness. The main goal of this work it to understand the behavior of metaheuristics when applied to this kind of problems in order to minimize the tardiness of client’s orders and consequently minimize the costs for the company. During the different chapters we will present the development of this investigation and further the results that we achieved and the final conclusions. What which chapter presents is explained below. In Chapter II we introduce some of the articles that we reviewed before writing this work. As it will be mentioned next, there aren’t many authors that studied this type of problem with the same restrictions, but there are similar themes in articles that are very helpful to conclude and understand the behavior of the different metaheuristics. There is one particular work (Costa 2015) that will be used in a comparison with our results, since it studies the same problem using different methods. Next, in Chapter III we describe the metaheuristics used, and the multiple versions that were tested for each one. All the pseudo-codes are also presented and described in this chapter. Chapter IV includes the presentation of the computational results achieved during this investigation. First we introduce the instances and the programming computational language that we used. Next, we talk about the parameter adjustment tests explaining the tested parameters and the chosen values for each version. Finally, the results are compared to an optimal solution computed via complete enumeration and then compared to the best heuristic found in previous studies, namely (Costa 2015). Finally in Chapter V we present the main conclusions. First we do a recapitulation of what we did during this work, then we show the principal results and at the end we give some ideas/suggestions for further investigations. 17 Chapter II- Literature Review As far as we know, there aren’t many studies about this topic but, on the other hand, there are several works that study the behavior of metaheuristics and heuristics procedures to conclude how they act and how close they get to the optimal solution. Some of the works which deal with squared tardiness scheduling with only one machine are (Valente, Schaller and Gonçalves 2013), (Valente and Schaller 2012 [3]) and (Valente and Schaller 2012 [4 ]). In (Valente, Schaller and Gonçalves 2013) the authors used three metaheuristics, namely iterated local search, variable greedy and steady-state genetic algorithm procedures. With their results they concluded that the studied metaheuristics could achieve optimal solutions for small size problems. Metaheuristics can be very useful as long as the problem is not too large. Variable greedy is often the metaheuristic that comes up with the best solution. Through computational results the authors could conclude that the heuristics used are very efficient in medium size problems. In (Valente and Schaller 2012 [3]) the authors use a branch-and-bound algorithm to optimally solve small size problems. So they could reduce the size of the problem, the authors used dominance conditions. Dominance rules identify a subset of solutions that contain at least one optimal solution. The results in this work evidence that dominance conditions improve significantly the efficiency of branch-and-bound algorithm procedure. Another work that deals with scheduling problem for a single machine is (Valente and Schaller 2012 [4]). In this work, authors used dispatching rules to minimize tardiness. This works uses not only heuristics adapted to quadratic objective function as also existing rules for linear problems. With the obtained results it was possible to conclude that heuristics that take into account the quadratic objective show better results that their linear counterparts. In what regards previous studies that considered earliness and tardiness costs we have (Valente and Schaller 2013) and (Hallah 2014). In (Valente and Schaller 2013) was considered a problem with a set of n jobs and M machines in a permutation flowshop environment as in our work. The authors imposed as main goal to minimize tardiness 18 and earliness costs using six heuristics. They used simulated annealing (in two strands), neighborhood search, genetic algorithm, variable greedy algorithm and fast ant colony algorithm. Through the results it was possible to conclude that the genetic algorithm achieved a lower total of tardiness and earliness. Thus, the authors concluded that, for this type of problem, the genetic algorithm performed better than the other procedures. As in (Valente and Schaller 2013), in (Hallah 2014) was considered a permutation flowshop problem where the main goal was also minimize tardiness and earliness costs. In this study, the author opted to use variable neighborhood search combining iterated local search with variable neighborhood descent. “ILS ensures the diversification while VND the intensification.” (Hallah 2014). Through the results the author could see that the combination of these two heuristics, iterated local search and variable neighborhood descent, is very efficient not only because of the reduced computational time but also because it is possible to accomplish solutions with great quality. (Costa 2015) considered the exact same problem as ours: permutation flowshop with a weighted squared tardiness objective. In this work, several dispatching rules were proposed, as well as a three-phase improvement procedure. Through the computational results, the authors concluded that dispatching rules are very efficient and in some cases are the only viable approach for larger instances. In this work it was also possible to verify that specific quadratic heuristic obtain better results than linear procedures. In (Costa 2015) after getting a set of randomly generated problems, the author applied some heuristics and compared them. After that comparison, improvement methods were applied to the two of best performing rules. To understand if the quadratic heuristic was better than its linear version, the author compared the performance between the two versions using a calculation of the mean relative improvement versus the worst result. The author could conclude that the heuristic adapted to the quadratic objective achieve better results. The better heuristic found in this work with already all the improvement methods applied was QATC_M_NEH_LS which will be the term of comparison to this investigation. Another approach to this type of problem is explained in (Cheng, Yin, Wen, Lin and Liu 2015), a very recent study. In this article, the authors studied a scheduling flowshop problem but with a little variant, they considered precedence constrains because they believe that this variant happens often in real life situations. However, they only 19 consider two machines. The goal of this work still was to minimize the total tardiness criterion. First, they tried to find an optimal solution using a branch-and-bound algorithm as it was used in (Valente and Schaller 2012 [3]), which is used in optimization problems that are not very large. Since in this article they only considered two machines, this could be defined as small optimization problem, provided the number of jobs was not large. After they used the branch-and bound algorithm, they looked for a near-optimal solution using a genetic and a larger-order-value method. They concluded that for small optimization problems, the methods used reached a nearoptimal solution with good quality and with a short computational time. (Fernandes and Franinam 2015) is another recent article which studied, once again, a permutation flowshop scheduling problem. This work tries to minimize the makespan subject to a maximum tardiness. A makespan is the total duration of the schedule, that is, the time that all jobs need to finish processing. The authors used a constructive heuristic and a non-population based algorithm. They compared the two methods referenced before to FL (constructive heuristic by Framinan and Leisten) and GA algorithms. They came to conclusion that the constructive algorithm had an excellent performance, and it was tested under certain measures such as the quality of the solutions, the number of feasible solutions, average relative percentage deviation and finally the number of instances with the best solution found. After analyzing the literature, it is possible to conclude that the better heuristic or metaheuristic depends on the problem and the goal of the study. 20 Chapter III- Metaheuristics 3.1- Heuristics The heuristic technique is an optimization procedure that aims to find a solution good enough for a certain problem. There is no guarantee that the solution found is the best one or the optimal solution; however, the solution found will be adequate in most cases. Heuristics can reach a good solution in reasonable time when the perfect solution cannot be found at all or found in satisfactory time. The same heuristic when applied to two different problems can achieve completely different results. The efficiency of one heuristic will always depend on the problem used. There are heuristics that are fast but not so effective and heuristics that are more effective, but with a must higher computational time. Before choosing the heuristic to use, first it is necessary to understand how large our optimization problem is and how close we want to be to the best solution. 21 3.2- Metaheuristics On the other hand, a metaheuristic is a heuristic that uses a general strategy to search the solution space, this is, the set of solutions. The general strategy allows applying metaheuristics to any problem since a generic set of steps is followed. Different metaheuristics use different strategies to search the solution space. Though, all the metaheuristic methods try to overcome the main weakness of local search, namely becoming trapped in a local optimum. A local optimum as the name says is an optimal solution on a specific area and not necessarily the best solution of the problem. In this work two different metaheuristics will be used, namely iterated local search and steady-state genetic algorithm. These metaheuristics will be explained next. As it was mentioned before, the metaheuristics also present different results when applied to different problems. There are more effective metaheuristics but with a higher computational time, and metaheuristics with lower solution quality but with a much faster computational time. Before choosing the metaheuristic to be used, it is necessary to combine the processing time (efficiency) and the solution quality (effectiveness) to determine the best one to use on an optimization problem. 22 3.3- Versions Before explaining each metaheuristic, some components that are used in the local search and/or generation of an initial solution are described. Even with different procedures and versions, both metaheuristics used will have the same common stop criterion. Since the main goal of this problem is to minimize the sum of the weighted squared tardiness values, the optimal solution will be definitely a cost equal to zero. So, we can use a maximum runtime as a stop criterion knowing if a solution with a total cost equal to zero is found, the procedure is immediately stopped since there is no better solution than that. The maximum runtime will increase in both n (number of jobs) and m (number of machines). 23 3.3.1- API This version is known as Adjacent Pairwise Interchanges (API). This algorithm works simultaneously with a local search procedure and an adjacent interchanges (with a firstimprove strategy) until is not possible to improve. 24 3.3.2- I+I The name I+I comes for Interchanges + Insertions. As API does, I+I algorithm works also with a local search procedure but combines it with interchanges and insertion neighborhoods. In similarity to what happens in API, this version applies a first improve strategy to the interchanges and insertion neighborhoods. Until no improvement is found, interchanges are first performed. After that, insertions are used again until no improvement is found. This process of applying interchanges followed by insertions is repeated until no further improvement is possible. 31 Finally, with the mutation procedure, we first choose at random a solution and then, a mutated chromosome is then generated from this solution via a gene mutation procedure. In gene by gene mutation, each position in the chromosome is involved in a random move with a given probability. The pseudo-code for the mutation procedure will be presented and described forward. In the last step of the implementation (3.5), the new solution replaces the current worst member of the population if it is unique (that is, no identical solution is present in the current population) and better than the current worst solution. The pseudo-code for the mutation procedure is explained next: Procedure: Fuction Perform_Mutation: 1. Set 𝑖 = 1. 2. While 𝑖 < 𝑛: 2.1. If rand_gen01() < gene_mut_prob: 2.1.1. Randomly select a position 𝑝 ≠ 𝑖. 2.1.2. If (mut_type == INT), swap jobs [𝑖] and [𝑝]. 2.1.3. Otherwise, remove job [𝑖] from its current position and insert it at position 𝑝. 2.2. Set 𝑖 = 𝑖 + 1. The user defined parameter 0 ≤ gene_mut_prob ≤ 1 is the probability of each position being affected by a random move. Also, mut_type ∈ {INT, INS} is a user defined parameter that indicates whether the random move consists of an interchange (INT) or an insertion (INS) operation. In step 2, each position in the sequence is considered sequentially. For each position i, the job in the position will be involved in a random move with a gene_mut_prob probability. Step 2.1 and its sub steps perform a random move and when this happens, a different position p is generated at random. If the random move is of the interchange type (INT), the jobs in the two positions are swapped. Else, the job in position i is removed from its current position and reinserted at position p. 32 Next, we will present the pseudo-code for the generation of the initial population. In the following, (𝑆𝑖𝑝,𝑜𝑓𝑣𝑖𝑝) is a solution created during the generation of the first population and its corresponding objective function value, respectively. Procedure: Function Generate_Initial_Population() 1. 𝑆𝑖𝑝 = Generate_Seed_Solution(). 2. If Do_Local_Search(𝑆𝑖𝑝) == TRUE, set (𝑆𝑖𝑝,𝑜𝑓𝑣𝑖𝑝) = Perform_Local_Search(𝑆𝑖𝑝). 3. Set 𝑝𝑜𝑝 = 𝑝𝑜𝑝 ∪ 𝑆𝑖𝑝 and update (𝑆𝑏𝑒𝑠𝑡, 𝑜𝑓𝑣𝑏𝑒𝑠𝑡) and (𝑆𝑤𝑜𝑟𝑠𝑡, 𝑜𝑓𝑣𝑤𝑜𝑟𝑠𝑡). 4. If 𝑜𝑓𝑣𝑏𝑒𝑠𝑡 = 0, RETURN. 5. Set i_count = 0. 6. While (#𝑝𝑜𝑝 < pop_size) OR (i_count < 3 × pop_size): 6.1. 𝑆𝑖𝑝 = Generate_Random_Solution(). 6.2. 𝑆𝑖𝑝 = NEH(𝑆𝑖𝑝). 6.3. If Do_Local_Search(𝑆𝑖𝑝) == TRUE, set (𝑆𝑖𝑝,𝑜𝑓𝑣𝑖𝑝) = Perform_Local_Search(𝑆𝑖𝑝). 6.4. If 𝑆𝑖𝑝 ∉ 𝑝𝑜𝑝, set 𝑝𝑜𝑝 = 𝑝𝑜𝑝 ∪ 𝑆𝑖𝑝 and update (𝑆𝑏𝑒𝑠𝑡, 𝑜𝑓𝑣𝑏𝑒𝑠𝑡) or (𝑆𝑤𝑜𝑟𝑠𝑡, 𝑜𝑓𝑣𝑤𝑜𝑟𝑠𝑡) when appropriate. 6.5. Set i_count = i_count + 1. 6.6. If 𝑜𝑓𝑣𝑏𝑒𝑠𝑡 = 0, BREAK. 7. If 𝑜𝑓𝑣𝑏𝑒𝑠𝑡 = 0, RETURN. 8. While (#𝑝𝑜𝑝 < pop_size): 8.1. 𝑆𝑖𝑝 = Generate_Random_Solution(). 8.2. If 𝑆𝑖𝑝 ∉ 𝑝𝑜𝑝, set 𝑝𝑜𝑝 = 𝑝𝑜𝑝 ∪ 𝑆𝑖𝑝 and update (𝑆𝑏𝑒𝑠𝑡, 𝑜𝑓𝑣𝑏𝑒𝑠𝑡) or (𝑆𝑤𝑜𝑟𝑠𝑡, 𝑜𝑓𝑣𝑤𝑜𝑟𝑠𝑡) as appropriate. 8.3. If 𝑜𝑓𝑣𝑏𝑒𝑠𝑡 = 0, BREAK. In this version, steps 1 to 3 generate a seed solution and then improve it via local search. If we have an optimal solution, that is, a solution with an objective function equal to zero, the generation of the initial population is stopped in step 4. If not, step 6 (and its sub steps) is in charge of iterating until the initial population has been fully generated, or a maximum of 3 x pop_size iterations have been performed. 33 In step 6.1 a random solution is first generated and next step 6.2 uses NEH to try to improve that solution. The next sub step 6.3 can apply local search to the same solution. The solution is added to the population if it is unique, and the best or worst variables are updated when appropriate. If an optimal solution with an objective function value of 0 is generated, step 6.6 terminates the procedure immediately. When the local search includes NEH, that NEH step will be skipped inside step 6. Indeed, the solutions generated inside step 6 have already been improved by NEH, so there is no need for the improvement procedure to apply NEH first to these solutions. To try to prevent a poor initial solution, we introduced the NEH procedure. Indeed, if this procedure was not used, and in the presence of a low user defined ls_prob local search probability, the initial population would consist mostly of randomly generated solutions, which can be of very low quality. If the initial population is quite poor, it can have a negative effect on the performance of a genetic algorithm, which can then require a large number of iterations in order to generate good solutions. As it was referred before, step 6 finishes if a maximum of 3 x pop_size iterations have been performed without successfully filling the initial solution. This limit is required in order to avoid, in some instances, a quite large number of iterations, or even an endless loop. In fact, in some instances with loose due dates, the application of the NEH procedure may lead systematically to a single or a few solutions in which only a small number of jobs is tardy. Since the objective function value of these solutions is positive, it is not possible to guarantee that the solution found is the optimal although it may be. In these cases it might take an extremely large number of iterations, or actually be impossible to fill the initial population in step 6 and its sub steps and so, after some experimental tests, the limit of 3 x pop_size iterations was imposed. When step 6 is not succeessfull at filling the initial population, the remaining solutions are generated at random in step 8 and its sub steps. A solution only can be added to the population if it is unique. 34 As it happened in ILS, here we will be using four versions for the SSGA metaheuristic. All four versions will be presented and described next:  SSGA_API o Initial Population:  seed solution (only one): QATC + M + NEH  remaining (unless limit of 3 * pop_size reached): random + NEH  if needed: random o Local Search  API  SSGA_NEH_API o Initial Population:  seed solution (only one): QATC + M  remaining (unless limit of 3 * pop_size reached): random + NEH  if needed: random o Local Search:  seed solution: NEH + API  remaining initial population solutions: API (NEH is applied before)  otherwise: NEH + API  SSGA_I+I o Initial Population:  seed solution (only one): QATC + M + NEH  remaining (unless limit of 3 * pop_size reached): random + NEH  if needed: random o Local Search  I+I  SSGA_NEH_I+I o Initial Population:  seed solution (only one): QATC + M  remaining (unless limit of 3 * pop_size reached): random + NEH  if needed: random o Local Search: 35  seed solution: NEH + I+I  remaining initial population solutions: I+I (NEH is applied before)  otherwise: NEH + I+I The main differences between the four versions are the initial solution, the type of local search, and whether or not NEH is included in the local search. If NEH is not included in the local search, the procedure will be applied to the seed solution. But on the other hand, if we include NEH in the local search, we will have the following. First, the seed solution is only QATC + M (since this is the first solution, it will go through local search which includes NEH), and second, NEH is removed from the local search when it is applied to the initial population solutions that already employ NEH, to avoid duplicating NEH. 36 Chapter IV- Computational results In this chapter we will first describe all the instances used, as well as the programing language used on the coding process. Then, all the parameters both tested and chosen will be presented. Finally we will see which version was chosen for each metaheuristic and then a comparison of results will be shown. 4.1- Experimental Design This work uses randomly generated problems. The set of randomly generated problems includes various numbers of of jobs, machines and combinations of due date tightness and range. The number of jobs has the following sizes: 8, 10, 12, 15, 20, 25, 30, 40, 50 and 75. Regarding the number of machines, we considered 5, 10 and 20 machines. For the processing time pij of one job in one machine, the number is generated from a uniform distribution over the integers 1 to 100. Finally, the weight wj is obtained from a uniform distribution [1, 10]. On the other hand, for each job j, an integer due date dj is generated from the uniform distribution [MS (1- T – R/2), MS (1 – T + R/2)], where MS is an estimate of the makespan calculated using the lower bound proposed in (Taillard1993), T is the tardiness and R is the range of due dates. Both tardiness and range of due dates parameters are set at 0.2, 0.4, 0.6, 0.8 and 1.0. For each combination of n, M, T and R we created 10 instances at random which totalizes 250 instances for each problem size, where the size is given by both the number of jobs and machines. Each metaheuristic was ran with 10 seeds which means that we will get, for each metaheuristic, 10 results. After several experimental tests, we decided to use the following expression for the calculating of the run time stop criterion: 0.2 + 0.0015𝑛2𝑀. 37 For all the computational tests we used a personal computer with a Windows 10 64-bit operating system, an Intel Core i7 4770 3.4G processor and 16GB RAM. The procedures were coded in C++ compiled for 64-bit Windows. 38 4.2- Parameter adjustment tests In this chapter we will presented the parameter adjustment tests. First all the tested parameters will be presented and described and then, all the chosen parameters for each version will be also shown. 4.2.1- Tested parameters ILS In the ILS metaheuristics, all four versions previously presented require a value for three parameters: α, β and ls_prob. All the corresponding values used for each parameter are in the table below. Parameter Values α 5, 6, 7 β 5, 10, 20, 25 ls_prob 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0 The values considered for α and β are the same used in some previous ILS applications. Since ls_prob values are between 0 and 1, we are considering the entire range, with 0.1 increments. 39 SSGA The used parameters for SSGA are different. We used five parameters in this metaheuristic: pop_size, cross_prob, mut_type, and again ls_prob. For each parameter there are a set of values that will be presented in the table below. Parameter Values pop_size 40, 50, 60 cross_prob 0.85, 0.90, 0.95, 0.975 mut_type INT, INS gene_mut_prob 0.03, 0.05, 0.07 ls_prob 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0 The parameter adjusment tests were performed on a separate, and smaller, problem set. This set included randomly generated instances with only 10, 20, 30 and 40 jobs. Also, only 5 instances were used for each combination of n, M, T and R. Also, a different maximum runtime was used in the stopping criterion, namely: 0.1 + 0.00075𝑛2𝑀. 40 4.2.2- Chosen Parameters In this chapter, we will present all the chosen parameters for each metaheuristic. For these tests we only used one seed. The chosen criterion was based on the speed of the computational time and the quality of the solution. For each heuristic we analyzed all the four versions separately and then, the best combination of parameters of each version were compared to each other so we could reach the best version for that heuristic. The values chosen for each parameter and each version will be shown next. ILS Table 1 - Chosen Parameters for ILS Version α β ls_prob stg API 5 5 1 11 II 5 5 1 11 NEH_API 5 5 0,8 9 NEH_II 6 5 0,6 51 After comparing all results for each version, the values above for all four parameters were the ones that achieved better results taking into account the computational time and the quality of the results. Finally, we compared all four versions and the overall best performed was NEH_II. 47 4.4.2- Comparison with worst metaheuristic result The final comparison is between metaheuristics, namely a comparison of each metaheuristic with the worst combined result. That is, we compare each of the 10 results provided by each metaheuristic with the worst of the combined 20 results. Table 7- Comparison with worst metaheuristic ivh n_opt m n ILS SSGA ILS SSGA 5 10 0 0 0 0 25 0,429336711 0,348986103 16,4 16,3 50 0,316132083 0,708384796 172,1 187,5 75 0,452227892 0,813230556 177,4 195,3 10 10 0 0 0 0 25 0,13018032 0,112597887 25,3 30,4 50 1,111724639 2,542430069 202,9 222,6 75 1,280965738 2,366608837 198,9 218,6 20 10 0 0 0 0 25 0,024985894 0,03142159 15,7 20 50 1,690337116 4,205906551 223,3 247,9 75 2,265211691 4,483993594 213,8 236,5 In this table, ivh shows us the average of the percentage of the improvement of the metaheuristics face to the worst result. For example, for 20 machines and 75 jobs, ILS was 2,265% better than the worst result of all. SSGA shows us a better improvement versus the worst result in all of the combinations between the number of jobs and the number of machines. The last two columns show us how many times ILS and SSGA were better than the worst Thus, for 20 machines and 75 jobs, SSGA was 236,5 better than the worse in 250 possible and 13,5 equal (250-236,5). 48 Table 8- Comparison with worst metaheuristic (T and R) – for n=50 and m=10 ivh n_opt T R ILS SSGA ILS SSGA 0,2 0,2 1,651590698 2,903909578 9,2 9,8 0,4 3,568296441 4,453678302 7,2 6,8 0,6 4,627557954 9,336501615 4,6 4,9 0,8 2,438059389 5,526126747 1,8 2 1,0 1,295616138 0,554381831 0,9 1 0,4 0,2 1,486792395 3,578491586 9 10 0,4 1,349191654 3,490636109 9 10 0,6 1,43289374 4,313554038 9 10 0,8 1,832439748 4,34343737 9 10 1,0 0,608919186 1,364845746 8 8,3 0,6 0,2 0,851715445 2,328202477 9 10 0,4 0,65879817 2,510078398 9 10 0,6 0,71987709 2,47308919 9 10 0,8 0,590305043 1,749461647 9 10 1,0 0,578010871 1,68089459 9,1 9,9 0,8 0,2 0,575533463 1,836816957 9 10 0,4 0,49309619 1,834429501 9 10 0,6 0,537815776 1,60913855 9 10 0,8 0,462115187 1,426160883 9 10 1,0 0,468029768 1,383277712 9 10 1,0 0,2 0,321194725 1,025866397 9 10 0,4 0,402163367 1,244040187 9 10 0,6 0,278234708 0,984128871 9 10 0,8 0,272867253 0,881568551 9 10 1,0 0,29200158 0,728034905 9,1 9,9 Once again, the complete table has a very large size so we are only showing the results for all values of T and R but only for 50 jobs and 10 machines. The first variable, ivh, is the improvement versus the worst result for each metaheuristic. In average, the improvement face the worst result is higher for SSGA and it was also the metaheuristic that was better than the worst more times (222,6 in 250 possible which means that was equal to the worst 27,4 times). In both metaheuristics, the percentage of improvement decreases with the increase of the T value. The average of the improvement for ILS and 49 T=0,2 is 2,716% and for T=1,0 is 0,31%. The same happens for SSGA, its percentage for T=0,2 is 4,55% and for T=1,0 is 0,97%. 50 4.4.3- Runtimes Finally, we will present the computational run times for each metaheuristic studied. Table 9- Run Times (in seconds) m n ILS SSGA max_rt 5 30 1,0812336 0,5508856 17375 40 4,2441236 3,3818092 30500 50 7,2184384 8,768428 47375 75 17,014092 23,277796 105968,75 10 30 3,344592 1,7790996 34250 40 11,024512 9,6245588 60500 50 17,580191 23,756299 94250 75 37,451772 52,857012 211437,5 20 30 6,1139956 2,7264788 68000 40 23,425442 17,511186 120500 50 39,038175 49,326003 188000 75 84,47573 116,97612 422375 The table above presents the computational run times for ILS and SSGA for all m values but only for 30, 40, 50 and 75 jobs. In this table it is also shown the maximum run time computed using this expression: 0.2 + 0.0015𝑛2𝑚. For instances with higher number of machines and jobs the computational time is obviously higher since the computational effort is also higher. For 50 and 75 jobs, SSGA is always slower than ILS. Although it has higher computational run time, SSGA achieves better results than ILS. 51 Chapter V- Conclusion This work studied a permutation flowshop problem with weighted squared tardiness in order to help a company to save time and money. We proposed in this study two metaheuristics, namely Iterated Local Search and Steady-State Genetic Algorithm. For each one of them, considered different types of local search and multiple versions. We first determined appropriate values for the parameters of each version. Then, we determined the best performing version within each metaheuristic The selection criterion was the best combination between the run time and the quality of the solution. Our results were compared first with the optimal solution, then with DR (proposed heuristic in (Costa 2015)) and finally with the worst result among the metaheuristic results. Both metaheuristics proved to be very efficient for this kind of problem (small to medium size problem), and quite effective, by achieving often the optimal solution. These meta heuristic accomplished also better results than DR since this heuristic is included in our initial solution. The reason why we included this heuristic in our initial solution was first because a poor initial solutions can have a negative effect on the metaheuristic and second, to try achieve no worse results. The computational results showed that ILS was often faster than SSGA but presents results with lower quality. Both of metaheuristic proved to be very efficient. For future research, others metaheuristics can be analysed, such as variable gready and iterated gready in order to test their performance since metaheuristics are often very efficient in small and medium size problems. On the other hand, additional problem characteristics could be included, such as release dates and setups. 52 References Nawaz M, Enscore jr EE, Ham I. (2008) “A heuristic algorithm for the m.machine, njob flow-shop sequencing problem”. Omega, pp 91-5. Valente, Jorge and Schaller, Jeffrey and Gonçalves Tomás (2013) “Metaheuristics for the single machine weighted quadric tardiness scheduling problem”. Computers & Operations research, pp 115-126. Valente, Jorge and Schaller, Jeffrey (2012) “Minimizing the weighted sum of squared tardiness on a single machine”. Computers & Operations research, pp 919-28. Valente, Jorge and Schaller, Jeffrey (2012) “Dispatching heuristics for the single machine weighted quadratic tardiness scheduling problem”. Computers & Operations research, pp 2223-31. Valente, Jorge and Schaller, Jeffrey (2013) “A comparison of metaheuristic procedures to schedule jobs in a permutation flow shop to minimize total earliness and tardiness”. International Journal of Production Research, pp 772-9. M’Hallah, R (2014) “An iterated local search variable neighborhood descent hybrid heuristic for the total earliness tardiness permutation flow shop”. International Journal of Production Research, pp 3802-19. Costa, Raquel (2015) “Heuristics for a permutation flowshop scheduling problem with weighted squared tardiness”. Dissertation for Master in Modeling, Data Analysis and Decision Support System, FEP. Sun, XQ and Noble, JS and Klein CM (1993) “Single machine scheduling with sequence dependent setup to minimize total weighted squared tardiness”. Iie Transactions (Institute of Industrial Engineers), pp113-124. Hoitomt, DJ and Luth, PB and Max, E and Pattipati, KR (1990) “Scheduling jobs with simple precedence constraints on parallel machines”. IEEE Control System Magazine, pp 34-40. 53 Thomalla, CS (2001) “Job shop scheduling with alternative process plans”. International Journal of Production Economics, pp 125-134. Taguchi, G (1986) “Introduction to quality engineering: designing quality into products and processes”. Proceedings of the National Electronics Conference, pp 32-39. Cheng, Shuenn-Ren and Yin, Yunqiang and Wen, Chih-Hou and Lin, Win-Chin and Wu, Chin-Chia and Liu, Jun (2015) “A two-machine flowshop scheduling problem with precedence constraint on two jobs”. Soft Computing, pp 13. Fernandes-Viagas, Visctor and M. Framinan, Jose (2015) “Efficient non-population- based algorithms for the permutation flowshop scheduling problem with makespan minimization subject to a maximum tardiness”. Computers & Operations research, pp 86-96. Goldberg DE, Deb K. (1990) “A comparative analysis of selection schemes used in genetic algorithms”. Foundations of Genetic Algorithms, pp 69-93. Davis L. (1991) “Handbook of genetic algorithms”. New York : Van Nostrand Reinhold. Beasley JE, Chu PC (1996) “A genetic algorithm for the set covering problem”. European Journal of Operation Research, pp 392-404.