GENETIC ALGORITHMS BASED APPROACH FOR TRANSHIPMENT HUB LOCATION IN URBAN AREAS

Points of distribution, sales or service are important elements of the supply chain. These are the final elements which are responsible for proper functioning of the whole cargo distribution process. Proper location of these points in the transport network is essential to ensure the effectiveness and reliability of the supply chain. The location of these points is very important also from the consumers point of view. In this paper developed method of points location was present on the example of urban transport network. The developed approach is based on the Vehicle Routing Problem in the multistage distribution systems. The proposed method uses a genetic algorithm. Article also presents a mathematical model of delivery cost as a criterion function. The article presents an example calculations which illustrating the operation of the developed method.


Introduction
The issue of supply chain is a complex problem and requires consideration it systemically. The objective of the supply chain is to provide finished products to customers. They can be in the form of material and or/and services. The main elements of the supply chain may include storage facilities and the connections between the various points in the transport network. The proper functioning of the supply chain depends on the management and coordination of logistics facilities. These facilities primarily serve the functions of storage, buffering, picking and distribution. The activities of the various supply chain should be subjected to continuous optimization involving, for example, the efficient use of resources and organization of work. Among the factors affecting the reliability and efficiency of the entire supply chain is the right location for infrastructure point [2], [16], [19]. Cargo distribution to customers is an important aspect of the functioning of the supply chain because it is responsible for the flow of materials to end users. Specific conditions is fraught distribution taking place in urban areas. It involves the planning and control of physical movement of finished products to customers. The issue of cargo distribution requires consideration of economic factors, availability of infrastructure and the safety of road users and the stochastic nature of traffic [12]. Transportation of goods is an important factor for economic and social development in urban areas. On the other hand, causes disturbances of the local community related to traffic safety and increased traffic. However, well-organized transport is a stimulating factor [8]. Therefore, it is important to develop methods positively influencing the distribution process which will contribute to the reduction of transport work in the city. Searching for the methods of planning is also important for entire supply chain and its individual cells. Because of the above is particularly important the location of storage and handling facilities [14]. In this article the problem of organization of cargo distribution in urban areas was presented. The final piece of the supply chain uses the cargo consolidation centres and transhipment hubs. The concept of distribution organization means the choice of location transhipment HUBs based on a cost index. Distribution plan must solve the problem of MDVRP with regard to localized HUBs (Multi Depot Vehicle Routing Problem).

Transhipment
HUB localization in multilevel distribution system The cargo distribution as an extensive research area requires many issues consideration. Among the issues with respect to the cargo distribution should takes into account the efficiency and reliability of distribution systems, ecology of transport, methods and ways of organizing to reducing costs and ensuring timely implementation. In the distribution process may be involved many intermediaries, depending on the demand for the services performed. The size of this demand significantly affects the spatial, technical and technological conditions of entire supply chain [10], [15]. The special nature has freight distribution in urban areas, which includes the planning, organization and execution of cargo in order to provide the recipient in accordance with the demand for the object of carriage, delivery date and cost [1]. The main problems is the area of transport operations and the inconvenience for the residents of these areas. Urban areas are characterized by a high population density. Considering the above, in order to reduce the negative impact of transport in urban areas should solve the problem systemically. This can be done through an appropriate organization of distribution and including appropriate location transshipment HUBs, which allows to reduce the transport work carried out in urban areas by the organization of the transport processes. This approach is associated with multi-level distribution systems [15], [21]. Multi-level distribution systems in urban areas include Cargo Consolidation Centres (CCC) located on the outskirts of cities and urban transshipment points (HUB). From the point of view of the distribution process systems can be distinguished: one-level, two-level, mixed ( Fig. 1.) [12], [24]. The use of multi-level distribution system implemented in cities is generally based on Centers Cargo Consolidation and HUB. CCC provides services such as storage, order picking and transport of goods. Loads brought to the CCC after being subjected to separation and picking and loading on the vehicle is supplied to the HUBs. In HUBs cargo is separated and loaded on the vehicles with a smaller capacity to delivery it to recipients [11], [12], [24].  [12], [24]. That approach is used in large cities with high population density and a large number of recipients. The CCC allows to integrate and coordinate the cargo collecting and distribution between parties located in a manufacturing companies and large manufacturers. This exchange is critical especially in the central part of the city. In this article we decided to use the idea of two-level system. Schematically, its operation is shown in Figure 2.
Methods of facilities points location in the transport network can be divided into: a) heuristic and exact -quality of the returned solution, b) one-and multi-criteria, c) one-level and multilevel -having regard to the hierarchy of points, d) static and dynamic -having regard to the passage of time, e) descriptive, analytical, analytical and descriptive, analog and numerical.
To solve the problems of object localization most common method is the distance minimizing or otherwise gravitational method. It takes into account one criterion for the selection and location and its based on heuristic methods. There are also used its modifications to include, for example: the validity of certain areas or individual customers, as well as the the cost of supplies [27]. Another method for which must be pay attention to is descriptive-analytical method involving the search of variants of the organization for which the sum of the transport and storage costs is compensated by a reduction in the cost of maintaining inventory [3], [17], [23]. Methods classified with regard to the number of criteria are a very important group. Proper selection criteria can be unambiguously characterized picked decision problem. The most common criterion choice is the distribution cost or the time of its realization. Tasks of this type rely on solving of transport tasks or vehicle routing problem (VRP). The solution of such tasks require the use of appropriate computer applications allows on including constraints. A representative model of the location based on one criterion is the model suggested in the work [18]. It presents a function that minimizes costs (formula 1): where: kmfixed costs of m warehouse, xmbinary variable that specifies, cmithe total cost of production and distribution in order to meet demand of i recipient from m warehouse, ymivariable determining the volume of traffic between m warehouse and i recipient, I*set of recipients, M*set of warehouses. Methods for multicriteria location methods can be divided into multi-criteria analysis and multi-criteria optimization. In works [11], [13] proposed multicriteria method for the analysis of the logistics center location is based on a pre-made variants. Multicriteria optimization methods rely instead on the appointment of options in terms of Pareto optimal [25]. A relatively new approach are methods taking into account the passage of time and thus the method takes into account the stochastic nature of the distribution process. Including the dynamics in models allow the use of for forward-looking demand submodels. Enable better matching capacity of individual facilities include periodic fluctuations. It is also possible the integration of variable durations of the various processes in facilities and transit times in the transport network. These methods are described in detail in the works [4], [10], [27]. The article discusses the problem of one criteria location problem based on formulated MDVRP. It is a modification of the classical vehicle routing problem (VRP) based on multiple depot. Problem belongs to class of NP-hard problems. Based on the solutions proposed in the works [8], [9], [20], [26] decided to use heuristic optimization methods.

Mathematical problem formulation
Solving problem of the location of storage facilities brought in to determine the location and capacity of HUBs in the city. The model has been formulated for the problem of one assortment. It was assumed that the location of CCC and customers is constant. There also adopted the assumptions necessary to meet the demand for transport. The model was presented based on research conducted at work [24]. To present the structure of the transport network of the study area was used graph G (formula 2) , where: Wset of graph nodes G (formula3): L defines arcs and is a relation defined on the cartesian product. Arc   , ' ww is understood as a transition from the node w to node ' w presented as a formula 4: On set W mapping  was made, which elements of this set transformed into a set {0,1,2} (formula 5): where: gdzie: tnumber of run; Truns in total.
Solving the problem of transshipment HUBs location also requires its formalization. Based on the network structure shown above, it is possible to determine the input data, the decision variables, constraints and criterion function.  (20) Criterion function (formula 21): A sample chart of the cost function c3 is shown in figure 3. It should be noted that the function is decreasing in the shown range. However, there are limit for which, with an increase in the number of units of cargo costs do not decrease (not marked on the chart). Costs may increase for larger flows as a result of necessary additional investment. For the purposes of the work presented function was used in counted example. When considering problem the cost of operation of the CCC was omitted (it is not needed because it does not optimized or its size, or location). Introduced constraints and data allow to eliminate locating objects with negligible material flow. Furthermore, a fixed cost of the indirect route allows to limit the number of vehicles and drivers. It was assumed that deliveries in the city not dependent on the volume of traffic, but only on kilometers traveled by distribution vehicles (Light Comercial Vehicles -LCV). This is due to the specific nature of the distribution. Of course, there is the possibility to modify the above model by adding time windows to allow for better representation of reality. It is also possible to distinguish whether the addition of different assortments or problems of location CCC. This article is limited to the presented model in order to present the developed method. The developed heuristic method is also applicable to more complex optimization models, although it requires some modification.

Solving methods
As mentioned previously the formulated problem belongs to NP hard problems class. Therefore, with the size of the task the computation time grows exponentially this implies that accurate methods are not applicable. It was decided to use heuristic methods belonging to the class of evolutionary algorithms (based on genetic algorithms). These algorithms allow to find a rational solution, which means that this is acceptable to the decision maker and is achieved within an acceptable time. The algorithms rely in some way on a random search of the solution space. However, the mechanisms used to channel them to not be boiled down to a random sampling [5], [6]. In order to implement the genetic algorithm it was necessary to design the individual and the population. Chromosome of individual is shown in figure 4. The population is composed of competing individuals. A single individual has the interpretation of a single solution.
It should be noted that in this case we are dealing with variable length of chromosome. Genetic algorithm which was developed starts from the initial population draws, the size of which is selected by the decision maker. The next step is to calculate the fitness function for each individual which indicates the quality of the found solution.
Then, based on the ranking method followed by selection of the best individuals for the establishment of a new population.
The new population is created through the mechanisms:crossing, mutation, repair individual , remove individual , elimination of hubs. The crossing is one of the most important elements of a genetic algorithm. It is responsible for the genes exchange between individuals. In the presented method, it is possible to crossing in the system: the best with the best, the best with the worst, and the worst with the worst. The crossing procedure within a population is introduced for each individual with a certain probability, also with a certain probability is selected corssing system. Crossing operator is responsible for improving the successive designated solutions [7], [22]. If on a particular run of the vehicle is only one recipient it means that it is a direct route. Then, these genes are not involved in the crossing. The genes for crossing are selected randomly while crossing genes are subjected only to customers and cannot be specified more than a number of gene on a given route. An example of crossing is shown in fig. 5.
Mutation is the second of the major operators evolution in the genetic algorithms. Its aim is to reduce the searching of solution algorithm in the local minima. Therefore provides a thorough search of the solution space in some way immunizes to return results related to local minima [6], [22]. The algorithm uses two types of mutation operators. At the same operator on the relatio CCC-HUB is to change the encoded object in the gene number HUB or CCC. In contrast, for the relation RECIPIENT-RECIPIENT works on the principle of replacement or repositioning of random gene in a random location. Further genes as a result of this operation, move up one place. This mutation may be in the range of one run. An example of an individual gene mutation is shown in fig. 6. Using these operators from parent population is creating a child population. After completion of the crossing and mutation, an assessment of individual is performing and it is last stage of each iteration.
Obtained result is connected with the number of iterations. Depending on the number of iterations to get better solution. However, after reaching a certain value of the function, a solution does not improve. This is because solution is approaching to the optimal result. Very important mechanism is the repairing of the individual. In this procedure are checked the conditions if they are not met single random gen is removed or added to the route, or all individual is removed. The decision to repair is undertaken with a certain probability. If an individual was deleted the new individual is seclected randomly. After reaching stabilization of the fitness function, ie. lack or limited its improvement over previous iteration, elimination of HUBs that participating in the carriage and transshipment hub for the smallest movement is performed. This results in not picking it for the next phase of the calculation. After the another optimization procedures are compared to the results of the evaluation and shall decide which option (at which location HUBs) achieved the best result. This algorithm was implemented in MatLab environment.

Example and results
For the developed method and its implementation was carried out sample calculations. We compared the results from genetic alghoritm with obtained by the simplest, greedy variant of the Monte Carlo method (random sampling). Various simulations were performed for different input data which was estimated by experts in order to get closer to the real parameters occurring in the problem. In the example, not all parameters task were given and presents only reduced data and to present method was main aim. In the example calculation was decided to map the distribution of the Warsaw area. Assumed the use of one CCC located in Ożarow Mazowiecki. The optimal location of hubs was tried to choose based on twelve possible locations presented in table 1.
The distribution of freight was carried out for 40 recipients located in various districts of Warsaw. The number of recipients in a given district are shown in table 2. Each of the recipients was characterized by the demand. The total demand for transport was 22145 units. For the task were used vehicles: HGV in relation CCC-HUB and LCV for transport in HUB-recipient relation. Used vehicles were also characterized by the cost.  After the optimization, the criterion function has reached the lowest value of the two hubs with symbols H4 i H8. The value of the criterion function was 118816,76. Figure 7 is a chart of the fitness (criterion) function (blue) get with genetic algorithm compared to the random sampling method (red). The comparison shows the function value with respect to the number of iterations. Fig. 7. Fitness function (redrandom sampling, bluegenetic alghoritm)

Conclusions
The issue taken in the article is very important due to the functioning of the entire supply chain. Its economic efficiency and reliability depends to a large extent on the accurate organization. Application of genetic algorithms is an effective method for selecting organizations of distribution system. The obtained results allow to conclude that the solution is of very good quality, obtained in a short time.
In the example, calculation was made on the simplified data to indicate the correctness and effectiveness of developed method. Detailed research, analysis, comparations and modifications of method will be presented in future articles. The developed method is prone to expansion and modification. It is possible to differentiate the costs, adding dynamic, random demand, random travel time, etc., can be introduced partial customer service or lack of service by the penalty charges.
In the developed example, generate results in various forms are possible. It is possible, for example, to obtain individual results of the algorithm, eg. for the various stages of the elimination of unprofitable hubs. The results for the developed embodiment presented in figure 8.