A Genetic Algorithm on Inventory Routing Problem

Inventory routing problem can be defined as forming the routes to serve to the retailers from the manufacturer, deciding on the quantity of the shipment to the retailers and deciding on the timing of the replenishments. The difference of inventory routing problems from vehicle routing problems is the consideration of the inventory positions of retailers and supplier, and making the decision accordingly. Inventory routing problems are complex in nature and they can be solved either theoretically or using a heuristics method. Metaheuristics is an emerging class of heuristics that can be applied to combinatorial optimization problems. In this paper, we provide the relationship between vendor-managed inventory and inventory routing problem. The proposed genetic for solving vehicle routing problem is described in detail.


I. Introduction and Motivation
Recently, inventory routing issues face a great deal of attention, because it is seen as a prosperous function of logistics and inventory management.It can be considered as one of the ties between these two functions of the firm and it offers a wide range of improvement.
Solution of inventory routing problem is basically used to determine the amount and time of shipments to the buyers and form the routes between them.There are side constraints accompanied with the inventory routing problem.For instance, the capacity of the vehicles and the distribution of demand faced by the buyers should be taken into account.Additionally, the maximum load that can be placed on the trucks varies; therefore, the capacity of the trucks may change while leaving from a state and entering into another.This fact should be taken into account while planning the inventory routing problem.
Our motivation for dealing with that area primarily comes from its importance for vendor managed inventory.If we consider a vendor managed inventory as philosophy, the inventory routing problem is the philosopher itself.Inventory routing problem can be considered as a combinatorial optimization problem and the decisions given based on the output of the inventory routing problem will determine the success of the vendor managed inventory which is one of the widely studied topic in supply chain management.On the other hand, inventory routing problem has close ties with vehicle routing problem.Vehicle routing problem is an area that the researchers bring in theoretical, heuristics and metaheuristics approaches.

II. Related Work
The inventory routing problem is concerned with the repeated distribution of the single product, from a single facility, to a set of n customers over a given planning horizon.The customers have a consumption rate and the vehicle delivering the products to the customers has a capacity.The objective is to minimize the average distribution costs during the planning period without causing stockouts for any of the customers.However, if the consumption rate is stochastic, then there may be cases that the stockouts may occur.In that case, a term related with the backordering or stockout costs for the product may be added to the objective function.In a similar way, inventory-holding costs may also be added to the objective function.The vehicles are considered to be homogeneous (i.e.all of the vehicles are the same).
The customers are supposed to have a depot with a certain capacity for storing the inventory.The vehicles also have a carrying capacity.
According to Campbell et al. [3], three decisions to be made within the context of inventory routing problem include i) when to serve the customer?, ii) how much to deliver to customer when it is served?, when customers place orders and the delivery company assigns the orders for the given day to routes for trucks.
In vehicle routing problems, the shortage of the inventory is not possible.
These two types of problems are NP-hard.
Since the inventory routing problem is a multi-period problem, it is more difficult to find a solution.

III. Genetic Algorithm Overview
Genetic Algorithms (GAs) are stochastic search A from the traveling salesman problem representation.For each visited customer, a number will be placed next to customer number indicating the amount of inventory that is being delivered to the customer.Whenever, the vehicle returns the warehouse, the symbol w (i.e.warehouse visiting) will be placed in the string.A vehicle returns to the warehouse for refill and then departs for distribution of these items to the customers.This task may be carried out in the same day or the next day.If subsequent visits to the customers are realized in the same day, then there appear more than two w symbols in that given day indicating the multiple visits to the warehouse.
Since, there are more than one vehicle, the sequences of the customers the vehicle have visited will be merged.For this purpose, the vehicles will also be numbered from 1 to m, where m is the total number of vehicles.
An example of the proposed chromosome representation is given below.
The string will be translated as follows.There are two vehicles in total.In the first day, the first vehicle departs from the warehouse, visits customers 2, 4, and 3, delivers items 5, 2, and 3 respectively, and then return back to the warehouse.The first vehicle in the second day, visits customers 1, 5, and 6, delivers items 4, 1, and 5 respectively, and then returns to warehouse again.This is a 2-day schedule for vehicle and the similar schedule is carried out for the second vehicle in two days.
There are several points to take into consideration.1) On each trip, the number of the items should not exceed the vehicle capacity and in our example, the vehicle capacity can be 10, 15 but not 8. 2) The

A Genetic Algorithm on Inventory Routing Problem
Emerging Markets Journal | P a g e |63 selected vehicles such that the total number of selected customers is N when it is summed over all vehicles and all days.If there are some customers not selected at all, the same number of customers already selected more than once in the whole population will be removed from the respective chromosome and new customers are placed instead.The reason for this operation is to consider all the customers for the solution process.If some of them are neglected, there is no way to retrieve these customers by our crossover and mutation operators.
After selecting the set of customers to be visited for each day by each vehicle, we need to determine the number of items delivered to each customer.In order to address this problem, an urgency measure may be developed which can be expressed as: , where R n being the number of items at the customer depot n, c n being the expected consumption rate per day for customer n and U n being the urgency measure for customer n.In addition to this approach, a different method can be followed.Instead of incorporating the expected consumption rate, one can use a simulation to find the day-by-day usage rates of customers.After finding the urgency measure of each customer, these U n figures pertaining to specific customers for a given vehicle on a given day are summed up, and an overall U figure is found.
To calculate the amount of items delivered to each customer, the following formula will be used: where CA representing the capacity of the vehicle and D n is the amount to be distributed to customer n.Since, all vehicles are assumed to be homogeneous, CA has no index.
The calculated amounts are distributed to the customers.If D n is greater than T n -R n , where T n is the capacity of depot of customer n, then it is not possible to make the scheduled replenishment to that customer, in that case make replenishment of T n -R n to customer n.
There is no simple formula for determining the population size in genetic algorithms, but a population size of 30 can be considered a reasonable choice.
After forming the initial population, we proceed to the next phase, the recombination.The recombination operators in genetic algorithms are mainly crossover and mutation, and we will use these two operators.
Next step after forming the initial population is determining the fitness value of the chromosomes.The fitness value of the chromosomes is determined by the cost of the tours of the vehicles among customers, the inventory holding costs, and the inventory backorder or shortage costs.Since in our application, the demand is considered to be stochastic, and because of the method in which the initial population is generated, the backorders are highly likely, so it must also be incorporated into model.Since the objective function is summation of the traveling cost, backorder cost and the inventory holding costs, a mapping that links the objective function to the fitness value of the chromosome should be constructed.It should be adjusted such that the higher the objective function is, the lower the fitness value will be.
The crossover operator in genetic algorithms is mainly used to blend the good properties of the parents in the offsprings.For this purpose, some of the selected portions of the parents are selected for crossover, and these are combined to form a new offspring.
In order to combine good properties, parents with good fit values should be selected.For this purpose, some mechanisms are devised in which higher probability is given to the fitter chromosomes.After these chromosomes are selected, they are mated with each other to produce offsprings.
For our genetic algorithm, we prefer to use two-point crossover.In traditional two-point crossover, the portions of the chromosome that are exchanged have the same length.But, in our case, we choose to make two-point crossover based on portions that have different sizes.The reason for such a modification is that we can change the number of visits a vehicle can make per day by this varying length portion exchange.If an offspring has more than two w symbols on the given day, it means multiple warehouses are visited.An example of crossover in our genetic algorithm may be given as follows: Note that under that scheme, if we assume the capacity of the vehicle as 10, for the second offspring for vehicle 1 in day 2, the total capacity of the vehicle is exceeded.In that case, we can devise a rule stating that 2 units of item can be removed from the customer which has the lowest U n value.If this is not possible, we can check the next customer having the lowest U n value, and so on.
As a result of crossover, the total capacity of the depot may be exceeded.In that case, the amount shipped to customer may be reduced by exceeded capacity so that the constraint for customer depot is not violated.
It must be noted that in second offspring, the customer 5 is not visited, and in the first offspring the customers 8 and 10 are not visited.However, looking at this infeasibility from the genetic algorithm perspective, it does not pose a big problem because the customers 5 in solution 1, 8 and 10 in solution 2 will suffer from stockouts and backorders and this will definitely be reflected to the fitness function After offsprings are formed, another mechanism which comes to the scene is mutation.Some researchers prefer to apply the mutation operator to offsprings only while the others apply it to both offsprings and parents.In this research, we will be applying this operator to offsprings only.
For mutation, we exchange the gene locations in the chromosome.Two pairs (i.e., the customer visited and the shipped amount to that customer) are selected and exchanged.An example is shown below: Generally, there is a predefined limit on the number of generations.They can be estimated based on some convergence criteria.If a certain proportion of the population converges to a single solution (i.e. the population is represented by few unique solution), then it can be concluded that it is time to end the genetic algorithm.While running the genetic algorithm, the incumbent solution is generally kept, and it is declared as the best solution at the end of the run.Some researchers suggested that there should be multiple runs of the genetic algorithm to find the best solution.In that case, different parameters (i.e.number of generations, crossover rate and mutation rate) are used in genetic algorithm runs; the incumbent solution in each run is kept and these incumbent solutions are compared with each other to find the "incumbent" of the incumbent solutions.

IV. Conclusions and Future Work
In this paper, we aim to bring a metaheuristic approach the inventory routing problem.
algorithms that were pioneered by Holland in 1970s.A GA utilizes an artificial chromosome that represents a solution to the problem of interest and attempts to successively find a better solution, using the Darwinian principle of survival of the fittest genes.This principle specifies that the gene represents possible solutions to the problem and fitness is the objective function value.GAs are atypical because many solutions are followed in parallel and then recombined in search of the improved ones.The technique is modeled on evolutionary process found in nature; natural evolution and thermodynamics.The evolutionary function eliminates trial solutions that are relatively ineffective, but a range of selection criteria is possible.The quality of the overall result and the computational effort required to achieve convergence depend critically on the selection criteria used.Volume 3 No 3 (2014) | ISSN 2158-8708 (online) | DOI 10.5195/emaj.2014.31| http://emaj.pitt.eduA Genetic Algorithm on Inventory Routing Problem Emerging Markets Journal | P a g e |61 GAs are based on natural selection principles which guide the generation of new chromosomes in living entities via genetic recombination.Using a genetic algorithm, the solutions are represented by chromosomes in GAs.In biological terminology, chromosomes consist of genes, which may take on some number of values called alleles.Chromosomes or genotypes are represented by a finite number of possible values or alleles at each position.They consist of a fixed length string.GAs conduct efficient search of a solution space because they use a probability transition guide.A genetic search is conducted on all dimensions by recombining structures and then evaluating them simultaneously.They enable survival-of-the fittest structures to be combined with a structured, yet randomized, information exchange.This combination forms a search algorithm with some creativity of human search.GAs use historical information to discover new research points in order to improve performance.To solve the problem, genetic algorithms must have the following five components: 1.A chromosomal representation of solutions to the problem.2. A method to create an initial population of solutions 3. Parameter values used by genetic algorithms (population size, mutation rate, crossover rate, etc.) 4.An evaluation function that operates in the role of the environment, rating solutions with respect to their "fitness" 5. Genetic operators that change the composition of children during reproduction.
time required for the trip is always smaller than the operation period of warehouses.It means that, if the operating hours of warehouses and customers are between 9 am-9 pm, the duration of trip, irrespective of the number and locations of the customers will take at most 12 hours.3) All the items are homogeneous.The demand of the customers is discrete and expressed as integer values.There is only single warehouse, with stochastic demand pattern for the customers.Short-term horizon is considered extending from a couple of weeks to at most 2 weeks, and the unit time is a day.4) At the beginning of the planning horizon, the depots of all customers are full.The vehicles are all homogeneous, and they have the same carrying capacity.This chromosome representation resembles the representation in traveling salesman problem but there are some extensions.The next phase of constructing the genetic algorithm is initial population generation.To start with the initial population generation, a customer will be selected at random, and the closest customer to that customer is selected.This procedure will be continued till the number of selected customers reaches of total customers, m is the number of vehicles, and t is the number of days.This operation will be performed for each vehicle each day.customers at randomly selected days will be assigned randomly Volume 3 No 3 (2014) | ISSN 2158-8708 (online) | DOI 10.5195/emaj.2014.31| http://emaj.pitt.edu

Volume 3
No 3 (2014) | ISSN 2158-8708 (online) | DOI 10.5195/emaj.2014.31| http://emaj.pitt.eduA Genetic Algorithm on Inventory Routing Problem Emerging Markets Journal | P a g e |65 Again, here for vehicle 1 in day 2 in mutated offspring, the capacity of the vehicle is exceeded.Although the capacity of the vehicle is 10, 11 items are scheduled to be delivered.To overcome this problem, the customer scheduled with lowest U n value is selected and one less item is delivered to that customer.Another version of the mutation may be only exchanging the number of items delivered to the specific customers.This way, the sequence of the customers remains the same, but only values scheduled to be shipped are exchanged.Yet another version may be to keep the amount of items shipped constant, and exchange the order of customers to be visited.Regardless of the version selected, we should keep in mind that the capacity constraint of the vehicle and the depot capacity constraint of the visited customer should not be violated.After crossover and mutation are performed, it is time to select the solutions (chromosomes) that will form the next generation.For this purpose, the researchers proposed different methods.Some favors the elitist selection which supports the idea of picking up the chromosomes with a highest fitness function.The others have devised some mechanisms for assigning probability of selection to the chromosomes according to the fitness function.For our research, we use the elitist selection, where we select the best chromosomes for the next generation.At that point, the number of crossovers performed in each generation is important.The number of offsprings are always twice of the number of crossovers performed in each generation.So, if we assume the number of chromosomes to be 30, then the total number of parents and offsprings are 30+C, C being the number of crossovers.Out of 30+C, 30 chromosomes are selected for the next generation.The best 30 chromosomes in terms of fitness values are identified and placed in the next generation.

Volume 3
No 2 (2013) | ISSN 2158-8708 (online) | DOI 10.5195/emaj.2014.31| http://emaj.pitt.eduOne of the future research direction is to determine the fitness function since the fitness function that correctly reflects the value of the solution is vital in genetic algorithms.If you discriminate between the good and relatively worse solutions too much, the problem of the domination of super chromosomes in the population and premature convergence may emerge.To overcome this problem, a good fitness function that combine the inventory holding, backorder and stockout costs as wellas the cost of trip should be devised.A pilot study may be conducted to decide on the best sets of parameters.The deviation from the optimal solution can be used as an indicator of the solution quality.To find the deviation from optimum, a mixed integer-programming model can be constructed and solved with some optimization packages such as GAMS.However, when the number of customers to be visited and the length of planning horizon are increased, the complexity of the problem also increases.For that reason, some lower bound finding mechanisms for the problem may be devised, or the results of previously solved vehicle routing problems may be used for comparison.Finding some cyclic properties for inventory routing problem could be another avenue.For this reason, the t (i.e. the duration of the period for which the inventory routing problem is solved) should be selected accordingly.Small t may not give the desired solution to our problem.On the other hand, large t values may increase the computation time and deteriorates the solution quality of genetic algorithm.The deterioration in solution quality in case of the increase in the chromosome length is nearly inevitable when the number of generations is remained constant.