<!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>A demo for Smart City Operation Center</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Filippos Gouidis</string-name>
          <email>gouidis@ics.forth.gr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giorgos Flouris</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dimitris Plexousakis</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Computer Science</institution>
          ,
          <addr-line>F.O.R.T.H Heraklion, Crete</addr-line>
          ,
          <country country="GR">Greece</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The delivery of Public Services to citizens is developing into a challenging task, as the urban population increases and the related networks are becoming more complex and entangled. In this work, we present a GUI application for Smart City Operation Center (SMOC), a platform designed for the optimal coordination of a City's Public Agencies that is based on two eminent AI paradigms: Action Languages (AL) and Answer Set Programming (ASP). The system receives requests for services and subsequently deploys the available agents of the di erent services, in order to ful l the demands in a timely manner. This paper provides the technical details behind the implementation, along with instructions and guidelines for the utilization of the application.</p>
      </abstract>
      <kwd-group>
        <kwd>Smart City Application</kwd>
        <kwd>Answer Set Programming</kwd>
        <kwd>Action Languages</kwd>
        <kwd>Multi-Agent Action Coordination</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>In the context of a modern city, the delivery of services to the citizens involves
the activation of many di erent agencies such as the re brigade, the police
department or the health care services. Typically, the management of the actions
necessary for this objective is carried out in principle by each agency separately,
since it is considered that a continuous coordination is too costly and arduous.
A notable exception is the handling of emergency incidents due to their critical
nature.</p>
      <p>Over the last few years, many Smart City projects have been launched with
the purpose of complementing the corresponding agencies in their tasks. For
example, in Amsterdam, the Smart Tra c Management Project 1 is used for the
administration of tra c ow and in the EU the new emerging trend of Connected
Cars 2 is expected, among others, to substantially improve ambulance response
times. However, similarly with the case of the various agencies, the approach
underlying behind these applications is rather specialized than holistic.
1 http://amsterdamsmartcity.com/projects/detail/id/58/slug/smart-tra
cmanagement
2 http://europa.eu/rapid/press-release MEMO-14-105 en.htm</p>
      <p>Maintaining constantly a coordinated and synergistic plan, nonetheless, could
be signi cantly more optimal for a number of reasons. Firstly, this approach
is translated to a substantial cost reduction in terms of human resources and
infrastructure. To start, the activities of two or more servicing organizations
are often interdependent, as for example in the case of tra c regulation by the
police that can facilitate enormously the other servicing units endeavouring to
ful l their tasks. Hence, a uni ed approach could serve better the interests of
the groups involved. Last, but not least, the experience and expertise gained by
this type of administration, might be proven crucial in an emergency incident
such as an earthquake or an extreme weather event.
1.1</p>
    </sec>
    <sec id="sec-2">
      <title>Smart City Operation Center</title>
      <p>
        Towards this direction, we have developed Smart City Operation Center (SMOC),
a platform for the central coordination of the various services operating in the
urban environment.The main responsibility of SMOC is to manage the city
services and decide how to e ectively deploy the available agents of the di erent
services, in order to provide optimum and timely assistance to citizens. The way
in which the problem is represented bears strong similarities to the multiple
Travelling Salesperson Problem (mTSP), a heavily studied problem in computer
science and mathematics of NP-hard complexity. Nonetheless, the majority of
the approaches has domain-dependant performance and the extension of the
representation of the problem is far from trivial [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>Our main objective behind this e ort aims at providing an easy-to-use tool
that could cope with a challenging practical problem. In order to develop the
platform, we utilized two eminent AI paradigms: Action Languages (AL) and
Answer Set Programming (ASP), considering that the declarative and highly
expressive nature of these formalisms is well suited for the addressing of the
problem. In addition, the aforementioned characteristics facilitate signi cantly
the development of solutions that are easily extended and can be used in
problems with similar settings. It should be stated that the version presented in the
context of this work is not nal and is amenable to signi cant improvement.
2
2.1</p>
      <sec id="sec-2-1">
        <title>Background</title>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Event Calculus</title>
      <p>
        Action theories are logical languages for reasoning about the dynamics of
changing worlds, having played a pivotal role in the development of non-monotonic
logics and in formalisms to represent knowledge. The EC [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ] is a
narrativebased many-sorted rst-order language for reasoning about action and change,
where the sort E of events (or actions) indicates changes in the environment,
the sort F of uents denotes time-varying properties and the sort T of
timepoints is used to implement a linear time structure. The calculus implements
the principle of inertia for uents, which captures the property that things tend
to persist over time unless a ected by some event, and applies the technique of
circumscription to solve the frame problem and support default reasoning.
      </p>
      <p>
        Di erent dialects have been proposed over the years; in this study, we
axiomatize our domains based on the Discrete-time Event Calculus (DEC) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and
the recently proposed Functional Event Calculus (FEC) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. DEC de nes a set of
predicates to express which uents hold when (HoldsAt F T ), which events
happen (Happens E T ), what their e ects are (Initiates, T erminates,
Releases E F T ) and whether a uent is subject to the law of inertia or
released from it (ReleasedAt F T ).
      </p>
      <p>FEC, on the other hand, generalizes the EC to include non-binary (i.e.
nontruth-valued) uents taking values from the sort V. In accordance to DEC, the
key predicates and functions are Happens E T , V alueOf : F T ! V ,
CausesV alue E F V T , P ossV al F V. Non-determinism and
triggered actions are supported by both formalisms. Along with the set of
domainindependent rules that axiomatize the notions of inertia, causality and e ect,
the execution of reasoning tasks is performed with a set of domain-dependent
axioms expressing the dynamics of the world.
2.2</p>
    </sec>
    <sec id="sec-4">
      <title>Answer Set Programming</title>
      <p>
        Answer set programming (ASP) is a recently developed programming technique
combining declarativeness, modularity and expressiveness. It is founded on logic
programming answer set semantics, which drive the computation of stable
models (answer sets). The procedure followed by most of ASP solvers is an enhanced
version of the DPLL algorithm [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. ASP is gaining increasing popularity due to
its ability to combine an expressive, non-complex language over powerful solvers.
      </p>
      <p>An Answer Set Program is a set of rules of the form:</p>
      <p>Rule: A0:- L1, : : : ,Lk 1;not Lk; :::;not Ln.
where Lj are atoms and not represents negation-as-failure. The set of literals
fL1; : : : ; Lng are called the body of the rule and A0 the head. Intuitively, the
head of a rule has to be true whenever all its body literals are true in the
following sense: a non negated literal Li is true if it has a derivation and a
negated one, not Li, is true if the atom Li does not have one. According to
stable model semantics, only atoms appearing in some head can appear in answer
sets. Furthermore, derivations have to be acyclic, a feature that is important to
model reachability. Rules with an empty body are called facts and their head is
unconditionally true, i.e., it appears in all answer sets. Rules with an empty head
are called integrity constraints and are used to reject answer set candidates.</p>
      <p>
        ASP has already proven its potential in expressiveness in comparison to other
declarative approaches, enabling the representation of phenomena for
commonsense and nonmonotonic reasoning ([
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]), while its solvers outperform satis
abilitybased and constraint-programming solvers in many domains [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ]. The success
of ASP is demonstrated in a wide variety of elds that spans from hardware
design and phylogenetic inference to the Semantic Web. In this study, we use
the most recent ASP implementation developed by Potsdam Answer Set
Solving Collection (Potassco), named Clingo [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. It combines the grounder Gringo
and solver Clasp and encompasses many utilities, such as detailed tuning of
grounding and solving, utilization of useful built-in functions and also the
ability to integrate scripts written in Lua and Python languages, which provides
signi cant exibility to developers.
3
      </p>
      <sec id="sec-4-1">
        <title>Technical Details</title>
        <p>In order to address the SCOC setting, planning with a combination of features,
such as temporal and causal constraints, was necessary. The problem
incorporates characteristics of simpler frameworks, such as variations of the Traveling
Salesman Problem, distance graphs and temporal reasoning with precedence
ordering. Furthermore, it extends them in various ways. In this section, we describe
how the EC and ASP can be applied to approach representational and practical
issues related to the problem of SCOC, revealing strong and weak points of each.
3.1</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Representation</title>
      <p>Representing SCOC with Event Calculus Axiomatizations The SCOC
planning problem formulates a demanding domain; while RAC theories are well
suited to express some of its aspects, others prove to be more challenging, as
we discuss next. We chose the EC as the speci cation language to describe
the domain, not only due to its ability to model a multitude of commonsense
phenomena, but also because of the availability of tools that can support our
reasoning tasks.</p>
      <p>
        In order to model the setting both FEC and DEC have been used. However,
even though both theories are comparable for the given domain, we will focus in
this subsection on FEC, whose ability to model functional uents o ers greater
exibility. Namely, as it is already elaborated in the Background section, FEC
provides the possibility of using non-binary uents. Moreover, in contrast to
DEC, FEC can model non-determinism by the usage of disjunction ([
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]), a
feature that could be exploited in the context of a future expansion of the platform
aiming to support uncertainty.
      </p>
      <p>We picture the smart city as a graph, whose edges have weights that may
change dynamically as a result of occurring events. To simplify the presentation
we assume one service and one agent type; the axiomatization can trivially be
extended to the more general case, by simply using a di erent graph per agent
type/service. In compliance with the notation introduced in the previous
sections, let ag; ag1; ::: denote variables of the AG sort, l; l1; ::: variables of the E
sort, while variables num; num1; ::: denote positive reals3.</p>
      <p>The following domain closure axioms de ne all uents and actions needed
to model SCOC, in order to reason about the state of agents (i.e., being at a
3 All variables in formulae are implicitly universally quanti ed, unless stated otherwise.</p>
      <p>Moreover, we assume E AC [ EV, i.e., events axiomatized by the Event Calculus
refer both to agent actions and triggered events.
location or moving), the state of locations (i.e., served or not) and the distance
traveled:
Fluent Step denotes how much distance the agent can cover in one timepoint
along the edge (l1; l2), while RemDist captures the distance that remains to be
traveled. Step is subject to change, as it depends on the state of the world. We
further assume uniqueness of names axioms for actions and uents. The possible
values for these uents are appropriated restricted:</p>
      <p>P ossV al(At(ag); l): P ossV al(Step(l1; l2); num): P ossV al(RemDist(ag; l1; l2); num):
P ossV al(Moving(ag); v) v = T rue _ v = F alse:</p>
      <p>P ossV al(Served(l); v) v = T rue _ v = F alse:
Certain predicates are also de ned. For instance, Connected(l1; l2; num) denotes
edges and the corresponding distance between locations.</p>
      <p>In comparison to other action theories, the explicit representation of time
inside EC predicates facilitates the developer in expressing complex temporal
expressions, necessary in SCOC to model for instance actions with durations,
such as traveling for a given amount of time. Moreover, the calculus has
established solutions to the frame, rami cation and quali cation problems, relieving
the developer from the tedious work of explicitly writing frame or
minimization axioms. Many aspects of the domain can easily be described by axioms
expressing context-dependent e ects of actions, action preconditions and state
constraints, with existentially quanti ed variables whenever needed:
CausesV alue(Arrives(ag; l); at(ag); l; t) V alueOf(Moving(ag); t) = T rue:</p>
      <p>Happens(Departs(ag; l1; l2); t) ! V alueOf(At(ag); t) = l1:</p>
      <p>V alueOf(At(ag); t) = l1 ^ V alueOf(At(ag); t) = l2 ! l1 = l2:</p>
      <p>Happens(Departs(ag; l1; l2); t) ! 9numConnected(l1; l2; num):</p>
      <p>In order to handle metric distances between locations or calculate traveled
distances, SCOC calls for extensive use of numerical operations to be
incorporated in the domain description. For instance, we have to recalculate the Step
uent every time certain agent actions a ect it, such as when some agent arrives
at, serves or leaves a particular location. We use the predicate
Af f ectsCost(ag; l; l1; l2; num; v) to model di erent variations of the costChange
event introduced in Section 3. For instance, when v = 1 (resp. v = 2, v = 3)
Af f ectsCost denotes that the cost of traveling from l1 to l2 becomes num when
agent ag arrives at (resp. is present at, departs from) location l. The following
axiom models the case when v = 3 (the rest are similarly de ned):</p>
      <p>CausesV alue(Departs(ag; l); Step(l1; l2); (num1=num); t)
[Connected(l1; l2; num1) ^ V alueOf(At(ag); t) = l ^ affectsSpeed(ag; l; l1; l2; num; 3)]:
Despite the simplicity of such axioms, the introduction of numerical variables
leads to an explosion of grounded terms having a tremendous impact on
performance, calling for special measures to be adopted.</p>
      <p>
        Finally, triggered events, i.e., events that occur when the world is in a
particular state, are a signi cant leverage in modeling real-world domains [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. In our
case, we use triggered events to keep track of the distance that an agent needs
to travel before reaching the destination location:
      </p>
      <p>Happens(UpdateRemDist(ag; l1; l2; (num1 num2)); t) V alueOf(Moving(ag); t) = T rue^</p>
      <p>V alueOf(RemDist(ag; l1; l2); t) = num1 ^ V alueOf(Step(l1; l2); t 1) = num2:
Note that, in contrast to most benchmark problems in action theories, in our
case the duration of certain actions, such as the agent's travel is not known
beforehand, but needs to be calculated on-the- y. Our modeling adopts the simple
solution of recalculating the remaining distance at every timepoint according to
the distance the agent has traveled in the previous timepoint (notice that Step
refers to t 1 in the previous axiom). A variation of this problem with static edge
weights has also been implemented to show the di erence in performance when
action duration is known a priori. ASP constructs can provide radical solutions,
as we argue in the next section.</p>
      <p>Finally, the axiomatization needs also to include the description of the initial
state, specifying the location and state of all agents, as well as the goal state,
i.e., V alueOf (Served(n); Topt) = T rue for some timepoint Topt. Note that since
the problem we solve is a planning problem, we do not specify completion of
the Happens predicate, letting the reasoner produce all combinations of event
occurrences that can lead to the satisfaction of the goal state. Of course, Topt is
not known beforehand.</p>
      <p>
        Representing SCOC in Answer Set Programming This subsection
describes an alternative modeling that uses ASP as speci cation language for
describing SCOC, aimed at exploiting the potential of state-of-the-art ASP solvers.
Given the structure of the problem, we based our representation on standard
methods found in the literature for encoding graph traversal, as given for
instance in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Due to the dynamic nature of the problem, we extended the
methodology with a treatment of time. In this way, atoms representing dynamic
attributes contain a variable accounting for time. As before, we simplify the
setting and assume only one agency and every node of the graph has to be visited
at least by one of the agents.
      </p>
      <p>To accommodate planning, Clingo o ers a special functionality where
reasoning progresses incrementally. Speci cally, a special variable, which denotes
timepoints in our case, is acting as a place-holder that increases by a constant
step number to perform grounding and solving in consecutive steps, until an
answer set satisfying the goal state is found. To accomplish this, the program
is divided into 3 independent parts: the basic, the cumulative and the volatile
part. The former contains the de nitions that are used throughout the
execution, as well as the initial state, while the latter speci es the goal condition. The
cumulative part, on the other hand, incorporates all rules and constraints that
have to be grounded every time the reasoning progresses by one step.</p>
      <p>The state of the graph is speci ed by predicates, such as in(Ag1,Nd1,1 ) and
edge(Nd1,Nd2,W,1) contained in the basic part. In order to represent the
displacement of the agents, rules able to express cardinality constraints are used:
0fon the road(AG; X; Y; C; t) : edge(X; Y; C; t)g1 : agent(AG); in(AG; X; t):
This rule states that an agent located at a node at a certain time-point can
initiate at most one movement and this movement should have as destination
a node that is connected (i.e., edge) to the node that is currently located at.
Such rules give signi cant leverage to the developer, o ering a compact way to
introduce various types of restrictions.</p>
      <p>In order to avoid overloading the grounded terms introduced in the Event
Calculus encodings when numerical operations are in place, we embedded in
our ASP encodings external predicates, a special functionality o ered by Clingo.
The truth value of these predicates can be decided by scripts written in the Lua
language, without requiring grounding or disturbing execution during reasoning.
Such an external predicate is @new cost appearing in the following rule:
The rule calculates the remaining distance for agents on the move. The
performance gains obtained when executing such computationally demanding tasks in
parallel with reasoning is depicted in the evaluation discussed in Section 5.</p>
      <p>While the built-in constructs described before o er enhanced functionalities
to support declarative reasoning, certain aspects of SCOC were not handled as
conveniently as with the EC encodings. The representation of inertia, which had
to be explicitly de ned in all time-dependent rules, and the treatment of time
in general, are characteristic examples:
edge(X; Y; C2; t) : edge(X; Y; C; t); edge(X; Y; C2; t 1); C2! = C:</p>
      <p>edge(X; Y; C2; t) : edge(X; Y; C2; t 1); not edge(X; Y; C2; t):
These rules model the weight of edges at each timepoint, having the law of
inertia explicitly expressed. The rst rule implies that if for two consecutive time
moments an edge has di erent weights, the earlier value must become obsolete
the next time moment, while the second rule indicates that if an edge's value
has not become obsolete, it is conserved for the next time moment (\ " denotes
strict negation). Similar behavior has to be designed for other atoms, whose
value may change over time. The ease of accommodating such phenomena with
the EC and their direct application to new features with minifemum e ort, often
referred to as elaboration tolerance, becomes easily evident.</p>
      <p>Finally, the constraint expressing the goal condition, i.e., whether all nodes
have been visited, is expressed as follows and added in the volatile part:
: not reached(X; t); node(X); query(t):
We additionally made use of Clingo's built-in function minimize, in order to
achieve a second-level of optimization:</p>
      <p>#minimizefC : on the road(AG; X; Y; C; t)g
With this expression we can de ne a secondary criterion to classify optimal plans,
when more than one are found. Speci cally, we choose the one with minimum
distances traveled by all agents, denoted by variable C. Special treatment of
such expressions allows the Clingo solver to calculate solutions e ectively.
3.2</p>
    </sec>
    <sec id="sec-6">
      <title>Implementation</title>
      <p>
        Recent progress regarding the generalization of the de nition of stable model
semantics used in ASP [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] has opened the way for highly expressive formalisms to
be reformulated in ASP encodings and exploit the several e cient
implementations that are currently available. Speci cally, the precise characterization of the
correspondence between stable models and circumscription used by many
theories for reasoning about action and change, such as the Situation and the EC, has
permitted the reformulation of the latter in ASP. For that purpose, we used the
F2LP4 tool to transform our circumscriptive DEC-based axiomatization into a
logic program that can be executed with ASP reasoners. This is important since
not all rst- order formulae can be transformed into the clausal form used in ASP
solvers while preserving stable models. F2LP applies the translation developed
in [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] that guarantees that the ASP encoding created as output is equivalent
to the circumscription-based axiomatization. For example the following DEC
axiom:
      </p>
      <p>happens(departs(Ag; Nd1; Nd2); T ) !
terminates(departs(Ag; Nd1; Nd2); at(Ag; Nd1); T ):
is transformed via F2LP into the next ASP rule:</p>
      <p>
        terminates(departs(Ag; Nd1; Nd2); at(Ag; Nd1); T ) :
happens(departs(Ag; Nd1; Nd2); T ); agent(Ag); node(Nd1); node(Nd2); time(T ):
Although the FEC-based axiomatization can also facilely become input to F2LP,
we opted to utilize the dedicated reasoner and encoding style for FEC theories
developed in [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. The major advantage that this tool o ers lies in its capacity
to support reasoning with highly expressive classes of problems with minimum
e ort on the developers side. Namely, it can execute the epistemic extension of
FEC [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], which we plan to integrate in future variations of the SCOC setting,
when for example some of the agents locations will not be known initially.
      </p>
      <p>
        In order to compare these di erent implementations in terms of e ciency
and speed, a number of experiments were conducted on random generated clique
graphs. The main ndings were the following: 1) in general, none of the
implementations could scale well in large cliques ,2) the purely ASP-based
implementation scored signi cantly better than the hybrid ones, 3) the major drawback
of EC was its incompetence to deal with the numerical operations and 4) the
grounding phase is far more time-consuming than the solving phase. For more
details regarding the experiments the reader is referred to [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]
      </p>
      <p>At rst glance, based on the previous results, it can be argued that the
utilization of EC in the current framework of the problem is unnecessary and,
hence, only the ASP implementation should be applied. Nevertheless, at it has
already been stated, the platform is still under development and the wide
experimentation which we plan to conduct regarding the EC encodings, might lead to
enhanced performance. Furthermore, the unique functionalities that EC o ers
could be proved particular useful for the extension of the problem. Summarizing,
we suggest that the user concerned only in performance issues should use the
purely ASP encoding. However, we opted to o er, in the context of the current
version, all the di erent options in order for a more direct comparison to be
possible.
4 F2LP website (last accessed 7/7/2014): http://reasoning.eas.asu.edu/f2lp/
4.1</p>
      <sec id="sec-6-1">
        <title>User Guide</title>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Requirements</title>
      <p>Currently, the application can be executed only in a Linux environment.
However, we plan to release a version that supports the family of Windows OS in
the near future. In order for the application to be executed, the following three
components are required: 1) Java Runtime Environment (JRE)5 , 2) a 2.7
version or higher of the Python language6 and 3) version 5.1 or higher of the Lua
language 7 .</p>
      <p>The necessary les for the deployment of the application are located in
the following url: http://www.ics.forth.gr/isl/MACPDRA/Demo/Demo.zip .
Extract the compressed folder Demo.zip and then launch the Demo.jar le
with JRE. Additionally two tutorial videos can be found in the following urls:
http://www.ics.forth.gr/isl/MACPDRA/Demo/video1.avi and http://www.
ics.forth.gr/isl/MACPDRA/Demo/video2.avi . Please note that for the
seamless execution of the application none of the les included in the uncompressed
folder should be deleted. Also, to prevent any mishaps, ensure that the
permissions of the les enable their execution.</p>
      <p>It should be stated that some of the features of the problem are not yet
supported by the application, although the corresponding ASP and AL encodings
address them. Namely, there is no di erence in the type of the di erent agents,
i.e. they all deliver the same services, and the edges of the graphs are static,
that is there is no dynamic interdependency among the agents. Nonetheless,
soon these aspects will be incorporated in the application.
4.2</p>
    </sec>
    <sec id="sec-8">
      <title>Basic Commands</title>
      <p>The application consists of two sub-windows. The left one is dedicated to the
design of the graph that represents the locations of the city, whilst in the right
the paths that the agents have to travel to provide the servicing are depicted.</p>
      <p>There are two options: the user can either use the strictly ASP
implementation or the implementation that is a combination of ASP and AL. By selecting
the former, the user can select the vertices of the graph that require servicing.
On the contrary, in the latter case it is assumed that all vertices should be visited
by the agents. In order to select between these two options, the user must use
the combo button that is located below the left sub-window.</p>
      <p>In order to create a new vertex, the user should right-click in an empty space
in the left sub-window. Consequently a name for the new vertex should be given.
Note that each vertex should bear a unique name.</p>
      <p>Similarly, to create a new edge between two vertices the user must right-click
on one of the two vertices and then drag the mouse to the other. Then, the
weight of the edge should be given in the pop-up dialog that appears. The value
should be a positive integer.
5 http://www.oracle.com/technetwork/java/javase/overview/index.html
6 http://www.python.org/
7 http://www.lua.org/</p>
      <p>To add a new agent in a vertex, the user must right-click the vertex. In the
dialog that appears the type and the name of the agent should be given. In the
same way, the user can remove an agent from a vertex by selecting the option
'Remove Agent'.</p>
      <p>To indicate that a vertex requires servicing, the user must right-click the
vertex. After the service have been added, the color of the vertex turns from
green to red. In order to remove a service from a location, the user must
rightclick the vertex and select 'Delete Service'.</p>
      <p>To add an image as a canvas, the user must click the button 'Load Image' that
is located under the right sub-window. The image can be removed by clicking
the button 'Remove Image'. At any time, the user can save a graph in an XML
le by using the button 'Save Graph'. Correspondingly, the user can load any
previously saved graphs by using the button 'Load Graph'.</p>
      <p>After the graph has been designed, the user can generate the plan for the
agents by clicking the button 'Generate' that is located under the right
subwindow. By clicking the button 'Proceed', the agents advance according to the
previously generated plan.
5</p>
      <sec id="sec-8-1">
        <title>Conclusions</title>
        <p>In this paper, we presented a smart city application that relies on the formalisms
of AC and ASP. While the investigation behind its implementation builds on
the latest theoretical and applied advancements in both elds, its user-friendly
interface enables people less or not familiar with these theories to harness its
potential and utilize it in the context of a highly demanding domain: a Smart
City environment. Conversely, by exploiting the direct and swift visualization
rendering that this tool provides, we could be aided signi cantly in our research
by gaining insights about the merits and the drawbacks of the aforementioned
paradigms.</p>
        <p>Before concluding, we would like to stress, once again, that the platform
is currently under development and, therefore, does not lack de ciencies, the
most important of which having to do with scalability and computational issues.
Besides, as SCOC will expand, we plan to include more features such as
unpredictable events, durational and prioritized tasks. This way, we aspire toward
developing more e cient, real-world implementations for SCOC. Moreover, the
GUI can be further improved and simpli ed, facilitating, thus, to a larger degree
the inexperienced user. Nonetheless, despite the enhancements and adjustments
that might be required, it is our belief that SCOC already constitutes a reliable
tool that can be used for both practical and theoretical applications.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>T.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cirillo</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koenig</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>On the traveling salesman problem with simple temporal constraints</article-title>
          .
          <source>In: 10th Symposium of Abstraction</source>
          , Reformulation, and
          <string-name>
            <surname>Approximation</surname>
          </string-name>
          (SARA'13). (
          <year>2013</year>
          )
          <volume>73</volume>
          {
          <fpage>79</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Kowalski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sergot</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A Logic-</article-title>
          based
          <source>Calculus of Events. New Generation Computing</source>
          <volume>4</volume>
          (
          <issue>1</issue>
          ) (
          <year>1986</year>
          )
          <volume>67</volume>
          {
          <fpage>95</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Miller</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shanahan</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>Some alternative formulations of the event calculus</article-title>
          . In: Computational Logic:
          <article-title>Logic Programming and Beyond, Essays in Honour of Robert A</article-title>
          .
          <string-name>
            <surname>Kowalski</surname>
          </string-name>
          ,
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          , London, UK, Springer-Verlag (
          <year>2002</year>
          )
          <volume>452</volume>
          {
          <fpage>490</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Mueller</surname>
          </string-name>
          , E.:
          <article-title>Commonsense Reasoning. 1st edn</article-title>
          . Morgan Kaufmann (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Miller</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Morgenstern</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patkos</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Reasoning about knowledge and action in an epistemic event calculus</article-title>
          .
          <source>In: 11th International Symposium on Logical Formalizations of Commonsense Reasoning (Commonsense'13)</source>
          . (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Davis</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Putnam</surname>
          </string-name>
          , H.:
          <article-title>A computing procedure for quanti cation theory</article-title>
          .
          <source>Journal of the ACM (JACM) 7</source>
          (
          <issue>3</issue>
          ) (
          <year>1960</year>
          )
          <volume>201</volume>
          {
          <fpage>215</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krennwallner</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Reasoning web. semantic technologies for information systems</article-title>
          . (
          <year>2009</year>
          )
          <volume>40</volume>
          {
          <fpage>110</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Coban</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Erdem</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ture</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Comparing</surname>
            <given-names>ASP</given-names>
          </string-name>
          ,
          <article-title>CP, ILP on two Challenging Applications: Wire Routing and Haplotype Inference</article-title>
          .
          <source>In: Proc. of the 2nd International Workshop on Logic and Search (LaSh</source>
          <year>2008</year>
          ).
          <article-title>(</article-title>
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>T.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Palla</surname>
          </string-name>
          , R.:
          <article-title>Circumscriptive event calculus as answer set programming</article-title>
          .
          <source>In: 21st International Joint Conference on Arti cial Intelligence (IJCAI09)</source>
          . (
          <year>2009</year>
          )
          <volume>823</volume>
          {
          <fpage>829</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Celik</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Erdogan</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tahaoglu</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Uras</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Erdem</surname>
          </string-name>
          , E.:
          <article-title>Comparing ASP and CP on four grid puzzles</article-title>
          .
          <source>In: Proc. of the 16th International Workshop on Experimental</source>
          <article-title>Evaluation of Algorithms for Solving Problems with Combinatorial Explosion (RCRA'09)</article-title>
          . (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaufmann</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ostrowski</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schneider</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Potassco: The potsdam answer set solving collection</article-title>
          .
          <source>Ai Communications</source>
          <volume>24</volume>
          (
          <issue>2</issue>
          ) (
          <year>2011</year>
          )
          <volume>107</volume>
          {
          <fpage>124</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Tran</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baral</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Reasoning about Triggered Actions in AnsProlog and Its Application to Molecular Interactions in Cells</article-title>
          .
          <source>In: 9th International Conference on the Principles of Knowledge Representation and Reasoning (KR2004)</source>
          . (
          <year>2004</year>
          )
          <volume>554</volume>
          {
          <fpage>564</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Kaufmann,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <surname>T.</surname>
          </string-name>
          :
          <article-title>Answer Set Solving in Practice</article-title>
          .
          <source>Synthesis Lectures on Arti cial Intelligence and Machine Learning</source>
          . Morgan &amp; Claypool Publishers (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Ferraris</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Stable models and circumscription</article-title>
          .
          <source>Arti cial Intelligence</source>
          <volume>175</volume>
          (
          <issue>1</issue>
          ) (
          <year>2011</year>
          )
          <volume>236</volume>
          {
          <fpage>263</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Palla</surname>
          </string-name>
          , R.:
          <article-title>Reformulating the situation calculus and the event calculus in the general theory of stable models and in answer set programming</article-title>
          .
          <source>Journal of Arti cial Intelligence Research</source>
          <volume>43</volume>
          (
          <issue>1</issue>
          ) (
          <year>2012</year>
          )
          <volume>571</volume>
          {
          <fpage>620</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Ma</surname>
          </string-name>
          , J.,
          <string-name>
            <surname>Miller</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Morgenstern</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patkos</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>An epistemic event calculus for aspbased reasoning about knowledge of the past, present and future</article-title>
          .
          <source>In: Proc. of the 19th International Conference on Logic for Programming</source>
          ,
          <source>Arti cial Intelligence, and Reasoning (LPAR-19)</source>
          . (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Gouidis</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patkos</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Flouris</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Plexousakis</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Declarative reasoning approaches for agent coordination</article-title>
          .
          <source>In: Arti cial Intelligence: Methods and Applications</source>
          . Springer (
          <year>2014</year>
          )
          <volume>489</volume>
          {
          <fpage>503</fpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>