<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Method for Optimizing Communication Costs in ACODA Using Simulated Annealing</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Costin B a˘dic a˘</string-name>
          <email>cbadica@software.ucv.ro</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sorin Ilie</string-name>
          <email>silie@software.ucv.ro</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mirjana Ivanovi c´</string-name>
          <email>mira@dmi.uns.ac.rs</email>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>BCI'12, September 16-20, 2012, Novi Sad, Serbia.</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Copyright c 2012 by the paper's authors. Copying permitted only for private and</institution>
          ,
          <addr-line>academic purposes. This volume is published and copyrighted by its editors., Local Proceedings also appeared in ISBN 978-86-7031-200-5</addr-line>
          ,
          <institution>Faculty of Sciences, University of Novi Sad.</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Craiova, Business Informatics and, Statistics Department</institution>
          ,
          <addr-line>A.I.Cuza 13, Craiova, 200585</addr-line>
          ,
          <country country="RO">Romania</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Craiova, Software Engineering, Department</institution>
          ,
          <addr-line>Bvd. Decebal 107, Craiova, 200440</addr-line>
          ,
          <country country="RO">Romania</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>University of Novi Sad, Faculty of Sciences, Department of Mathematics</institution>
          ,
          <addr-line>and Informatics, Trg Dositeja Obradovica 3, 21000 Novi Sad</addr-line>
          ,
          <country country="RS">Serbia</country>
        </aff>
      </contrib-group>
      <fpage>139</fpage>
      <lpage>141</lpage>
      <abstract>
        <p>ACODA is a truly distributed framework for Ant Colony Optimization. ACODA is heavily using message passing, so communication costs are quite high. In this paper we formulate the optimization of communication costs in ACODA as a mathematical optimization problem. We analyze the feasibility of its solution using Simulated Annealing.</p>
      </abstract>
      <kwd-group>
        <kwd>Algorithms</kwd>
        <kwd>artificial intelligence</kwd>
        <kwd>distributed systems</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Ant Colony Optimization on a Distributed Architecture – known
as ACODA is a multi-agent distributed framework for Ant Colony
Optimization (ACO hereafter) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. ACODA was developed for
solving computationally difficult path optimization problems in
graphs, such as the Traveling Salesman Problem (TSP hereafter)
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. The main idea behind ACODA was to represent the network of
nodes that define the problem domain as a distributed multi-agent
system. In particular, the agents are able to store and exchange ant
information, thus enabling a fully distributed model of ants
migration as message exchanged by agents.
      </p>
      <p>
        In fact, with our proposal we identify and exploit fine-grained
parallelism that is inherently present in collective natural
bio-systems, in particular in colonies of natural ants that is the metaphor
behind ACO. According to this view, ACODA can be
conceptualized as a network of computational nodes that are exchanging ant
information according to ACO rules. So, using parallel
computing as source of inspiration, we observed that by defining a
suitable partitioning of the nodes of this network and its mapping to a
high-speed computer network, we can efficiently divide the
communication and computation costs of ACODA among the available
network machines, thus leading to the improvement of the overall
execution time of an ACO algorithm. The problem of defining a
suitable partition of the network of ACODA computational nodes
is an instance of the Graph Partitioning problem (GP hereafter) – a
well-known NP-hard computational problem [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        In this paper we propose the use of Simulated Annealing (SA
hereafter) for defining a suitable partition of ACODA
computational nodes. SA is a probabilistic mathematical optimization
method inspired by the physical process of slowly cooling a metal until
its internal structure is frozen to an equilibrium state that represents
the optimal solution of the problem [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. SA has already been
applied to solve the GP problem [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>
        Note however that there are various approaches for defining the
optimization criteria of GP [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. In this paper we define an
optimization criteria suitable for ACODA, as well as a new formulation of
the solution space of SA. Then we propose an SA algorithm
inspired by [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] for exploring the partitioning solution space. We also
present initial experiments of applying this algorithm on real data
extracted during the execution of ACODA while solving standard
benchmark instances of the TSP problem [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>It is interesting to note that there is an important difference
between the standard application of GP to parallel computing
problems and its application to optimization of communication costs in
ACODA. The standard application assumes that the optimization
graph and the partitioning are defined and computed before the
execution of the parallel problem solving process. On the other hand,
ACODA can be described as a probabilistic search algorithm, so it
is impossible to define the graph and the partitioning before the
algorithm is run. With our approach the partitioning should be done
during rather than before the execution of the parallel problem
solving process.
2.</p>
    </sec>
    <sec id="sec-2">
      <title>BACKGROUND</title>
      <p>
        Following [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], ACODA architecture can be succinctly described
as a network of computational nodes mapped to several physical
machines interconnected by a high-speed communication network.
The structure of the network of computational nodes mimics the
graph that defines the instance of the optimization problem (TSP
in this case) which ACODA is configured to solve. Basically, pairs
of nodes can exchange messages (i.e. ant information). The set of
nodes is distributed to the set of the available network machines.
Usually, the set of nodes is much larger than the set of available
machines. In our JADE-based implementation [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] of ACODA each
machine is running a JADE agent that is managing the set of nodes
assigned to that machine.
      </p>
      <p>The cost of exchanging messages between two nodes located on
different physical machines is obviously significantly higher than
the cost of exchanging messages between two nodes located on the
same physical machine. Intuitively, if two nodes exchange a large
number of messages they should be located on the same machines,
while if they exchange a reduced number of messages they can be
safely located on different machines. Therefore the optimal
partitioning of the set of nodes should take into account the specific
interaction pattern between the nodes that is defined by the
execution of ACODA.</p>
    </sec>
    <sec id="sec-3">
      <title>OPTIMIZATION OF COMMUNICATION</title>
    </sec>
    <sec id="sec-4">
      <title>COSTS</title>
      <p>We model ACODA as a network of n computational nodes that
are mapped onto a high-speed computer network consisting of k
physical machines (or processors). The mapping of nodes to
machines can be described by a partition p of the set {1, 2, . . . , n} into
k sets. For each i ∈ {1, 2, . . . , k} let pi be the set of nodes mapped
onto machine i.</p>
      <p>During the execution of ACODA we record the number of
messages (or ants) mi j exchanged by any two nodes i and j. m is an
n × n symmetric matrix. The nodes of the set pi that are mapped
to machine i will exchange messages with the rest of nodes, i.e.
p¯i = {1, 2, . . . , n} \ pi, so the associated cost can be computed as:</p>
      <p>The total communication cost incurred during the execution of
ACODA can be estimated as the total number of messages
exchanged by the machines, as follows:</p>
      <p>Ci(p) =</p>
      <p>X
j∈pi,l∈p¯i</p>
      <p>m jl
k
C(p) = X Ci(p)</p>
      <p>i=1</p>
      <p>Let 0 &lt; d &lt; n be a natural number and let q = ⌊n/k⌋, i.e. q is
the quotient of the integer division of n by k. A partition p is called
d-balanced if for each i ∈ {1, 2, . . . , k} the number of elements of
the set pi is bounded as follows: ||pi| − q| ≤ d. This means that the
number of elements of pi cannot be larger than q + d and it cannot
be smaller than q − d. For example, if d = 1 then each set of a
1-balanced partition can contain either q − 1, q or q + 1 elements.</p>
      <p>The GP problem asks for computing a d-balanced partition p
such that the total communication cost C(p) is minimum.</p>
    </sec>
    <sec id="sec-5">
      <title>SIMULATED ANNEALING</title>
      <p>
        SA is a probabilistic mathematical optimization method inspired
by the physical process of slowly cooling a metal until its internal
structure is frozen to an equilibrium state that represents the
optimal solution of the problem [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. We follow the formulation of the
SA algorithm presented in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>The key ingredients of the SA algorithm are as follows:
• The set S of feasible solutions also known as “problem states”.</p>
      <p>In our case this is given by the set p of d-balanced partitions.
• For each x ∈ S the set S (x) of its “neighbors”. In our case
a neighbor is defined by choosing two distinct sets pi and
p j of the partition such that |pi| &gt; q − d and |p j| &lt; q + d
and moving one arbitrary element from pi to p j. It is easy
to see that the neighbor is correctly defined, i.e. it is a
dbalanced partition. Moreover we can always choose pi as
the set with the largest number of elements and p j as the set
with the smallest number of elements that shows that in our
formulation of the GP problem each state has at least one
neighbor.
• A nondecreasing “temperature” function T : N → R+ also
known as “cooling schedule”.</p>
      <p>SA starts from a given initial state. It proceeds through an
iterative search process without backtracking by randomly choosing in
each iteration a neighbor of the current state. SA seeks to improve
(i.e. to decrease the value of the cost of) the currently best solution.
So most of the time SA will prefer downhill moves. However, in
order to avoid being trapped to local minima, sometimes SA allows
uphill moves. The selection of uphill moves is controlled by the
cooling schedule. SA stops when the improvement of the currently
best solution seems highly unlikely (the standard term is that the
state is “frozen”).</p>
      <p>
        The SA algorithm is illustrated in Fig. 1. The main source of
inspiration for this algorithm is [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. It takes an initial state p and
returns an optimized state pmin.
      </p>
      <p>The SA algorithm is using several functions as follows:
• neigh_size() that determines an estimation of the number of
neighbors of a problem state;
• successor that randomly picks up a neighbor q ∈ S (p) of p
• cost that determines the value of the current state
• random that determines a uniformly distributed random
number.</p>
      <p>The SA algorithm can also be externally configured using the
following three parameters:
• S IZ EFACT OR is a real number between 0 and 1 that
represents the proportion of neighboring states from the estimated
number of neighbors that will be handled in the current
iteration
• MAX_CNT that represents the maximum number of times
the algorithm tries to improve the currently best solution
during the current iteration before declaring that the state is
frozen
• MIN_PERCENT that determines the minimum proportion
of moves that must be accepted during the current iteration
in order to consider that the further improvement of the
currently best solution is still possible, i.e. the state is not frozen.</p>
      <p>A crucial aspect of any SA algorithm is the cooling schedule.
There are several proposals in the literature:
• Linear cooling schedule, defined as:
• Logarithmic or Boltzman cooling schedule, defined as:
• Exponential cooling schedule, defined as:</p>
      <p>Tlin(i) = T0/i</p>
      <p>Tboltz(i) = T0/(1 + log i)
Texp(i) = T0 ∗ γi, 0 &lt; γ &lt; 1
SIMULATED-ANNEALING(p)
1. C ← cost(p), Cmin ← C, pmin ← p, cnt ← 0
2. i ← 1, trials ← S IZ EFACT OR ∗ neigh_size()
3. while cnt &lt; MAX_CNT do
4. T ← temp(i)
5. acc_moves ← 0
6. for i = 1, trials do
7. q ← succesor(p), C1 ← cost(q), Δ ← C1 − C
8. if Δ &lt; 0 then
9. p ← q, C ← C1, acc_moves ← acc_moves + 1
10. if C &lt; Cmin then
11. pmin ← p, Cmin ← C, cnt ← 0
12. else
13. prob ← exp(−Δ/T )
14. r ← random()
15. if r ≤ prob then
16. C ← C1, p ← q
17. acc_moves ← acc_moves + 1
18. if acc_moves ≤ trials ∗ MIN_PERCENT then
19. cnt ← cnt + 1
20. i ← i + 1
21. return pmin</p>
      <p>Before usage, the cooling schedules must be calibrated by
determining a suitable value for the initial temperature T0 (parameter
gamma is set in advance to a value smaller than and close to 1, for
example 0.95). The calibration process can be achieved by
choosing an initial state p and estimating the difference between C(p)
and the average value of the neighboring states q of p, i.e.:
Δ = ( X</p>
      <p>C(q))/|S (p)| − C(p)
q∈S (p)</p>
      <p>Then, given an initial value for the probability r of accepting
uphill moves (used in steps 13-17 of SA algorithm from Fig. 1;
usually this is taken as 0.2), Δ can be used to compute T0 by solving
the following equation:</p>
      <p>r = exp(−Δ/T (1))
for each of the cooling schedules: Tlin, Tboltz and Texp.</p>
      <p>Finally, we can provide an estimation of the size of the
neighborhood of a given partition p (the value returned by the function
neigh_size()) for the GP problem. A neighbor can be in principle
determined by choosing an element x of one of the sets of the
partition and transferring it to one of the other k − 1 sets of the partition.
Taking into account that there are n elements then we can estimate
the size of the neighborhood for the GP problem as n ∗ (k − 1).
5.</p>
    </sec>
    <sec id="sec-6">
      <title>CONCLUSION AND FUTURE WORK</title>
      <p>We have presented our approach and work-in-progress for
optimizing communication costs in ACODA – a multi-agent distributed
framework for Ant Colony Optimization. We are now in the
process of performing an experimental evaluation of this approach. We
shall report on our progress in subsequent papers.
6.</p>
    </sec>
    <sec id="sec-7">
      <title>ACKNOWLEDGMENTS</title>
      <p>This work was partially supported by the multilateral agreement
on academic cooperation in 2012 between Serbia (Novi Sad),
Romania (Craiova), and Poland (Warsaw and Gdansk) on “Agent
Technologies, Tools, Environments, Applications”.
7.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>F. L.</given-names>
            <surname>Bellifemine</surname>
          </string-name>
          , G. Caire, and
          <string-name>
            <given-names>D.</given-names>
            <surname>Greenwood</surname>
          </string-name>
          .
          <article-title>Developing Multi-Agent Systems with JADE</article-title>
          . John Wiley &amp; Sons Ltd,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>D.</given-names>
            <surname>Bertsimas</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Tsitsiklis</surname>
          </string-name>
          .
          <article-title>Simulated annealing</article-title>
          .
          <source>Statistical Science</source>
          ,
          <volume>8</volume>
          (
          <issue>1</issue>
          ):
          <fpage>10</fpage>
          -
          <lpage>15</lpage>
          ,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>B.</given-names>
            <surname>Hendrickson</surname>
          </string-name>
          and
          <string-name>
            <given-names>T. G.</given-names>
            <surname>Kolda</surname>
          </string-name>
          .
          <article-title>Graph partitioning models for parallel computing</article-title>
          .
          <source>Parallel Computing</source>
          ,
          <volume>26</volume>
          :
          <fpage>1519</fpage>
          -
          <lpage>1534</lpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>Ilie</surname>
          </string-name>
          and
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Ba˘dica˘. Multi-agent approach to distributed ant colony optimization (in press)</article-title>
          .
          <source>Science of Computer Programming</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Johnson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. R.</given-names>
            <surname>Aragon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. A.</given-names>
            <surname>McGeoch</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Schevon</surname>
          </string-name>
          .
          <article-title>Optimization by simulated annealing: an experimental evaluation. part i, graph partitioning</article-title>
          .
          <source>Operations Research</source>
          ,
          <volume>37</volume>
          (
          <issue>6</issue>
          ):
          <fpage>865</fpage>
          -
          <lpage>892</lpage>
          ,
          <year>1989</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>G.</given-names>
            <surname>Reinelt. Tsplib -</surname>
          </string-name>
          <article-title>a traveling salesman library</article-title>
          .
          <source>ORSA Journal on Computing</source>
          ,
          <volume>3</volume>
          :
          <fpage>376</fpage>
          -
          <lpage>384</lpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>