scheduling of trucks at a cross docking warehouse using genetic algorithm

Upload: april-smith

Post on 03-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    1/31

    1

    IE 632: Scheduling Models

    Course Project

    Scheduling of Trucks at a Cross Docking

    Warehouse using Genetic Algorithm with

    Deterministic Sampling and Stochastic

    Sampling Replacement Schemes

    Submitted by,

    Shivraman K R,

    Haresh Gopalan.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    2/31

    2

    TABLE OF CONTENTS Page

    CHAPTER I INTRODUCTION 3

    1.1 Cross Docking 3

    1.2 Genetic Algorithm 4

    1.2.1 Background 4

    1.2.2 Overview 5

    1.3 Objective of the Present Work 6

    CHAPTER II LITERATURE REVIEW 8

    2.1 Genetic Algorithm 8

    2.2 Work on Truck Scheduling in Crossdocking 8

    CHAPTER III METHODOLOGY 10

    3.1 Generation of Initial Population 10

    3.2 Fitness of Initial Population 10

    3.3 Selection of Parent Chromosomes for crossover 12

    3.4 Performing Crossover operation 13

    CHAPTER IV PROBLEM DEFINITION 15

    CHAPTER V RESULTS AND DISCUSSION 17

    5.1 Checking the optimality of the solution obtained using GA 17

    5.2 Comparison of the Selection Schemes for the 10-truck algorithm 20

    5.3 Comparison with Computation Time from other programs 22

    CHAPTER VI CONCLUSION 24

    CHAPTER VII FUTURE SCOPE FOR RESEARCH 25

    REFERENCES 25

    APPENDIX 26

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    3/31

    3

    CHAPTER I

    INTRODUCTION

    1.1 Cross Docking

    It has been well understood that todays customers are increasingly expecting faster deliveries of

    their ordered products at lower prices. This customer driven business model has pushed business

    managers to improve their supply chains, more specifically their distribution chains, by employing

    effective planning strategies. Many different cost reduction measures are undertaken by the industries,

    one of the significant measures undertaken is the reduction of inventory holding costs. The reduction of

    product delivery time in the customer point of view and reduction of product variable cost due to

    inventory, labor, and storage in the managerial point of view are both satisfied by a logistic strategy

    called Cross-docking.

    Cross Docking is a logistics technique in which goods are transferred directly from inbound

    trucks to outbound trucks with little or no storage in between. This process is essentially rapid

    consolidation of shipments from multiple sources in order to get economies of scale in outbound

    shipments. Thus cross-docking favors the timely distribution of freight and a better synchronization with

    the demand.

    For successful implementation of cross docking, the following factors could be considered

    important. First-of-all, the supply from the inbound trucks must be reliable with short lead times,

    because there is no stock available to buffer between supply and demand. Products should be delivered

    to cross-docking warehouse at the right time, in the right

    quantity and of the right quality. Otherwise, trucks would

    travel too late or half-empty to customers. Secondly,

    information such as arrival times, departure times,

    destination etc. should be available at the right timethroughout the entire supply chain so that the scheduling of

    trucks could be planned and executed in advance. Thirdly,

    the out-bound trucks should arrive at the cross dock on

    time to ensure that products depart on time.

    In a typical situation, a cross docking center consists

    of a number of dock doors where trucks can load or unload.

    These dock doors can be located along any of the walls.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    4/31

    4

    Trucks arrive according to a schedule to load or unload. First, trucks that arrive have to be unloaded.

    Each arriving unit load, which is not immediately transferred to another truck, has to be assigned to a

    storage location. General-purpose forklift trucks generally perform transport between trucks and storage

    locations. When (almost) all incoming loads have been received, trucks start arriving for loading. When a

    truck arrives for loading, all pallets for that particular truck are moved from their storage locations to

    this truck. A simple cross docking system is represented by a figure in the previous page.

    Cross-docking can be applied to a number of circumstances. For manufacturing, cross-docking

    can be used to consolidate inbound supplies, which can be prepared to support just-in-time assembly.

    For distribution, cross-docking can be used to consolidate inbound products from different suppliers

    which can be delivered when the last inbound shipment is received. For transportation, cross-docking

    involves the consolidation of shipments from several suppliers in order to achieve economies of scale.For retail, cross-docking concerns receiving products from multiple suppliers and sorting them to

    outbound shipments to different stores. The world's biggest retailer, Wal-Mart, delivers about 85% of its

    merchandises using a cross-docking system (Rodrigue et al., 2009). The type of cross-docking considered

    in the current work is retail cross-docking.

    1.2 Genetic Algorithm

    1.2.1 Background

    Genetic algorithm (GA) is an adaptive search heuristic that mimics the process of natural

    evolution and genetics. Genetic algorithms belong to the larger class of evolutionary algorithms (EA),

    which generate solutions to optimization problems using techniques inspired by natural evolution, such

    as inheritance, mutation, survival of the fittest. These algorithms could be considered to represent an

    intelligent exploitation of a random search used to solve optimization problems. It could also be argued

    that GAs are not completely random because they make use of historical information to lead the search

    into the region of better performance within the search space (Imperial College London lecture notes).

    Unlike artificial neural networks (ANNs), which are designed to function like the way the human

    neurons work, genetic algorithms utilize the concepts of natural selection to determine the best solution

    for a problem. GAs are actually considered to be better than artificial intelligence techniques in terms of

    robustness, i.e., unlike older AI systems, they do not break easily even if the inputs are slightly changed,

    or in the presence of reasonable noise. In addition to this, while searching a large state-space, multi-

    modal state-space, or n-dimensional surface, a genetic may offer significant benefits over typical search

    of optimization techniques like linear programming, depth-first, breath-first etc. (Imperial College London

    lecture notes)

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    5/31

    5

    GAs simulate the survival of the fittest among individuals over consecutive generation for

    solving a problem. Each generation consists of a population of character strings that are analogous to

    the chromosome that we see in our DNA. Each individual represents a point in a search space and a

    possible solution. The individuals in the population are then made to go through a process of evolution.

    1.2.2 Overview

    GAs are based on an analogy with the genetic structure and behavior of chromosomes within a

    population of individuals using the following foundations:

    Individuals in a population compete for resources and mates. Those individuals most successful in each 'competition' will produce more offspring than those

    individuals that perform poorly. Genes from `good' individuals propagate throughout the population so that two good parents

    will sometimes produce offspring that are better than either parent.

    Thus each successive generation will become more suited to their environment.

    A population of individuals is maintained within search space for a GA, each representing a

    possible solution to a given problem. Each individual is coded as a finite length vector of components,

    or variables. To continue the genetic analogy these individuals are likened to chromosomes and the

    variables are analogous to genes. Thus a chromosome (solution) is composed of several genes

    (variables).

    A fitness score is assigned to each solution representing the abilities of an individual to

    `compete'. The individual with the optimal (or generally near optimal) fitness score is sought. The GA

    aims to use selective `breeding' of the solutions to produce `offspring' better than the parents by

    combining information from the chromosomes.

    The GA maintains a population of n chromosomes (solutions) with associated fitnessvalues.

    Parents are selected to mate, on the basis of their fitness, producing offspring via a reproductive plan.

    Consequently highly fit solutions are given more opportunities to reproduce, so that offspring inherit

    characteristics from each parent. As parents mate and produce offspring, room must be made for the

    new arrivals since the population is kept at a static size.

    Individuals in the population die and are replaced by the new solutions; eventually creating a new

    generation once all mating opportunities in the old population have been exhausted. In this way it is

    hoped that over successive generations better solutions will thrive while the least fit solutions die out.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    6/31

    6

    New generations of solutions are produced containing, on average, more good genes than a typical

    solution in a previous generation. Each successive generation will contain more good `partial solutions'

    than previous generations. Eventually, once the population has converged and is not producing

    offspring noticeably different from those in previous generations, the algorithm itself is said to have

    converged to a set of solutions to the problem at hand (2). After an initial population is generated

    randomly, the algorithm evolves through the following steps:

    a. Calculation of the fitness values:A fitness function is carefully selected based on the objective of theoptimization problem. Then the fitness value for each chromosome in the population is evaluated.

    b. Selection of parent chromosome for mating/cross-over: Pairs of parent chromosomes are selected from thepopulation based on the assigned fitness value. The two selection schemes dealt in this work are

    i. Stochastic Sampling Replacement (Roulette Wheel Selection)ii. Deterministic Sampling

    c. Cross-over:Cross-over is the mating of each pair of chromosomes selected based on one of the abovetechniques. Cross-over location or site in each chromosome is selected randomly, but it has to be

    ensured that chromosomes in every pair of parent individuals have cross-over occurring at the same

    location.

    d. Mutation:Mutation introduces random changes in chromosome. These changes are usually reversalof the characteristics such as changing 0 to 1 in a binary string or vice-versa. The rate of mutation is

    usually kept very low such as 0.001. In the current work, we have not taken mutation into account,

    i.e., the rate of mutation is kept at 0.

    e. Cloning:Cloning operation is performed only if the crossover operation is not performed. To clone apair of offspring, the two selected chromosomes are not changed and added to the next generation.

    Cloning, as well, is taken in to consideration in the present work (Ley and Elfayoumy, 2007).

    1.3 Objective of the Present Work

    Genetic Algorithm has found its application to a great extent in the field of scheduling. It has

    been used as heuristic in a variety of machine shop models. Its applications in scheduling problems have

    been discussed briefly in the next chapter.

    In the current work, genetic algorithm is used to schedule the trucks in a cross-docking

    warehouse. Our primary objective has been to reduce the waiting time of the trucks at a cross-dock. It

    could be seen that the waiting time of a particular truck could be reduced by prompt loading of the

    necessary goods into the truck. For the loading to be prompt, the goods have to arrive at the gate intime. The prompt arrival of the goods at the gate depends on the distance travelled by the goods from

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    7/31

    7

    the gates where the in-bound trucks arrived at to the appropriate out-bound trucks gate. Hence, the

    objective now shifts towards reducing the distance travelled by the goods on conveyors or forklift trucks

    inside the cross-docking warehouse.

    Our next task is to select an appropriate technique to achieve the objective. Since this problem is

    NP-hard (as known from literature), the conventional algorithm is exponential time based. So we could

    develop a heuristic to get a solution that is close to optimal. The heuristic that is made use of here is the

    genetic algorithm with two different types of selection schemes (stochastic and deterministic).. Finally,

    comparison has been made between stochastic and deterministic selection schemes based on the

    population size considered and the resulting computation time. The current results are also compared

    with results from earlier research, but only to a certain extent.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    8/31

    8

    CHAPTER 2

    LITERATURE SURVEY

    2.1 Genetic Algorithm

    Genetic algorithm (GA) is a search heuristic that mimics the process of natural evolution. This

    heuristic is routinely used to generate useful solutions to optimization and search problems. Genetic

    algorithms belong to the larger class of evolutionary algorithms (EA), which generate solutions to

    optimization problems using techniques inspired by natural evolution, such as inheritance, mutation,

    selection, and crossover.

    2.1.1. History

    Idea of evolutionary computing was introduced in the 1960s by I. Rechenberg in his work

    "Evolution strategies". Genetic Algorithms (GAs) were invented by John Holland and developed by him

    and his students and colleagues. This lead to Holland's book "Adaption in Natural and Artificial

    Systems" published in 1975.In 1992 John Koza has used genetic algorithm to evolve programs to

    perform certain tasks. He called his method "genetic programming" (GP). LISP programs were used,

    because programs in this language can expressed in the form of a "parse tree", which is the object the

    GA works on.

    2.2 Work On Truck Scheduling in Cross Docking

    There are different approaches for solving a scheduling problem in cross docking ranging from

    Mixed integer programming to Genetic algorithms. Z. P. Li and M. Y. H. Low (2009) uses a two

    different solution approaches and compares them for relative accuracy. The two approaches are

    Dependency ranking search (DRS) Heuristic and Mixed integer Programming (MIP). The objective of

    the two problems is to minimize the total cross-docking operational time. The result is DRS heuristic is

    capable of finding a fairly comparable solution and the heuristic maintains scalability as the problem size

    increases.

    Shayla Ley and Sherif Elfayoumy (2007) uses genetic algorithm to solve a truck-scheduling

    problem in cross-docking. They developed a five-step process consisting of creating a initial population,

    defining a fitness function, selection, crossover and mutation. They created four programs to verify the

    procedure and the results for the time and accuracy evaluation testing show that using genetic algorithms

    to determine a schedule for a cross dock trucking system provides an accurate and timely solution.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    9/31

    9

    Mojtaba Shakeri, Malcolm Yoke Hean Low, Zhengping Li (2008) developed a generic

    mathematical model to address the two problems of truck scheduling and truck- to-door assignment

    through employing a mixed integer programming approach (MIP). The objective of this problem is to

    minimize the makespan which is defined as the total operating time starting from the moment when the

    first product of the first scheduled docked truck is unloaded onto the staging area to the moment when

    the last product of the last scheduled docked truck is loaded from the staging area. After solving using

    MIP it has been found that the cross-docking model is scalable enough to accept any arbitrary number

    of doors, trucks, product types, and also different product handling time.

    Ruslan Sadykov (2011) proposed a dynamic programming algorithm to solve the truck

    scheduling problem with the objective to minimize the storage usage during the product transfer inside

    the terminal.

    Yu and Egbelu (2008) developed a model for scheduling incoming and outgoing trucks to

    minimize the make-span (i.e. the maximum completion time) and proposed several heuristic algorithms

    for it.

    David Montana, Marshall Brinn, Sean Moore, Garrett Bidwell (1998) uses the flexibility and

    power of genetic algorithms to produce practical solutions to complex scheduling problems in a

    generally applicable manner. They created an approach for solving real time scheduling problems using

    domain-specific chromo-some representation and genetic operators, multi-objective evaluation function,

    heuristic initialization of the population, dynamic rescheduling, and cooperative interaction with humanoperators.

    Andrew J. Page and Thomas J. Naughton (2005) developed a genetic algorithm to dynamically

    schedule heterogeneous tasks on heterogeneous processors in a distributed system. The scheduler

    operating in a batch fashion in an environment with dynamically changing resources and adapts to

    variable system and utilizes a genetic algorithm to minimize the total execution time.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    10/31

    10

    CHAPTER III

    METHODOLOGY

    This chapter describes the various steps involved in the genetic algorithm used for the

    scheduling of inbound and outbound trucks in a cross-docking warehouse. The various steps involved in

    this heuristic are

    1. Generation of the initial population of a given number of schedules (chromosomes) randomly.2.

    Setting up of the fitness function and evaluation of the fitness values for each schedule.

    3. Selection of the schedules (parent chromosomes) for cross-over.4. Performing cross-over of the selected schedules leading to the generation of a new population.

    3.1.Generation of Initial Population:

    The initial population is generated randomly using the rand function in MATLAB. This

    particular function in MATLAB generates uniform random numbers. Uniform distribution of these

    random numbers is extremely important as it ensures that every possible schedule is equally probable to

    appear in the initial population. This initial population is generated as required according to the number

    of inbound and outbound trucks based on a user input. The codes and relevant explanation has been

    given in the Appendix I.

    3.2.Fitness of the Population:3.2.1. Setting Up of the Fitness Function:

    The fitness function has to be setup even before any these of steps of the algorithm. Setting up

    of an appropriate fitness function is critical to the efficient working of the algorithm and convergence at

    a near optimal solution. For an algorithm to be efficient in terms of computation time and convergence

    to optimal value, the fitness function has to be accurate and also as simple as possible, but without

    omitting any piece of useful available information. For the problem in hand, the fitness function could

    be constructed in the following way.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    11/31

    11

    Before going on to setting up the fitness function, it would be useful to make a few assumptions.

    1. The cross-docking warehouse consideredhere has a rectangular shape in the top view

    of the structure. So the width(w) of the

    cross-dock is constant.

    2. The inbound and outbound trucks arealigned on the opposite sides of the

    rectangle respectively.

    3. The width of each gate, on the oppositessides, where the trucks are docked are

    considered to be a constant.

    Now the distance of each outbound truck from the inbound truck could be calculated using

    Pythagoras theorem as follows from the above figure

    Distance of truck 1 from truck 5 = L

    Distance of truck 1 from truck 6 =

    Distance of truck 1 from truck 7 =

    Distance of truck 3 from truck 8 =

    Using this basic idea, we could calculate the total distance travelled by the goods inside the cross-

    dock as follows. Lets say, the goods from truck 1 has to travel to trucks 5, 7, 8.

    1. An array with elements [0 2 3] is formed. This array represents the vertical distance of trucks 5, 7,8 in terms of the gate width w.

    2. Now the distance of each outbound truck from truck 1 could be calculated as followsa. Distance of truck 5 from 1 = b. Distance of truck 7 from 1 = c. Distance of truck 8 from 1 =

    3. These distances are added together. In a similar way, the total distance travelled by goods fromeach inbound truck is calculated, i.e., repeat steps 1 and 2 followed by adding the distances.

    4. Distances obtained for each inbound truck are summed up. This sum is the fitness value of thatparticular schedule or chromosome.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    12/31

    12

    But having this total distance as the fitness function as suggested by Ley and Elfayoumy (2007)

    would reduce the efficiency of the algorithm, thereby increasing the computation time of the algorithm.

    In this work, we suggest an alternative algorithm which would drastically reduce the computation time

    without compromising on the accuracy of evaluation of the optimal solution. The algorithm we suggest

    is as follows.

    1. Consider the array formed in the first step of the previous algorithm, i.e, the array [0 2 3]. Thisarray represents nothing but thevertical distance of trucks 5, 7, 8 in terms of the gate width w.

    2. Since the width of the cross-dock (L) is constant, we could say that the horizontal distancetravelled by the goods from a particular inbound truck in any schedule is going to be constant.

    3. So we could say the optimality of a schedule depends on the effective vertical distance travelledby the goods from the inbound trucks.

    4. The vertical distance travelled by the goods from each truck is nothing but the product of thesum of the elements in the array we form as given above and the width of the gate.

    5. Since the width of the gate is also constant, we could consider the sum of the elements in thearray to represent the total vertical distance travelled by the goods in each schedule.

    Summarizing the above the discussion, the fitness function proposed in this work is the total

    vertical distance travelled by the goods in each schedule which is represented by the sum of the elements

    in the array we form for each truck as shown in the step 1 of the previous algorithm.

    3.2.2. Evaluation of the Fitness Values for Each Schedule (Chromosome):Using the fitness function set up in the previous section, we find out the fitness values of each

    schedule in the population with the help of the codes given in the Appendix II.

    3.3.Selection of Parent Chromosomes for Cross-Over:In this work, selection of parent chromosomes (schedules) from the given population set has

    been performed in two different ways. The results from both selection schemes have been compared.

    The two selection schemes used here are

    3.3.1. Stochastic Sampling Replacement (SSR) Scheme:

    A stochastic sampling done with replacement is also called the roulette wheel selection method -

    this sampling method selects parents according to a spin of a weighted roulette wheel. The roulette

    wheel is weighted according to chromosome fitness values. A high-fit chromosome will have more area

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    13/31

    13

    assigned to it on the wheel and hence, a higher probability of ending up as the choice when the biased

    roulette wheel is spun. This technique is commonly adopted in this field of genetic algorithms for the

    selection of chromosomes for cross-over. The algorithmic implementation of this scheme is done as

    follows:

    1. This SSR scheme is biased towards chromosomes with higher fitness values. But for the problemin hand, we require the characteristics of the schedules (chromosomes) with lower fitness values

    to be passed down to the subsequent generation of population. So before implementing the SSR

    scheme, we invert the fitness values so that the desired schedules that have lower fitness values

    now after inversion would have higher values which are desirable for the SSR scheme.

    2. Now these inverted values are weighted by dividing each value by the sum of all the values.3.

    Using a uniform random generator, we now generate a value R between 0 and 1.

    4. The weighted value of each schedule is added progressively to the next. We stop when this sumjust exceeds the value R. The last chromosome that was added is taken as the first parent. The

    second parent is also chosen in a similar fashion.

    5. Thus pairs of parent chromosomes are selected from the entire population.3.3.2. Deterministic Selection Scheme:

    The deterministic selection scheme adopted in this work is actually very biased in terms of the

    selection of the selection of the parent chromosomes. This actually turned out to be an interesting idea

    as it could be seen from the results which are shown in later chapters. The algorithmic implementation

    of this scheme is done as follows:

    1. The schedules (chromosomes) in the given population are sorted according to increasing ordecreasing values of their fitness function.

    2. The schedule with the highest fitness value is rejected. If there are multiple schedules with thehighest fitness value, the schedule to be rejected is selected randomly.

    3. Once a schedule is rejected, the schedule with the lowest fitness value is repeated replicated sothat the population size remains even.

    4. Now the pairs of parent chromosomes are formed as follows considering that the populationsize is n: (1,n), (2,n-1), (3,n-2),.., (n/2 , n/2 +1).

    5. We have no mathematical theory behind coming up with this kind of a deterministic scheme.This algorithm showed an intuitive appeal. We felt forming the parent chromosome pair with a

    good parent (lower fitness value) and a bad parent (higher fitness value) might result in the

    formation of acceptable daughter chromosomes.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    14/31

    14

    3.4.Performing Cross-Over Operation:Once the selection process of the parent chromosomes is done, cross-over operation has to be

    performed on the parent chromosomes to result formation of daughter chromosomes. The crossover

    operation for the cross docking problem is different from the normal genetic algorithm crossover

    because there can be no duplicates in a chromosome. It is not possible for any truck to be in two

    different bays at the same time. Another difference is that the first half of the chromosome represents

    the set of full trucks while the second half represents the set of empty trucks. Because of this, the

    crossover operation is performed on both halves of the chromosome. Therefore a different technique

    for crossover must be used. The cross docking crossover operation works as follows:

    1. A crossover point is initially selected. The selection of the cross-over point has to be donerandomly.

    2. From the beginning of the chromosome to the crossover point, the trucking schedule is copiedto the new chromosome. This must be performed for the full trucks as well as the empty trucks.

    3. The second chromosome is copied after the point of crossover, if there is no conflict. A conflictoccurs if the truck being added already exists in the new chromosome.

    4. The next step is to solve the conflicts by scanning the second chromosome from the beginningto find the unused trucks and put them in the order that is opposite to the order they appear in

    the first chromosome.5. The final step is to repeat the process, substituting the second chromosome as the first.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    15/31

    15

    CHAPTER IV

    PROBLEM DEFINITION

    The algorithm elaborated in the previous chapter is applied to scheduling problems of size 4

    (4!*4! Possible solutions, 4 inbound and 4 outbound trucks), 7 (7! * 7! Possible solutions, 7 inbound

    trucks and 7 outbound trucks) and 10 (10!*10! Possible solutions, 10 inbound and 10 outbound trucks).

    The chapter deals with the application of genetic algorithm to the aforesaid scheduling problems with

    the objective of reducing the total distance travelled by the goods within the cross-docking warehouse.

    Both the selection schemes (stochastic and deterministic) are used in all the above cases. The inputs that

    need to be fed to the computer are the number of trucks and the destination trucks of the goods from

    each truck. The following are the inputs used in the three different cases considered.

    Case I: Scheduling of 4 inbound and 4 outbound trucks:

    Goods from truck 1 have to go to the outbound trucks 5, 7, 8 Goods from truck 2 have to go to the outbound trucks 6, 7 Goods from truck 3 have to go to the outbound trucks 5, 6, 7 Goods from truck 4 have to go to the outbound trucks 8

    Case II: Scheduling of 7 inbound and 7 outbound trucks:

    Goods from truck 1 have to go to the outbound trucks 9, 11, 13, 14 Goods from truck 2 have to go to the outbound trucks 8, 9, 10, 11, 12 Goods from truck 3 have to go to the outbound trucks 10, 12, 14 Goods from truck 4 have to go to the outbound trucks 8, 13, 14 Goods from truck 1 have to go to the outbound trucks 8, 9, 10, 11, 12, 13, 14 Goods from truck 2 have to go to the outbound trucks 8, 10, 11, 13 Goods from truck 3 have to go to the outbound trucks 9, 12, 14

    Case III: Scheduling of 10 inbound and 10 outbound trucks:

    Goods from truck 1 have to go to the outbound trucks 11, 13, 15, 16, 18, 19, 20 Goods from truck 2 have to go to the outbound trucks 13, 17, 18, 19, 20 Goods from truck 3 have to go to the outbound trucks 12, 14, 15, 16, 18 ,20 Goods from truck 4 have to go to the outbound trucks 11, 12, 13, 14, 15,16, 17, 18, 19, 20 Goods from truck 5 have to go to the outbound trucks 12, 13, 14, 15, 17, 18, 20 Goods from truck 6 have to go to the outbound trucks 11, 15, 16, 17, 18, 19

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    16/31

    16

    Goods from truck 7 have to go to the outbound trucks 11, 15, 16, 17 Goods from truck 8 have to go to the outbound trucks 12, 13, 14, 15, 17, 18, 19 Goods from truck 9 have to go to the outbound trucks 14, 15, 16, 17, 18, 19, 20 Goods from truck 10 have to go to the outbound trucks 11, 12, 14, 15, 18

    Once the input is fed, genetic algorithm is used to generate the optimal or near-optimal solution.

    The various comparisons and analysis carried out are listed below.

    1. Checking the optimality of the solution generated using Genetic Algorithm (GA) for case I andII

    2. Comparison of the selections schemes (stochastic and deterministic) in GA within every case.3. Comparison of the computation time here with that from other optimal programs. The

    computation times of these other optimal programs have been taken from literature.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    17/31

    17

    CHAPTER V

    RESULTS & DISCUSSION

    5.1. Checking the Optimality of the Solution obtained using GA:This check is carried out for case I (4 trucks) and case II (7 trucks). As we have already

    discussed, the total horizontal distance travelled by the goods in any schedule is going to be the same

    because the dock width is a constant. So the parameter that was optimized was the total vertical distance

    units travelled by the goods in any schedule. The total vertical distance units when multiplied with the

    width of the gate gives us the total vertical distance itself. An optimal solution each for 4 trucks and 7

    trucks is given and they have values of 5 and 43 units respectively. Both these optimal schedules were

    built by common sense (and it actually took lots of time to arrive at them!). Given below is the tablewhich presents the results obtained using deterministic and stochastic selection process with their

    accuracy and computation time. The convergent iteration has been approximately obtained from the

    plots obtained rather than a rigorous algorithm.

    2 3 1 4 6 7 5 8

    Optimal Solution for Case I : 4 trucks

    4 6 1 5 2 3 7 13 8 11 10 9 14 12

    Optimal Solution for Case II : 7 trucks

    It could be seen from the above tables that both the deterministic and stochastic sampling

    schemes give optimal or close to optimal solutions. It could also be inferred from the tables that the

    deterministic sampling selection GA is more accurate than Stochastic Selection Replacement (SSR) GA

    at lower population sizes. But as the population size increases, though the deterministic GA still remains

    accurate, it take more computational time than SSR GA. SSR GA is found to give more accurate

    solutions as the population size increases. Later in this section, deterministic and SSR GA have been

    compared for a higher number of trucks. This comparison could give a better idea which GA is more

    suited as the number of trucks increase. Later we have discussed for 10 trucks (10 inbound and 10

    outbound trucks). The performance graphs for scheduling of 7 trucks with these two algorithms for

    different population size are given below.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    18/31

    18

    Case I:4 trucks: Optimal Solution=5 Stochastic Selection Scheme

    Population

    Size

    GA solution Accuracy (%) Convergent

    Iteration

    Computation Time

    (seconds)

    100 5 100 35 3.37200 5 100 30 3.15

    300 5 100 40 3.29

    400 5 100 45 4.25

    Case I: 4 trucks: Optimal Solution = 5 Deterministic Selection Scheme

    Population

    Size

    GA solution Accuracy Convergent

    Iteration

    Computation Time

    (seconds)

    50 5 100 110 3.70100 5 100 220 5.86

    200 5 100 610 19.52

    300 5 100 890 37.03

    Case II: 7 trucks: Optimal Solution=43 Stochastic Selection Scheme

    Population

    Size

    GA solution Accuracy (%) Convergent

    Iteration

    Computation Time

    (seconds)

    100 46 93.02 185 8.58

    200 44 97.67 260 19.86

    300 43 100 240 35.59

    400 43 100 305 55.64

    500 43 100 285 95.83

    Case II: 7 trucks: Optimal Solution = 43 Deterministic Selection Scheme

    Population

    Size

    GA solution Accuracy Convergent

    Iteration

    Computation Time

    (seconds)

    50 43 100 245 7.8

    100 43 100 410 15.36

    200 43 100 1330 60.68

    300 43 100 1780 92.09

    400 43 100 2340 160.57

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    19/31

    19

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    20/31

    20

    5.2. Comparison of Selection Schemes for the 10-truck algorithm:The table shows the fitness values achieved, computation time for both deterministic and

    stochastic sampling replacement selection schemes of genetic algorithm. The optimal solution in this

    case is unknown and we judge the efficiency of the schemes with respect to the lower fitness value

    achieved by these schemes for different population sizes.

    It could be very well seen from the tables that the deterministic sampling selection GA algorithm

    is efficient than the SSR GA algorithm for this case III of 10 trucks. Though the computation times of

    the two algorithms are comparable, the deterministic sampling GA gives lower fitness values. To add to

    this, this fitness value repeats itself for lower population sizes as well.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    21/31

    21

    Case III: 10 trucks: Stochastic Selection Scheme

    Population Size GA solution Convergent

    Iteration

    Computation Time

    (seconds)

    100 155 440 10.89200 161 540 79.54

    300 159 700 147.51

    400 154 890 224.73

    500 152 1210 387.71

    Case III: 7 trucks: Optimal Solution = 43 Deterministic Selection Scheme

    Population Size GA solution Convergent

    Iteration

    Computation Time

    (seconds)50 150 290 9.31

    100 147 680 17.92

    150 148 1050 51.37

    200 147 1740 69.73

    300 147 2450 162.57

    400 147 3750 297.15

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    22/31

    22

    5.3. Comparison with the Computation Times from other programs:The computation time for case is obtained from the journal Cross Dock Scheduling using

    Genetic Algorithms by Ley and Elfayoumy (2007).

    Number of Trucks Optimal Program-Time

    Seconds (Leyet al., 2007)

    Genetic Algorithm-

    Deterministic Selection (s)

    Genetic Algorithm-

    Stochastic Selection (s)

    Time(s) Population Time(s) Population

    4 0.040 19.52 200 3.15 200

    7 940.833 160.57 400 55.64 400

    10 4.87728E+08 297.15 400 * *

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    23/31

    23

    Thus we could see that with an increase in the number of trucks genetic algorithm is much more

    efficient than conventional algorithm techniques in achieving an optimal solution or close to optimal

    solution. It is also observed that deterministic scheme of GA is efficient compared to stochastic scheme

    of GA when the number of trucks in the problem in hand increases. But we cannot definitely conclude

    that as deterministic scheme of GA is more efficient than the stochastic one. With appropriate fine-

    tuning of the stochastic scheme algorithm, we could achieve more efficiency. This is an area where there

    is more scope for research.

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    24/31

    24

    CHAPTER VI

    CONCLUSION

    We got inspired to carry out work in this area after coming across the journal of Ley and

    Elfayoumy (2007). Though initially we thought of trying to reproduce and verify the authors work in

    their journal, our objective later on shifted in a new direction where we came to know a lot about using

    genetic algorithms in scheduling models. During the initial period of this process, we found that there is

    some scope for improvement in the algorithm proposed by the authors. This modified algorithm is

    proposed in Section 3.2.1 of Chapter 3. Then we thought of playing around with the selection algorithm.

    It was during this period we decided to use the less-popular deterministic scheme of selection. We then

    thought a deterministic selection algorithm composed of sorting(using mergesort) and selecting the

    parent chromosomes from the top and bottom of the sorted list. Though we got convincing results with

    this selection scheme, we felt this method is very biased and contains elements which could be

    considered to be against the natural process of evolution. It was then when we implemented a stochastic

    selection process. A comparison of the stochastic and deterministic selection schemes led us to

    interesting junctures.

    We observed that genetic algorithm based on both schemes yielded optimal schedules. It was

    always observed that as the population size increased, the efficiency and accuracy of the stochastic

    scheme increased. At the same time, though the accuracy of the deterministic scheme was good with

    increase in population size, its efficiency i.e., computation time, increased at a much drastic rate than

    stochastic scheme. It was also observed that at lower population sizes (

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    25/31

    25

    CHAPTER VII

    FUTURE SCOPE FOR RESEARCH

    The following suggestions are made with respect to application of genetic algorithm to cross

    dock scheduling operations

    1. Fine-tuning of the stochastic and deterministic selection scheme algorithms to increase the efficiencyof the algorithm.

    2. Incorporating usual genetic operators like mutation rate, cloning rate into the algorithm.3. Analysis by setting up a design of experiments to obtain the best parameters (like mutation rate,

    crossover rate, required initial population size) for a particular problem.

    4.

    Analysis of the selection schemes so as to make an acceptable guess or compute that entirealgorithms complexity

    As we have read from literature, genetic algorithm is still an upcoming field and there is always

    more scope for improvement.

    REFERENCES

    W. Yu & P.J. Egbelu, Scheduling of inbound and outbound trucks in crossdocking systems withtempo-rary storage, Eur. J. Oper. Res., vol. 184(1), pp. 377-396, 2008.

    S. Ley, & S. Elfayoumy, Crossdock scheduling using genetic algorithms, Proc. 2007 IEEE Int. Sympo.Computational Intelligence in Robotics and Automation, FL, USA, 2007, pp. 416-420.

    M. Shakeri, M. Y. H. Low, and Z. P. Li, "A generic model for crossdock truck scheduling and truck-to-door assignment problems, " 2008 6th IEEE International Conference on Industrial Informatics, vol. 1-3, pp. 822-829, 2008.

    Ruslan Sadykov,Scheduling incoming and outgoing trucks at cross docking terminals to minimize thestorage cost,2011.

    Andrew J. Page, Thomas J. Naughton, Framework for task scheduling in heterogeneous distributedcomputing using genetic algorithms, Artificial Intelligence Review, Volume 24, Numbers 3-4, November2005, Pages: 415 - 429.

    David Montana, Marshall Brinn, Sean Moore, Garrett Bidwell,Genetic Algorithms for complex,RealTime scheduling IEEE International Conference on Systems, Man, and Cybernetics - SMC , vol. 3, pp.2213-2218 vol.3, 1998

    Rodrigue, JP et al. (2009) The Geography of Transport Systems, Hofstra University, Department of

    Global Studies & Geography, http://people.hofstra.edu/geotrans.

    Application of Genetic Algorithms, Dr. Sophia Drossopoulou, Department of Computing, ImperialCollege, London http://www.doc.ic.ac.uk/~nd/surprise_96/journal/vol1/hmw/article1.html#why

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    26/31

    26

    APPENDIX

    I. Generation of required population size:%% Genetic Algorithm for M_Trucks: STEP I%% Generation of the Initial Population of required size

    function [P]=population(n,m,M)% n-no. of random numbers to be used;% m-no. of schedules to be generated.for q=1:m

    for i=1:ny1=rand(1,n);x1=M.*y1; % Generating uniform random number for inbound trucksz1=ceil(x1);I1=truck_sch(z1);y2=rand(1,n);x2=(M.*y2)+M; %Generating uniform random number for outbound trucksz2=ceil(x2);I2=truck_sch(z2);I0=cat(2,I1,I2); %The required schedule

    endP(q,:)=I0;

    end

    function [I]=truck_sch(z)I(1)=z(1);i=1;j=2;

    while(ilen)

    breakend

    endif (k == len+1)

    I(i+1)=z(j);i=i+1;

    endj=j+1;

    end

    II. Evaluation of the fitness function value:%% Genetic Algorithm for M trucks: STEP II: Calculation of the fitness functionvalue

    function [dist_min p_dist avg PPtot_dist]=fitness_valuegeneric(modified_routin,P) % P is the population generated in the previous

    % modified_routin is the routing file that has to be input to the computer% modified_routin file consists of an array which consists of just 0's and% 1's. If an array element is 1, then it means the goods has to travel from

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    27/31

    27

    % inbound truck represented by the row index to the outbound truck% represented by the column index

    m=size(P,1);b=modified_routin;for i=1:m

    for a=1:14c(a)=find(P(i,:)==a);

    endtot_dist(i)=0;for j=8:14

    for k=1:7tot_dist(i)=tot_dist(i)+b(k,j-7)*abs(c(j)-c(k)-7); % Computation of the fitness value for each schedule.% This fitness value is the total vertical distance units% travelled by the goods in that particular schedule

    endend

    end

    dist_min=min(tot_dist);% Computation of the standardized fitness values of all the schedulessum1=0;for i=1:m

    sum1=sum1+tot_dist(i);endavg=sum1/m;for i=1:m

    p_dist(i)=tot_dist(i)/sum1;endPP=cat(2,P,(tot_dist)');

    III.Selection Scheme:III.A. Deterministic Selection Scheme:

    %%Genetic Algorithm: STEP III :Elimination of unfit chromosomes and%%Formation of pairs of parent chromosomesfunction sorted=elimination(p_dist,P)maxi= max(p_dist); % Finding the maximum value of the fitness functionmax_index= find(p_dist==maxi);% Computing the position of the schedule which

    % has the maximum value.PP=cat(2,P,(p_dist)');lengmax=size(max_index,2);rdn_index=ceil(lengmax*rand(1,1));PP(max_index(rdn_index),:)=[]; % Randomly removing the schedule which has

    % the largest fitness valuesorted_PP=mergeSort(PP); % Implementation of Mergesort technique to sort the

    % the schedule list according to their p_dist% values

    rows=size(sorted_PP,1);columns=size(sorted_PP,2);if(mod(rows,2)~=0)

    a=sorted_PP(1,:);

    sorted_PP=cat(1,a,sorted_PP);% Replicating the schedule which has the% lowest fitness valueend

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    28/31

    28

    sorted=sorted_PP(:,1:columns-1);% Mergesort functionfunction dataOut = mergeSort(dataIn)len = size(dataIn,2);lenD= size(dataIn,1);if(lenD

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    29/31

    29

    sum2=0;k=0;while(sum2length_a)

    break

    endendif (k==length_a+1)

    a(length_a+1)=d(j);else a(length_a+1)=0;end

    endzer=find(a==0);length_zer=size(zer,2);ini=size(a,2)-l;length_a=size(a,2);j=1;zer_index=0;while(j

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    30/31

    30

    elsek=ini+1;while (b(j)~=a(k))

    k=k+1;if(k>length_a)

    break

    endend

    if (k==length_a+1)a(zer(length_zer-zer_index))=b(j);zer_index=zer_index+1;

    endcount=0;for p=1:length_a

    if (a(p)==0)count=count+1;

    endend

    if (count==0)breakendj=j+1;

    endends=a;

    V. Simulation Run program:V.A. Deterministic GA Simulation

    function [avg dist PP]=deterministicGA(b,M,I)% b- input routing array% M- Population Size% I- Number of iterationsP=population(200,M);for i=1:I

    [dist(i) p avg(i) PP]=fitness_valuegeneric(b,P);sorted=elimination(p,P);P=cross_over(sorted);

    endfor i=1:I

    x(i)=i;endplot(x,avg,'r');hold onplot(x,dist,'g');xlabel('Number of Iterations');ylabel('Fitness Function');legend('Average Value of Fitness Function','Minimum value of Fitness Function');title('Performance Graph for Scheduling of 7 trucks using DeterministicSelection');

    V.B. Stochastic GA Simulation :

    function [avg dist PP]=stochastic_overall(b,M,I)

  • 7/28/2019 Scheduling of Trucks at a Cross Docking Warehouse using Genetic Algorithm

    31/31

    P=population(200,M);for i=1:I

    [dist(i) p avg(i) PP tot_dist]=fitness_valuegeneric(b,P);final=stochastic_sampling(tot_dist,P); P=cross_over(final);

    end

    for i=1:Ix(i)=i;endplot(x,avg,'r');hold onplot(x,dist,'g');xlabel('Number of Iterations');ylabel('Fitness Function');legend('Average Value of Fitness Function','Minimum value of Fitness Function');title('Performance Graph for Scheduling of 7 trucks using SSR Selection');