OPTIMIZATION OF LOGISTIC PROCESSES USING ANT COLONIES

Size: px
Start display at page:

Download "OPTIMIZATION OF LOGISTIC PROCESSES USING ANT COLONIES"

Transcription

1 OPTIMIZATION OF LOGISTIC PROCESSES USING ANT COLONIES C. A. Silva, T.A. Runkler J.M. Sousa, R. Palm Siemens AG Technical University of Lisbon Corporate Technology Instituto Superior Técnico Information and Communications Dept. Mech. Eng. GCAR-IDMEC 8173 Munich, Germany Lisbon, Portugal KEYWORDS Ant colonies, logistic processes, scheduling. ABSTRACT The scheduling of logistic processes modeled by birth-anddeath processes is a combinatorial problem. We consider here the problem of dynamic assignment of components to orders. In this paper, a distributed algorithm based on ant colonies is proposed to optimize this assignment. The ant-agents jointly test several different combinations and choose the solution that is able to deliver more orders at the correct delivery date, while keeping the delay variance small for the orders that are not delivered at the desired date. A simulation example is presented, comparing this algorithm with three other scheduling methods. Results show the effectiveness of the proposed algorithm. INTRODUCTION In supply chains management, logistics can be defined as the subprocess of the supply chain process that deals with the planning, handling, and control of the storage of goods between the manufacturing point and the consumption point. In the past, goods were produced, stored and then delivered on demand. Nowadays, many companies do not work with stocks, using instead cross-docking centers [Jayashankar M. Swaminathan and Sadeh, 1998]. The goods are transported from the suppliers to these cross-docking centers, stored, and then shipped to the costumers. The lack of storage may increase the delivery time, but it considerably reduces the volume of invested capital and increases the flexibility of the supply chain. The key issue is to deliver the goods in time by minimizing the stocks. The goods should be delivered at the correct date (not earlier or later) in order to ensure the costumers satisfaction. The scheduling algorithm has to decide, which goods are delivered to which costumers. If the costumers orders are sets of different components, the most common method is to pre-assign the components to the orders. In this strategy, all This work is supported by the German Ministry of Education and Research (BMBF) under Contract no.13n796 (project NIVELLI) and and by the Portuguese Fundation for Science and Technology (FCT) under Grant no. SFRH/BD/6366/1. components are assigned to the orders at the moment when the components are ordered from the suppliers. They can therefore not be used by any other order. This static scheduling strategy revealed to be poor. Therefore, a dynamic assignment strategy, allowing to exchange components between the orders is necessary. Dynamic assignment consists of distributing the available components to orders. This can be done with a sorted list of orders. If the first order in the list can be delivered using the available components, the components are taken from the stock and delivery is triggered. Then, the dynamic assignment algorithm proceeds to the next orders in the list, an so on. The easiest way to sort this list is to use a First In First Served (FIFS) principle, where the orders are sorted by order date or a First Desired First Served (FDFS) principle where the orders are sorted by their desired date. Since both principles use a unique orders list, these scheduling methods are called centralized dynamic approaches. This paper proposes a dynamic assignment method using a distributed approach. The idea is to assign individual agents to the orders and let the population of agents interactively find an optimization scheduling solution [Palm and Runkler, 2]. The interaction between the agents is realized by exchanging information about quantity, desired date and arriving date. In a logistic scheduling problem, the number of agents involved and the quantity of information that has to be exchanged is very large. Multi-agent algorithms based on social insects can avoid this complexity. Social insects have captured the attention of scientists because of the high structuration level that the colonies can achieve, especially when compared to the relative simplicity of the individuals. Ants are one example of social insects. Even though ants are very simple animals, with no special abilities and almost blind, they are capable of establishing the shortest route paths from their colonies to feeding sources and back to the nests. Here, we propose an ant algorithm for logistic processes. The paper is organized as follows. The next section presents a global description of a logistic process. Then, some of the standard scheduling algorithms are briefly described. Further, the principles of the optimization algorithm using ant colonies are introduced, as well as the new framework for

2 an estimated delivery date, which is the predicted date for the order delivery. Component request When an order has been accepted by the logistic system, the different components must be requested from the suppliers. Each component is characterized by a certain quantity. Requesting the components consists of making a purchase list with the types of components and their quantities, so that the external suppliers can deliver the components. Figure 1: General Representation of the Logistic Process the application to scheduling logistic processes. Finally, it is presented a simulation example and the analysis of the results. The closing section concludes this paper and defines the future research work. THE LOGISTIC PROCESS Figure 1 presents a schematic representation of a logistic process, which can be described in probabilistic terms. In fact, the birth process of the system (arrival of new orders in a certain period of time) and the death process (delivery of orders per unit of time, or the time it took them to be processed), can be described by the classical theory of queuing processes [Wolff, 1989]. For the process being studied, this theory asserts the Poisson (and exponential depending on the perspective where the process is being looked at) distribution for the model of the birth process, p(x, λt) = (λt)x e λt (1) x! where x is the random variable number of orders and λt is the parameter that indicates the probability of this event to occur in a certain time t. The death process is modeled by the exponential distribution p(t, λ) = µe µt (2) where t is the random variable and µ is the death rate. The five steps of the process are described in the following sections. Order arrival The company delivers products, which can be seen as a collection of components. Whatever the type of product needed by the client is, it is called an order. An order is a set of one or more different items, called generally the components c i. When an order is submitted to the system, it must contain a desired delivery date, which is the date required by the client for the order to be delivered. The system should offer Component arrival Each component takes some time to be delivered to the logistic system. This time is called the supplier delay and accounts for the necessary time for the supplier to deliver the demanded components. After this time, the component is delivered to the so-called cross-docking places, e.g. airports. A component stock list is built at these places, which contains the available components and their quantity. Component assignment All the components have to be delivered to the docking places, but usually the components are not all available at the same time. For this reason, the orders have to wait for all required components to be available. This waiting list is called the order stock. Each order has its own desired delivery date. Since the components are available at different instants in time, the decision process has to decide which orders are going to be delivered, taking into account if their components are already available. This is usually done once per day. This process consists of examining the component stock list, comparing it to the order stock, and making a decision based on some optimization routine. STANDARD SCHEDULING ALGORITHMS The component assignment is the key issue of a logistic process. The company can not influence the birth rate of the orders, or the suppliers delay. The death rate of the orders are the only control variable, through the assignment of components to the orders. The control goal is to generate particular death rates for each order by some decision process using external information like desired times or internal information, such as the amount of stocks [Palm and Runkler, 1]. The scheduling assigns components to orders at each day. This paper compares the pre-assignment method, the dynamic centralized approaches FIFS and FDFS based on sorting lists, and a dynamic decentralized approach using the ant colonies. The next sections describe in detail these different scheduling policies.

3 Pre-assignment (PA) When the components arrive to the cross-docking center from the external suppliers, they are already assigned to specific orders. If the components do not arrive all at the same time at the docking center, they have to be stored there until all the missing components are arrived, so that all the components of the order can be delivered together. This strategy can not deal efficiently with disturbances, such as a delay in the component arrival or a change in the quantity of demanded components by the clients. Since the assignment is already defined as soon as an order enters the system, we call this a static scheduling method. First In First Served (FIFS) The static approach cannot be influenced by the company, it totally depends on external variables. In contrast to that, the dynamic assignment is based on the exchange of components between the orders. All the components in the cross-docking center are gathered in a single stock, and the list of orders is sorted in such a way that the order on top of the list is the first one to be analyzed by the decision method. If all the components that it needs are available, the order is delivered. If not, this order stays in the list, and the next order is analyzed. The easiest way to sort this list is by arriving dates, so the first orders to get into the system are the ones that will be first served, thus it is called a FIFS. Notice again, that if the first order can not be delivered, the components are not assigned to that order,as with the pre-assignment scheduling method. First Desired First Served (FDFS) A disadvantage of FIFS is that orders that arrived early are also delivered early, even though their desired delivery dates might not be reached yet. On the other hand, orders with early desired dates might be delayed, just because they entered the system too late. This problem can be solved by sorting the orders by desired delivery date instead of orders arrival date. This sorting method can also be combined with a priority list [J.M.Sousa et al., 2]. Distributed approach The use of information about how many orders will be delivered or if the orders placed on the top of the list (thus having some kind of priority) are indeed the ones that can be delivered, can increase the performance of the system. None of the previous strategies uses this internal information. The idea is to use internal information in a distributed approach. The distributed approach also works with a global stock, but there is no sorting between the orders. The agents associated with orders and components, exchange information between each other. This information can be the desired delivery dates, the quantity of components in the stock or the number of orders that will be delivered. After exchanging all the information, the agents jointly decide which orders will be delivered. This approach is more flexible, because it allows to evaluate the scheduling result and possibly modify it before delivery. SCHEDULING USING ANT COLONIES Ants are social insects. They live in colonies and all their actions are towards the survival of the colony as a whole, rather than the benefit of a single individual of the society. The individual ants have no special abilities. They communicate between each other using chemical substances, the pheromones. This indirect communication allows the entire colony to perform complex tasks, such as establishing the shortest route paths from their nests to feeding sources. In [Dorigo and Maniezzo, 1996] an optimization algorithm was proposed that tries to mimic the foraging behavior of real ants, i.e. the behavior of wandering in the search for food. This algorithm has already been successfully used to solve the Traveling Salesman problem [Gambardella and Dorigo, 1996], the Job-shop floor problem [Cicirello and Smith, 1] and other NP hard optimization problems. The next subsections describe this algorithm and its application to scheduling in logistic processes. General description of the ant colonies algorithm When an ant is searching for the nearest food source and comes across with several possible trails, it tends to choose the trail with the largest concentration of pheromone τ, with a certain probability p. After choosing the trail, it deposits another pheromone, increasing the concentration of pheromones in this trail. The ants return to the nest using always the same path, depositing in the way back another portion of pheromone. Imagine then, that two ants at the same location choose two different trails at the same time. The pheromone concentration on the shortest way will increase faster than the other: the ant that chooses this way, will deposit more pheromones in a smaller period of time, because it returned earlier. If a whole colony of thousands of ants follows this behavior, soon the concentration of pheromone in the shortest path will be much higher than the concentration in other paths. Then the probability of choosing any other way will be very small, and only very few ants among the colony will fail to follow the shortest path. There are another phenomenon related with the pheromone concentration. Since it is a chemical substance, it tends to evaporate in the air, so the concentration of pheromones vanishes along the time. In this way, the concentration of the less used paths will be much lower than that on the most used ones, not only because the concentration increases in the other paths, but also because its own concentration decreases. In general, the ant colony behavior can be described formally using the following mathematical framework. Let the nest and the food source be connected by several different paths, connecting n intermediate nodes. The ant k in node i chooses one of the possible trails (i, j) connecting the actual node to one of other possible positions j 1,, n}, with probability p k ij = f(τ ij ) (3)

4 where τ ij is the pheromone concentration on the path connecting i to j, in the way to the food source. The pheromone in this trail will vary for in time according to: τ ij (t + 1) = τ ij (t) ρ + δ k ij (4) where δik k is the pheromone released by the ant k on the trail (i, j) and ρ [, 1] is the evaporation coefficient. The system is continuous, so the time acts as the performance index, since the shortest paths will have the pheromone concentration increased in a shorter period of time. This is the mathematical description of a real colony of ants. However, the artificial ants that mimic this behavior, can be uploaded with more characteristics, e.g. memory and ability to see. If the pheromone expresses the experience of the colony in the job of finding the shortest path, memory and ability to see, express useful knowledge about the problem the ants are solving. In this way, (3) can be extended to: p k f(τij, η ij(t) = ij ) if j / Γ (5) otherwise where η ij is a visibility function and Γ is a tabu list. In this case, the visibility expresses the capability of seeing which is the nearest node j to travel towards the food source. Γ is a list that contains all the trails that the ant has already passed and must not be chosen again (artificial ants can go back before achieving the food source). This acts as the memory of an ant. Finally, each ant deposits a pheromone δij k on the chosen trail: where τ c is a constant. δ k ij = τ c (6) In the artificial ants framework, due to the time factor, equation (4) is not sufficient to mimic the increasing pheromone concentration in the shortest path. With real ants, time acts as a performance index, but the artificial ants all use the same time to perform the task, whether they choose a short path or not. For the artificial ants, it is the length l of the paths they have passed that will determine if the solution is good or not. Thus the best solution should increase even more the pheromone concentration on the shortest trail. To do so, (4) is changed to: τ ij (t + n) = τ ij (t) ρ + τ ij (7) where τ ij are pheromones deposited in the trails (i, j) followed by all the m ants, τ ij = m δij k f( 1 ) (8) z k k=1 and z k is the performance index, in this case the the length l k of the path chosen by the k ant. In this way, the global update is biased by the solution found by each individual ant. The paths followed by the ants that achieved the shortest paths have their pheromone concentration increased. Notice that the time Initialization: Set for every pair (i, j): τ ij = τ Set N = 1 and define a N max Place the m ants While N <= N max Build a complete tour For i = 1 to n 1 or m 2 For k = 1 to m 1 or n 2 Choose the next node using p k ij = (5)1 or (9) 2 Update locally τ ij (t) using (6) 1 or (11) 2 Update the tabu list Γ Analyze solutions For k = 1 to m 1 or n 2 Compute performance index z: (l k ) 1 or (13) 2 Update globally τ ij (t + n) using (7) 1 or (14) 2 1 General algorithm 2 Scheduling algorithm Figure 2: Ant Colonies Optimization Algorithm interval taken by the m ants to do a complete tour is t + n iterations. A tour is a complete route between the nest and the food source and an iteration is a step from i to j done by all the ants. The algorithm runs N max times, where in every N th tour, a new ant colony is released. The total number of iterations is N max n. The general algorithm for the ant colonies is described in Fig. 2. Implementation in scheduling In this problem, there are two different sets of entities: the orders and the components. Each type of component stands for a type of food source and each order stands for a nest. The nests may require different types of food in different amounts, as orders require different types of components in different quantities. Different nests may require the same type of food, as different orders may require common types of components. Conceptually, the job of the ants from this colony is very different from the foraging job described before. Here, there are m ants, one per food source. The job of these ants is to distribute the quantity of food q in the food sources to the n nests. Once again, the ant has to choose with some probability p which is the nest to visit first and while visiting the nest place a pheromone τ in the way from the food source to the nest. One tour is complete when all the ants from each of the food source have visited all the nests. Each ant delivers an amount qj i from the total amount qi of component i 1,, m} to an order j 1,, n}. Since there are several nests to visit, the ant chooses the path to a particular nest with the probability τ α η β ij ij n if j / Γ p k ij(t) = τ α η β ir ir (9) r / Γ otherwise

5 Figure 3: Example of an Ant Colony applied to the Logistic Process with Pheromone Concentration Level on the Trails: High ( ), Medium (- -) and Low ( ) where τ ij is the amount of pheromone connecting component type i to order j, η ij is a visibility function and the Γ is the tabu list. The tabu list is the list of the orders that the ant k has already visited, or the orders that do not need component type i (thus the visit can be avoid). The visibility function η ij is defined in the following way: η ij = e dj (1) where d j is the delay of order j, i.e. the difference between the actual day and the desired date. The aim of this function is give the ants some information about how delayed an order is, since the objective of the problem is not only to fulfill the highest number of orders per day, but also to deliver them on the right day, both not before and not after. Orders that should be delivered on the actual date have visibility η ij = 1. Orders that can still wait will have a lower visibility, and orders that are already delayed will have a higher one, so the ants will preferably feed delayed orders. The pheromone trails indicate the prior attempts from other ants. The parameters α and β measure the relative importance of trail pheromone (experience) with visibility (knowledge), respectively. After choosing the order to visit, the ant will deposit a pheromone on the trail connecting the type of component i and the order j. At this point, the ant can find two different situations: 1) If the amount of components q i of component type i is not enough to fulfill the amount qj i needed by order j, the ant should not reinforce this path; 2) If there exist sufficient components q i to deliver to order j, the ant should reinforce these path. The local update of the pheromone concentration is given then by δij(t) k τc if qj = i qi (11) otherwise where τ c is some constant. In this way, the pheromones are locally updated with the information about the possibility of satisfying or not order j with the components i. After the ant visits order j, we decrement q i by q ij before the next ant from resource i visits order j + 1. Note also, that the ant delivers always all the q ij components that order j needs, to avoid the situation where all orders have part of the needed components, but none has the complete amount. At the end of a complete tour we will have m τ ij = δij. k (12) k=1 At this point, when all ants have delivered all possible components, the solution can be evaluated using a performance index n aj = 1 if d j = z = a j, where (13) a j = otherwise j=1 where n is the number of orders and d j is the delay of order j. This index is used to update globally the pheromones. At each tour N of the algorithm (with t + n iterations), a z is computed and stored in the set Z = z(n),, z(t + n). If the z(t + n) is higher than the previous z Z it means that the actual solution has improved, so the used pheromones should be emphasized. If it is worse, they should be reduced. This is done once again by the global pheromone update, where the ρ evaporation coefficient avoids the solution to stagnate. In this way, the pheromone update is the following: τij (t) ρ + τ τ ij (t + n) = ij if z(t + n) max Z τ ij (t) ρ otherwise (14) Figure 3 represents schematically this framework. This particular framework of the ant colonies algorithm can also be implemented using the general algorithm described in Fig. 2. In the simulation, the best result was achieved using the following parameters: α = 1, β = 1, ρ =.5, τ = 1, τ c = 1 and N max = 1. SIMULATION RESULTS We consider here a logistic system with the following parameters: the number of orders arriving at each day is a Poisson distribution (1) with λt = 1. The example considers that each order can have at the most 7 different types of components c i, and the quantity for each component varies randomly between 1 and 2. Each type of component has a constant supplier delay, which are 1, 3, 2, 3, 1, 2, 6 days for components type c 1,, c 7, respectively. For each order a desired date is generated using an exponential distribution (2) with µ = 7. The simulation was done for an interval of 6 months. At each day the system adds the components arriving at that day to the stock (except for the pre-assignment strategy). These components are then distributed to the orders following the methods described before. It is difficult to define reasonable performance indices for logistic problems [Lee et al., 1995]. To measure the performance of the different methods, we use histograms of the

6 2 2 FDFS 2 2 FIFS Ants Figure 4: Histograms of the Orders Delay d for the Scheduling Methods Table 1: Comparison Between all the Strategies Scheduling p.a. FIFS FDFS Ants #d < #d = #d > min d max d orders delay. Figure 4 presents the histograms for the different scheduling methods. They show the number of orders with a specific delay d: if the orders were delivered earlier, d < ; if they were delivered at the correct date, d = ; and if they were delivered with some delay, d >. Table 1 quantifies this analysis in number of orders and also indicates the spread for each method in number of days. What can be interpreted from the results is that the ant colonies algorithm yields the maximum number of deliveries on the correct date (#d = ), and the minimum number of delayed orders (#d > ). It also yields the lowest spread between maximum and minimum delays (max d min d). This means that, even if the orders are delivered before or after the correct date, it is more likely with this method that the delays, negative or positive, are not too different from the correct desired date. This shows clearly,the superiority of the ant algorithm to the other methods used in this application. CONCLUSIONS This paper presents a modified ant colony algorithm for the optimization of logistic problems. A dynamically distributed assignment of components to orders is achieved by means of exchanging simple information between the agents. The pheromones used by the ants to determine the assignment represent distributed information about prior assignment attempts, as well as information about the desired delivery date and availability of components to fulfill the orders. The comparison between this algorithm and three other scheduling methods (p.a., FIFS and FDFS) have shown that the distributed ant algorithm is better to solve the problem than the static or centralized dynamic approaches. The simplified example mimics a real-world logistic process at Fujitsu-Siemens Computers [Silva, 1], and it shows that the ant colonies algorithm is a better alternative to the actual scheduling method. As the next step, we will apply the ant algorithm to the real full scale problem. REFERENCES [Cicirello and Smith, 1] Vicent A. Cicirello and Stephen F. Smith. Ant colony for autonomous decentralized shop floor routing. In Proceedings of ISADS-1, Fifth International symposium on autonomous decentralized systems, 1. [Dorigo and Maniezzo, 1996] Marco Dorigo and Vittorio Maniezzo. Ant system: Optimization by a colony of cooperating agents. IEEE Transactions on Systems, Man, and Cybernetics-Part B, 26(1):29 41, [Gambardella and Dorigo, 1996] Luca Maria Gambardella and Marco Dorigo. Solving symmetric and asymmetric tsps by ant colonies. In IEEE Conference on Evolutionary Computation (ICEC 96), [Jayashankar M. Swaminathan and Sadeh, 1998] Stephen F. Smith Jayashankar M. Swaminathan and Norman M. Sadeh. Modeling supply chain dynamics: A multiagent approach. Decision Sciences Journal, 29(3):67 632, [J.M.Sousa et al., 2] J.M.Sousa, Rainer Palm, C.A.Silva, and Thomas Runkler. Fuzzy optimization of logistic processes. Accepted in WCCI-2, Honolulu, Hawaii, 2. [Lee et al., 1995] J. Lee, Hsing-Pei Kao, and Weiling Chiang. A tradeoff analysis of logistics performance based on relationships between criteria. In International Joint Conference of CFSA/IFIS/SOFT 95 on Fuzzy Theory and Applications, pages , [Palm and Runkler, 1] Rainer Palm and Thomas Runkler. Decentralized control of hybrid systems. In Proceedings of ISADS-1, Fifth International symposium on autonomous decentralized systems, 1. [Palm and Runkler, 2] Rainer Palm and Thomas Runkler. Multi-agent control of queuing processes. Accepted in IFAC-2, Barcelona, Spain, 2. [Silva, 1] Carlos A. Silva. Arbeitspaket S1: Systemanalyse - Fujitsu Siemens Computers. Technical Report 1, Siemens AG, Corporate Technology, Department of Neural Computation, CT IC-4, October 1. [Wolff, 1989] R. W. Wolff. Stochastic Modeling and the Theory of Queues. Prentice -Hall, 1989.