Genetic Procedure for the Single Straddle Carrier Routing Problem

— This paper concentrates on minimizing the total travel time of the Straddle Carrier during the loading operations of outbound containers in a seaport container terminal. Genetic Algorithm is well-known meta-heuristic approach inspired by the natural evolution of the living organisms. Heuristic procedure is developed to solve this problem by recourse to some genetic operators. A numerical experimentation is carried out in order to evaluate the performance and the efficiency of the solution.


INTRODUCTION
The success of a seaport container terminal resides in a fast transshipment process with reduced costs and it is measured by many performance indicators such as the productivity and the customer satisfaction.Because containerships are highly capitalized and their operating costs are very high, it is very important that their turn-around time in container terminals is as short as possible.The turn-around time of a containership implies the sum of the queue time and service time which is the sum of time for berthing, unloading, loading and departing.
Since inbound containers are usually unloaded into a designated open space, the yard handling equipment (i.e.Straddle Carrier) does not have to travel much during the unloading operation.However, the time for loading depends on the loading sequence of containers as well as the number of loaded containers.The Single Straddle Carrier Routing Problem (SSCRP) has a great effect on the time service and the performance of the container terminal.In this paper, our objective is to minimize the total travel time of the Straddle Carrier (SC) for loading outbound containers.
The remainder of the paper is organized as follows: section 2 present the related works that solve the SSCRP.Section 3 will be reserved to detail the problem formulation.The two following sections will be reserved to present our Genetic Algorithm solution and our paper will be finished by numerical examples in order to prove the efficiency of our method.Some concluding remarks and perspectives to extend this work are finally discussed.

II. RELATED WORKS
Operational decision problems on seaport terminals have received increasing attention by researchers.Some of them evoked the SCRP as Kim and Kim ([1] [2] [3]); they present in their papers a mathematical formulation for the SSCRP where their objective is to minimize the distance between yard-bays in the storage area during the SC tour.They propose a solution procedure based on beam search heuristic method that its principle is to select the nearest yard-bay to visit by a SC.However, they suggest that the times spend by the SC inside yard bays are constant.In reality, we note that these times vary and significantly affect the SC routing tour.In fact, we judge that the reshuffling and the unproductive movements inside a yard bay depend on the positions of required containers into stacks and levels.Hence, we will evaluate the time spent between initial position and all destinations yard bays in addition to the time cost inside each one and we select the least of them.Therefore, in our paper we solve the SSCRP by considering this time (intra-yard bay) as variable.

Little research has been done on this topic although the practical importance of this problem ([4] [5] [6] [7] [8]).
In 2003, V. Nunes Leal Franqueira [9] proposed Heuristic strategies Beam Search and Ant Colony Optimization to solve the single vehicle routing problem.These are tested comparatively.A new strategy for container collection is proposed as a substitute for the traditional greedy strategy of container collection.The proposed strategy increased the number of alternatives considered within the search space and turned out to improve the quality of solutions.It is proved that the Ant colony heuristic react well as beam search method in this strategy.
In 2005, E. Nishimura et al. [10] present in their paper a Genetic Algorithm heuristic to solve the trailer routing problem using a dynamic routing assignment method.They focus on the tours related to one cycle operation of the quay cranes.Experimental results demonstrate that the dynamic assignment is better than static one.The drawback to their solution procedure is the complexity of the trailer routing, which may increase the possibility of human error.Trailer drives may find difficult to follow the complicated itineraries assigned to them, resulting in mistakes in driving.E. Nishimura et al. in 2001 [11] address in their paper the problem of a dynamic assignment ships to berths.They develop a heuristic procedure based on genetic algorithm where chromosomes are presented as character strings instead of bit binary string representation.The chromosome representation of the solution defines the set assignments of www.ijacsa.thesai.orgships to berths, giving ships the positions of service sequence for each berth.

A. Straddle Carrier definition
By a "subtour" of a SC, we mean a visiting sequence of yard-bays which a SC visits to pick up all the containers which will be loaded onto a cluster of cells in the ship.An overview of a container terminal is presented in Figure 1.

B. Optimization model
An optimization model will be developed to display the container arrivals and yard locations and the actual and optimized assignment of straddles to containers.
The main part of this modeling is to develop and evaluate the algorithms for assigning straddles to containers.
The discussion from the previous section illustrates the fact that the manner in which the straddles are assigned container jobs impacts the cost and service quality of operation.
In general, the problem of assigning straddles to containers can be formulated as the assignment problem, a mathematical programming problem presented by L.N. Spasovic et al. in 1999 [12].

of the i j assignment 
Equation ( 1) is an objective function that minimizes costs.Constraints ( 2) and ( 3) are typical assignment problem restrictions that ensure that a straddle can be assigned to only one container and vice versa.

A. Motivation
Because of existing the several equality constraints in our model, the implementation of the GA in order to quick and facilitate achieve to the feasible solutions is the objective of our work.
Our reasons for choosing GA as a solution approach are as follows: We need an approach to search the feasible route.The most of the model's constraints are as equality form and, therefore, obtaining of the feasible solutions is a hard task.In this case, the probability of reaching infeasible solutions is more than feasible solutions and therefore we need a population-based approach such as GA to better exploration of the solution routing.
GA is a well-known meta-heuristic that its efficiency is verified for many problems in the literature.
GAs work on a population of the solutions simultaneously.They combine the concept of survival of the fittest with structured, yet randomized, information exchange to form robust exploration and exploitation of the solution routing [13].

B. Probleme outlines
The problem can be summarized as follow:  Each feasible solution of the problem is treated as a chromosome in the GA.
 Every container must be picked up once and exactly once at any route.
 The handling time of each container is dependent on its positions in the storage yard.
The set of chromosomes construct a generation where steps of GA are applied: Step1: A fitness function is applied to extract the fittest value of the generation The SCRP is a minimization problem; thus the smaller the objective function is, the higher the fitness value must be.
Step2: The GA selects the fittest chromosomes and applied a crossover operator to give rise to better solution.
The crossover scheme should be capable of creating new feasible solution (child) by combining good characteristics of both parents.
Step3: These solutions are treated by a mutation operator which introduces random changes to the chromosomes to create new generation

C. Our representation
In our GA application, a candidate solution to an instance of the SCRP specify the number of required containers, the possible visited yard bays, the partition of the demands and www.ijacsa.thesai.orgalso the delivery order for each route.Each chromosome represents a feasible solution.
We will apply genetic operators to generate new individuals.Each of them defines a possible route of genes that represent the required containers.
For our problem a chromosome is a set of containers that can be visited by a SC to perform a quay crane (QC) work schedule.For example a QC demands r t containers type A to load them into a containership, SC has to move toward the yard bays that include this type of containers, and transports them to the QC.Each container has a transportation cost depends on its position inside the storage yard and especially in its chromosome's order.The number of genes in a chromosome is bounded by r t required containers.And the cost of the SC's tour will be the sum of transportation costs of the picked up containers.
The position is defined by the number of yard bay, stack and level.Every type or group is presented by a matrix.Each element of the matrix will be equal to 1 if the group of the current container is the same as the required type and 0 otherwise.Therefore we begin our procedure by this set of required containers from which we construct the initial generation of n chromosomes.The GA will choose randomly a set of chromosomes that contains r t genes.The gene represents a required container.

Let
designs the container inside yard bay i in stack s in level l; i.e.
represents a container inside the first yard bay, in the third level of the 8 th stack.

A. Fitness fuction
For our solution procedure we will take under consideration the sigmoid function as defined in E. Nishimura et al. in 2001 [11] ; where z(y) denotes the objective function value.
( ) 1/1 exp( ( ) /10.000) ) 0 ( ) 0.5 (4) For the feasible solutions, our GA calculates the cost of each route that satisfies the objective function of the SSCRP.Then it compares between these costs and selects the smallest amount one.

B. Reproduction
It is a process in which chromosomes are copied according to their scaled fitness function values, i.e., chromosomes with a higher fitness value would have more of their copies at the next generation.This can be done by randomly selecting and copying chromosomes with probabilities that are proportional to the fitness values (costs of routes presented in each chromosome).

1) Initial Situation:
We have n genes representing the number of the available required containers.Example: for n=9  2) Initial generation: GA chooses randomly r t genes from this table, constructs generations of chromosomes and selects the two fittest ones from each generation.
For our example, let chromosomes A and B be the selected parents.

C. Crossover
We use the 2-point crossover to introduce new chromosomes (or children) by recombining current genes.In this crossover, two cut points are randomly chosen on the parent chromosomes.In order to create an offspring, the strings between these two cut points in both chromosomes are interchanged.
A crossover may generate infeasible children in terms of constraint, i.e., a child chromosome may have container to be picked up twice.In order to keep the feasibility, the crossover operation is performed in the following manner.
First, substrings to be interchanged are given by two crossover points that are randomly determined.After interchanging the substrings between chromosomes A and B, we have chromosomes A′ and B′ as temporary children.Next, additional interchanges described below are carried out to make them feasible.Letting the interchanged string be the substring that was interchanged so far in each chromosome, we examine genes from left to right in the interchanged string of A′.Note that we never interchange any genes in the interchanged string again in the following process: As the most left gene is container which is scheduled to be picked up twice in A′, obtain the container type (which is ) in B′ at the corresponding position of the gene (hereafter referred to as a cell).
Therefore the container placed in the 7th bit in the chromosome A′ will be replaced by .The second double container in chromosome A′ is .
When we look at the corresponding gene in chromosome B′ we find the container which already exists in A′, so we follow the interchange arrows until we reach its end.In our example we stop in the container which will replace in chromosome A′.
We look at chromosome B′ and we follow the same way as in A′.

D. Mutation
This genetic operator introduces random changes to the chromosomes by altering the value to a gene with a userspecified probability called mutation rate.As an example we choose to apply the swap operator to each gene.This operator consists in randomly selecting two genes and exchanging them.The genetic procedure for case2 is presented as follow: Step1: For t = 1 (first subtour)  let r 1 containers (genes) from a type h  apply genetic algorithm developed in case 1 Step2: For subtours t = {2 ...T}  start from the last straddle carrier's position of the resulting chromosome in step1  Apply genetic algorithm developed in case 1

VII. NUMERICAL EXAMPLES
The resulting solutions of two strategies (Greedy collection strategy and Random collection strategy) are used as references for our experiments.The Greedy strategy is the collection of the maximum quantity of containers available at a determined location.The Random strategy is the collection of a random quantity of containers without leaving behind containers needed to complete a work schedule subtour.A MATLAB program was used to solve the above mixed-integer programming for an example problem.The MATLAB is a programming environment for algorithm development, data analysis, visualization, and numerical computation.All experiments were performed on a 3GHz Pentium 4 computer.
In the following tables the presented solutions of the GA procedure are the best ones between 12 generations for every iteration.
Case 1: in this case containers of the same group (A) are required.Two instances are generated in order to evaluate the GA procedure. In instance 1, Genetic algorithm demonstrated to return solutions of better quality than the Random collection strategy and the Greedy collection approach, within the same range of the processing time.
 Due to the random nature of Genetic algorithm heuristic method, increasing the size of the problem in instance 2 to look for solutions does not necessarily guarantee that a better solution will be reached.As observed in iterations 5 and 7, Random collection strategy found a better quality solution.
 By looking at iterations 4 and 8 in instance 2, we notice that Greedy collection strategy worked better since it found the minimum costs.It can be explained by the fact that the genetic heuristic selects the next location based on container's positions, i.e. both the yard-bay and the position of containers (stacks and levels) are taken into account, while the Greedy collection strategy selects the next location based on the yard-bays only.
 It seems that increasing the number of subtours has the same effect as increasing the number of the required containers.
 In big size problem, genetic procedure is less performed, this is can be explained by the fact that at each generation built by genetic procedure, a number of selected containers is fixed and the genetic operators are used only in this set of containers in order to choose the best cost solution between them.
 Genetic algorithm demonstrates better solution sin small sizes problem.
 The processing time in all iterations is quite reasonable.

VIII. CONCLUSION
In this paper, we have presented the routing problem of the SC to load outbound containers.We use Genetic Algorithm as an approach to solve the SSCRP, we defined its utility, and we developed our Genetic heuristic procedure and its operators such as fitness function, reproduction, crossover and mutation in order to get best solution to choose a route for the SC which has the least cost.Numerical examples are carried out to prove the performance and the efficiency of our method comparing with greedy and random collection strategies.

IX. FUITURE WORK
In a real container terminal there is more than one quay crane, with their respective work schedules, and many Straddle Carriers (SCs).Several SCs must complete their routing, by sharing the same container yard-map.This new scenario introduces a few complications to the single SC routing problem, increasing significantly the routing problem www.ijacsa.thesai.orgcomplexity.Our future work aims to solve the multiple straddle carrier routing problem (MSCRP) in a container terminal.In Other metaheuristics can be applied in the future, such Ant colony and particle swarm optimization, and comparative study can be done.

Figure 1 .
Figure 1.An overview of a container terminal

2 c
c c c c c c c c

Figure 2 .
Figure 2. list of required containers

Figure 4 .
Figure 4. Temporary children They are infeasible, because for instance, chromosome A′ has containers and to be picked up twice and lose containers and .Next, additional interchanges described below are carried out to make them feasible.Letting the interchanged string be the substring that was interchanged so far in each chromosome, we examine genes from left to right in the interchanged string of A′.Note that we never interchange any genes in the interchanged string again in the following process:

Figure 6 . 1 .
Figure 6.Swap operator VI.SOLUTION HEURISTIC PROCEDURE At really quay crane work schedule, many cases can be found.In this paper the 'single tour' and the 'subtours' cases are chosen.Case 1: single tour (where containers of the same type are required) 1.We have initial situation with all available required containers 2. Repeat  Create a generation in which all chromosomes have r genes where r is equal to the number of required containers. Calculate the objective function for each individual  Transform it to a fitness value  Select best-ranking individuals to reproduce  let individuals having better fitness be new parents  Create offspring through crossover operator

TABLE III
By analyzing the results in table II and table IV the following remarks can be made: