Vous êtes sur la page 1sur 6

8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC08)

Rhodes, Greece, August 20-22, 2008

Elitist Ant System for Route Allocation Problem


SORIN C. NEGULESCU, CONSTANTIN OPREAN, CLAUDIU V. KIFOR, ILIE CARABULEA
Faculty of Engineering,
Lucian Blaga University of Sibiu
10 Victoriei Blv., 550024, Sibiu
ROMANIA
sorin_negulescu@yahoo.com, rector@ulbsibiu.ro, claudiu.kifor@ulbsibiu.ro
Abstract: As Multi-Agent Systems (MAS) have gained their place in the artificial intelligence field by
proving their effectiveness in solving optimisation problems, this paper presents a new approach for a hard and
well-known problem: vehicle route allocation. After a brief introduction about the MAS and stigmergy in
section one, the paper presents the rationale (section two) where Ant Colony Optimisation (ACO) and its
common extensions such as Elitist Ant System (EAS), Max-Min Ant System (MMAS), Rank-Based Ant
System (ASrank) and others are described, and the approach (section three) where the reasons for choosing
EAS as starting algorithm and the steps that must be followed in order to adapt EAS for solving the Route
Allocation Problem (RAP) are presented. The resulted algorithm is depicted in section four. The paper
concludes that the approach proved to be workable on usual configurations and effective in dealing with
combinatorial explosion usually encountered in optimisation problems.
Key-words: Ant Colony Optimisation, Route Allocation Problem (RAP), Multi-Agent Systems (MAS),
Synergy, Ant Systems (AS), Stigmergic Control (SC).

is an important mechanism to guide activities of


these agents and to accumulate information
about ongoing activities of the whole agent
society [7]. Therefore, ants natural or
artificial, alike are too trivial to be genuine
agents since they lack two fundamental agentsy
features: social ability (being unable to interact
with their peers and with humans) and proactiveness (being unable to manifest
teleological behaviour by taking initiative
since specialized knowledge is the source of
goals and initiatives). Thus, they behave rather
as robots than as agents. Yet, the system they
belong to is not a multi-robot system but a
multi-agent one; the marvel is due to the
synergistic effect of their interaction: beyond
the individuals (ant-like entities), the team
(society) comes out [1], [2]. However, that is
the pre-terminological meaning of synergy,
due to Aristotle: the whole is stronger that the
sum of its parts. (Hence, at least in this paper,
the term synergy is preferred to the more
usual one: emergent synthesis.) Thus, SC is
not only a research field per se, but also a test
bed for exploiting inter-paradigmatic synergy.

1. Introduction
Multi-agent systems have gained their place in
the artificial intelligence field by proving their
effectiveness in solving optimisation problems.
An example of a multi-agent system is the ant
colony where ants make use of stigmergy to
solve difficult problems. The concept of
stigmergy is used in its initial meaning
proposed by Grasse [6], to characterise the type
of interaction taking place in biological insect
societies. (In observing ant colonies, Grasse
identified a coordination mechanism, based on
the creation and placement of a dissipative field
of smelling substances the ant pheromones
in the environment; such stigmas alter the
environment for other ants and influence their
behaviour.) However, especially in the
syntagma stigmergic coordination (SC)
related to MAS, it describes a form of
asynchronous interaction and information
exchange between agents mediated by an
"active environment" [7], or the production of
certain behaviour in agents as a consequence of
the effects produced in the local environment by
previous behaviour [10], [11]. In this context:
the agents are simple, reactive, and unaware of
other agents or of the emerging complex
activities of the agent society; the environment
ISSN: 1790-5109

62

ISBN: 978-960-6766-94-7

8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC08)


Rhodes, Greece, August 20-22, 2008

Place ant k on a randomly chosen city

2. Rationale

The ant colony optimization algorithm (ACO),


introduced by Marco Dorigo in 1992 in his PhD
thesis, is a probabilistic technique for solving
computational problems which can be reduced
to finding good paths through graphs. The
pseudocode is presented in figure 1. They are
inspired by the behaviour of ants in finding
paths from the colony to food [8].

// Initialize the best tour and its length


T+ = the shortest tour found
from the beginning
L+ = the length of the best tour
// Main loop
for (t = 1; t <= Tmax; t++) {
// Compute a tour for every ant
for (k = 1; k <= m; k++) {
Build tour Tk(t) by applying
n-1 times the following step:
Choose the next city j with
probability

procedure ACO_MetaHeuristic {
while(not_termination) {
generateSolutions()
pheromoneUpdate()
daemonActions()
}
}

pijk (t) =

lJ ik

[ il (t)] [il ]

pijk (t) = 0

, if

jJ

jJ

, if
where i is the current city.

Fig.1. ACO MetaHeuristic pseudocode.


}

In all early Ant System (AS) algorithms,


ants construct (candidate) solutions based on
two main components: pheromone trails and
problem-dependent
heuristic
information.
These algorithms have suffered frequent
modifications in order to improve their
efficiency. Thus, the AS [4] developed into the
Elitist Ant System (EAS) [3], because each ant
that finds a better solution has the chance to
deposit more pheromone. Other systems that
emerged from the AS are the Ant-Q [5] where
the deposited pheromone amount is directly
proportional to the quality of the found solution,
the Max-Min Ant System (MMAS) [9]. In the
Rank-Based Ant System (ASrank) all solutions
are ranked according to their fitness. The
amount of pheromone deposited is then
weighted for each solution, such that the more
optimal solutions deposit more pheromone than
the less optimal solutions.

// Compute the tour lengths for all


ants
for (k = 1; k <= m; k++) {
Compute the length Lk(t) of the
tour Tk(t) produced by ant k
}
// Update the best tour if an improved
tour is found
if (an improved tour is found) {
Update T+ and L+
print T+ and L+
}
// Global update for the pheromone
trails
for (every edge i, j) {
Update the pheromone trails
by applying the rule:

ij (t) = (1 ) ij (t) + ij (t) + e ije (t) , where


m

ij (t) =

(t) ,
k
ij

k =1

Q/Lk (t),if(i, j) T k (t)


ijk (t) =

0, otherwise

3. Approach

and

Q/L+ ,if(i, j) T +
ije (t) =

0, otherwise

For the development of the algorithm for


solving RAP the authors have started their
research with the EAS, because it proved to be
the most adaptable and it generated the best
simulation results. In figure 2 is resented the
standard form of the EAS for solving the toyproblem: Travelling Salesman Problem (TSP).

}
// Calculate the intensity of the
pheromone for next iteration
for (every edge i, j) {
ij(t + 1) = ij(t)
}
}

// Initialize pheromone trails


for (every edge i, j) {

Fig.2. Elitist Ant System pseudocode for solving the


Travelling Salesman Problem.

= 0
}

The constraints for the RAP where vehicles


must be allocated to different routes are:
The number of routes (destinations);

// Choose the starting town for every ant


for (k = 1; k<=m; k++) {

ISSN: 1790-5109

[ ij (t)] [ij ]

63

ISBN: 978-960-6766-94-7

8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC08)


Rhodes, Greece, August 20-22, 2008

The cost function must include the


following factors:
The vehicle history (the cost is greater if
the vehicle departed from node0 and
arrived at noden more recently and
smaller otherwise);
The average distance ran by a vehicle in
a month (the cost is directly proportional
with the difference between the average
distance and the actual distance).
The break (of two days) for the drivers
(the cost is directly proportional with the
difference between the required break
days and the actual break days).

The number of vehicles in the fleet;


The route allocation history (the routes
must be allocated in an equally
distributed manner for each month
TURNUS);
The average distance travelled by
vehicles in a month (this distance must
be (optimally) equal for all the vehicles
AVERAGE DISTANCE);
The drivers break (of two days)
between trips (BREAK).
Because of these constraints, new variables
are necessary to be included in the algorithm for
solving RAP. Moreover a different approach is
necessary regarding the development of the
graph used to solve the problem. In figure 3 are
depicted the graphs for solving TSP and RAP
accordingly.
If in the case of TSP the nodes in the graph
are standing for the cities that the salesman
must reach, and the arches are standing for the
roads (their cost being directly proportional to
the distance between cities), in the case of RAP
the nodes (seen as pairs {node0 and noden}) are
determining a certain route (e.g. Bucharest
Paris) and the arches are determining the cost of
allocating a vehicle to that route.
Another approach is that the node0 is a
unique virtual node regardless of the citys
name that corresponds to the departure station
(e.g. node0 can be Bucharest, Paris, etc.).

4. The resulted algorithm


The algorithm for solving RAP by using the
modified Elitist Ant System is presented in
figure 4.
// Variables used
// Tmax
maximum numbers
of iterations
// R
- number of routes
// V
- number of vehicles
// H
- routes history matrix
// Dij
- distance between
cities i and j
// Pij
pheromone intensity between
cities i and j
// a
- number of ants used to
solve the problem
//
(a is also equal with the
number of routes)
// Tkr(t)
the matrix tour of ant k at
the iteration t
// C
- the vector containing ant
tours costs
// T+
vector containing the best
tour
// C+
the cost of the best tour
// ~= 0.7 how much the ants takes in
consideration the history
// ~= 0.3 how much the ants takes in
Consideration the
pheromone intensity
// ~= 0.8 how much the ants takes in
consideration the routes
distances
// ~= 0.5 percent of the pheromone
that evaporates
// ~= 0.5 the multiplication value
for the pheromone
intensity of the elitist
ant
// p0
minimum pheromone
intensity = 10-6

a. The graph for solving TSP

// Initialize pheromone trails


for (every edge i, j) {
Pij=p0
}

b. The graph for solving RAP


Fig.3. Comparison between the graphs for solving TSP
(a) and RAP (b).
ISSN: 1790-5109

// Initialize the best tour and its cost

64

ISBN: 978-960-6766-94-7

8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC08)


Rhodes, Greece, August 20-22, 2008

T+ = the best tour found from the beginning


L+ = the length of the best tour

// Calculate the intensity of the


pheromone for next iteration
for (every edge i, j) {
Pij(t + 1) = Pij(t)
}

// Main loop
for (t = 1; t <= Tmax; t++) {
// For every vehicle (every ant colony)
for (v = 1; v <= V; v++) {
// Choose the starting town
for every ant
for (k = 1; k<=a; k++) {
Place ant k on node zero
(start node)
}
// Compute a tour for every ant
for (k = 1; k <= a; k++) {
Build tour Tk(t) by applying
n-1 times the following step:
Choose the next node j in
witch the vehicle k will go
with probability

p (t) =
k
vi

}
}

Fig.4. Elitist Ant System pseudocode for solving the


Route Allocation Problem.

The , and parameters are controlling the


relative weight of the history, pheromone
intensity and the distance in the process of
choosing the next node in the itinerary. The
formula for computing the pheromone intensity
between nodes i and j at the t moment is:
Pij (t) = (1 ) Pij (t) + Pij (t) + Pije (t) , where
a

Pij (t) = Pijk (t) ,

[H vi (t)] [Pvi (t)] [Dvi ]

vTkr

[H vi (t)] [Pvi (t)] [Dvi ]

k =1

1 - H iTk , if(i, j) Tki (t)


P (t) =

0, otherwise

if i Tk (t )

k
ij

p kvi (t) = 0 ,

if i Tk (t )
where v is the
current vehicle.

1 - H iTk , if(i, j) T +

and P (t) =
0, otherwise

// Compute the tour costs for


all ants
for (k = 1; k <= a; k++) {
Compute the cost Ck(t) of the
tour Tk(t) produced by ant k
}

(1 ) . Pij(t) the pheromone quantity


that evaporates on the arch between
nodes i and j at the t moment;

Pij (t) = Pijk (t)

e
ij

k
ij

pheromone quantity deposited by ant k


on the arch between the nodes i and j if
that arch belongs to its itinerary (Tki(t))
at the t moment. This quantity is
inversely proportional with the history
of the vehicle on the route associated to
the node that points to that arch;

, where

P (t) ,
k
ij

k =1

1 - H Tki ,if(i, j) T i (t)


i
k
P (t) =

0,
otherwise

k
ij

1 - H Tik , if(i, j) T +
P (t) =

0, otherwise
e

and

1 - H Tke ,if(i, j) T +
i
P (t) =

0, otherwise

e
ij

the

pheromone quantity deposited by the


elitist ant k on the arch between nodes i
and j if that arch belongs to its itinerary
(Tki(t) = T+) at the t moment. This

e
ij

ISSN: 1790-5109

1 - H iTk , if(i, j) Tki (t)


P (t) =
the
0, otherwise

// Global update for the pheromone


trails
for (every edge i, j) {
Update the pheromone trails
by applying the rule:

Pij (t) =

total

pheromone quantity that is deposited on


the arch between nodes i and j at the t
moment as sum of pheromone quantity
deposited by all the ants that have used
this arch,

// Update the best tour if an


improved tour is found
if (an improved tour is found) {
Update T+ and C+
print T+ and C+
}

Pij (t) = (1 ) Pij (t) + Pij (t) + Pije (t)

the

k =1

65

ISBN: 978-960-6766-94-7

8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC08)


Rhodes, Greece, August 20-22, 2008

quantity is inversely proportional with


the history of the vehicle on the route
associated to the node that points to that
arch.
This process repeats until a certain condition
is met (number of iterations, time, the finding of
an acceptable solution, etc.).
The application interface of implemented
algorithm for solving RAP is presented in figure
5.

References
[1]

[2]

[3]

[4]

[5]
Fig.5. The application interface for solving Route
Allocation Problem.

5. Conclusions and intentions


The self-organisation (as in the case of ant
colonies) indirectly supports the quality of the
allocation service through the lack of the
distortions or the deficiencies that may appear
in a centralized coordination. The resulting
implemented algorithm is robust (both reliable
and error tolerant). The optimisation algorithm
that makes use of stigmergic coordination (ant
colony optimisation) proved to be perfectly
adaptable to the Resource Allocation Problem.
Despite being yet in a syncretic stage, SC
shows an obvious potential as problem-solving
tool, at least in the context of simple MAS and
relevant results can be achieved on affordable
hardware configurations.
The short-range intentions are:
Improving the cost formula;
Finishing the tests regarding the control
of pheromones and search paths;
Speeding up the search by fine tuning
the algorithm.
The middle-range target is to try to apply
the stigmergic coordination in a real-time
manner by modifying the algorithm.

ISSN: 1790-5109

[6]

[7]

[8]

[9]

66

Brbat B.E. (2002). Agent-Oriented


Intelligent Systems (In Romanian).
Bucharest:
Romanian
Academy
Publishing House.
Barbat B.E., Negulescu S.C., Zamfirescu
C.B (2005). Human-Driven Stigmergic
Control. Moving the Threshold. In N.
Simonov (Ed.), Proc. of the 17th IMACS
World Congress (Scientific Computation,
Applied Mathematics and Simulation)
(pp.11-15). Paris: ebook.
Bonabeau E., Dorigo M., Theraulaz G.
(1999). Swarm Intelligence: From
Natural to Artificial Systems. New York:
Oxford University Press.
Dorigo M., Maniezzo V., Colorni A.
(1996). The Ant System: Optimisation by
a Colony of Cooperating Agents. IEEE
Transactions on Systems, Man, and
Cybernetics, Part B, 26 (1), 29-42.
Gambardella L.M., Dorigo M. (1995).
Ant-Q: A Reinforcement Learning
Approach to the Travelling Salesman
Problem. In A. Prieditis and S. Russell
(Ed.), Proceedings of the Eleventh
International Conference on Machine
Learning (pp.252-260). San Francisco,
CA: Morgan Kaufmann.
Grasse P.P. (1959). La reconstruction du
nid et les coordinations interindividuelles
chez bellicositermes natalensis et
cubitermes sp. La theorie de la stigmerrie:
essai dinterpretation du comportement
des termites constructeurs. Insectes
Sociaux, 6, 41-81.
Hadeli, Valckenaers P., Kollingbaum M.,
Van Brussel H. (2004). Multi-agent
coordination and control using stigmergy.
Computers in Industry, 53, 75-96.
Negulescu S.C., Brbat B.E. (2004).
Enhancing the effectiveness of simple
multi-agent systems through stigmergic
coordination. In ICSC-NAISO (Ed.),
Fourth International ICSC Symposium on
ENGINEERING OF INTELLIGENT
SYSTEMS (EIS 2004) (pp.149-156).
Canada: ICSC-NAISO Academic Press.
Sttzle T., Hoos H.H. (2000). MAX-MIN
Ant System. Future Generation Computer
Systems, 16 (8), 889-914.

ISBN: 978-960-6766-94-7

8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC08)


Rhodes, Greece, August 20-22, 2008

[10] Theralauz G., Bonabeau E., Deneubourg


J.L. (1998). The origin of nest complexity
in social insects. Complexity, 3 (6), 15-25.
[11] Vaughan R.T., Sty K., Sukhatme G.S.,
Matari M.J. (2000). Whistling in the
Dark: Cooperative Trail Following in
Uncertain Localization. In Vaughan (Ed.),
Proceedings of the 4th International
Conference on Autonomous agents
(pp.187-194). Barcelona: ACM Press.

ISSN: 1790-5109

67

ISBN: 978-960-6766-94-7

Vous aimerez peut-être aussi