A Distributed Metaheuristic For The Transportation Problem: Lcruz@itcm - Edu.mx, Ia32, Juanarturo Jgvaldez50, cggs71
A Distributed Metaheuristic For The Transportation Problem: Lcruz@itcm - Edu.mx, Ia32, Juanarturo Jgvaldez50, cggs71
Transportation Problem
Laura Cruz R., Nelson Rangel V., Juan A. Herrera O., Apolinar Ramı́rez S.,
Héctor Fraire H., Guadalupe Castilla V., and Claudia G. Gómez S.
1 Introduction
A company that transports goods to supply customers usually needs to plan the
routes that the fleet must follow to visit the customers. Due to the transportation
means a high percentage of the value added to goods, 5% to 20% of the total
cost [1], it is necessary to find efficient ways to plan it.
Nowadays, the solution of real-life world transportation problems requires the
development of robust methods that support the hard inherit complexity of this
kind of problems. We propose a methodology to give solution, in an integrated
way, to three tasks included in a generic transportation problem (RoSLoP):
Routing, Scheduling and Loading. The routing task we focused on is a generic
VRP known as Rich VRP, and includes six important VRP variants. To test our
approach we built a Transportation System based on two heuristic algorithms
(TSHA).
This article has been organized in six sections. The second section defines the
vehicle routing problem and gives a short review of the related works. In the third
section the tasks of a real bottled product transportation problem are described.
The fourth one describes the solution methodology using and Ant Colony System
algorithm (ACS), which is a distributed metaheuristic that combines an adaptive
memory with a local heuristic function to repeatedly construct solutions of hard
combinatorial optimization problems, and the DiPro algorithm, a new heuristic
that solves load distribution. The fifth section resumes the experimental results
obtained. The last section shows the conclusions and future works.
3 Transportation Problem
The transportation of bottle products, described in this section, was specified
by our industrial partner. This problem has three main sub-problems which are:
Routing, Loading and Scheduling.
The objective of the routing task is to assign routes to vehicles with the
minimum total cost. A route is the trip that a truck does to service the customers.
It starts and ends in a depot and can just be assigned to one vehicle. The
restrictions are based on six VRP variants (CVRP, VRPM, HVRP, VRPTW,
sdVRP and SDVRP) and the new one that limits the number of vehicles that
can be in a location at the same time.
In the Loading task, the distribution of the goods in the vehicles is planned
by satisfying a set of restrictions that depends on the company conditions. This
problem is known as Bin-Packing Problem (BPP) and many variants of it have
been studied.
In the companies of our industrial partner, the manual procedure to distribute
the load consists of three basic steps: first, the demand given by our customer is
transformed into product beds; second, the beds are used to build the platforms;
and third, the platforms are assigned into the pallets of the vehicles. For the
assignment, all sides of the vehicles must be balanced in weight.
During the scheduling, programs containing the arrival time of each vehicle
to the customers are elaborated. This is the easiest task in our approach.
In order to generalize the transportation problem of this research, the Routing-
Scheduling-Loading Problem (RoSLoP) is formulated as follows: Given a set of
customers with a demand to be satisfied, a set of depots that is able to supply
them and a set of BPP and VRP variants that restrict them, it is necessary to
design the routes, schedules and loads for vehicles such that the customer de-
mands are completely satisfied, the total cost is minimized and the constraints
are satisfied.
4 Methodology
The methodology of solution consists of two steps; the first one involves the
simultaneously solution of the Routing and Loading tasks with two heuristic
algorithms: ACS and DiPro. The second step solves the scheduling task.
The ACS algorithm designed to solve the Routing task is a distributed meta-
heuristic based on the approach shown in [3] and its goal is to find the minimum
number of vehicles needed to satisfy all the customer demands in a RoSLoP
instance.
In order to build a solution, the proposed ACS algorithm uses two measures
known as closeness η and the pheromone trail τ . These measures can be associ-
ated with two customers (ηij ,τij ) or with a vehicle (ηc ,τc ). They are calculated
according with [3] for customers, while for a vehicle the equations (1 to 3) are
proposed in this paper.
In the vehicle closeness, three vehicle properties are combined: the truck size,
velocity and remained time for service (1). The vehicle which has the better
balanced between these properties will be the best.
1
ηc = (1)
nvc · T Mc + T Rc · trc /ttc
where ηc is the closeness of vehicle c; Nk is a set of customers with a demand
di to be supplied by depot k; Ck is the fleet of the depot k; c is a specific vehicle
c ∈ Ck ; i is a customer such that i ∈ Nk ; nvc are the trips needed by the
vehicle c ∈ Ck to supply the demands di , for every i ∈ Nk ; T Mc is the average
load/unload time of a vehicle c ∈ Ck ; T Rc is the average travel time of a vehicle
c ∈ Ck ; trc is the available service time of the vehicle c ∈ Ck ; and ttc is the total
service time of the vehicle c ∈ Ck .
The pheromone τ trail measures how desirable it is to include a certain
element into a solution. This value is modified by the ants during the construction
of the solutions. The global updating of the pheromone trail for vehicles τc is
given by equation (2), and the local updating is defined in (3).
ρ
τc = (1 − ρ) · τc + (2)
Jψgb
τc = (1 − ρ) · τc + ρ · τ0 (3)
ACS algorithm(β, ρ, q0 )
1 ψ gb ← Initial Solution /* initialize global best solution */
2 t ← #active vehicles(ψ gb ) − 1 /* initialize global best solution */
3 repeat /* start ACS algorithm */
4 repeat /* start minimization of number of vehicle */
5 ψ lb ← Initial Solution /* initial local best solution */
6 for each ant k ∈ K /* start ant colony system optimization */
7 ψ k ← new ant solution(k, t, IN ) /* built a new solution with t vehicles */
8 ∀j ∈ / ψ k : INj ← INj + 1 /* update INj , times j hasn’t been visited */
9 if #visited customers(ψ k ) >#visited customers(ψ lb ) then
10 ψ lb ← ψ k
11 ∀j : INj ← 0
12 End repeat /* minimization of number of vehicle*/
13 End for each
14 ∀c ∈ ψ lb : τc = (1 − ρ) · τc + ρ/Jψlb /* vehicle global update with ψlb */
15 ∀i, j ∈ ψ lb : τij = (1 − ρ) · τij + ρ/Jψlb /* customer global update with ψlb */
16 ∀c ∈ ψ gb : τc = (1 − ρ) · τc + ρ/Jψgb /*vehicle global update with ψgb */
17 ∀i, j ∈ ψ gb : τij = (1 − ρ) · τij + ρ/Jψgb /*customer global update with ψgb */
18 until stop criterion is reached
19 if ψ lb is feasible and ψ lb improves ψ gb then /*if global best is improved */
20 ψ gb ← ψ lb
21 t ← #active vehicles(ψ gb ) − 1
22 until stop criterion is reached
In the ACS algorithm the functions #active vehicles and #visited customers
determine the number of vehicles used in a solution and the number of demands
satisfied, respectively. The function #depot tells which depot is the owner of a
specific vehicle. The integer vector INj stores the number of times a customer
j hasn’t been inserted in a solution. IN is used by the construction procedure
to favor the customers that are less frequently included in a solution ψ.
In Figure 2, the constructive procedure new ant solution builds the new so-
lution with the ant k. It consists in building routes using t vehicles to satisfy
customer demands.
The first step to create a route is to determine the set of feasible vehicles
Nvk which will contain the vehicles that can still be used to supply customers.
After that, a vehicle is selected by calculating the closeness value of each vehicle
that belongs to Nvk and choosing one of them. In this step the exploration and
exploitation mechanisms described in [2] are used.
Once that the vehicle has been chosen, the next step is to visit customers
to satisfy their demands. The vehicle leaves the depot to supply a customer.
The decision of which customer the vehicle must visit first is taken using the
exploration and exploitation strategies. While the set Nik has customers to visit,
the vehicle will continue visiting them. After the last customer has been visited,
the vehicle will return to the depot. During this construction, the pheromone
trail is locally updated. The route construction process is repeated until no more
customers can be incorporated to the solution or no more vehicles can be used.
DiProAlgorithm(k, t, IN )
1 Order Pc by the supported weight sp of its products
2 for each p ∈ Pc /*calculate and build homogeneous beds and platforms */
3 hom bedp ← qpc /pbbp
4 hom platp ← hom bedp /pbpp
5 hom bedp ← hom bedp Mod pbpp /*determine remaining beds of p */
6 rpbp ← qpc Mod pbbp /*determine remaining product boxes */
7 End for
8 for each p ∈ Pc /*form heterogeneous beds using rpbp */
9 If rpbp 6= 0 then
10 loop
11 search for a q ∈ Pc such that catp = catq and rap = raq
12 het bedp ← add rpbq to rpbp
13 update rpbp to rpbq
14 while het bedp be incomplete
15 End for each
16 for each rest area r /*built heterogeneous platforms */
17 for each p ∈ Pc such that rap = r
18 T otal beds lef t ← total beds lef t + hom bedp + het bedp
19 End for each
20 N eeded platf ormsr ← total beds lef t/pallet height
21 Heterogeneous platf orms distributionr ←RoundRobin(needed platf ormsr , r)
22 End for each
23 Calculate the total number of platforms T otal P latf orms built.
24 Order all the T otal P latf orms by weight
25 Assign ordered platforms to the vehicles pallets balancing both sides
and keeping the heaviest platforms in the front and lightest in the black.
Due to the demand of the customers are made in product boxes, the algorithm
uses Pc to represent the set of products that are demanded by a customer c. Each
p ∈ Pc has a quantity qpc that is the amount of product p that has been asked
for the customer c.
In order to distribute a customer demand Pc in a vehicle, the products in
Pc are ordered by its supported weight. After that, the goods are organized in
homogeneous platforms hom platp and homogeneous beds hom bedp . Then, the
remaining product boxes of each product rpbp are used to form heterogeneous
beds het bedp with products that have the same category and belong to the same
area. The het bedp contains the same number of boxes that a homogeneous bed
due to the compatible products vary only in their weight or supported weight
and not in their dimension.
The rest of homogeneous and heterogeneous beds that couldn’t form homo-
geneous platforms in the previous process are combined to form heterogeneous
platforms het plat. The heterogeneous platforms are created by following the
Round Robin mechanism. During this task it is necessary to consider that the
beds can be combined to form a heterogeneous platform only if they have the
same category.
Once all the platforms have been built, all the created platforms are ordered
by weight and then assigned to the pallets. It is necessary to take into account
that the left and the right side of the vehicle must be weighed balanced and that
the heaviest platforms go in the front and the lightest in the back.
As it is shown, the DiPro algorithm uses the round-robin technique. A round
robin is an arrangement of choosing all elements in a group equally in some
rational order, usually from the top to the bottom of a list and then starting
again at the top of the list and so on. In DiPro, the arrangement is the remaining
beds of products that couldn’t be allocated in homogeneous platforms; the order
is given by their supported weight.
5 Experimental Results
5.1 Evaluation of a basic ACS Algorithm
In this experiment, we compared a version of our ACS Algorithm that solves only
VRPTW with other scientific community heuristics that solve the same variant.
During the experiment, 56 VRPTW instances of the Solomon’s benchmark were
solved. The cases were composed by six different problem types (which are R1,
R2, C1, C2, RC1, and RC2). Each instance contains 100 locations.
The basic algorithm was implemented in C#, and each instance was solved
30 times. The experiments were executed under the next conditions: Xeon Pro-
cessor at 3.06 GHz, with 3.87 Gb of RAM Memory and Windows Server 2003
as Operative System. In Table 8 the parameters setting of our algorithm imple-
mentation are shown. The values for the parameters of the ACS algorithm for
VRPTW were: ants used = 10, colonies = 5; generations = 40; q0 = 0.9; β= 1;
ρ= 0.1.
Table 1 shows the comparison between our ACS Algorithm and four of the
best known algorithms that have solved VRPTW. The columns two to six show
the average number of vehicles used in the solutions by each kind of instance.
The last column is the combination of the average number of vehicles shown in
the results of the whole set of instances. The considered algorithms were: Reac-
tive Variable Neighborhood Search [9], Hybrid Genetic Algorithm [10], Genetic
Algorithm [11], Multi-Objective Ant Colony System [3].
Table 1 shows that our algorithm (row 1) improves the others in the average
number of used vehicle; it has an average running time of 7.81 seconds. Due to
this performance we decided to implement the ACS algorithm in such a way that
it could be used to solve more complex real-world instances, like the RoSLoP
instances.
Metrics
Instance
Vehicles used in the solution Supplied products
NN TSHA1 TSHA2 Manual NN TSHA1 TSHA2 Manual
Case 01 8 7 7 7 11077 12681 12681 12681
Case 02 8 5 5 6 10953 10953 10953 10953
Case 03 8 7 6 6 8019 15040 15040 15040
Case 04 8 6 5 5 11302 12624 12624 12624
Case 05 8 8 7 7 11283 14262 14262 14262
1
Execution time of five seconds
2
Execution time of ten minutes
This paper shows the feasibility of solving real-world instances of the transporta-
tion problem named RoSLoP because it includes routing, scheduling and loading
tasks. The proposed solution methodology is based on a distributed metaheuris-
tic (ACS algorithm) and a deterministic heuristic (DiPro algorithm).
In comparison with the manual procedure, our Transportation System based
on Heuristic algorithms (TSHA) reduced the time needed to find a solution from
16 hours to 10 minutes. It also reduced, in a 20% of the cases, the number of
vehicles needed to supply the customer. In general, the solutions given by TSHA
can be considered efficient solutions according with the standard given by our
industrial partner.
Besides, we solved a well-known benchmark of the vehicle routine problem
(VRP); an advantage of 14% was obtained with regard to the best known solu-
tion.
For future works we are planning to manage more than six VRP variants and
solve instances of very large scale. Also, we plan to solve the load distribution
task by using a Bin-Packing approach.
References
[1] Toth P., Vigo D.: The Vehicle Routing Problem. Monographs on Discrete Mathe-
matics and Applications. SIAM, Philadelphia. (2001)
[2] Blasum, U., Hochstätter, W.: Application of the Branch and Cut Method to the
Vehicle Routing Problem. Universität zu Köln, BTU Cotbus. May 15, (2002).
[3] Gambardella, L., Taillar, E., Agazzi, G.: MACS-VRPTW: A Múltiple Ant Colony
System for Vehicle Routing Problems with Time Windows. Technical Report IDSIA.
IDSIA-06-99. Lugano, Switzerland. (1999)
[4] Mingozzi, A., Vallet, A.: An exact Algorithm for Period and Multi-Depot Vehicle
Routing Problems. Department of Mathematics, University of Bologna, Bolonga,
Italy. (2003)
[5] Archetti, C., Mansini, R., Speranza, M.: The Vehicle Routing Problem with ca-
pacity 2 and 3, General Distances and Multiple Customer visits. ORP 2001, PARIS.
September 26-29. (2001)
[6] Taillard, E., Laport, G., Gendreau, M.: Vehicle Routing Problem with Multiple Use
of Vehicles. Centre de Recherche sur les transports. Publicación CRT-95-19. March,
(1995)
[7] Taillard, E.: A Heuristic Column Generation Method For the Heterogeneous Fleet
VRP. Istituto Dalle Moli di Studi sull Inteligenza Artificiale, Switzerland. CRI-96-03.
Mayo, (1996)
[8] Pisinger, D., Ropke, S.: A general Heuristic for Vehicle Routing Problems. DIKU,
University of Copenhagen.. February 25th, (2005)
[9] Bräysy, O.: A Reactive Variable Neighborhood Search Algorithm for the Vehicle
Routing Problem with Time Windows. Working paper, SINTEF Applied Mathemat-
ics, Department of Optimization, Norway. (2001).
[10] Berger, J., Barkaoui, M., Bräysy, O.: A Parallel Hybrid Genetic Algorithm for the
Vehicle Routing Problem with Time Windows. Working Paper, Defense Research
Establishment Valcartier, Canada. (2001)
[11] Homberger, J., Gehring, H.:. Two Evolutionary Meta-heuristics for the Vehicle
Routing Problem with Time Windows. Infor. 37, 297 - 318. (1999)