Ant Colony Optimization para roteamento de veículos em avançado

download Ant Colony Optimization para roteamento de veículos em avançado

of 6

Transcript of Ant Colony Optimization para roteamento de veículos em avançado

  • 7/28/2019 Ant Colony Optimization para roteamento de veculos em avanado

    1/6

    Ant Colony Optimization for vehicle routing in advanced

    logistics systems

    Luca Maria Gambardellaa,b,Andrea E. Rizzolia,b, Fabrizio Oliveriob,

    Norman Casagrandea,Alberto V. Donatia,Roberto Montemannia,Enzo LucibellobaIDSIA, Galleria 2, 6928 Manno, Switzerland

    bAntOptima, via Fusoni 4, 6900 Lugano, SwitzerlandURL: http://www.idsia.ch, http://www.antoptima.com

    Email: [email protected]

    ABSTRACT

    Many distribution companies service their customerswith non homogeneous fleets of trucks. Their problem isto find a set of routes minimising the number of travelledkilometres and the number of used vehicles, whilesatisfying customer demand. There are three majorproblems why traditional Operations Researchtechniques are not enough to deal with this problem,which is known as the Vehicle Routing Problem. First ofall, it is inherently combinatorial, and exact algorithmsfail when the dimension of the problem (number ofcustomers and orders) reaches a reasonable size.Secondly, the problem can be extended and made morecomplex in many ways, for instance, adding more thanone depot, considering more than one vehicle type,accounting for stochastic customer demand (the exact

    requested quantity is known only at delivery time),considering time windows during which the customersmust be served, taking into account vehicle accessibilityrestrictions (some customers cannot be served by somevehicles). Finally, the problem can become very differentwhen we consider on-line distribution, that is, we acceptdelivery orders for lorries which are en route. There,geolocation of customers and vehicles, online datatransfer among lorries and the base station, have animpact as great as the solution strategy.

    In this paper we present DyvOil and AntRoute, twosoftware tools which assist the tour planner during the

    different stages of goods distribution, from pre-planningon the basis of reorder forecasts, to online planning,through offline planning based on an advancedmetaheuristic such as Ant Colony System. We alsodescribe the case of Pina Petroli, a fuel oil distributioncompany located in Canton Ticino, Switzerland, whichoperates a fleet of 12 vehicles and serves customers usingDyvOil and Migros, the largest Swiss supermarket chain,which uses AntRoute operates daily a fleet of hundredsof trucks distributing goods to its shops.

    Keywords: Supply chain optimisation, vehicle routingproblem, ant colony optimisation

    INTRODUCTION

    A traditional business model is articulated in threestages: production, distribution, and sales. Each one ofthese activities is usually managed by a different

    company, or by a different branch of the same company.Research has been trying to integrate these activitiessince the 60s when multi-echelon inventory systems werefirst investigated (Clark and Scarf, 1960), but, in the late70s, the discipline which is now widely known as SupplyChain Management was not delivering what wasexpected, since the integration of data and managementprocedures was too hard to achieve, given the lack of realintegration between the Enterprise Resource Planning(ERP) and the Enterprise Data Processing (EDP) systems(Sodhi, 2001). Only in the early 1990s did ERP vendorsstart to deploy products able to exploit the pervasiveexpansion of EDP systems at all levels of the supply

    chain. The moment was ripe for a new breed ofcompanies, such as SAP, i2, Manugistics and others, toput data to work and start to implement andcommercialise Advanced Logistics Systems (ALS),whose aim is to optimise the supply chain seen as aunique process from the start to the end.

    The first ALSs were the preserve of big companies, whocould afford the investment in research and developmentrequired to study their case and to customise theapplication to interact with the existing EDP systems.Moreover, the available optimisation algorithms requiredmassive computational resources, especially for

    combinatorial problems such as Vehicle Routing.While ALSs were first deployed, researchers in the fieldof Operational Research were first investigating newmeta-heuristics, heuristic methods that can be appliedto a wide class of problems, such as Ant ColonyOptimisation ACO (Dorigo et al. 1996, Bonabeau et al.2000). Algorithms based on ACO are multi-agentsystems that exploit artificial stigmergy for the solutionof combinatorial optimization problems: they draw theirinspiration from the behaviour of real ants, which alwaysfind the shortest path between their nest and a foodsource, thanks to local message exchange via the

  • 7/28/2019 Ant Colony Optimization para roteamento de veculos em avanado

    2/6

    deposition of pheromone trails. Theremarkable advantage of ACO basedalgorithm over traditional optimisationalgorithms is the ability to produce agood suboptimal solution in a very shorttime. Moreover, for some probleminstances, ACO algorithms enhancedwith local optimisation capabilities, havebeen proven to be the best overall(Gambardella and Dorigo, 2000).

    The integration of optimisationalgorithms based on innovative meta-heuristics, such as Ant ColonyOptimisation, Tabu Search (Glover andLaguna, 1997), Iterated Local Search(Sttzle and Hoos, 1999), SimulatedAnnealing (Kirkpatrick et al., 1984),with ALSs for Supply ChainManagement opens new perspectives ofOR applications in industry. Not only big companies can

    afford ALSs, but also small and medium enterprises canuse state-of-the-art algorithms, which run quickly enoughto be adopted for online decision making.

    In this paper we present a modular approach to ALSdesign and implementation, driven by the user needs. Weshow how different algorithms and modules can beimplemented in an ALS and how tailor-made solutionscan be integrated into traditional supply chainmanagement software.

    In the next sections, first we detail the workflow in adistribution centred company, then we introduce anddiscuss the off-line and on-line vehicle routing problems,

    which are common to most distribution companies. Theformer is solved when the orders to be delivered areknown in advance, the latter when new orders arrivewhile the distribution process is on. Finally, we brieflyreport on how two pieces of software, DyvOil andAntRoute, have been designed, implemented, and testedin collaboration with Pina Petroli, a leading Swiss fueloil distribution company, and Migros, the largestsupermarket chain in Switzerland.

    CLOSING THE LOOP BETWEEN SALES AND

    DISTRIBUTION

    Sales and distribution processes require the ability toforecastcustomer demand and to optimally plan the finedistribution of the products to the consumers. These twostrategic activities, forecast and optimisation, must betightly interconnected in order to improve theperformance of the system as a whole (Gambardella etal., 2001).

    In Figure 1 the workflow process of a distribution-centred company is sketched.

    The sales departmentgenerates new orders by contactingthe customers (old and new ones) to check whether they

    need a new delivery. The effectiveness of this operation

    can be increased thanks to the FORECAST module,which estimates the consumption of every customer,indicating the best re-order time for each of them.

    New orders are then processed by the planningdepartment, which, according to the quantity requested,the location of the customers, the time windows for thedelivery, decides how many vehicles to employ andcomputes the best routes for the delivery, in order tominimise the total travel time and space. This task isassisted by ACO algorithms solving the Static VehicleRouting Problem (SVRP), embedded in the OPTIMISEblock in our schema.

    The vehicle tours are then assigned to the fleet, which ismonitored by thefleet operational control station, whichmonitors the evolution of deliveries in real time. Thisprocess is assisted by the SIMULATE/MONITOR/RE-PLAN module, which allows re-planning online in faceof new urgent orders, which were not yet availableduring the previous off-line planning phase. This moduleuses ACO algorithms designed to solve the DynamicVehicle Routing Problem (DVRP)

    Finally, after vehicles have returned to the depot,delivery data are off-loaded and transferred back to thecompany database.

    THE STATIC VEHICLE ROUTING PROBLEM

    The most elementary version of the vehicle routingproblem is the capacitated vehicle routing problem(CVRP) where n customers must be served from aunique depot, each customer asks for a quantity q, whilethe vehicles have a capacity Q. Since the vehiclescapacities are limited, they must periodically return to thedepot for refilling. Therefore a CVRP solution is acollection of tours, where each customer is visited only

    DyvOilCustomers DB,

    Orders DB

    Sales Dept

    FORECAST

    New orders

    Planning Dept

    Vehicles'

    ToursFleet operational

    control station

    SIMULATE/

    MONITOR/

    RE-PLAN

    OPTIMISE

    Delivered

    orders

    Figure 1. The workflow loop in a distribution-centred company.

  • 7/28/2019 Ant Colony Optimization para roteamento de veculos em avanado

    3/6

    once and the total quantity delivered in a tour is at mostQ.

    This problem can be made more complex by addingaccessibility constraints (not all vehicles can serve allcustomers), and time windows (customers can be servedonly during fixed time intervals during a day). A VRPproblem with time windows is denoted by the acronym

    VRPTW.A tour is an ordered collection of tour deliveries. Eachtour starts from and ends at the depot. Lorries may returnmore than once to the depot for reloading, but weconsider these reloading stops as a particular type ofdelivery and we define a tour as the ordered list ofdeliveries served by a vehicle during a day. In Figure 2we represent a vehicle serving a set of customers.

    The CVRP can be formulated in terms of graph theory,and it can be shown to be an extension of the TravellingSalesman Problem, thus the CVRP is also NP-hard. Weare interested in solving an extension of the CVRP, thevehicle routing problem with time windows, where eachcustomer has a time window during which s/he can beserved. Every tour has a maximum duration and thevehicle fleet is non-homogeneous.

    The solution of the VRPTW problem is a set of toursover a given time horizon, referred to as the planninghorizon.

    ACS for SVRP

    The Ant Colony System (ACS) algorithm is based on acomputational paradigm inspired by the way real antcolonies function. The medium used by ants tocommunicate information regarding shortest paths tofood, consists ofpheromone trails. A moving ant layssome pheromone on the ground, thus making a path by atrail of this substance. While an isolated ant movespractically at random, an ant encountering a previouslylaid trail can detect it and decide, with high probability,

    to follow it, thus reinforcing the trail with its ownpheromone. The collective behavior that emerges is aform of autocatalytic process where the more the antsfollow a trail, the more attractive that trail becomes to befollowed. The process is thus characterized by a positivefeedback loop, where the probability with which an antchooses a path increases with the number of ants thatpreviously chose the same path. The ACS paradigm isinspired by this process.

    In MACS-VRPTW, a very efficient algorithm developedby Gambardella et al. (1999), two ant colonies work inparallel. The first colony builds tours trying to minimizethe total traveled distance, given a number of vehiclesimposed from the outside. The second colony tries toreduce the number of used vehicles, in order to minimisethe cost of the used resources. If a solution which uses asmaller number of vehicles is found, this is passed to theother colony, which tries again to minimize the distance.The process is repeated iteratively until no furtherimprovements can be obtained.

    THE DYNAMIC VEHICLE ROUTING PROBLEM

    In Dynamic Vehicle Routing Problems (DVRP) neworders dynamically arrive when the vehicles have alreadystarted executing their tours and they may have alreadyleft the depot. The vehicle tours have to be re-planned atrun time in order to include these new orders, since wedo not want vehicles to travel back to the depot whenthey are assigned new orders. A communication systemmust exist between vehicles and the depot.

    ACS for DVRP

    Montemanni et al. (2003) have developed the algorithmACS-DVRP based on the decomposition of the DVRPinto a sequence of static VRPs. There are three mainelements in the algorithm architecture: Event manager,collects new orders and keeps trace of the orders already

    DepotCustomer

    a

    c

    b

    Figure 2. A vehicle completes a set of tours,

    composed of the three tours a, b, and c.

    Figure 3. The architecture of the DVRP algorithm

  • 7/28/2019 Ant Colony Optimization para roteamento de veculos em avanado

    4/6

    served, the position of each vehicle and their residualcapacity. This information is used to construct thesequence of static VRP-like instances. The Ant ColonySystem algorithm used to solve the static instances is theone described in the section titled ACS for SVRP.Pheromone conservation, once a static problem has beensolved, the pheromone matrix contains information aboutgood solutions to this problems. As each static problemis potentially very similar to the next one, thisinformation is passed to the next problems, whichincludes the new orders that arrive in the meantime. Thispassage is efficiently implemented, following a strategyinspired by Guntsch and Middendorf (2001).

    The performance of the tours depends on the strategyadopted by the Event Manager to split the day in timeslices. If the algorithm runs as soon as a new order isreceived, the resulting tour could be myopicallydesigned, since one gives up the possibility of includinganother (still unknown) order in the modified tour. Onthe other hand, waiting too long can lead to a sensible

    decrease in customer satisfaction, since the time betweenan order is placed and when it is executed can becometoo long.

    TWO EXEMPLAR VEHICLE ROUTING

    APPLICATIONS

    The first application, DyvOil, supportsplanning the sales and distribution processesof fuel oil. DyvOil covers all the phases ofthe workflow loop of Figure 1, since it aimsat small and medium enterprises willing tointegrate sales and goods distribution.

    DyvOil includes a Sales Forecasting moduleand a Vehicle Routing Planning module.Moreover, DyvOil is currently beingenhanced with an on-line vehicle routingmodule, to provide the ability to respond tounexpected delivery requests. DyvOil isintended for use by small and mediumenterprises, which deliver their goods incities and urban centres, subject to highvolatility of order batches.

    The second application, AntRoute is asoftware component embedded in theexisting ALS of a medium/big enterprise. Ithas been designed with the clear objectiveof providing high quality solutions of largescale off-line vehicle routing problems,where the order batches are known in advance withsufficient certainty.

    DyvOil, forecasting demand

    Distribution of a product can be improved if warehousestock-outs are foreseen, avoiding urgent orders whichperturb the standard planning of delivery operations.Moreover, predicting when a customer is likely to order

    is fundamental to anticipate the competitors, if thecustomer has the option to ask for service from more thanone company.

    The approach adopted is based on the extraction of datafrom the past order history of each customer. Thisallows estimation of the dynamics of the warehousemanagement of each customer, thus allowing prediction

    of the time a re-order is most likely to be issued.DyvOil is an application for the distribution of fuel oil,the consumption of which is related to external factors,such as temperature, and customer re-order preferences,but the same principle can be applied for a great varietyof goods. Data mining techniques can be used when largeenough base of past orders data is available.

    Thanks to the use of DyvOil Forecasting module, PinaPetroli claims that the number of successful calls(telephone calls to customers leading to an order) hassensibly increased from one success out of four to oneout of two.

    DyvOil: optimising distribution

    DyvOil has two optimisation modules: off-line and on-line. Particular care has been given to the integration ofthese advanced algorithmic modules within the userinterface of DyvOil (see Figure 4). DyvOil is a Windows

    based application which can be interfaced to most ERPand EDP systems thanks to its flexible and easy toconfigure ODBC interface to external databases.

    DyvOil displays an interface that lets the human plannermanually enter vehicle routes and, on-demand, theseroutes can be automatically optimised by the algorithm,which returns its results in a few minutes. The plannercan then decide whether the computer generated results

    Figure 4. A sample of DyvOil user interface

  • 7/28/2019 Ant Colony Optimization para roteamento de veculos em avanado

    5/6

    can be accepted as they are, or they require furtherrefinements and adaptations. This kind of interactiveusage has proven very successful in getting thetechnology adopted by planners in small-mediumenterprises, where the obstacles to technology adoptionare usually higher.

    The off-line module is used every evening to plan vehicle

    tours for the next day. This module solves the SVRPusing ACO algorithms, as described in section ACS forSVRP. The particular implementation of ACO inDyvOil is aimed at catching the finer details constrainingthe delivery process, since DyvOil is often used in urbanenvironments. This requirement imposes strongaccessibility constrains to vehicles: not all lorries canaccess all customers, who are often located in the citycentre where both architectural constraints and trafficrules limit the vehicle dimensions.

    The off-line planning module has been tested in a realworld setting at Pina Petroli, a leading Swiss fuel oil

    distribution company. It has been observed an increase inthe vehicle routing performance of 20% up to 30% withrespect to human generated plans (Rizzoli et al. 2003).

    The volatility of order batches, the fact that some ordersarrive during delivery and they must be urgentlyexecuted leads to the requirement of on-line routeplanning. This module solves the DVRP, as described insection ACS for DVRP. This module is still aprototype, but first results, obtained using data from PinaPetroli, show that the algorithm is very efficient, alsowhen compared to heuristic techniques (Montemanni etal. 2003)

    AntRoute

    An always increasing number of large and medium-largedistribution companies have already adopted ALS tomanage their whole supply chain. The basic informationprocessing infrastructure is in place and many supplychain management suites already provide optimisationmodules for some components. The objective of theAntRoute software component is to integrate a state-of-the-art optimisation algorithm within an existing supplychain management structure. AntRoute has beenimplemented in C++ and it has been deployed as awindows DLL, but its code can be recompiled under

    most operating systems.AntRoute has been designed for the inclusion in thesupply chain of Migros, the largest supermarket chain inSwitzerland, which has recently concentrated itsinventories in the new logistic hub of Suhr, in centralSwitzerland. All the department stores of Central,Western and Eastern Switzerland send their orders inSuhr, via a SAP-based application. The orders areprocessed to prepare the pallets, ready to be distributedby lorry to the stores. Migros planners use CADIS, anapplication which includes the high-performance

    AntRoute algorithms to compute the tours of thedistribution vehicles.

    Vehicles are non-homogeneous and AntRoute must alsocope with accessibility restrictions, stores impose softtime windows on delivery time. The objectives are costminimization (cost per km) and tour minimization (tolimit the number of vehicles). The objective function

    evaluates each solution (a set of tours) according to thefollowing scheme:

    first minimize the number of tours, then minimize the costs per kilometer and the

    cost of violating the soft time windows

    The algorithm has been modeled after MACS-VRPTW(Gambardella et al. 1999).

    In this application the orders are known with sufficientadvance to be able to run an off-line optimisation.

    AntRoute outperforms the human planners creating tours

    which are shorter, use less vehicles, and are lessexpensive.

    CONCLUSIONS

    Advanced Logistic Systems ask for high performanceoptimisation algorithms. In the case of vehicle routing,algorithm based Ant Colony Optimization prove to beamong the best and most performing. We have discussed

    the classical VRP problem where orders are known inadvance, before optimization starts, and its extension toon-line planning (dynamic VRP) where orders arriveduring the distribution process. A new heuristic based onACO for the solution of DVRP has been brieflydescribed.

    Finally, we have presented DyvOil, an AdvancedLogistic System for the sales and distribution of fuel oil,and AntRoute, a software component embedded in athird-party ALS.

    Figure 5. A sample of the tours computed by

    AntRoute

  • 7/28/2019 Ant Colony Optimization para roteamento de veculos em avanado

    6/6

    DyvOil is compact, fast, easy to install and use, able tosatisfy the requirements of both large and small vehiclefleets thanks to innovative algorithms based on the AntColony System metaheuristic. DyvOil helps forecastcustomer demand, thus allowing better pre-planning ofdistribution routes. It provides fast and efficientsolutions to the off-line vehicle routing problem, but italso assists in dynamic vehicle routing, in the face ofunexpected, urgent orders.

    DyvOil, has been developed as a CTI-KTI (SwissCommission for Technology and Innovation) sponsoredproject, is now a commercial product of AntOptima andPina Petroli.

    AntRoute is a highly specialised software modulededicated to the solution of medium to large scale staticvehicle routing problems. It has been applied withremarkable success to the optimisation of the vehicleroutes of Migros, the largest supermarket chain ofSwitzerland.

    AntRoute has been developed by AntOptima for MigrosLogistik Transport with the collaboration of Cantaluppi& Hug Software and Consulting, Zrich.

    REFERENCES

    Bonabeau, E., M. Dorigo, and G. Theraulaz, Inspirationfor optimization from social insect behaviour,

    Nature 406, 3942, 2000.

    Clark, A.J., and H. Scarf, Optimal policies for a multi-echelon inventory problem, Management Science,6, 475490, 1960.

    Dorigo, M., V. Maniezzo, and A. Colorni, The antsystem: optimization by a colony of cooperatingagents, IEEE Transactions on Systems, Man, andCybernetics--Part B, 26(2), 2941, 1996.

    Gambardella, L., . Taillard, G. Agazzi. MACS-VRPTW: a multiple ant colony system for vehiclerouting problems with time windows. In: D.Corne et al. (eds.), New ideas in optimization,McGraw-Hill, London, 1999.

    Gambardella L.M. and M. Dorigo, An Ant ColonySystem Hybridized with a New Local Search forthe Sequential Ordering Problem, INFORMS

    Journal on Computing, 12(3), 237255, 2000.Gambardella, L.M, M. Mastrolilli, A.E. Rizzoli M.

    Zaffalon, An integrated approach to theoptimisation of an intermodal terminal based onefficient resource allocation and scheduling,

    Journal of Intelligent Manufacturing, 12 (5/6),521534, 2001.

    Glover, F. and M. Laguna, Tabu Search. KluwerAcademic Publishers, Boston, MA, 1997.

    Guntsch, M., and M. Middendorf, Pheromonemodification strategies for ant algorithms appliedto dynamic TSP. In: Lecture Notes in ComputerScience, 2037, 213222, Springer-Verlag, 2001.

    Kirkpatrick, S., C. D. Gelatt, and M. P. Vecchi,Optimization by simulated annealing, Science,220, 671680, 1983.

    Montemanni, R., L.M. Gambardella, A.E. Rizzoli, A.V.Donati. A new algorithm for a Dynamic VehicleRouting Problem based on Ant Colony System(Extended abstract). Accepted at ODYSSEUS2003: Second International Workshop on Freight

    Transportation and Logistics, Palermo, Italy, 27-30 May 2003.

    Rizzoli, A.E., Casagrande, N., Donati, A.V.,Gambardella, L.M., Lepori, D., Montemanni, R.,Pina, P., and Zaffalon, M. Planning andoptimisation of vehicle routes for fuel oildistribution. In Post, D.A. (ed) MODSIM 2003

    International Congress on Modelling andSimulation, Volume 4, pp. 2024--2029. Modellingand Simulation Society of Australia and NewZealand. July 2003.

    Sodhi, M. S., Applications and Opportunities forOperations Research in Internet-Enabled SupplyChains and Electronic Marketplaces, Interfaces,31(2), 5669, 2001.

    Sttzle, T., and H. Hoos, Analyzing the Run-timeBehaviour of Iterated Local Search for the TSP, InProceedings of MIC99, III Metaheuristics

    International Conference, 1999.

    BIOGRAPHY

    Luca Maria Gambardella is a Research Director atIDSIA and Professor of Artificial Intelligence at SUPSI.His major research interests are in the area ofoptimisation, simulation, multi-agent learning andadaptation, applied to both academic and real-worldproblems. In particular, he has studied and developedseveral Ant Colony Optimization algorithms to solvetravelling salesman problems, quadratic assignmentproblems, sequential ordering problems and vehiclerouting problems. In these domains, the best-knownsolutions for many benchmark instances have beencomputed. He leads IDSIA research on routing andoptimization. He has led several research and industrialprojects both at Swiss and European level. He is memberof the board of the Swiss Association of OperationalResearch.