An ant colony optimization approach for the preference...

16
Journal of the Chinese Institute of Engineers Vol. 34, No. 2, March 2011, 181–196 An ant colony optimization approach for the preference-based shortest path search Seung-Ho Ok a , Woo-Jin Seo a , Jin-Ho Ahn b , Sungho Kang c and Byungin Moon d * a School of Electrical Engineering and Computer Science, Kyungpook National University, 1370 Sankyuk-dong, Buk-gu, Daegu 702-701, Korea; b Department of Electronic Engineering, Hoseo University, 165 Sechul-ri, Baebang-myun, Asan, Chungnam 336-795, Korea; c Department of Electrical and Electronic Engineering, Yonsei University, 262 Seongsanno, Seodaemoon-Gu, Seoul 120-749, Korea; d School of Electronics Engineering, Kyungpook National University, 1370 Sankyuk-dong, Buk-gu, Daegu 702-701, Korea (Received 9 September 2010; final version received 19 October 2010) This article proposes a modified ant colony system algorithm for finding the shortest path with preferred links. Most of the shortest path search algorithms focus on finding the distance or time shortest paths. However, these shortest paths may not necessarily be the optimum path for drivers who prefer choosing a less short, yet more reliable or flexible path. Accordingly, a preference-based shortest path search algorithm is proposed that uses the properties of the links in a map, as specified by a set of data provided by the user of the car navigation system. The proposed algorithm is implemented in C and experiments are performed using maps that include 64, 128, 192, and 256 nodes with 118, 242, 362, and 484 links, respectively. The simulation results with various parameter sets confirm that the proposed algorithm is effective for finding the preference-based shortest path. Keywords: shortest path search algorithm; car navigation system; ant colony optimization algorithm; artificial intelligence 1. Introduction Recent years have witnessed a resurgence of interest in the shortest path search problem for use in various engineering applications, such as highway systems, railroads, transportation planning systems, and com- munication networks (Noto and Sato 2000, Fu et al. 2006). In particular, car navigation systems have undergone an explosive growth in popularity due to new developments in Intelligent Transportation Systems (Noto and Sato 2000). Yet, a single-pair shortest path search from a source node to a destina- tion node remains one of the most important problems for car navigation systems, as there are many possible paths to the destination node. In recent years, a number of shortest path search algorithms, such as A* (A-star), Dijkstra algorithms, and meta-heuristic approaches, such as ant colony optimization (ACO), have been proposed for use in car navigation systems (Noto and Sato 2000, Yue and Shao 2007, Nazari et al. 2008, Salehinejad and Talebi 2008). Nazari et al. (2008) suggested a modified version of the Dijkstra algorithm that restricts the search space using a rectangle or hexagon to improve the run time and memory usage of the algorithm, while Yue and Shao (2007) studied the application of the A* shortest path search algorithm in a real-time urban dynamic traffic environment. Meanwhile, Noto and Sato (2000) proposed a method to obtain a path as close as possible to the path obtained by the Dijkstra method with a decreased search time, while Salehinejad and Talebi (2008) developed a vehicle navigation system that finds the shortest path by considering the average velocity and distance between nodes based on ACO. However, none of these shortest path search algorithms can meet the requirements of a preference-based shortest path search algorithm, as the focus is only finding the distance shortest or time shortest path. Therefore, Perny and Spanjaard (2005) proposed various preference-based search algorithms for the spanning tree problem and shortest path problem using the Kruskal, Prim, and Bellman algorithms. Yet, the high computational time demand involved with these opti- mal algorithms makes them unsuitable for most transportation applications that require fast search times. Thus, a key motivation for developing a heuristic shortest path algorithm, such as A* or ACO, was the need for a fast identification of the shortest path for some transportation applications (Fu et al. 2006). Taking inspiration from the foraging behavior of ants, *Corresponding author. Email: [email protected] ISSN 0253–3839 print/ISSN 2158–7299 online ß 2011 The Chinese Institute of Engineers DOI: 10.1080/02533839.2011.565574 http://www.informaworld.com Downloaded by [Yonsei University] at 18:58 17 August 2011

Transcript of An ant colony optimization approach for the preference...

Page 1: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

Journal of the Chinese Institute of EngineersVol. 34, No. 2, March 2011, 181–196

An ant colony optimization approach for the preference-based shortest path search

Seung-Ho Oka, Woo-Jin Seoa, Jin-Ho Ahnb, Sungho Kangc and Byungin Moond*

aSchool of Electrical Engineering and Computer Science, Kyungpook National University, 1370 Sankyuk-dong, Buk-gu,Daegu 702-701, Korea; bDepartment of Electronic Engineering, Hoseo University, 165 Sechul-ri, Baebang-myun, Asan,Chungnam 336-795, Korea; cDepartment of Electrical and Electronic Engineering, Yonsei University, 262 Seongsanno,

Seodaemoon-Gu, Seoul 120-749, Korea; dSchool of Electronics Engineering, Kyungpook National University,1370 Sankyuk-dong, Buk-gu, Daegu 702-701, Korea

(Received 9 September 2010; final version received 19 October 2010)

This article proposes a modified ant colony system algorithm for finding the shortest path with preferred links.Most of the shortest path search algorithms focus on finding the distance or time shortest paths. However, theseshortest paths may not necessarily be the optimum path for drivers who prefer choosing a less short, yet morereliable or flexible path. Accordingly, a preference-based shortest path search algorithm is proposed that uses theproperties of the links in a map, as specified by a set of data provided by the user of the car navigation system.The proposed algorithm is implemented in C and experiments are performed using maps that include 64, 128,192, and 256 nodes with 118, 242, 362, and 484 links, respectively. The simulation results with various parametersets confirm that the proposed algorithm is effective for finding the preference-based shortest path.

Keywords: shortest path search algorithm; car navigation system; ant colony optimization algorithm; artificialintelligence

1. Introduction

Recent years have witnessed a resurgence of interest inthe shortest path search problem for use in variousengineering applications, such as highway systems,railroads, transportation planning systems, and com-munication networks (Noto and Sato 2000, Fu et al.2006). In particular, car navigation systems haveundergone an explosive growth in popularity due tonew developments in Intelligent TransportationSystems (Noto and Sato 2000). Yet, a single-pairshortest path search from a source node to a destina-tion node remains one of the most important problemsfor car navigation systems, as there are many possiblepaths to the destination node.

In recent years, a number of shortest path searchalgorithms, such as A* (A-star), Dijkstra algorithms,

and meta-heuristic approaches, such as ant colony

optimization (ACO), have been proposed for use in car

navigation systems (Noto and Sato 2000, Yue and

Shao 2007, Nazari et al. 2008, Salehinejad and Talebi

2008). Nazari et al. (2008) suggested a modified version

of the Dijkstra algorithm that restricts the search space

using a rectangle or hexagon to improve the run time

and memory usage of the algorithm, while Yue and

Shao (2007) studied the application of the A* shortest

path search algorithm in a real-time urban dynamic

traffic environment. Meanwhile, Noto and Sato (2000)

proposed a method to obtain a path as close as possible

to the path obtained by the Dijkstra method with a

decreased search time, while Salehinejad and Talebi

(2008) developed a vehicle navigation system that finds

the shortest path by considering the average velocity

and distance between nodes based on ACO. However,

none of these shortest path search algorithms can meet

the requirements of a preference-based shortest path

search algorithm, as the focus is only finding the

distance shortest or time shortest path. Therefore,

Perny and Spanjaard (2005) proposed various

preference-based search algorithms for the spanning

tree problem and shortest path problem using the

Kruskal, Prim, and Bellman algorithms. Yet, the high

computational time demand involved with these opti-

mal algorithms makes them unsuitable for most

transportation applications that require fast search

times.Thus, a key motivation for developing a heuristic

shortest path algorithm, such as A* or ACO, was theneed for a fast identification of the shortest path forsome transportation applications (Fu et al. 2006).Taking inspiration from the foraging behavior of ants,

*Corresponding author. Email: [email protected]

ISSN 0253–3839 print/ISSN 2158–7299 online

� 2011 The Chinese Institute of Engineers

DOI: 10.1080/02533839.2011.565574

http://www.informaworld.com

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 2: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

ACO was originally proposed by Dorigo and hiscolleagues as a method for solving optimizationproblems (Dorigo et al. 1996). Ants deposit phero-mones on the ground as chemical signals to markcertain favored paths to guide other ants in the colonyto food. While these pheromone signals evaporate overtime, the pheromone on the shortest path from thefood to the ant nest is reinforced more often thanthe pheromone on the longer path, allowing most ofthe ants to find the shortest path due to the higherpheromone intensity.

The first ACO algorithm, referred to as the antsystem (AS), was initially applied to the travelingsalesman problem (Dorigo et al. 1996), and the antcolony system (ACS) algorithm was then developed byGambardella and Dorigo to improve the performanceof AS (Gambardella and Dorigo 1996). As a result, antalgorithms have since been successfully applied tomany combinational problems, including travelingsalesman problems, quadratic assignment problems(Maniezzo 1999), job-shop scheduling problems(Colorni et al. 1994), sequential ordering(Gambardella and Dorigo 1997), and graph coloringproblems (Costa and Hertz 1997). In addition, Chenand Ting (2006) proposed an improved ACS algorithmwith modified local and global pheromone updatingrules to solve vehicle routing problems, while Lee et al.(2008) improved the ACO algorithm by adopting apotential field scheme as the heuristic function.

However, distinct from previous algorithms thatfocus on finding the distance shortest or time shortestpath, this article proposes a preference-based shortestpath search algorithm that adopts a new heuristicfunction, transition probability rule, and pheromoneupdate rule, where the preference-based shortest pathis identified using link properties, such as avoidanceand preference, as specified by a set of data providedby the user of the car navigation system. The remain-der of this article is organized as follows. Section 2briefly introduces the AS and ACS algorithms, andthen Section 3 describes the proposed ACS algorithmfor preference-based shortest path searching. Section 4presents the implementation of the algorithm andanalyzes experimental results as a function of variousparameters, and conclusions are given in Section 5.

2. ACO algorithm

Several ACO algorithms have already been proposedand successfully employed to solve various problems(Dorigo and Caro 1999, Dorigo et al. 2006, Dorigoand Socha 2007). Essentially, these algorithms can bedescribed as the interplay of three procedures(ConstructAntsSolutions, UpdatePheromones, and

DaemonActions) as follows (Dorigo and Thomas

2004):

Procedure: ACO algorithm

Set parameters, initialize pheromone trails;While (termination condition not met) Do

ConstructAntsSolutions;UpdatePheromones;DaemonActions; (optional)

End

End

After initializing the parameters and pheromone

trails, the ACO algorithm continues to iterate through

the main loop until the algorithm meets its termination

conditions. After all the paths of ants from the source

node to the destination node are constructed using the

transition probability in the ConstructAntsSolutions

procedure, the pheromone trails are then updated

using the pheromone updating rules in the

UdatePheromones procedure. Meanwhile, the

DaemonActions procedure is used to implement cen-

tralized actions that cannot be performed by a single

ant, such as a local optimization procedure or the

collection of useful global information to decide

whether it is useful or not to deposit additional

pheromones (Dorigo and Thomas 2004).The first ACO algorithm referred to as AS was

developed by Dorigo et al. (1996). In AS, an ant k

currently located at node i selects the next node j using

the transition probability rule (1).

pkijðtÞ ¼

��ij ðtÞ��ijðtÞP

u2NkiðtÞ �

�iuðtÞ�

�iuðtÞ

, if j 2 Nki ðtÞ,

0, if j =2 Nki ðtÞ,

8><>: ð1Þ

where Nki is the set of nodes not yet visited by ant k and

connected to node i, �ij represents the pheromone for

the link between nodes i and j, and � and � are the

positive constant parameters used to amplify the rela-

tive importance of the pheromone versus the heuristic

function �ij given by

�ij ¼1

dij, ð2Þ

where dij is the distance of the link between nodes i

and j.Once all the ants have constructed a path from the

source node to the destination node, each ant deposits

pheromone in the amount of D�kijðtÞ at the links of the

path using the pheromone updating rule (3).

�ijðtþ 1Þ ¼ ð1� �Þ � �ijðtÞ þXnkk¼1

D�kijðtÞ, ð3Þ

182 S.-H. Ok et al.

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 3: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

where � is the evaporation rate parameter distributed

in (0, 1), nk is the number of ants, and D�kijðtÞ is the

amount of pheromone deposited by ant k at link (i, j)

at time step t, as given by

D�kij ¼Q

Lk, if ant k used link ði, j Þ,

0, otherwise,

(ð4Þ

where Q is a constant (normally set to one) and Lk is

the total distance of the path constructed by ant k. The

main characteristic of the pheromone updating rule in

AS is that the pheromone values are updated by all the

ants involved in constructing a path from the source

node to the destination node.The ACS algorithm differs from the AS in four

aspects. First, a different transition probability rule is

used. Second, a different pheromone updating rule

is defined. Third, a local pheromone updating rule is

introduced. Finally, candidate lists that consist of

preferred nodes to be visited ahead of others are used

(Dorigo and Thomas 2004, Engelbrecht 2006). In ACS,

ant k currently located at node i selects the next node j

using the transition probability rules (5) and (6). Also,

since the ACS transition probability rule uses �¼ 1,

� is omitted from rule (6).

j ¼arg maxu2Nk

iðtÞ �iuðtÞ�

�iuðtÞ

n o, if r � r0,

choose j using probabillity rule ð6Þ, if r4 r0,

(ð5Þ

where r is a random variable uniformly distributed in

[0, 1] and r0 is a user-specified constant parameter.

pkijðtÞ ¼�ijðtÞ�

�ijðtÞP

u2NkiðtÞ �iuðtÞ�

�iuðtÞ

ð6Þ

Unlike AS, only those ants involved in constructing

the shortest path from the source node to the destina-

tion node in each iteration are allowed to reinforce the

pheromone at the links of the corresponding best path

using the global updating rule (7).

�ijðtþ 1Þ ¼ ð1� �1Þ�ijðtÞ þ �1D�ijðtÞ, ð7Þ

with �1 in (0, 1), and D�ij(t) is the amount of phero-

mone deposited by ant k at link (i, j) at time step t.

Besides the global updating rule, ACS also adds a local

updating rule (8) that is used by all the ants to reinforce

the pheromone at every link on the constructed path.

�ijðtÞ ¼ ð1� �2Þ�ijðtÞ þ �2�0, ð8Þ

with �2 also in (0, 1), and �0 is a small positive constant

value.

3. Proposed algorithm

In this section, a modified version of the ACSalgorithm is proposed with the aim of finding thepreference-based shortest path using the properties of

the links in the map. In addition, several importantdifferences between the proposed algorithm and theconventional ACS algorithm are described in detail.

The conventional ACS algorithm is insufficient tofind the preference-based shortest path as the heuristicfunction �ij is the inverse of the length of the link, as

shown in rule (2). Thus, the node connected by theshorter length has more probability to be selected asthe next node, as in rule (6). Moreover, with theconventional ACS algorithm, the ant with the shortestpath is allowed to reinforce the pheromone at the links

on that path. In addition, the pheromone along thepath of the best ant is reinforced with varying amountsaccording to the length of the path, as shown inrule (7). Thus, the heuristic function and pheromone

update rule in the conventional ACS algorithm are notsuitable for a preference-based shortest path searchalgorithm as they do not reflect the preference andavoidance characteristics of the links. Accordingly,modifications are made to the heuristic function,

transition probability rule, and pheromone updaterule of the conventional ACS algorithm in order tofind the preference-based shortest path. In the pro-posed algorithm, the best ant is selected using a costfunction that reflects the preference, avoidance, and

distance of the links. As a result, the best path reflectsboth the preference and the distance of the links.Moreover, the proposed algorithm is able to identifyvarious best paths using the coefficient of the heuristicfunction. The flowchart, pseudo-code of the proposed

algorithm, and the differences from the conventionalACS algorithm are described in detail as follows.

The flowchart of the proposed algorithm is shownin Figure 1. First, the parameters of the algorithm,such as the number of ants (nk), coefficient of theheuristic function (�), balancing factor of the node

selection (r0), and number of Try and Repetition loopiterations, are all initialized.

In the conventional ACS algorithm, the pheromoneat each link is initialized as a small random value or setto zero. Thus, strictly speaking, no link has anypheromone concentration for the first iteration

(Engelbrecht 2006). In contrast, in the proposedalgorithm, the pheromone at each link is initializedaccording to the distance of that link on the map fromthe start. In addition, while the heuristic function ofthe conventional ACS algorithm is defined as the

inverse of the distance of the link from the start, theheuristic function of the proposed algorithm is defined

Journal of the Chinese Institute of Engineers 183

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 4: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

to take account of the avoidance of a link over the

preference of a link. Thus, the transition probability

rule of the proposed algorithm is modified to select the

link with the lower pheromone intensity and higher

preference.In the proposed algorithm, the Repetition loop is

nested within the Try loop, as shown in Figure 1.

Within a single Try loop iteration, if the Repetition

loop is finished, the path of the final iteration best ant

is output as the best path for the current �, and then

the next Try loop iteration for another best path starts

after increasing �. That is, as the iteration counter of

the Try loop increases, the identified paths are more

biased in favor of the user’s preference, as a larger �increases the influence of the heuristic function on the

probability function.In the Repetition loop, the ants all construct a path

from the source node to the destination node using a

different transition rule from the conventional ACS

algorithm. Transition rule (9) uses the inverse of the

multiplication of the pheromone and the heuristic

function, as the pheromone is initialized according to

the distance of the links on the map, while the heuristic

function is the inverse of the user’s preference.If r4 r0, ant k currently located at node i selects the

next node j using transition rule (9). When a small

Figure 1. Flowchart of the proposed algorithm.

184 S.-H. Ok et al.

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 5: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

value is used for r0, this allows a wider path explora-tion by the ants according to the probability functionpkij. Otherwise, if r� r0, transition rule (10) is used. Inthe absence of any candidate nodes, namely preferrednodes to be visited first at node i, transition rule (9) isused, which is similar to r4 r0. Thus, when a largevalue is used for r0, most of the ants choose paths usingthe candidate list. Consequently, r0 is used to balancethe exploration and exploitation of the ant behavior.

pkijðtÞ ¼1= �ijðtÞ�

�ijðtÞ

� �P

u2NkiðtÞ 1= �iuðtÞ�

�iuðtÞ

� � , ð9Þ

where �¼ avoidance of link/preference of link,

j ¼arg maxu2Nk

iðtÞ �iuðtÞ�

�iuðtÞ

n o, if 9 j 2 cadicate list,

choose j using rule ð9Þ, if 9 j 2 cadicate list:

(ð10Þ

After all the ants have constructed a path from thesource to the destination, the iteration best ant with theminimum cost is selected. To reflect the preference ofthe links in the cost of a path, the cost function isdefined as the multiplication of the distance and theheuristic function of the path. Thus, the total cost ofthe path is calculated using cost function (11).

f xðtÞð Þ ¼X

�ijðtÞ � ��ij if each link ði, j Þ 2 xðtÞ, ð11Þ

where x(t) represents the path from the source node tothe destination node, searched by the current ant.

After each iteration of the Repetition loop, unlikethe conventional ACS algorithm, only the pheromoneon the path of the iteration best ant is updated usingrule (12) to prevent a premature convergence of thealgorithm.

�ijðtþ1Þ ¼ 1�D�ijðtÞ� �

� �ijðtÞ, if each link ði, j Þ 2bxðtÞ,ð12Þ

where D�ijðtÞ ¼ 1=ð�ijðtÞ � ��ijðtÞÞ. The pseudo-code for

the proposed algorithm is described as follows:

Procedure: Proposed algorithm

Initialize parametersWhile (Try5 number of Try loop iterations)bxðtÞ ¼ ;;�ijðtÞ ¼ dij; ðdij 4 0ÞWhile (Repetition5 number of Repetition loop

iterations)For each ant k¼ 1, . . . , nk do

xkðtÞ ¼ ;;While (full path has been constructed)

If r� r0 thenChoose j 2 Nk

i ðtÞ from candidate list;

End

Else

Choose j 2 Nki ðtÞ using rule (9);

End

xkðtÞ ¼ xkðtÞ [ fði, j Þg;End

xkðtÞ ¼P�kijðtÞ�

�ijðtÞ, where ði, j Þ 2 xkðtÞ;

Compute f(xk(t));End

x ¼ xkðtÞ : f ðxkðtÞÞ ¼ mink0¼1,...,nk f ðxk0

ðtÞÞ� �

;

Compute f(x);If f ðxÞ5 f bxðtÞð Þ thenbxðtÞ ¼ x;

f ðbxðtÞÞ ¼ f ðxÞ;End

For each link ði, j Þ 2 bxðtÞ doUpdate pheromone on path of iteration best

ant;Endbxðtþ 1Þ ¼ bxðtÞ;f ðbxðt ¼ 1ÞÞ ¼ f ðbxðtÞÞ;t ¼ tþ 1;Increase iteration counter of Repetition loop;

End

Return path of bxðtÞ;Increase coefficient of heuristic function �;Increase iteration counter of Try loop;

End

4. Implementation and experimental results

4.1. Implementation

The proposed algorithm was implemented in C andexecuted on a PC equipped with 4GB of RAM and anIntel Core 2 Quad processor running at 2.66GHz. Theexperiments were performed using maps that included64, 128, 192, and 256 nodes with 118, 242, 362, and 484links, respectively, as shown in Table 1. Maps 2, 3, and4 were made by expanding maps 1, 2, and 3, respec-tively, with additional nodes and links. Every link ineach map had preference and avoidance properties.When the preference and avoidance of a link wereequal, the link was treated as a common link. When thepreference of a link was higher than the avoidance, thelink was treated as a preferred link. Otherwise, the linkwas treated as a non-preferred link. The map linkproperties described in Table 1 were used in thefollowing experiments. The preference and avoidancevalues of the links were set to 1 or 2 to facilitate an easycomparison of the experimental results. Figure 2 showsmap 1 with 61 common links, 21 preferred links, and36 non-preferred links, where the dotted lines representthe preferred links, the dashed-dotted lines represent

Journal of the Chinese Institute of Engineers 185

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 6: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

Figure 2. Map 1 indicating preference and avoidance values for links.

Table 1. Properties of map links.

Map numberNumber of

nodesNumber of

common linksNumber of

preferred linksNumber of

non-preferred links Total number of links

1 64 61 21 36 1182 128 126 44 72 2423 192 189 65 108 3624 256 252 88 144 484

186 S.-H. Ok et al.

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 7: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

the non-preferred links, and the ordinary lines repre-sent the common links. For map 1, the source nodewas set as node 35, while the destination node was setas node 26. Meanwhile, to investigate the effect of largemaps on the proposed algorithm, maps 2 and 3 had thesame source and destination nodes set as nodes 99 and26, respectively, while for map 4, the source anddestination nodes were set as nodes 227 and 26,respectively.

4.2. Parameters

All the main parameters of the proposed algorithm,including the number of ants (nk), balancing factor ofthe node selection (r0), coefficient of the heuristicfunction (�), and number of Repetition loop iterations,have a significant influence on the performance of thealgorithm. Thus, to measure the influence of eachparameter, the proposed algorithm was simulatedusing various sets of parameters, as shown inTable 2. Parameter sets 1–5 were used to analyze theinfluence of r0 and nk when varying �, while parametersets 6–9 were used to analyze the influence of thenumber of Repetition loop iterations. Here, the numberof Try loop iterations was set to 11 and the maximumnumber of candidate nodes for each node was set to 3,whereas nk, r0, and �, and the number of Repetitionloop iterations were varied according to the experi-mental procedure, as shown in Table 2. In addition, toinvestigate the effect of the size of the map on theproposed algorithm, parameter sets 10–16 were used inthe experiments. In particular, parameter sets 13–15were used to investigate the sensitivity and the

computational time overhead as function of numberof Repetition loop iterations, nk, and �.

4.3. Experimental results and analysis

The first important experimental result with parameterset 1 was that the number of non-preferred andcommon links decreased in the final best path as �increased, as shown in Figure 3. Also, when increasing�, the total distance of the path also increased as thealgorithm tended to accept longer detours thatincluded preferred links. Conversely, the cost, definedas the multiplication of the distance and the heuristicfunction, gradually decreased when increasing �.Furthermore, for high values of �, the algorithm wasalso found to converge toward the same path (� from1.4 to 2).

The experimental results for different settings of r0in comparison with the previous experiments areshown in Figures 4 and 5. As shown in Figure 4,when using a small value for r0 (0.1), various pathswere selected depending on the value of �, as most ofthe ants explored more widely according to theprobability pkij. Conversely, when using a high valuefor r0 (0.9), most of the ants used the candidate lists. Asa result, the algorithm tended to converge rapidly onthe same path, as shown in Figure 5. It was alsoobserved that increasing � meant the algorithm con-verged toward the same path, irrespective of the valueof r0.

Figures 6 and 7 show the experimental results fordifferent settings of nk. As shown in Figure 6, whenusing a small number of ants (nk ¼ 10), the algorithmdid not converge rapidly to the same path whencompared to the use of a high number of ants (nk¼ 70),as shown in Figure 7. As such, these experimentalresults seem to indicate that a high number of antscaused a premature convergence of the algorithm.Table 3 shows the paths from the source node to thedestination node according to the parameter set.

The effect of the number of Repetition loopiterations on the quality of the results was alsoexamined. As shown in Figure 8, the average numberof preferred links increased when increasing thenumber of Repetition loop iterations, whereas theaverage number of non-preferred links and commonlinks decreased gradually. This was because, when thenumber of iterations increased, the pheromone on thebest paths was updated more times by more iterationbest ants, thereby increasing the learning effect of thealgorithm.

Table 4 shows the experimental results when usingparameter sets 7–9. As shown in the table, when using

Table 2. Parameter sets used in experiments.

Parameterset number

Mapnumber

Number ofRepetition loop

iterations nk r0 �

1 1 50 40 0.5 1–22 1 50 40 0.1 1–23 1 50 40 0.9 1–24 1 50 10 0.5 1–25 1 50 70 0.5 1–26 1 10–70 40 0.5 1–27 1 10–70 40 0.5 1.08 1 10–70 40 0.5 1.39 1 10–70 40 0.5 1.610 2 50 40 0.5 1–211 3 50 40 0.5 1–212 4 50 40 0.5 1–213 1–4 10–100 40 0.5 1.514 1–4 50 10–100 0.5 1.515 1–4 50 40 0.5 1–11

Journal of the Chinese Institute of Engineers 187

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 8: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

a small value for � (1.0), the algorithm was unable tofind a path that only included preferred and commonlinks, even though the number of Repetition loopiterations was increased. However, when �¼ 1.3, the

algorithm was able to find a path that did not includenon-preferred links when using a high number ofRepetition loop iterations. Finally, when using thehighest value for � (1.6), the algorithm was quicker in

Figure 4. (a) Total number of links and (b) total cost and distance of selected best paths as function of � (Repetition¼ 50,nk¼ 40, r0¼ 0.1, map 1).

Figure 3. (a) Total number of links and (b) total cost and distance of selected best paths as function of � (Repetition¼ 50,nk¼ 40, r0¼ 0.5, map 1).

Figure 5. (a) Total number of links and (b) total cost and distance of selected best paths as function of � (Repetition¼ 50,nk¼ 40, r0¼ 0.9, map 1).

188 S.-H. Ok et al.

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 9: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

Table 3. Path from source to destination node according to parameter set.

Parameter set number � Paths from source node (35) to destination node (26)

1 1.0 35! 38! 40! 39! 43! 47! 46! 1! 11! 15! 31! 30! 261.1–1.3 35! 38! 40! 39! 43! 47! 46! 1! 11! 15! 31! 29! 28! 261.4–2.0 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 29! 28! 26

2 1.0 35! 36! 37! 48! 55! 56! 54! 57! 60! 20! 21! 25! 261.1 35! 38! 40!39! 42! 46! 1! 11! 15! 31! 29! 28! 261.2 35! 36! 34! 33! 43! 47! 3! 4! 5! 16! 23! 261.3 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 261.4–1.6 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 29! 28! 261.7 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 261.8–2.0 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 29! 28! 26

3 1.0 35! 38! 40! 39! 43! 47! 46! 1! 2! 4! 5! 12! 13! 15! 31! 261.1–1.5 35! 38! 40! 39! 43! 47! 46! 1! 11! 15! 31! 29! 28! 261.6 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 29! 28! 261.7–1.8 35! 38! 40! 39! 43! 47! 46! 1! 11! 15! 31! 29! 28! 261.9–2.0 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 29! 28! 26

4 1.0 35! 36! 34! 33! 43! 47! 46! 1! 2! 4! 5! 16! 23! 24! 261.1 35! 38! 40! 42! 47! 3! 6! 8! 7! 11! 15! 31! 261.2 35! 38! 40! 39! 43! 47! 46! 1! 11! 15! 31! 29! 28! 261.3 35! 36! 37! 48! 55! 59! 49! 50! 52! 53! 57! 60! 20! 21! 28! 261.4–1.5 35! 38! 40! 39! 43! 47! 46! 1! 11! 15! 31! 29! 28! 261.6–2.0 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 29! 28! 26

5 1.0 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 29! 28! 261.1 35! 38! 40! 39! 43! 47! 46! 1! 11! 15! 31! 29! 28! 261.2 35! 36! 34! 33! 43! 47! 46! 1! 11! 15! 31! 29! 28! 26

Figure 7. (a) Total number of links and (b) total cost and distance of selected best paths as function of � (Repetition¼ 50,nk¼ 70, r0¼ 0.5, map 1).

Figure 6. (a) Total number of links and (b) total cost and distance of selected best paths as function of � (Repetition¼ 50,nk¼ 10, r0¼ 0.5, map 1).

Journal of the Chinese Institute of Engineers 189

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 10: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

finding a path that only included preferred andcommon links than with �¼ 1.3. This was because,when increasing �, the transition probability of select-ing a preferred link increased, allowing the algorithmto find the preferred path more quickly. However, ahigher value for � also prevented the algorithm fromfinding various preference-based paths, even withdifferent numbers of Repetition loop iterations.

Figures 9–11 show the experimental results whenusing parameter sets 10, 11, and 12, respectively. Asshown, when increasing �, the number of non-preferredand common links decreased in the final best path,regardless of the size of the map. In particular, Figures 9and 10 show similar experimental results with differentmap sizes. Thus, when the maps had the same sourceand destination node, the size of the map did not have a

Table 4. Number of each type of link on best paths according to value of �.

�Number of Repetition loop

iterationsNumber of

common linksNumber of

preferred linksNumber of

non-preferred links Number of total links

1.0 10 8 2 4 1420 8 4 2 1430 9 3 3 1540 4 7 2 1350 4 4 4 1260 4 4 3 1170 4 7 2 13

1.3 10 6 2 3 1120 4 7 2 1330 4 7 2 1340 3 10 0 1350 4 7 2 1360 3 10 0 1370 3 10 0 13

1.6 10 4 7 2 1320 3 10 0 1330 3 10 0 1340 3 10 0 1350 3 10 0 1360 3 10 0 1370 3 10 0 13

Figure 8. Average number of each type of link on selected best paths according to number of Repetition loop iterations.

190 S.-H. Ok et al.

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 11: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

Figure 11. (a) Average number of links and (b) average cost and distance of selected best paths as function of � (Repetition¼ 50,nk¼ 40, r0¼ 0.5, map 4).

Figure 10. (a) Average number of links and (b) average cost and distance of selected best paths as function of � (Repetition¼ 50,nk¼ 40, r0¼ 0.5, map 3).

Figure 9. (a) Average number of links and (b) average cost and distance of selected best paths as function of � (Repetition¼ 50,nk¼ 40, r0¼ 0.5, map 2).

Journal of the Chinese Institute of Engineers 191

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 12: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

significant effect on the performance of the proposedalgorithm. However, when using a larger map, the bestpath including only preferred links was found withhigher values for �, as shown in Figure 11.

The experimental results when using parameter set13, represented in Figures 12 and 13, showed the effectof the number of Repetition loop iterations on theaverage number of each type of link on the paths.Regardless of the size of the map, when increasing thenumber of Repetition loop iterations, the number ofcommon and non-preferred links decreased, while thenumber of preferred links increased. This was mainlybecause the learning effect of the algorithm increasedgradually as the number of Repetition loop iterationsincreased. For map 1, the number of preferred linkswas saturated after about 50 iterations. However, formaps 2 and 3, regardless of the size of the map, the

number of preferred links was saturated after about 80iterations. This was mainly because maps 2 and 3 hadthe same source and destination nodes. For map 4, thenumber of preferred links was only saturated afterabout 160 iterations, as shown in Figure 13(b). Thus,the sensitivity threshold of the number of Repetitionloop iterations was influenced by the size of the map,as well as the location of the source and destinationnodes.

Figures 14 and 15 present the experimental resultswhen using parameter set 14 and show the effect of thenumber of ants on the average number of each type oflink on the paths. When increasing the number of ants,the number of preferred links was saturated morerapidly, regardless of the size of the map. This wasbecause, as the number of ants increased, theprobability of finding the best path also increased.

Figure 13. (a) Average number of links in map 3 and (b) map 4 as function of number of Repetition loop iterations (nk¼ 40,r0¼ 0.5, �¼ 1.5).

Figure 12. (a) Average number of links in map 1 and (b) map 2 as function of number of Repetition loop iterations (nk¼ 40,r0¼ 0.5, �¼ 1.5).

192 S.-H. Ok et al.

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 13: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

As a result, the pheromone on the best paths was

updated more times by more iteration best ants.

However, this also meant that, with a high number

of ants, the algorithm was unable to find various paths

when increasing �, as the algorithm tended to converge

quickly toward the same path. For map 1, the number

of preferred links was saturated after the number of

ants was 60. Meanwhile, for maps 2 and 3, the number

of preferred links was saturated with a similar number

of ants, as the sensitivity of the number of ants was

related to the location of the source and destination

nodes. For the largest map, namely map 4, the number

of preferred links was saturated after about 130 ants,

as shown in Figure 15(b).The experimental results when using parameter set

15, represented in Figures 16 and 17, show the effect of

� on the average number of each type of link on the

paths. Regardless of the size of the map, the number of

preferred links was highest when � was between about

2 and 5. However, when a large value was used for �,the algorithm tended to converge toward suboptimal

paths, namely paths constructed with fewer preferred

links and also more total links. This was mainly

because, for a large �, the amount of pheromone at

searched preferred links was excessively decreased by

the iteration best ants according to rule (12), prevent-

ing successive ants from finding optimal paths.The experimental results when using parameter sets

13, 14, and 15, represented in Figure 18(a), (b), and (c),

respectively, show the effect of the number of

Repetition loop iterations, number of ants, and � on

the computational time of the proposed algorithm. The

average computational time was linearly proportional

to the number of Repetition loop iterations and

number of ants. The computational time was constant,

irrespective of �. However, when increasing � from 4

Figure 15. (a) Average number of links in map 3 and (b) map 4 as function of number of ants (Repetition¼ 50, r0¼ 0.5, �¼ 1.5).

Figure 14. (a) Average number of links in map 1 and (b) map 2 as function of number of ants (Repetition¼ 50, r0¼ 0.5, �¼ 1.5).

Journal of the Chinese Institute of Engineers 193

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 14: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

to 5, the average computational time increased asshown in Figure 18(c). This was mainly because the

algorithm converged toward suboptimal paths when �was more than 4. Thus, the total number of links of the

searched path increased, resulting in increased compu-tational time. For this reason, an excessively large

value for � had a negative influence on the algorithm.

5. Conclusion

This article has proposed a preference-based shortestpath search algorithm that adopts a new heuristic

function, transition probability rule, and pheromone

update rule. The proposed algorithm was implemented

in C and experiments were performed using variousparameter sets with maps that included 64, 128, 192,

and 256 nodes.

The experimental results showed that the proposed

algorithm performed path searching, reflecting prefer-

ence as well as distance and time. When increasing the

coefficient of the heuristic function, �, the final best

path included more preferred links, while the number

of non-preferred and common links decreased, regard-

less of the size of the map. Furthermore, the total

length of the path increased when increasing �, whilethe total cost of the path decreased gradually. In

addition, increasing � enabled quick identification of

paths with many preferred links, yet prevented the

algorithm from finding various paths. However, the

algorithm converged toward suboptimal paths when �was more than 4. This shows that an excessively large

value for � has a negative influence on the algorithm.

When increasing the number of iterations and ants, the

learning effect of the algorithm increased gradually.

Thus, high numbers of iterations and ants were found

Figure 16. (a) Average number of links in map 1 and (b) map 2 as function of � (Repetition¼ 50, nk¼ 40, r0¼ 0.5).

Figure 17. (a) Average number of links in map 3 and (b) map 4 as function of � (Repetition¼ 50, nk¼ 40, r0¼ 0.5).

194 S.-H. Ok et al.

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 15: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

to identify the paths constructed with more preferredlinks without increasing �, yet with increased compu-tational time.

Although the proposed algorithm is not optimal asregards finding the distance shortest path, it is suitedfor finding the preference-based shortest path, makingit a viable and practical solution. Future work willfocus on combining the proposed algorithm with adistance shortest path search algorithm, therebyimproving the overall performance.

Nomenclature

� pheromone amplificationcoefficient

� heuristic amplification coefficientdij distance between nodes i and jf cost function

i, j node indexk index of individual ants

Lk length of path constructed by ant knk number of antsNk

i set of nodes not yet visited by ant kand connected to node i

pkij probability rule by which ant kselects node j from node i

Q positive constant used to weightinfluence of path length in calcula-tion of amount of depositedpheromone

r random numberr0 constant parameter used to balance

exploration and exploitationt time step

xk(t) path constructed by ant k at timestep tbxðtÞ path constructed by the iterationbest ant at time step t

Figure 18. (a) Average computational time as function of number of Repetition loop iterations (nk¼ 40, r0¼ 0.5, �¼ 1.5),(b) average computational time as function of number of ants (Repetition¼ 50, r0¼ 0.5, �¼ 1.5), and (c) average computationaltime as function of � (Repetition¼ 50, nk¼ 40, r0¼ 0.5).

Journal of the Chinese Institute of Engineers 195

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1

Page 16: An ant colony optimization approach for the preference ...soc.yonsei.ac.kr/Abstract/International_journal/pdf/91_An Ant Colony... · An ant colony optimization approach for the preference-based

D�ij amount of pheromone depositedon the link between nodes i and j

�ij heuristic function of the linkbetween nodes i and j

� pheromone evaporation rate�ij amount of pheromone of the link

between nodes i and j�0 small positive constant

References

Chen, C.H. and Ting, C.J., 2006. An improved ant colonysystem algorithm for the vehicle routing problem. Journalof the Chinese institute of industrial engineers, 23 (2),

115–126.Colorni, A., et al., 1994. Ant system for job–shop scheduling.Belgian journal of operations research, statistics andcomputer science, 34 (1), 39–53.

Costa, D. and Hertz, A., 1997. Ants can colour graphs.Journal of the operational research society, 48 (3), 295–305.

Dorigo, M., Birattari, M., and Stutzle, T., 2006. Ant colony

optimization – artificial ants as a computational intelli-gence technique. IEEE computational intelligence maga-zine, November, 1–12.

Dorigo, M., and Caro, G.D., 1999. Ant colony optimization:a new meta-heuristic. In: Proceedings of the congress onevolutionary computation, Washington, DC, USA, Vol. 2,1470–1477.

Dorigo, M., Maniezzo, V., and Colorni, A., 1996. Antsystem: optimization by a colony of cooperating agents.IEEE transactions on systems, man, and cybernetics-part B,

26 (1), 29–41.Dorigo, M. and Socha, K., 2007. An introduction to antcolony optimization. Handbook of approximation algo-

rithms and metaheuristics. Boca Raton, FL: Chapman &Hall/CRC.

Dorigo, M. and Thomas, S., 2004. Ant colony optimization.

Cambridge, MA: MIT Press.Engelbrecht, A.P., 2006. Fundamentals of computationalswarm intelligence. West Sussex, England: Wiley.

Fu, L., Sun, D., and Rilett, L.R., 2006. Heuristic shortest

path algorithms for transportation applications: state of

the art. Computers and operations research, 33 (11),

3324–3343.Gambardella, L.M. and Dorigo, M., 1996. Solving sym-

metric and asymmetric TSPs by ant colonies. In:

Proceedings of the IEEE conference on evolutionary

computation, 20–22 May, Nagoya, Aichi, Japan, 622–627.Gambardella, L.M. and Dorigo, M., 1997. Has-sop: hybrid

ant system for the sequential ordering problem. Technical

report, UMI Order Number: IDSIA-11-97, Istituto Dalle

Molle Di Studi Sull Intelligenza Artificiale, Lugano,

Ticino, Switzerland.

Lee, J.W., et al., 2008. Improved ant colony optimization

algorithm by potential field concept for optimal path

planning. IEEE-RAS international conference on humanoid

robots, 1–3 December, Daejeon, Korea, 662–667.Maniezzo, V., 1999. Exact and approximate nondeterministic

tree-search procedures for the quadratic assignment

problem. INFORMS journal on computing, 11 (4),

358–369.Nazari, S., et al., 2008. An advanced algorithm for finding

shortest path in car navigation system. International

workshop on intelligent networks and intelligent systems,

1–3 November, Wuhan, Hubei, China, 671–674.Noto, M. and Sato, H., 2000. A method for the shortest path

search by extended Dijkstra algorithm. IEEE international

conference systems on man, and cybernetics, 8–11 October,

Nashville, TN, USA, Vol. 3, 2316–2320.

Perny, P. and Spanjaard, O., 2005. A preference-

based approach to spanning trees and shortest paths

problems. European journal of operational research, 162 (3),

584–601.

Salehinejad, H. and Talebi, S., 2008. A new ant algorithm

based vehicle navigation system: a wireless networking

approach. International symposium on telecommunications,

27–28 August, Tehran, Iran, 36–41.Yue, H. and Shao, C., 2007. Study on the application of A*

shortest path search algorithm in dynamic urban

traffic. Third international conference on natural computa-

tion, 24–27 August, Haikou, Hainan, China, Vol. 5,

463–469.

196 S.-H. Ok et al.

Dow

nloa

ded

by [

Yon

sei U

nive

rsity

] at

18:

58 1

7 A

ugus

t 201

1