<!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>
      <journal-title-group>
        <journal-title>Journal of Visual Languages &amp; Computing 25 (2014) 827-839.
doi:10.1016/j.jvlc.2014.10.023.
[15] S. Consoli</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1109/WF-IoT.2014.6803232</article-id>
      <title-group>
        <article-title>Ontologies for Simulating Smart Cities: the KnOCS Project</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Chiara Alì</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Domenico Cantone</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giorgia Leanza</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mirko Giuseppe Mangano</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alex Mattia</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marianna Nicolosi Asmundo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniele Francesco Santamaria</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Catania</institution>
          ,
          <addr-line>Catania</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2014</year>
      </pub-date>
      <volume>8797</volume>
      <fpage>575</fpage>
      <lpage>580</lpage>
      <abstract>
        <p>Developing smart cities is a multifaceted efort spanning technological challenges that require innovative tools to facilitate their efective and practical deployment. Among such tools, simulators play a pivotal role by enabling the testing, analysis, and optimization of urban systems in controlled, risk-free environments before real-world implementation. Despite their potential, however, the current literature reveals a gap in engineering simulators for modeling and analysing the behaviour of smart cities in a comprehensive and machine-understandable manner. This goal can be reached through ontologies, which ofer expressiveness and interoperability, allow for more accurate representations of urban dynamics, ensure alignment with real-world semantics, and provide the lfexibility required by urban scenarios. The present contribution reports on the ongoing project KnOCS - Knowledge Oriented City Simulator, a novel framework that integrates discrete-event simulators with ontologies to support comprehensive modeling and analysis of smart city evolutions.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Semantic Web</kwd>
        <kwd>OWL</kwd>
        <kwd>Smart City</kwd>
        <kwd>IoT</kwd>
        <kwd>Simulation</kwd>
        <kwd>Discrete Event</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Smart cities reshape urban environments by integrating technologies such as Artificial Intelligence (AI),
Internet of Things (IoT), and Big Data to enhance sustainability, eficiency, and quality of life for modern
citizens. Smart cities aim at optimizing energy consumption, reducing trafic congestion through smart
mobility solutions, improving public services with digital governance, and reducing waste and carbon
footprints.</p>
      <p>However, building and implementing a smart city is a complex undertaking that encompasses many
challenges from infrastructural, economic, social, governance, and technological perspectives.</p>
      <p>From a technological standpoint, the ability to digitally simulate complex urban environments before
real-world deployment is crucial. Simulators provide a safe and cost-efective way to experiment
with diferent configurations, technologies, and (cyber)security policies without disrupting existing
infrastructure. They empower stakeholders to predict system behaviours, detect potential failures,
optimize performance, reduce costs, and test new solutions.</p>
      <p>However, building such simulators remains challenging. On the one hand, it requires software capable
of managing urban scenarios, triggering, collecting, and logging events related to smart cities, including
agent actions and interactions. On the other hand, the collected information must be represented in a
formal, meaningful, and interoperable way. In this context, ontologies can play a substantial role.</p>
      <p>Smart cities are inherently complex systems, shaped by the interaction of thousands of agents and
assets of diferent natures and goals, operating in diverse infrastructures, technologies, and capabilities.</p>
      <p>Therefore, ontologies from various domains must be integrated, with the modeled information
seamlessly incorporated into the simulator allowing for continuous updates while maintaining coherence
and computational eficiency. Moreover, the knowledge base must be designed to adapt and evolve over
time in response to changing urban dynamics, which requires the use of ontologies that evolve over
time.</p>
      <p>In conclusion, integrating smart city simulators with semantic knowledge bases presents significant
challenges, both from an engineering and an ontological perspective.</p>
      <p>The Knowledge-Oriented City Simulator (KnOCS) is an ongoing project for the definition of a
framework for smart city simulation grounded on semantic knowledge bases. KnOCS is designed for
modeling, simulation, and analysis of complex urban environments by integrating formal knowledge
representations with event-driven computational models.</p>
      <p>At the core of KnOCS lies a Discrete Event Simulator (DES), a powerful simulation paradigm for
capturing the temporal dynamics of systems where changes occur at discrete points in time, particularly
well-suited to modeling urban processes such as trafic flow, energy consumption, emergency response,
and communication among Internet of Things (IoT) devices.</p>
      <p>What sets KnOCS apart from conventional simulation platforms is its integration with semantic
knowledge bases, achieved through the use of domain-specific and foundational ontologies which
provide a formal machine-interpretable representation of the key entities, agents, and processes involved
in the simulation of urban environments. These include: (a) ontologies for agents and their interactions,
which define the characteristics, roles, and behaviours of urban agents (e.g., citizens, vehicles, sensors,
administrators) and capture their interactions in various contexts such as mobility, communication, and
service delivery; (b) evolving ontologies, which represent the way a system changes during a simulation.
These ontologies allow the system to track changes, detect anomalies, analyse trends over time, and
pave the way to temporal reasoning; (c) ontologies for IoT devices and smart cities stakeholders, which
are essential for specifying the participants and assets of urban environments.</p>
      <p>By leveraging the Semantic Web, KnOCS supports interoperability, reusability, and explainability of
city simulations. This enables researchers, city planners, and policymakers to configure, test, and extend
simulation scenarios with minimal efort, using high-level conceptual models rather than low-level
code.</p>
      <p>Finally, KnOCS is envisioned as a valuable tool for urban digital twin applications, policy impact
assessment, smart infrastructure design, and adaptive IoT system testing. Its semantically grounded
architecture ensures that the simulations remain consistent, transparent, and aligned with real-world
knowledge frameworks.</p>
      <p>The remainder of the paper is organized as follows. Section 2 reviews the main contributions from
the state of the art. Section 3 outlines the architecture of the KnOCS project and highlights the key
design choices, while Section 4 briefly presents a use case. Finally, Section 5 concludes the paper and
discusses the next steps necessary to successfully advance the project.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Works</title>
      <p>
        This section is devoted to the literature review concerning the exploitation of ontologies for simulation
purposes, in particular in the context of IoT and smart cities, where semantic technologies are crucial
to reach the desired interoperability [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        IoT research has mainly focused on sensor modulation, with the Semantic Sensor Network (SSN)
ontology [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] widely recognized as the standard in the field. A practical application is presented in
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], which describes the open-source platform OpenIoT and the associated ontology, while another
significant contribution is ofered in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], where the authors introduce SAREF, a suite of ontologies that
has since evolved into a key resource for ensuring semantic interoperability among smart appliances.
      </p>
      <p>
        A comprehensive overview of the development of ontologies for IoT is provided in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], which reviews
key advances in the field between 2012 and 2017. Notably, two works deserve mention: OntoSensor
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and its successor MyOntoSens [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], the latter of which extends the former by defining the semantic
description of sensor observations.
      </p>
      <p>
        FIESTA-IoT [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] extends this landscape by aiming to unify existing IoT-related ontologies, with a
particular focus on test-bed environments such as Smart Santander, where real data from sensors and
smart buildings are semantically annotated. Similarly, the VITAL project [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] introduces an ontology
designed to manage heterogeneous data streams from smart city devices, modeling sensors and their
measurements to support improved service integration within IoT ecosystems.
      </p>
      <p>
        An attempt to address interoperability through semantic modeling is presented in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], where the
authors propose a unified knowledge base that leverages multiple ontologies to model the dynamic
environments in which IoT entities operate. This knowledge base incorporates several existing
ontologies, including: (a) the SSN ontology, which is extended to model sensor resources by accounting for
additional properties such as roles and events; (b) the GeoNames ontology, which is extended to provide
a location model that supports the linkage between IoT resources and services; (c) a Policy Ontology
and a Service Ontology, which complete the knowledge base by enabling the specification of rules and
functionalities within the IoT context.
      </p>
      <p>In [11], the authors propose a semantic framework based on ontologies to enhance interoperability
and automation in IoT systems. The approach is built on a three-layer architecture comprising: (i)
the semantic/ontological layer, (ii) the cloud/edge computing layer, and (iii) the IoT devices and
communication layer. By transforming raw data into semantically structured formats, enabling eficient
data processing at the edge, and supporting heterogeneous communication protocols, the framework
is tested through simulations in real-world scenarios. The results demonstrate a 98% communication
success rate between devices, a 65% reduction in latency, and 85% eficiency with up to 500 devices.</p>
      <p>An overview of the use of ontologies in smart city applications, covering work up to 2021, is provided
in [12]. Among more recent contributions, [13] introduces a Unified Knowledge Model (UKM) and a
framework for semantic reasoning and data management, with a focus on connecting multiple scenarios
and leveraging Digital Twins. The UKM is closely linked to the Snap4City framework, which in turn
builds upon the Km4City ontology [14], originally developed to support the reuse of existing ontologies.
The overarching goal is to process large volumes of data from both public and private sources, map
them into the ontology, and enable the development of services for smart cities.</p>
      <p>In the same direction, the PRISMA project [15] proposes an ontology that reuses WGS84, NeoGeo,
and Collections ontologies to integrate heterogeneous data related to urban infrastructure. The ontology
models geodata from GIS, as well as information on public transport lines and stops, lighting maintenance
systems, road conditions, and historical waste collection data. Similarly, SCOnt [16] presents an
ontologybased approach, which combines a population ontology, a geo-location ontology, and DBpedia to support
a four-layer architecture.</p>
      <p>SCOPE, a framework for modeling cybersecurity threats in smart cities using the UCO and CASE
ontologies, is presented in [17], while TrafCsOnto, proposed in [18], is a solution aimed at managing
trafic in smart cities. Another notable contribution is the STAR-CITY project [19], which develops
ontologies to diagnose and predict trafic congestion by integrating heterogeneous data sources, including
weather conditions, public transport, road events, and social media. Finally, [20] introduces S2RICO, a
framework whose main objective is to provide a standard ontology for assessing and monitoring smart
city performance.</p>
      <p>
        With regard to the management of user consent in the processing of personal data, the authors of [21]
propose a unified and consistent model that covers consent, contracts, sensor data, and their processing.
The resulting ontology consists of 202 classes, 87 object properties, and 42 data properties, and it reuses
nine existing ontologies: GConsent [22], DPV [23], FIBO, PROV-O [24], OntoSensor [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], schema.org
[25], DCAT [26], CampaNeo [27], and LCC [28].
      </p>
      <p>At the time of writing, many simulators are available for use in the context of smart cities, such as
SUMO [29], an open-source trafic simulation designed to handle large road networks, in particular
vehicle movement, including trafic lights, public transport, and custom routing algorithms. SUMO
is widely used in academic and industrial research for evaluating trafic management strategies and
intelligent transportation systems. Analogously, CityFlow [30] is a high-performance trafic simulator
capable of simulating large-scale urban road networks in real time, supporting road topologies and
machine learning algorithms for trafic signal controls. In the context of frameworks for simulating
transportation systems, it is worth mentioning MATSim [31], which is used for multimodal transport
systems, long-term planning, and policy evaluation in urban mobility.</p>
      <p>Finally, OMNeT++ [32] is a modular, component-based C++ simulation framework, originally
designed for building network simulators, but flexible enough to be extended to smart city applications,
particularly those involving semantic knowledge bases.</p>
      <p>Concerning IoT simulation, it is worth mentioning IoTIFY [33], which enables the simulation of
thousands of virtual devices sending data over MQTT or HTTP, making it particularly useful for smart
city scenarios involving sensors, environmental monitoring, and smart infrastructure.</p>
    </sec>
    <sec id="sec-3">
      <title>3. The KnOCS Architecture</title>
      <p>Discrete Event Simulation (DES) is a simulation paradigm used to simulate the behaviour and performance
of a real-world system as it evolves over time. Unlike continuous simulations, where the system state
changes continuously, DES-based frameworks update the system state only at specific points in time;
namely, it changes when events happen at distinct time—specific points.</p>
      <p>In DES, each event is an instantaneous occurrence that may alter the state of the system. The
simulation maintains a clock that progresses from one event to the next, and an event queue that stores
all scheduled events, sorted by their execution time. At the core of a DES is an event loop that repeatedly
removes the next event from the queue, advances the simulation clock, updates the system state, and
potentially schedules new events. Events are scheduled dynamically based on the user’s configuration,
which specifies a set of dependencies between events as well as constraints on their execution order. In
addition to deterministic rules, the configuration may include probabilistic elements that govern the
random selection of certain events or event sequences, allowing for varied and non-repetitive behaviour
across diferent runs. This approach ultimately enables the analysis and understanding of complex
systems with asynchronous and time-dependent behaviour.</p>
      <p>OMNeT++ is the most popular, open-source discrete event simulation framework, primarily used
for modeling and simulating communication networks, but flexible enough to support a wide range of
systems, including smart cities. The main challenges of simulating smart cities through DES stem from
the need for scalability, interoperability, and adaptability to the complexity of urban environments. To
address these challenges, the Knowledge Oriented City Simulator (KnOCS) – an ongoing project at
the University of Catania– leverages ontological models to: (a) ensure consistency and unambiguity
through structured, formal, and shared representations of urban stakeholders; (b) provide a semantic
bridge across simulation tasks; (c) enable modularity and reusability within the simulator architecture;
(d) enhance simulation with logical consistency, explainability, and traceability.</p>
      <p>To integrate ontologies and DES systems, KnOCS provides a framework composed of two main
modules. The first, called KnOCS- Discrete Event (KnOCS-DE), is responsible for managing discrete
events related to smart city operations. The second, KnOCS-Knowledge Base (KnOCS-KB), maintains
the semantic knowledge bases and incorporates a Graph Database Management System (GDBMS) for
eficient storage and retrieval. It is also responsible for storing smart city stakeholder behaviours, the
events resulting from their actions and interactions, and any other information used by KnOCS-DE to
carry out the simulation.</p>
      <p>As shown in Figure 1, KnOCS-DE consists of three main modules:
• The core module, called Smart City Emulation Core (SimCore) and extending OMNeT++, is devoted
to the generation and triggering of the discrete events related to smart cities, in particular, agent
actions and interactions. It also includes the software required to keep the knowledge base
updated and synchronised with the simulator.
• The Software Development Kit (SDK) is a collection of software development tools that enables
Smart City stakeholders to develop and deploy new modules for KnOCS-Discrete Event, thereby
extending the simulator’s functionalities and capabilities.
• The User-API includes the programming facilities that can be adopted to programmatically interact
with the simulator.</p>
      <p>The KnOCS-KB consists of two modules:
• the GDBMS, which manages the storing and retrieving of the information from the knowledge
base. The current version of KnOCS adopts OpenLink Virtuoso [34] as GDBMS;
• the Knowledge Base-API (KB-API ), the access point of the simulator to the knowledge base, is
responsible for integrating the event simulator with the GDBMS and the related knowledge base.
The KB-API connects the KnOCS-DE component with the GDBMS, managing the correct encoding
and decoding of smart city events generated by SimCore in the knowledge base, their permanent
storage, retrieval, and querying. Within the KB-API, the Synchronisation Service guarantees that
changes are correctly applied by persistently recording the precise configuration and state of
the city at each simulation step. This mechanism maintains a dynamic, semantically grounded
trace of the city’s evolution. The Synchronisation Service is also responsible for synchronizing
the reasoner, ensuring the consistency and alignment of the evolution of the knowledge base
throughout the simulation.</p>
      <p>OMNeT++ is based on Event-Driven Architectures (EDAs), a foundational paradigm for modeling
complex and dynamic systems such as smart cities. In an EDA, changes in the state of the system are
captured as discrete events that trigger specific reactions from components of the system. This reactive
logic supports scalable and asynchronous management of information flows generated by distributed
agents, an essential feature in IoT-based environments.</p>
      <p>Our architecture embraces this approach by explicitly modeling events as ontological entities, raised
by the actions of the smart city stakeholders. These stakeholders are introduced as agents and their
commitments, enriched through the notion of the roles they play in various urban contexts. OMNeT++ is
responsible for triggering events thanks to the KnOCS-KB, whose Terminological Box (T-Box) describes
how agents interact and how events are induced by those actions. Ontological representations of
simulation events are collected in the Assertion Box (A-Box) that captures the evolution of the emulated
smart city. The SimCore module is responsible for verifying which events can be generated and
determining the dependencies among them by querying the T-Box of the KnOCS-KB. Using the OMNeT++
module, these events are then generated according to user-defined system presets as the simulation
clock advances. When a set of events occurs in a time , the state of the simulation changes, which
means that the smart city evolved, and the A-Box is updated accordingly by means of the KB-API. When
the simulation clock progresses to time +1, another set of events occurs, causing the smart city to
evolve to its subsequent state.</p>
      <p>Continuous update of the A-Box requires appropriate strategies to ensure its consistency and
alignment with the progression of the simulation. Although one can devise ontological models to represent
the A-Box’s evolution, this approach becomes impractical when OWL restrictions are involved or when
it is necessary to reconstruct the temporal evolution of the smart city or querying across several states.</p>
      <p>To enable this dynamic evolution, KnOCS relies on evolving ontologies that lie at the core of the
Synchronisation Service. Evolving ontologies allow for the formal representation not only of the involved
entities, but also of the entire lifecycle of events, including their propagation efects,and the management
of state changes over time. Unlike static models, evolving ontologies can be incrementally updated
to reflect changes in real-world contexts, while preserving semantic coherence across versions and
enabling interoperability among heterogeneous systems. Within this context, the Synchronisation
Service acts as an orchestrator that updates the knowledge base and ensures the consistency of the
evolving knowledge base by leveraging automated reasoners. This synergy between EDA systems and
evolving ontologies enables precise, traceable, and semantically grounded simulations of smart city
states and their evolution, allowing the system to respond flexibly to dynamic and even unpredictable
scenarios. For these reasons, the knowledge base is shaped as described below.</p>
      <p>Agents, actions, and events for smart cities. To simulate events in smart cities, it is first necessary
to have ontological tools for describing agents, particularly those within the Internet of Things (IoT)
I
P
A
B
K</p>
      <p>modeled by
encodes to Gtn
encodes to Gt1
..o.ntologies</p>
      <p>modeled by</p>
      <sec id="sec-3-1">
        <title>Graph DB</title>
      </sec>
      <sec id="sec-3-2">
        <title>Graph DBMS</title>
        <sec id="sec-3-2-1">
          <title>KKnOnOCCSS-K-KBB</title>
          <p>Module 1</p>
          <p>...</p>
          <p>Module k
enables
enables
K
D
S
SgimeneCraoterse
generates Estn
...</p>
        </sec>
        <sec id="sec-3-2-2">
          <title>KnOCS-DE</title>
        </sec>
        <sec id="sec-3-2-3">
          <title>Knowledge Oriented City Simulator (KnoCS)</title>
          <p>domain, and their actions. For this purpose, we adopt OASIS 2 [35, 36], a foundational OWL 2 ontology
based on the behaviouristic approach inspired by the Theory of Agents and its associated mentalistic
notions. OASIS 2 efectively characterizes agents in terms of their capabilities.</p>
          <p>Inspired by the Tropos methodology [37] which is devised from Agent Oriented Programming (AOP),
OASIS 2 represents agents through three essential and publicly shared mental states, namely (expected)
behaviours, goals and tasks. Behaviours represent the mental state of the agent associated with its
ability to modify its environment or, in general, act or do something. Goals describe mental attitudes
representing preferred progressions of a particular system that the agent has chosen to put efort into
bringing about [38]. Tasks depict how to carry on such progressions and describe atomic operations
that agents perform. Agents and their interactions are represented by carrying out three main steps,
namely: (a) an optional step that consists of modelling descriptions of general abstract behaviours, called
templates, conceptual characterization of behaviours from which concrete agent behaviours are drawn;
(b) modelling concrete agent behaviours, possibly drawn by agent templates; (c) modelling actions and
associating them with the corresponding behaviours. The first step, not mandatory, consists in defining
the agent’s behaviour template, namely a higher-level description of the behaviour of abstract agents
that can be leveraged to define concrete behaviours of real agents; for example, a template is designed
to describe the abstract behaviour consisting in activating a signal. Additionally, templates are useful to
guide developers in the definition of the behaviours of their specific agents. The second step consists of
representing concrete agent behaviours either by relying on a template or by defining it from scratch.
Concrete behaviours are modelled analogously to those of templates, where the models of outstanding
features are replaced with actual characteristics. Behaviours drawn by shared templates are associated
with them in order to depict the behaviour inheritance relationship.</p>
          <p>As stated above, the description of agents comprises three main elements, namely behaviour, goal,
and task. Agent tasks, in their turn, describe atomic operations that agents perform, including possibly
input and output parameters required to accomplish them. Those elements in OASIS 2 are introduced
by way of the following OWL classes:
• Agent. This class comprises all the individuals representing agents. Instances of such a class are
connected with one or more instances of the class Behaviour using the OWL object-property
• Behaviour. Behaviours can be seen as collectors comprising all the goals that an agent may achieve.</p>
          <p>Instances of Behaviour are connected with one or more instances of the class GoalDescription by
means of the object-property consistsOfGoalDescription.
• GoalDescription. Goals represent containers embedding all the tasks that the agent can achieve.</p>
          <p>Instances of GoalDescription comprised by a behaviour may also satisfy dependency relationships
introduced by the object-property dependsOn. Goals are connected with the tasks that form
them and are represented by instances of the class TaskDescription through the object-property
consistsOf TaskDescription.
• TaskDescription. This class describes atomic operations that agents perform. Atomic operations
are the simplest actions that agents are able to execute and, hence, they represent what agents
can do within their environment. Atomic operations may depend on other atomic operations
when the object-property dependsOn is specified. Atomic operations whose dependencies are not
explicitly expressed are intended to be performed in any order.</p>
          <p>In the last step, actions performed by agents are described as direct consequences of some behaviours
and are associated with the behaviours of the agent that performed them. To describe such an association,
OASIS 2 introduces plan executions. Plan executions describe the actions performed by an agent,
associating them with one of its behaviours. Associations are carried out by connecting the description
of the performed action to the behaviour from which the action has been drawn: actions are hence
described by suitable graphs that retrace the model of the agent’s behaviour.</p>
          <p>OASIS 2 enables agents to declare the activities they can perform, the information required to execute
them, and the expected outputs – thus formally specifying their behaviours. Technical details are
abstracted away, allowing agents to automatically discover each other without needing to know how
the underlying system architecture or the technologies involved. As a result, agent commitments are
clearly described, and the evolution of the environment can be unambiguously represented, queried, and
accessed. OASIS 2 has already been successfully applied in other domains, including blockchains [39],
and is leveraged in KnOCS to answer the 4W1H of IoT context: What, When, Who, Where, and How [40].</p>
          <p>Recently, OASIS 2 has been extended to support the general specifications of processes and procedures
executed by agents [35], drawing inspiration from the concept of Abstract State Machines [41]. Although
the literature provides many modeling approaches to events [42], this extension introduces notions of
events and agent roles, particularly suitable for modeling complex scenarios such as those involving
smart cities and aligned with OMNeT++, where events correspond to messages sent from one agent
to another. In KnOCS, event dependencies modeled through this extended version of OASIS 2 are
used to generate cascade events associated with smart city activities. These activities are performed by
agents and their related actuators, both of which are described according to the behaviouristic approach
adopted by OASIS 2. The modeled actions may include protocols and algorithms that are subject to
simulation.</p>
          <p>Concerning the ontologies for representing IoT stakeholders, in particular in the context of smart
cities, KnOCS requires a vocabulary capable of describing all relevant entities, subjects, objects, and
assets. As an initial test-bench, KnOCS adopts an agent-oriented extension of TrafCsOnto [18] to
simulate trafic within smart cities.</p>
          <p>Evolving ontologies. Evolving ontologies are designed to remain up to date as the domains they
represent evolve over time. Despite the growing importance of adaptive ontologies, the research
community has not yet reached a consensus on how to standardize processes or design patterns for
implementing them [43]. A recent proposal by Pietranik and Kozierkiewicz [44] introduces a framework
for ontology evolution and alignment maintenance that preserves the validity of ontology alignments
by analysing only the changes introduced to the maintained ontologies. Another notable approach [45]
focuses on deriving expressive and invertible diferential evolution mappings between diferent versions
of the ontology to support controlled evolution. This mechanism efectively enables ontologies to
maintain a dynamic record of the state transitions triggered by events.</p>
          <p>The adopted approach to simulating smart cities treats ontologies as active components for tracking
the evolving state of the city. This is realized through the Synchronisation Service (implemented in
Python) that orchestrates interactions both among and within the ontological models in the knowledge
base. The service treats the ontologies as mutable data stores, continuously querying the current state
and applying updates to reflect changes as the simulation progresses from interval  to interval +1.
These updates specifically target the A-Box, modifying instance-level data by updating class, object, and
data property assertions involving individuals that represent city elements. Conversely, the T-Box – that
is, the classes and properties characterizing the smart city domain – remain mostly stable throughout
state transitions.</p>
          <p>From [46], an evolving ontology is defined as a sequence of ontology states arranged along a timeline,
namely, a specific version of an ontology at a given point in time, including its explicit axioms and any
entailed (inferred) knowledge that can be computed from that version using a reasoner. Let  denote
the set of all possible ontology states. An evolving ontology ℰ is defined as ℰ = ⟨0, 1, 2, . . . , ⟩,
where  denotes the ontology state at time , with 0 representing the initial state. Each state is obtained
by applying a modification operation  to the previous state, that is +1 = (). A modification
operation  is defined as a composition of fundamental changes, such as adding or removing a class
assertion, an object-property assertion, or a data-property assertion.</p>
          <p>An evolving ontology is constructed by way of the following steps:
• Pre-Change State (). The process begins by loading the current, stable version of the ontology
 at time  into the memory. This condition serves as a crucial reference point for identifying
subsequent variations.
• Transaction Execution. The activity that triggers the alteration occurs on a temporary version
of the ontology. This transaction implements a collection of logical modifications, resulting in a
temporary condition in memory.
• Delta Calculation (∆ ). Once the transaction is finished, a comparison is carried out between
the state after the change (+1) and the state before the change (). This process isolates the
set of added RDF triples (∆+ ) and those that were removed (∆ − ). Formally, ∆ = (∆+ , ∆ − ),
where ∆+ = +1  and ∆ − =  +1. This fundamental delta accurately captures the precise
meaning of the change that took place.
• Logging and Archiving. The calculated delta (∆ ) is converted into a standard format and stored
permanently. At the same time, a metadata entry is created in an evolution log, linking the delta
to a timestamp, a semantic description of the operation, and references to the physical delta files.</p>
          <p>This log serves as a verifiable record of the ontologies.
• Consolidation of the New State (+1). The new state (+1) is only finalized after the delta
has been successfully logged, replacing the earlier version () and establishing the new stable
baseline for upcoming transactions.</p>
          <p>This method not only guarantees that changes are preserved but also ofers complete traceability
and the option to carry out rollback processes by sequentially applying reserved deltas or retrieving
earlier ontology versions.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. A use case on V2I communication</title>
      <p>We present a simple use case in Vehicle-to-Infrastructure (V2I) use case to illustrate how a simulation in
KnOCS operates. For simplicity, we consider two agents: a vehicle  and a smart trafic light ℓ. As the
vehicle approaches ℓ, the trafic light issues a stop signal to indicate that it has turned red. Due to a
malfunction, however, the vehicle ignores the signal and continues its trajectory.</p>
      <p>We assume that, in the simulation, each vehicle movement results in an update of its GPS coordinates.
Additionally, suitable OASIS behaviours modeling the capabilities of both vehicles and trafic lights,
along with the corresponding event models, are encoded in the knowledge base’s T-Box. We can
summarize these behaviours as follows:
1. move(, +1): models the capability of a vehicle  to move from a point  to a point +1;
2. send_message(, , ): models the capability of any agent  to send a message  to an agent ;
3. activate_signal(): models the capability of a trafic light ℓ to set its signal to a colour .</p>
      <p>The SimCore module retrieves such information from the T-Box to instruct the OMNeT++ module on
how to schedule the events. For such purpose, the module leverages user-defined presets that regulate
the event generation. In our example, the vehicle can randomly ignore the stop signal to emulate a
communication error or a malfunction of the vehicle brakes. Then, the OMNeT++ scheduler progresses
through four intervals 1–4, during which the following events are triggered in order:
1. vehicle_move(, 0): triggered by the move behaviour; at time 1, the vehicle moves to GPS point
0, which lies within the area monitored by the trafic light ℓ.
2. set_signal(ℓ, red): triggered by the send_message behaviour; at time 2, the trafic light ℓ sets its
signal to red. We assume that at time 0 a set_signal(ℓ, yellow) event has already been triggered
to change the state of the light from green to yellow.
3. c_send(ℓ, , ): triggered by the send_message behavior; at time 3, the trafic light ℓ sends the
message  to vehicle , indicating that the light is currently red.
4. vehicle_move(, 1): triggered by the move behavior; at time 4, the vehicle moves to the GPS
point 1, which is located beyond the trafic light ℓ.</p>
      <p>Figure 2 illustrates the ontology states 0, . . . , 4 generated by the synchronization servicee at times
0, . . . , 4, respectively,with the relevant assertions from each state explicitly shown. For conciseness,
the OWL assertions are presented using a notation analogous to OMNeT++ constructs. The simulation
ends after processing the final state.</p>
      <p>oo
y
log te set_signal(ℓ, yellow)
ton taS
O</p>
      <p>o1
set_signal(ℓ, yellow)
vehicle_move(v, po)</p>
      <p>o2
set_signal(ℓ, red)
vehicle_move(v, po)</p>
      <p>o3
set_signal(ℓ, red)
vehicle_move(v, po)</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusions</title>
      <p>In this contribution, we presented the Knowledge Oriented City Simulator, an ongoing project at the
University of Catania aimed at establishing a framework for smart city simulators grounded in semantic
knowledge bases. At its current stage, the development team is focusing on the core of KnOCS and on
the integration of the modules described in the present contribution.</p>
      <p>The next steps include a) the full development of the KB-API and of the SDK, which will enable
semantic querying, reasoning, and ontology-based data manipulation; b) the implementation of a USER
API, designed to support user-level interactions with the simulation environment; c) the introduction
of the first real-world case study, focusing on trafic management. This will serve as the foundation
for the first publicly accessible version of the simulator; d) the design of a visual dashboard for
realtime visualisation and interaction with simulated city events; e) the integration of interactions among
heterogeneous entities such as vehicles, pedestrians, and infrastructure components; and f) the gradual
inclusion of additional complex event categories, such as intra-vehicle and extra-vehicle communications,
environmental monitoring, and emergency response scenarios. Finally, we plan to replace OMNeT++
with a purpose-built DES specifically tailored to leverage the semantics of the underlying ontological
knowledge bases. These steps are part of a broader efort to establish KnOCS as a flexible, extensible,
and semantically grounded platform capable of supporting realistic and comprehensive simulations of
smart city dynamics.</p>
    </sec>
    <sec id="sec-6">
      <title>Declaration on Generative AI</title>
      <p>During the preparation of this work, the authors used ChatGPT in order to Grammar and spelling check,
Paraphrase and reword. After using this tool, the authors reviewed and edited the content as needed and take full
responsibility for the publication’s content.
Journal on Semantic Web and Information Systems 18 (2022) 1–22. doi:10.4018/IJSWIS.300820.
[28] Languages, Countries, and Codes (LCC) Specification Version 1.2, Technical Report, Object
Management Group (OMG), 2021. URL: https://www.omg.org/spec/LCC/1.2/About-LCC/.
[29] M. Behrisch, L. Bieker, J. Erdmann, D. Krajzewicz, SUMO – simulation of urban mobility: An
overview, in: Proceedings of the Third International Conference on Advances in System Simulation
(SIMUL), 2011, pp. 63–68. DOI: 10.5281/zenodo.13907886.
[30] Y. Zhang, et al., Cityflower: An eficient and realistic trafic simulator with embedded machine
learning models, 2024. URL: https://arxiv.org/abs/2402.06127. arXiv:2402.06127.
[31] A. Horni, K. Nagel, K. W. Axhausen (Eds.), The Multi-Agent Transport Simulation MATSim,</p>
      <p>Ubiquity Press, 2016. doi:10.5334/baw.
[32] A. Varga, R. Hornig, An overview of the OMNeT++ simulation environment, in: Proceedings
of the 1st International Conference on Simulation Tools and Techniques for Communications,
Networks and Systems &amp; Workshops (SIMUTools), ICST, 2008, pp. 1–10. doi:10.4108/ICST.</p>
      <p>SIMUTOOLS2008.3027.
[33] IoTIFY Team, IoTIFY Documentation, 2024. URL: https://docs.iotify.io/, online documentation.
[34] O. Erling, Virtuoso universal server: A platform for linked data and semantic web applications,
2019. URL: https://virtuoso.openlinksw.com/, accessed: 2025-05-21.
[35] G. Bella, G. Castiglione, D. F. Santamaria, A behaviouristic approach to representing processes
and procedures in the oasis 2 ontology, in: Proceedings of the Joint Ontology Workshops 2023,
Episode IX: The Quebec Summer of Ontology, co-located with the 13th International Conference
on Formal Ontology in Information Systems (FOIS 2023), Sherbrooke, Québec, Canada, July 19–20,
2023, volume 3637, CEUR Workshop Proceedings, 2023.
[36] G. Bella, D. Cantone, C. F. Longo, M. Nicolosi-Asmundo, D. F. Santamaria, The Ontology for
Agents, Systems and Integration of Services: OASIS version 2, Intelligenza Artificiale, Vol. 17, no 1
(2023) 51–62.
[37] P. Bresciani, A. Perini, P. Giorgini, F. Giunchiglia, J. Mylopoulos, Tropos: An agent-oriented
software development methodology, in: Autonomous Agents Multi Agent Systems, volume 8:3,
2004, pp. 203–236.
[38] M. B. van Riemsdijk, M. Dastani, M. Winikof, Goals in agent systems: A unifying framework, in:
Proceedings of Autonomous Agents and Multi-Agent Systems (AAMAS), AAMAS 08, International
Foundation for Autonomous Agents and Multiagent Systems, 2008, pp. 713–720.
[39] G. Bella, D. Cantone, M. Nicolosi Asmundo, D. F. Santamaria, Towards a semantic blockchain: A
behaviouristic approach to modelling Ethereum, Applied Ontology 19 (2024) 143 – 180. doi:10.
3233/AO-230010.
[40] G. Bajaj, R. Agarwal, P. Singh, N. Georgantas, V. Issarny, 4W1H in IoT Semantics, IEEE Access 6
(2018) 65488–65506. doi:10.1109/ACCESS.2018.2878100.
[41] E. Börger, R. F. Stärk, Abstract State Machines. A Method for High-Level System Design and</p>
      <p>Analysis, Springer, 2003. URL: http://www.springer.com/computer/swe/book/978-3-540-00702-9.
[42] F. H. Rodrigues, M. Abel, What to consider about events: A survey on the ontology of occurrents,</p>
      <p>Applied Ontology 14 (2019) 387–422. doi:10.3233/AO-190217.
[43] F. Zablith, G. Antoniou, M. d’Aquin, G. Flouris, H. Kondylakis, E. Motta, D. Plexousakis, M. Sabou,
Ontology evolution: A process-centric survey, The Knowledge Engineering Review 30 (2015)
45–75. doi:10.1017/S0269888913000349.
[44] M. Pietranik, A. Kozierkiewicz, Methods of managing the evolution of ontologies and
their alignments, Applied Intelligence 53 (2023) 20382–20401. URL: https://doi.org/10.1007/
s10489-023-04545-0. doi:10.1007/s10489-023-04545-0.
[45] M. Hartung, A. Groß, E. Rahm, COnto-Dif: Generation of complex evolution mappings for life
science ontologies, Journal of Biomedical Informatics 46 (2013) 15–32.
[46] R. Pernisch, D. Dell’Aglio, A. Bernstein, Beware of the hierarchy – an analysis of ontology evolution
and the materialisation impact for biomedical ontologies, Journal of Web Semantics 70 (2021)
100658. doi:10.1016/j.websem.2021.100658.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M.</given-names>
            <surname>Ganzha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Paprzycki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Pawlowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Szmeja</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Wasielewska</surname>
          </string-name>
          ,
          <article-title>Semantic technologies for the IoT - An Inter-IoT perspective</article-title>
          , in: 2016 IEEE First International Conference on
          <article-title>Internet-of-Things Design and Implementation (IoTDI)</article-title>
          , IEEE, Berlin, Germany,
          <year>2016</year>
          , pp.
          <fpage>271</fpage>
          -
          <lpage>276</lpage>
          . doi:
          <volume>10</volume>
          .1109/ IoTDI.
          <year>2015</year>
          .
          <volume>22</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Haller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Janowicz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Cox</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. L.</given-names>
            <surname>Phuoc</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Taylor</surname>
          </string-name>
          , M. Lefrançois, Semantic Sensor Network Ontology, https://www.w3.org/TR/vocab-ssn/,
          <year>2017</year>
          . URL: https://www.w3.org/TR/vocab-ssn/,
          <source>w3C Recommendation, 19 October</source>
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Soldatos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Kefalakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Nechifor</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Serrano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hauswirth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lanza</surname>
          </string-name>
          , D. de Miguel,
          <article-title>OpenIoT: Open source Internet-of-Things in the cloud</article-title>
          , in: I. P. Žarko,
          <string-name>
            <given-names>K.</given-names>
            <surname>Pripužić</surname>
          </string-name>
          , M. Serrano (Eds.),
          <article-title>Interoperability and Open-Source Solutions for the Internet of Things</article-title>
          , volume
          <volume>9001</volume>
          of Lecture Notes in Computer Science, Springer, Cham,
          <year>2015</year>
          , pp.
          <fpage>13</fpage>
          -
          <lpage>25</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -16546-
          <issue>2</issue>
          _
          <fpage>3</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>L.</given-names>
            <surname>Daniele</surname>
          </string-name>
          , F. den
          <string-name>
            <surname>Hartog</surname>
          </string-name>
          , J. Roes,
          <article-title>Created in close interaction with the industry: The smart appliances reference (SAREF) ontology</article-title>
          , in: R. Cuel, R. Young (Eds.),
          <source>Formal Ontologies Meet Industry. FOMI</source>
          <year>2015</year>
          , volume
          <volume>225</volume>
          <source>of Lecture Notes in Business Information Processing</source>
          , Springer, Cham,
          <year>2015</year>
          , pp.
          <fpage>100</fpage>
          -
          <lpage>112</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -21545-
          <issue>7</issue>
          _
          <fpage>9</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>G.</given-names>
            <surname>Bajaj</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Agarwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Georgantas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Issarny</surname>
          </string-name>
          ,
          <article-title>A Study of Existing Ontologies in the IoT Domain</article-title>
          ,
          <source>Technical Report hal-01556256</source>
          , Inria,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Russomanno</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Kothari</surname>
          </string-name>
          , O. Thomas,
          <article-title>Sensor ontologies: from shallow to deep models</article-title>
          ,
          <source>in: Proceedings of the Thirty-Seventh Southeastern Symposium on System Theory</source>
          ,
          <year>2005</year>
          . SSST '05, IEEE, Tuskegee, AL, USA,
          <year>2005</year>
          , pp.
          <fpage>107</fpage>
          -
          <lpage>112</lpage>
          . doi:
          <volume>10</volume>
          .1109/SSST.
          <year>2005</year>
          .
          <volume>1460887</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>L.</given-names>
            <surname>Nachabe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Girod-Genet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. E.</given-names>
            <surname>Hassan</surname>
          </string-name>
          ,
          <article-title>Unified data model for wireless sensor network</article-title>
          ,
          <source>IEEE Sensors Journal</source>
          <volume>15</volume>
          (
          <year>2015</year>
          )
          <fpage>3657</fpage>
          -
          <lpage>3667</lpage>
          . doi:
          <volume>10</volume>
          .1109/JSEN.
          <year>2015</year>
          .
          <volume>2393951</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R.</given-names>
            <surname>Agarwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. G.</given-names>
            <surname>Fernandez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Elsaleh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gyrard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lanza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Sanchez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Georgantas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Issarny</surname>
          </string-name>
          ,
          <article-title>Unified IoT ontology to enable interoperability and federation of testbeds, in: 2016 IEEE 3rd World Forum on Internet of Things (WF-IoT)</article-title>
          , IEEE,
          <year>2016</year>
          , pp.
          <fpage>70</fpage>
          -
          <lpage>75</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Kazmi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Jan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zappa</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Serrano, Overcoming the heterogeneity in the Internet of Things for Smart Cities</article-title>
          , in: International workshop on interoperability and open-source solutions, Springer,
          <year>2016</year>
          , pp.
          <fpage>20</fpage>
          -
          <lpage>35</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S. N. A. U.</given-names>
            <surname>Nambi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sarkar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. V.</given-names>
            <surname>Prasad</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rahim</surname>
          </string-name>
          ,
          <article-title>A unified semantic knowledge base for IoT,</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>