<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CSSE</journal-id>
<journal-id journal-id-type="nlm-ta">CSSE</journal-id>
<journal-id journal-id-type="publisher-id">CSSE</journal-id>
<journal-title-group>
<journal-title>Computer Systems Science &#x0026; Engineering</journal-title>
</journal-title-group><issn pub-type="ppub">0267-6192</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">14376</article-id>
<article-id pub-id-type="doi">10.32604/csse.2021.014376</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>A Model Transformation Approach for Detecting Distancing Violations in Weighted Graphs</article-title><alt-title alt-title-type="left-running-head">A Model Transformation Approach for Detecting Distancing Violations in Weighted Graphs</alt-title><alt-title alt-title-type="right-running-head">A Model Transformation Approach for Detecting Distancing Violations in Weighted Graphs</alt-title>
</title-group>
<contrib-group content-type="authors">
<contrib id="author-1" contrib-type="author" corresp="yes">
<name name-style="western">
<surname>Subahi</surname>
<given-names>Ahmad F.</given-names>
</name>
<email>AFSubahi@uqu.edu.sa</email>
</contrib><aff><institution>Department of Computer Science, University College of Al Jamoum, Umm Al Qura University</institution>, <addr-line>Makkah, 21421</addr-line>, <country>Saudi Arabia</country></aff>
</contrib-group><author-notes><corresp id="cor1">&#x002A;Corresponding Author: Ahmad F. Subahi. <email>Email: AFSubahi@uqu.edu.sa</email></corresp></author-notes>
<pub-date pub-type="epub" date-type="pub" iso-8601-date="2020-12-17">
<day>17</day>
<month>12</month>
<year>2020</year>
</pub-date>
<volume>36</volume>
<issue>1</issue>
<fpage>13</fpage>
<lpage>39</lpage>
<history>
<date date-type="received">
<day>17</day>
<month>9</month>
<year>2020</year>
</date>
<date date-type="accepted">
<day>24</day>
<month>10</month>
<year>2020</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2020 Subahi</copyright-statement>
<copyright-year>2020</copyright-year>
<copyright-holder>Subahi</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CSSE_14376.pdf"></self-uri>
<abstract>
<p>This work presents the design of an Internet of Things (IoT) edge-based system based on model transformation and complete weighted graph to detect violations of social distancing measures in indoor public places. A wireless sensor network based on Bluetooth Low Energy is introduced as the infrastructure of the proposed design. A hybrid model transformation strategy for generating a graph database to represent groups of people is presented as a core middleware layer of the detecting system&#x2019;s proposed architectural design. A Neo4j graph database is used as a target implementation generated from the proposed transformational system to store all captured real-time IoT data about the distances between individuals in an indoor area and answer user predefined queries, expressed using Neo4j Cypher, to provide insights from the stored data for decision support. As proof of concept, a discrete-time simulation model was adopted for the design of a COVID-19 physical distancing measures case study to evaluate the introduced system architecture. Twenty-one weighted graphs were generated randomly and the degrees of violation of distancing measures were inspected. The experimental results demonstrate the capability of the proposed system design to detect violations of COVID-19 physical distancing measures within an enclosed area.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Model-driven engineering (MDE)</kwd>
<kwd>Internet-of-Things (IoTs)</kwd>
<kwd>model transformation</kwd>
<kwd>edge computing</kwd>
<kwd>system design</kwd>
<kwd>Neo4j graph databases</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>Indoor tracking and monitoring systems have witnessed increased interest recently because of potential technological advancements in the domain of the Internet of Things (IoT), wireless networks, and pervasive computing. As a result of the current trend of artificial intelligence (AI) and computer vision, different localization, positioning, and tracking techniques and mechanisms have been introduced, providing indoor localization services to users. From a data engineering perspective, AI and machine learning systems that deal with a massive amount of data, or &#x201C;big data&#x201D;, require appropriate architecture for a data pipeline system design to collect, clean, transform, and route the source data, which are captured from multiple resources, to the backend data storage of the system [<xref ref-type="bibr" rid="ref-1">1</xref>,<xref ref-type="bibr" rid="ref-2">2</xref>]. The data pipeline can be designed in the form of layered architecture consisting of an ingestion layer and transformation layers. In the context of this work, data are collected from various IoT devices and represented in an initial format at the ingestion layer. Then, a number of transformations, including filtering, aggregation, and enriching steps, are applied to the source data forming the final format of the target storage (relational-based, document-based, or graph-based data) [<xref ref-type="bibr" rid="ref-1">1</xref>,<xref ref-type="bibr" rid="ref-2">2</xref>]. These stored data are retrieved using several predefined queries that report results to users.</p>
<p>Model-driven engineering (MDE) is a software development methodology that considers&#x2014;rather than general purpose codes&#x2014;the use of models constructed using appropriate modelling languages to develop software systems. Model transformation mechanisms and code generators are two key principles or components in the MDE software system&#x2019;s development lifecycle. Model transformation plays important roles in database reengineering, including data migration, schema construction, and normalization [<xref ref-type="bibr" rid="ref-3">3</xref>,<xref ref-type="bibr" rid="ref-4">4</xref>].</p>
<p>This study considers a model transformation approach, which is an aspect of the overall proposed system design, to generate the executable graph data model and related queries from the sensor-based data captured in the real-world situation. This research adopts MDE principles to introduce a lightweight model transformational approach that detects the degree of violation of social distancing measures based on personal space in groups. The mathematical foundation of the presented system is a complete weighted graph model of a restricted network size consisting of groups of individuals who represent a real-world crowd in an indoor scenario.</p>
<p>The system design supports capturing the status of individuals in a group according to determined distancing measures. The system analyzes the distances between group individuals and decides the degree to which the social distancing measure is being violated in a covered place. When a violation is detected, the system sends a message to the authorized person of the area to take the appropriate corresponding action when required. Because various applications of graph theory exist in the domain of crowd control systems (e.g., [<xref ref-type="bibr" rid="ref-5">5</xref>&#x2013;<xref ref-type="bibr" rid="ref-9">9</xref>], a wireless sensor network (WSN) technology based on Bluetooth Low Energy (BLE) was considered the design choice for the infrastructure of the proposed system design. BLE provides an efficient method of transferring data in a WSN using low energy, which helps mobile Bluetooth beacons produce data for extremely long durations.</p>
<p>Additionally, as a result of ongoing global spread and the absence of a known treatment, the cumulative total of confirmed cases of coronavirus (COVID-19) reached 6 million by June 2020. Consequently, various Internet of Things (IoT)&#x2013;based initiatives have been introduced using energy efficient communication technologies and smart devices to automate physical distancing detection, tracking, and monitoring [<xref ref-type="bibr" rid="ref-4">4</xref>,<xref ref-type="bibr" rid="ref-10">10</xref>]. Hence, a case study on detecting violations of the COVID-19 physical distancing measures was designed as proof of concept to evaluate the introduced system architecture.</p>
<p>The reminder this paper is organized as follows. Section 2 briefly highlights the techniques and technologies related to current trends that might be considered when designing an automated solution for detecting the implementation of physical distancing measures based on IoT and wireless networks. Section 3 theoretically presents a weighted graph-based model for detecting violation of social distancing measures, including the model&#x2019;s mathematical foundation and implementation. Section 4 discusses our vision of the architecture of the system&#x2019;s major components based on MDE model transformation, the IoT, and edge computing. Section 5 highlights the adopted strategy of the model-to-code transformation approach as a middleware layer of the proposed data pipeline architecture. Section 6 evaluates the proposed system design using a case study and a basic discrete-time simulation, based on real-world actions taken by international retail supermarkets in selected countries. Finally, Section 7 concludes our proposed work.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Techniques and Technologies</title>
<p>This section briefly highlights the domains related to the implementation of COVID-19 social distancing measures using the theories and applications of computer science from five main perspectives: Application domains, device/sensor technologies, communication technologies, overall system architectures, and background theories or algorithms.</p>
<p>To explore the internet technology (IT) and computer-based approaches and systems most relevant to the automatic implementation of COVID-19 distancing measures, a literature survey was conducted using different research databases available in the following globally recognized academic collections: Scopus and ISI Web of Science, Institute of Electrical and Electronics Engineers (IEEE Xplore), Association for Computing Machinery (ACM) Digital Library, Multidisciplinary Digital Publishing Institute (MDPI), ScienceDirect, and Springer. Technical terms, including wireless sensor network (WSN), Internet of Things (IoT), wireless fidelity (Wi-Fi), ultrawideband (UWB), radio frequency identification device (RFID), Bluetooth Low Energy (BLE), indoor tracking, positioning localization, monitoring, and crowd control were utilized as search strings. <xref ref-type="table" rid="table-1">Tab. 1</xref> provides a summary of the research articles reviewed.</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>A summary of research articles reviewed in the literature</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Ref.</th>
<th>Device/Sensor</th>
<th>Application domain</th>
<th>Communication technology</th>
</tr>
</thead>
<tbody>
<tr>
<td>[<xref ref-type="bibr" rid="ref-11">11</xref>]</td>
<td>Camera</td>
<td>Vehicle tracking</td>
<td>Industrial,<break/>scientific &#x0026; medical (ISM)&#x2013;band</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-12">12</xref>]</td>
<td>Healthcare devices</td>
<td>Monitoring of patient vital signs</td>
<td>Peer-to-peer network</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-13">13</xref>]</td>
<td>Tag</td>
<td>Elderly people monitoring</td>
<td>UWB and BLE</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-14">14</xref>]</td>
<td>Wearable camera &#x002B; headset</td>
<td>Museum audio guide</td>
<td>Vision WSN</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-15">15</xref>]</td>
<td>Wearable device</td>
<td>Indoor localization and motion analysis</td>
<td>UWB</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-16">16</xref>]</td>
<td>COTS RFID Devices (Tags)</td>
<td>Indoor localization system</td>
<td>RFID</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-17">17</xref>]</td>
<td>User device</td>
<td>Indoor location-based control system</td>
<td>BLE</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-18">18</xref>]</td>
<td>BLE sensors</td>
<td>Indoor localization and tracking system</td>
<td>BLE</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-19">19</xref>]</td>
<td>Smart watch</td>
<td>Indoor positioning system</td>
<td>Wi-Fi fingerprinting</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-20">20</xref>]</td>
<td>Smartphones</td>
<td>Traffic monitoring</td>
<td>Bluetooth beacons</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-21">21</xref>]</td>
<td>ECG sensor and smartphones</td>
<td>Monitoring system</td>
<td>BLE</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-22">22</xref>]</td>
<td>Active RFID tags</td>
<td>Indoor locating system</td>
<td>RFID</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-23">23</xref>]</td>
<td>Wearable tag</td>
<td>3-D indoor localization</td>
<td>RFID</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-24">24</xref>]</td>
<td>Passive tag</td>
<td>Indoor localization</td>
<td>RFID</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-5">5</xref>]</td>
<td>UHF RFID tags</td>
<td>Indoor tracking</td>
<td>RFID</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-25">25</xref>]</td>
<td>Smartphones</td>
<td>Indoor localization</td>
<td>Beacons BLE &#x002B; Wi-Fi</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-26">26</xref>]</td>
<td>Smartphones</td>
<td>Indoor positioning at smart museum</td>
<td>Beacons BLE</td>
</tr>
<tr>
<td>[<xref ref-type="bibr" rid="ref-27">27</xref>]</td>
<td>Bracelets</td>
<td>Crowd monitoring and control</td>
<td>Beacons BLE</td>
</tr>
</tbody>
</table>
</table-wrap>
<sec id="s2_1">
<label>2.1</label>
<title>Application Domains</title>
<p>Indoor tracking, positioning, localization, and monitoring systems can be described as a collection of networked devices used for locating or tracking objects. This includes people inside buildings, train stations, airports, underground garages, and other locations sharing aspects of systems to detect violation of distancing measures. These systems are related to this study&#x2019;s design aim.</p>
<p>Different types of indoor localization applications exist that utilize various sensor and communication technologies. For example, according to Jamil et al. [<xref ref-type="bibr" rid="ref-12">12</xref>], in the domain of e-health a localization system for monitoring elderly people was introduced. Two kinds of communication technologies (UWB and BLE) were used with two algorithms, hybrid localization and a TDOA-based algorithm (time difference of arrival), to enable the evaluation of elderly behaviors, monitoring of health status and wellbeing, and detection of emergency situations. Further, an economical design of wearable devices for indoor localization and motion analysis using data fusion algorithms is presented in zhang et al. [<xref ref-type="bibr" rid="ref-15">15</xref>] as another example. An interesting integration between an inertial measurement unit and UWB localization was introduced using a Mahony filter and quaternions as a solution that achieved high-accuracy, signal stability, and motion tracking capability.</p>
<p>Technologies and techniques related to outdoor monitoring and tracking approaches were omitted from the review conducted for this study. These approaches are considered more complex than required for the current study&#x2019;s aim and normally involve more than one communication interface attached to the utilized IoT devices to cover both short- and long-range communication [<xref ref-type="bibr" rid="ref-11">11</xref>,<xref ref-type="bibr" rid="ref-18">18</xref>,<xref ref-type="bibr" rid="ref-20">20</xref>]. At this stage of development, introducing a detection system of distancing measures with wide coverage capability for highly movable objects is not part of our aim.</p>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Sensors and Communication Technologies in the Related Approaches</title>
<p>During the review, we found four main alternative technologies were used when designing wearable devices for indoor localization systems, namely, RFID, BLE and UWB, smart devices [<xref ref-type="bibr" rid="ref-19">19</xref>&#x2013;<xref ref-type="bibr" rid="ref-21">21</xref>,<xref ref-type="bibr" rid="ref-24">24</xref>&#x2013;<xref ref-type="bibr" rid="ref-26">26</xref>], and visual detection cameras. These alternatives strongly relate to the kinds of communication technologies used in the systems. As the basis of these technologies, a WSN was found a suitable communication technology adopted in the systems reviewed in this work. According to Nikodem et al. [<xref ref-type="bibr" rid="ref-11">11</xref>], for instance, detection cameras for monitoring road traffic and detecting and classifying vehicles were utilized and connected to a WSN. These cameras were installed on the sides of roads to track and monitor vehicles. In another study, wearable devices equipped with cameras and headsets and connected via a low-power Wi-Fi module could recognize paintings in a museum from the image captured by the camera using computer vision techniques and transfer the captured data to audio [<xref ref-type="bibr" rid="ref-14">14</xref>].</p>
<p>In addition, accuracy and energy consumption are critical factors that must be considered when designing wearable IoT devices and selecting their intercommunication technology. BLE is used to address energy consumption issues in many IoT applications [<xref ref-type="bibr" rid="ref-13">13</xref>,<xref ref-type="bibr" rid="ref-17">17</xref>,<xref ref-type="bibr" rid="ref-18">18</xref>,<xref ref-type="bibr" rid="ref-22">22</xref>]. However, UWB technology provides a high accuracy WSN for IoT systems [<xref ref-type="bibr" rid="ref-14">14</xref>,<xref ref-type="bibr" rid="ref-15">15</xref>]. In Kolakowski et al. [<xref ref-type="bibr" rid="ref-13">13</xref>], for instance, a balance between these two factors was discussed for the proposed system. UWB- and BLE-enabled devices were utilized in the proposed radio positioning system. UWB consumed higher energy during packet transmission than did BLE, although BLE provided more accurate detection results. A hybrid algorithm that offers the benefits of both technologies was designed and used for object detection and tracking [<xref ref-type="bibr" rid="ref-13">13</xref>].</p>
<p>In addition, a real-time intelligent crowd engineering analytical approach using mobility characterization and energy-efficient BLE to enhance mobility characterization and signal analysis (ICE-MoCha) was proposed in Jabbari et al. [<xref ref-type="bibr" rid="ref-27">27</xref>]. Crowd individuals wear the BLE tracker bracelets to manage the power consumption on the bracelet. Each tracker bracelet has a unique identification code for identifying each pedestrian in the crowd. The communication system of ICE-MoCha supports various messaging techniques for sending and receiving messages or probes from or to the tracker bracelets based on type: active or passive. Generally, the approach works to translate the BLE beacon signals from various transmitters into group semantics for tracking the status of the crowd and predicting potential accidents using a smart video surveillance technology.</p>
<p>Further, RFID-based wearable devices were utilized in several IoT indoor localization systems [<xref ref-type="bibr" rid="ref-5">5</xref>,<xref ref-type="bibr" rid="ref-16">16</xref>,<xref ref-type="bibr" rid="ref-22">22</xref>,<xref ref-type="bibr" rid="ref-23">23</xref>]. RFID technology can transmit wearable device IDs and data captured by the attached sensor to an RFID reader over a range of about 100&#x2013;200 m with low power consumption because it works on radio frequency signals [<xref ref-type="bibr" rid="ref-25">25</xref>&#x2013;<xref ref-type="bibr" rid="ref-28">28</xref>]. The RFID-based devices are normally attached by RFID tags. Each tag consists mainly of two major components: an electronic chip for storing data corresponding to the individual object attached to it and an electronic antenna for transmitting sensed data to the associated readers [<xref ref-type="bibr" rid="ref-29">29</xref>].</p>
<p>For instance, the research discussed in Zhang et al. [<xref ref-type="bibr" rid="ref-22">22</xref>] introduced an active RFID-based indoor locating system that uses a frequency-hopping technique to reduce the noise of the captured RSSI fingerprinting data. Two kinds of low-cost tags, with a tag&#x2013;tag communication protocol, are utilized: virtual reference tags and object tags. The reference tags are distributed in the covered area to improve accuracy, whereas the object tags present RFID coordinates to RFID readers. Further, an RFID-based 3D indoor tracking system for eHealth was presented in Paolini et al. [<xref ref-type="bibr" rid="ref-23">23</xref>]. The study introduced a customized low-cost reader that is remotely controllable and supported by real-time 3D scanning features to detect the dynamic location of a patient within an indoor area. The algorithm developed retrieves the reader&#x2013;tag distance and its height. The approach demonstrated high accuracy detection in the tags&#x2019; height, with an error rate below 20 cm in all the simulation experiments conducted, in which the average error of 10 experiments performed was less than 18 cm for distances up to 4.50 m [<xref ref-type="bibr" rid="ref-23">23</xref>].</p>
<p>Various sensors and existing communication technologies for indoor tracking and positioning systems were reviewed and investigated based on four main factors: energy-saving capability, accuracy, costs, and coverage range. The following table (<xref ref-type="table" rid="table-2">Tab. 2</xref>) summarizes each technology considered in the review and its features regarding these four factors.</p>
<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>A comparison between selected communication technologies regarding four factors</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Technology</th>
<th>Energy saving</th>
<th>Accuracy</th>
<th>Cost</th>
<th>Range</th>
</tr>
</thead>
<tbody>
<tr>
<td>Radio frequency identification (RFID)</td>
<td>&#x2713;</td>
<td>&#x2713;</td>
<td>&#x2713;</td>
<td>Up to 1 m</td>
</tr>
<tr>
<td>Bluetooth Low Energy (BLE)</td>
<td>&#x2713;</td>
<td>Acceptable</td>
<td>&#x2713;</td>
<td>&#x2713;</td>
</tr>
<tr>
<td>Ultrawideband (UWB)</td>
<td>&#x2212;</td>
<td>&#x2713;</td>
<td>&#x2212;</td>
<td>&#x2713;</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s2_3">
<label>2.3</label>
<title>Related Graph-Based Approaches</title>
<p>Graph theory played a significant role in developing collective adaptive systems (CASs). CASs can be defined as complex systems with a massive number of heterogeneous entities that interact with each other without a central control to achieve an individual or shared goal. In [<xref ref-type="bibr" rid="ref-30">30</xref>], a model of pedestrian movement was introduced as a CAS using an expressive process calculus language (CARMA). The model is based on graph structure representing a network of pedestrian paths. Each individual entity, which represents a pedestrian, acts as a decision-making element when it produces probabilistic choices about the next movement in the future and how that affects other pedestrian movements. Pedestrians are expressed as graph nodes in the model, whereas the current paths of each pedestrian are expressed via graph edges and determined by the pedestrian’s current and next position.</p>
<p>In Allam et al. [<xref ref-type="bibr" rid="ref-5">5</xref>], the design of a wearable wireless sensor is presented to ensure crowd safety in high density situations. The device communicates with other devices in its sensing range to send simple warning and safety messages or status notifications across devices. This approach is based on the theory of graph density, in which each device in a crowd counts the number of surrounding devices and then calculates the density around it. Consequently, the previously determined threshold is examined to decide whether the device is in a safe situation. If not, an appropriate warning message is propagated to other devices within range, and guidance and instructions through messages are provided to prevent overcrowding and dangerous situations. The technique is based on an existing agent-based crowd simulation model called Multi-Agent Simulator of Neighborhoods (MASON), which is written in Java and used in 2D environment simulation tools.</p>
<p>Additionally, graph theory applications have a long history in the domain of crowd analysis, monitoring and control. In Matthias et al. [<xref ref-type="bibr" rid="ref-29">29</xref>], for instance, a graph-based framework for detecting and tracking pedestrians, dense crowds, and events is proposed using hidden Markov models. The framework requires a short sequence of images for effective pedestrian tracking and location of possible danger areas in a crowd. All results are implemented and demonstrated using a simulation model.</p>
<p>Further, in Angela et al. [<xref ref-type="bibr" rid="ref-7">7</xref>], a graph-based approach obtains indoor dense locations from tracking data using the semantic location. The dense location queries, processing, and indexing are performed using a proposed technique called the Dense Location Time Index, which combines the information of locations with time points. In another approach [<xref ref-type="bibr" rid="ref-8">8</xref>], a decision graph finds the cluster centers in the proposed pre-screening method. This method is presented to the density-based clustering algorithm to obtain possible shapes of the clusters and the internal density between each point in the graph [<xref ref-type="bibr" rid="ref-8">8</xref>].</p>
<p>Moreover, Xu et al. [<xref ref-type="bibr" rid="ref-9">9</xref>] introduces an approach for analyzing and recognizing crowd dynamics based on a static proximity graph. The proximity graph data structure represents crowd textures as graph vertices. Spatial closeness relationships between persons in the crowd are recognized in terms of their texture over time. The graph is supported by annotation extension attached to the vertices to add further semantics representing crowd context. Thereby, it provides a precise picture for the decision maker. Wearable devices on graph individuals collect information and are connected via a Bluetooth-based wireless communication technology and utilized as a network infrastructure.</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>The Mathematical Graph Model</title>
<p>Graphs are an appropriate data structure for managing and processing connected data. They enable tracing of interconnections between data entities to understand dependencies between them. In regard to the context of this work, tracing links among persons who spend time together as a group in public places, representing this in a graph data structure, and identifying possible clusters might provide deeper insights into the spread of the COVID-19 virus in the community.</p>
<p>Unlike the construction of direct simulations and predictions or video tracking systems, which are based on substantial processing of images and videos, and complex AI techniques for detecting abnormal events in crowds, the proposed graph-based mathematical model is defined here as a formal basis for all utilized concepts that are stored in the backend database. The proposed approach only requires information such as locations, distances, and other attributes associated with a group of people that are modelled using graph theory.</p>
<sec id="s3_1">
<label>3.1</label>
<title>Foundation of the Graph Model</title>
<p>In previous research, a substantial number of real-world problems are represented mathematically and formalized using either directed or undirected graph theory. The cyber security knowledge (directed) graph and route planning (directed) graph presented in Jia et al. [<xref ref-type="bibr" rid="ref-31">31</xref>] and [<xref ref-type="bibr" rid="ref-32">32</xref>], respectively, are examples of the variety of applications of graph theory. In this study, it is assumed that the direction of each individual is not vital information in the model. Thus, the (undirected) complete weighted graph model is considered a theoretical base of this work.</p>
<p>In this section, the notation of first-order predicate logic (FOPL), with extensions for equality (<inline-formula id="ieqn-1">
<alternatives><inline-graphic xlink:href="ieqn-1.png"/><tex-math id="tex-ieqn-1"><![CDATA[$=$]]></tex-math><mml:math id="mml-ieqn-1"><mml:mo>&#x003D;</mml:mo></mml:math>
</alternatives></inline-formula>), and membership (<inline-formula id="ieqn-2">
<alternatives><inline-graphic xlink:href="ieqn-2.png"/><tex-math id="tex-ieqn-2"><![CDATA[$\in$]]></tex-math><mml:math id="mml-ieqn-2"><mml:mo>&#x2208;</mml:mo></mml:math>
</alternatives></inline-formula>), is employed to express the mathematical foundation of the graph concepts used in the proposed system design. A syntactic sugar notation is used for a unary predicate to assign a type to a variable, for example, <inline-formula id="ieqn-3">
<alternatives><inline-graphic xlink:href="ieqn-3.png"/><tex-math id="tex-ieqn-3"><![CDATA[$Graph\left( g \right)$]]></tex-math><mml:math id="mml-ieqn-3"><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>p</mml:mi><mml:mi>h</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>g</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></inline-formula> is re-expressed as <inline-formula id="ieqn-4">
<alternatives><inline-graphic xlink:href="ieqn-4.png"/><tex-math id="tex-ieqn-4"><![CDATA[$g\!:\!Graph$]]></tex-math><mml:math id="mml-ieqn-4"><mml:mi>g</mml:mi><mml:mo>:</mml:mo><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>p</mml:mi><mml:mi>h</mml:mi></mml:math>
</alternatives></inline-formula>. Further, the notation (<inline-formula id="ieqn-5">
<alternatives><inline-graphic xlink:href="ieqn-5.png"/><tex-math id="tex-ieqn-5"><![CDATA[$,$]]></tex-math><mml:math id="mml-ieqn-5"><mml:mo>,</mml:mo></mml:math>
</alternatives></inline-formula>) is utilized to shorten and replace the logical <inline-formula id="ieqn-6">
<alternatives><inline-graphic xlink:href="ieqn-6.png"/><tex-math id="tex-ieqn-6"><![CDATA[$AND{\rm \; }\left( \wedge \right)$]]></tex-math><mml:math id="mml-ieqn-6"><mml:mi>A</mml:mi><mml:mi>N</mml:mi><mml:mi>D</mml:mi><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mo>&#x2227;</mml:mo><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></inline-formula> operator.</p>
<p>In the proposed FOPL formalization system, there are four basic types of variables, namely <inline-formula id="ieqn-7">
<alternatives><inline-graphic xlink:href="ieqn-7.png"/><tex-math id="tex-ieqn-7"><![CDATA[$Graph,{\rm \; }Vertex,{\rm \; }Edge,{\rm \; }Attribute,$]]></tex-math><mml:math id="mml-ieqn-7"><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>p</mml:mi><mml:mi>h</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>V</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>E</mml:mi><mml:mi>d</mml:mi><mml:mi>g</mml:mi><mml:mi>e</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>A</mml:mi><mml:mi>t</mml:mi><mml:mi>t</mml:mi><mml:mi>r</mml:mi><mml:mi>i</mml:mi><mml:mi>b</mml:mi><mml:mi>u</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>,</mml:mo></mml:math>
</alternatives></inline-formula> and <inline-formula id="ieqn-8">
<alternatives><inline-graphic xlink:href="ieqn-8.png"/><tex-math id="tex-ieqn-8"><![CDATA[$Value$]]></tex-math><mml:math id="mml-ieqn-8"><mml:mi>V</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>u</mml:mi><mml:mi>e</mml:mi></mml:math>
</alternatives></inline-formula>. Each variable is utilized to represent concepts of graph theory in the system. The following formal definition describes the notation of the computational graph model adopted in this work:</p>
<p><disp-formula id="eqn-1">
<label>(1)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-1.png"/><tex-math id="tex-eqn-1"><![CDATA[$$A\; Graph\; is\; a\; tuple\; G = \left( {V,\; E,\; P,\; w ,t} \right)$$]]></tex-math><mml:math id="mml-eqn-1" display="block"><mml:mi>A</mml:mi><mml:mspace width="thickmathspace"></mml:mspace><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>p</mml:mi><mml:mi>h</mml:mi><mml:mspace width="thickmathspace"></mml:mspace><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mspace width="thickmathspace"></mml:mspace><mml:mi>a</mml:mi><mml:mspace width="thickmathspace"></mml:mspace><mml:mi>t</mml:mi><mml:mi>u</mml:mi><mml:mi>p</mml:mi><mml:mi>l</mml:mi><mml:mi>e</mml:mi><mml:mspace width="thickmathspace"></mml:mspace><mml:mi>G</mml:mi><mml:mo>&#x003D;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>V</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace"></mml:mspace><mml:mi>E</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace"></mml:mspace><mml:mi>P</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace"></mml:mspace><mml:mrow><mml:mo>ð</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p><inline-formula id="ieqn-9">
<alternatives><inline-graphic xlink:href="ieqn-9.png"/><tex-math id="tex-ieqn-9"><![CDATA[${\rm V}$]]></tex-math><mml:math id="mml-ieqn-9"><mml:mrow><mml:mi mathvariant="normal">V</mml:mi></mml:mrow></mml:math>
</alternatives></inline-formula>:A finite set of all vertices in graph <inline-formula id="ieqn-10">
<alternatives><inline-graphic xlink:href="ieqn-10.png"/><tex-math id="tex-ieqn-10"><![CDATA[${\rm G}$]]></tex-math><mml:math id="mml-ieqn-10"><mml:mrow><mml:mi mathvariant="normal">G</mml:mi></mml:mrow></mml:math>
</alternatives></inline-formula>. Vertices correspond to individuals within a specific place who form a crowd. A vertex is expressed using the following formula:</p>
<p><disp-formula id="eqn-2">
<label>(2)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-2.png"/><tex-math id="tex-eqn-2"><![CDATA[$$\forall {\rm \; }v,u:Vertex \cdot \left( {v,u \in V} \right)$$]]></tex-math><mml:math id="mml-eqn-2" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi><mml:mo>:</mml:mo><mml:mi>V</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>V</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p><inline-formula id="ieqn-11">
<alternatives><inline-graphic xlink:href="ieqn-11.png"/><tex-math id="tex-ieqn-11"><![CDATA[$E$]]></tex-math><mml:math id="mml-ieqn-11"><mml:mi>E</mml:mi></mml:math>
</alternatives></inline-formula>:A finite set of all edges in graph <inline-formula id="ieqn-12">
<alternatives><inline-graphic xlink:href="ieqn-12.png"/><tex-math id="tex-ieqn-12"><![CDATA[$G$]]></tex-math><mml:math id="mml-ieqn-12"><mml:mi>G</mml:mi></mml:math>
</alternatives></inline-formula>. Edges are undirected and correspond to the actual distances between the graph vertices. This is expressed in the formula:</p>
<p><disp-formula id="eqn-3">
<label>(3)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-3.png"/><tex-math id="tex-eqn-3"><![CDATA[$$\forall {\rm \; }{e_1},{e_2}:Edge \cdot \left( {{e_1},{e_2} \in E} \right)$$]]></tex-math><mml:math id="mml-eqn-3" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow><mml:mo>:</mml:mo><mml:mi>E</mml:mi><mml:mi>d</mml:mi><mml:mi>g</mml:mi><mml:mi>e</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:mi>E</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p>The notation <inline-formula id="ieqn-13">
<alternatives><inline-graphic xlink:href="ieqn-13.png"/><tex-math id="tex-ieqn-13"><![CDATA[${e_{vu}}$]]></tex-math><mml:math id="mml-ieqn-13"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula> is used to represent an edge between two vertices <inline-formula id="ieqn-14">
<alternatives><inline-graphic xlink:href="ieqn-14.png"/><tex-math id="tex-ieqn-14"><![CDATA[$v$]]></tex-math><mml:math id="mml-ieqn-14"><mml:mi>v</mml:mi></mml:math>
</alternatives></inline-formula> and <inline-formula id="ieqn-15">
<alternatives><inline-graphic xlink:href="ieqn-15.png"/><tex-math id="tex-ieqn-15"><![CDATA[$u$]]></tex-math><mml:math id="mml-ieqn-15"><mml:mi>u</mml:mi></mml:math>
</alternatives></inline-formula>, where <inline-formula id="ieqn-16">
<alternatives><inline-graphic xlink:href="ieqn-16.png"/><tex-math id="tex-ieqn-16"><![CDATA[$v$]]></tex-math><mml:math id="mml-ieqn-16"><mml:mi>v</mml:mi></mml:math>
</alternatives></inline-formula> and <inline-formula id="ieqn-17">
<alternatives><inline-graphic xlink:href="ieqn-17.png"/><tex-math id="tex-ieqn-17"><![CDATA[$u$]]></tex-math><mml:math id="mml-ieqn-17"><mml:mi>u</mml:mi></mml:math>
</alternatives></inline-formula> are called the endpoints of <inline-formula id="ieqn-18">
<alternatives><inline-graphic xlink:href="ieqn-18.png"/><tex-math id="tex-ieqn-18"><![CDATA[${e_{vu}}$]]></tex-math><mml:math id="mml-ieqn-18"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula>.</p>
<p><inline-formula id="ieqn-19">
<alternatives><inline-graphic xlink:href="ieqn-19.png"/><tex-math id="tex-ieqn-19"><![CDATA[${P_v}$]]></tex-math><mml:math id="mml-ieqn-19"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi>v</mml:mi></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula>: A set of all attributes that belong to the value of a vertex <inline-formula id="ieqn-20">
<alternatives><inline-graphic xlink:href="ieqn-20.png"/><tex-math id="tex-ieqn-20"><![CDATA[$v$]]></tex-math><mml:math id="mml-ieqn-20"><mml:mi>v</mml:mi></mml:math>
</alternatives></inline-formula> expressed as a pair of keys. Similarly, some edges may also have attributes in the model. The notation <inline-formula id="ieqn-21">
<alternatives><inline-graphic xlink:href="ieqn-21.png"/><tex-math id="tex-ieqn-21"><![CDATA[${P_{{e_{vu}}}}$]]></tex-math><mml:math id="mml-ieqn-21"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula> is used to represent the set of all attributes of the edge <inline-formula id="ieqn-22">
<alternatives><inline-graphic xlink:href="ieqn-22.png"/><tex-math id="tex-ieqn-22"><![CDATA[${e_{vu}}$]]></tex-math><mml:math id="mml-ieqn-22"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula>. The pair of keys&#x2019; values is described by the following formula:</p>
<p><disp-formula id="eqn-4">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-4.png"/><tex-math id="tex-eqn-4"><![CDATA[$$\forall i,j \in \left\{ {1,2, \ldots ,n} \right\},i \ne j$$]]></tex-math><mml:math id="mml-eqn-4" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>&#x2260;</mml:mo><mml:mi>j</mml:mi></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-5">
<label>(4)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-5.png"/><tex-math id="tex-eqn-5"><![CDATA[$$\forall v:Vertex,\forall {\rm \; }ke{y_i},ke{y_j}:Attribute,{\rm \; }va{l_i},va{l_j}:Value$$]]></tex-math><mml:math id="mml-eqn-5" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>v</mml:mi><mml:mo>:</mml:mo><mml:mi>V</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>k</mml:mi><mml:mi>e</mml:mi><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mi>k</mml:mi><mml:mi>e</mml:mi><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mo>:</mml:mo><mml:mi>A</mml:mi><mml:mi>t</mml:mi><mml:mi>t</mml:mi><mml:mi>r</mml:mi><mml:mi>i</mml:mi><mml:mi>b</mml:mi><mml:mi>u</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>v</mml:mi><mml:mi>a</mml:mi><mml:mrow><mml:msub><mml:mi>l</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mi>v</mml:mi><mml:mi>a</mml:mi><mml:mrow><mml:msub><mml:mi>l</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mo>:</mml:mo><mml:mi>V</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>u</mml:mi><mml:mi>e</mml:mi></mml:math>
</alternatives></disp-formula></p>
<p><inline-formula id="ieqn-23">
<alternatives><inline-graphic xlink:href="ieqn-23.png"/><tex-math id="tex-ieqn-23"><![CDATA[$\exists {P_v} \cdot ({P_v} = \{$]]></tex-math><mml:math id="mml-ieqn-23"><mml:mi mathvariant="normal">&#x2203;</mml:mi><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi>v</mml:mi></mml:msub></mml:mrow><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi>v</mml:mi></mml:msub></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mo stretchy="false" fence="false">{</mml:mo></mml:math>
</alternatives></inline-formula>{<inline-formula id="ieqn-24">
<alternatives><inline-graphic xlink:href="ieqn-24.png"/><tex-math id="tex-ieqn-24"><![CDATA[$ke{y_i},va{l_i}\} ,{\rm \; }\left\{ {ke{y_j},va{l_j}} \right\}\} )$]]></tex-math><mml:math id="mml-ieqn-24"><mml:mi>k</mml:mi><mml:mi>e</mml:mi><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mi>v</mml:mi><mml:mi>a</mml:mi><mml:mrow><mml:msub><mml:mi>l</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false" fence="false">}</mml:mo><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mi>e</mml:mi><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mi>v</mml:mi><mml:mi>a</mml:mi><mml:mrow><mml:msub><mml:mi>l</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo stretchy="false" fence="false">}</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math>
</alternatives></inline-formula></p>
<p><inline-formula id="ieqn-25">
<alternatives><inline-graphic xlink:href="ieqn-25.png"/><tex-math id="tex-ieqn-25"><![CDATA[$w$]]></tex-math><mml:math id="mml-ieqn-25"><mml:mrow><mml:mo>w</mml:mo></mml:mrow></mml:math>
</alternatives></inline-formula> : When modelling a distance between individuals in the crowd, it is important to determine a weight function <inline-formula id="ieqn-26">
<alternatives><inline-graphic xlink:href="ieqn-26.png"/><tex-math id="tex-ieqn-26"><![CDATA[$w$]]></tex-math><mml:math id="mml-ieqn-26"><mml:mrow><mml:mo>ð</mml:mo></mml:mrow></mml:math>
</alternatives></inline-formula>, where <inline-formula id="ieqn-27">
<alternatives><inline-graphic xlink:href="ieqn-27.png"/><tex-math id="tex-ieqn-27"><![CDATA[${\rm {\mathbb R}}$]]></tex-math><mml:math id="mml-ieqn-27"><mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:mrow></mml:mrow></mml:math>
</alternatives></inline-formula> is a real number associated with each edge <inline-formula id="ieqn-28">
<alternatives><inline-graphic xlink:href="ieqn-28.png"/><tex-math id="tex-ieqn-28"><![CDATA[${e_{{\rm \; \; }}}$]]></tex-math><mml:math id="mml-ieqn-28"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow></mml:mrow></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula>in the graph. This is represented via the following expression:</p>
<p><disp-formula id="eqn-6">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-6.png"/><tex-math id="tex-eqn-6"><![CDATA[$$w :E \to {\rm {\mathbb R}}$$]]></tex-math><mml:math id="mml-eqn-6" display="block"><mml:mrow><mml:mo>ð</mml:mo></mml:mrow><mml:mo>:</mml:mo><mml:mi>E</mml:mi><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:mrow></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-7">
<label>(5)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-7.png"/><tex-math id="tex-eqn-7"><![CDATA[$$\forall {\rm \; }v,u:Vertex,{\rm \; }{e_{vu}}:Edge,g:Graph \cdot \left( {v,u,{e_{vu}} \in g} \right) \wedge {\rm \; }\left( {{e_{vu}} \in E} \right)$$]]></tex-math><mml:math id="mml-eqn-7" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi><mml:mo>:</mml:mo><mml:mi>V</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>:</mml:mo><mml:mi>E</mml:mi><mml:mi>d</mml:mi><mml:mi>g</mml:mi><mml:mi>e</mml:mi><mml:mo>,</mml:mo><mml:mi>g</mml:mi><mml:mo>:</mml:mo><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>p</mml:mi><mml:mi>h</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:mi>g</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2227;</mml:mo><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:mi>E</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-8">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-8.png"/><tex-math id="tex-eqn-8"><![CDATA[$$\exists \left( {x \in {\rm {\mathbb R}\; }} \right) \cdot w \left( {{e_{vu}}} \right) = x$$]]></tex-math><mml:math id="mml-eqn-8" display="block"><mml:mi mathvariant="normal">&#x2203;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>x</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>ð</mml:mo></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>x</mml:mi></mml:math>
</alternatives></disp-formula></p>
<p>The weight is computed using the traditional distance formula as:</p>
<p><disp-formula id="eqn-9">
<label>(6)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-9.png"/><tex-math id="tex-eqn-9"><![CDATA[$$DISTANCE = \; \sqrt {{u^2} - {v^2}}$$]]></tex-math><mml:math id="mml-eqn-9" display="block"><mml:mi>D</mml:mi><mml:mi>I</mml:mi><mml:mi>S</mml:mi><mml:mi>T</mml:mi><mml:mi>A</mml:mi><mml:mi>N</mml:mi><mml:mi>C</mml:mi><mml:mi>E</mml:mi><mml:mo>&#x003D;</mml:mo><mml:mspace width="thickmathspace"></mml:mspace><mml:msqrt><mml:mrow><mml:msup><mml:mi>u</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:msup><mml:mi>v</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:msqrt></mml:math>
</alternatives></disp-formula></p>
<p>where <inline-formula id="ieqn-29">
<alternatives><inline-graphic xlink:href="ieqn-29.png"/><tex-math id="tex-ieqn-29"><![CDATA[$v$]]></tex-math><mml:math id="mml-ieqn-29"><mml:mi>v</mml:mi></mml:math>
</alternatives></inline-formula> and <inline-formula id="ieqn-30">
<alternatives><inline-graphic xlink:href="ieqn-30.png"/><tex-math id="tex-ieqn-30"><![CDATA[$u$]]></tex-math><mml:math id="mml-ieqn-30"><mml:mi>u</mml:mi></mml:math>
</alternatives></inline-formula> are two points that have x and y coordinates <inline-formula id="ieqn-31">
<alternatives><inline-graphic xlink:href="ieqn-31.png"/><tex-math id="tex-ieqn-31"><![CDATA[$$v\left( {{x_1},{y_1}} \right){\rm \; }and{\rm \; }u\left( {{x_2},{y_2}} \right)$$]]></tex-math><mml:math id="mml-ieqn-31"><mml:mi>v</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></inline-formula>.</p>
<p>Unlike other crowd modelling approaches that consider including all edges in the model, only edges between individuals that reflect the social distancing rules for reducing the transmission rate of COVID-19 are included in the current study. Thus, the range of distance considered in the approach falls between 0 m and 4 m. Thus, it is unnecessary to represent all of the connections between individuals in the crowd that have distances (weights) over 4 m. Function <inline-formula id="ieqn-32">
<alternatives><inline-graphic xlink:href="ieqn-32.png"/><tex-math id="tex-ieqn-32"><![CDATA[$t$]]></tex-math><mml:math id="mml-ieqn-32"><mml:mi>t</mml:mi></mml:math>
</alternatives></inline-formula> is used to indicate that two individuals (vertices), <inline-formula id="ieqn-33">
<alternatives><inline-graphic xlink:href="ieqn-33.png"/><tex-math id="tex-ieqn-33"><![CDATA[$v$]]></tex-math><mml:math id="mml-ieqn-33"><mml:mi>v</mml:mi></mml:math>
</alternatives></inline-formula> and <inline-formula id="ieqn-34">
<alternatives><inline-graphic xlink:href="ieqn-34.png"/><tex-math id="tex-ieqn-34"><![CDATA[$u$]]></tex-math><mml:math id="mml-ieqn-34"><mml:mi>u</mml:mi></mml:math>
</alternatives></inline-formula> in the model, fall within the range of interest for evaluation of COVID-19 physical distancing measures. Therefore, edge <inline-formula id="ieqn-35">
<alternatives><inline-graphic xlink:href="ieqn-35.png"/><tex-math id="tex-ieqn-35"><![CDATA[$e$]]></tex-math><mml:math id="mml-ieqn-35"><mml:mi>e</mml:mi></mml:math>
</alternatives></inline-formula> links the pair <inline-formula id="ieqn-36">
<alternatives><inline-graphic xlink:href="ieqn-36.png"/><tex-math id="tex-ieqn-36"><![CDATA[$v$]]></tex-math><mml:math id="mml-ieqn-36"><mml:mi>v</mml:mi></mml:math>
</alternatives></inline-formula> and <inline-formula id="ieqn-37">
<alternatives><inline-graphic xlink:href="ieqn-37.png"/><tex-math id="tex-ieqn-37"><![CDATA[$u$]]></tex-math><mml:math id="mml-ieqn-37"><mml:mi>u</mml:mi></mml:math>
</alternatives></inline-formula>. This is expressed using the formula:</p>
<p><disp-formula id="eqn-10">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-10.png"/><tex-math id="tex-eqn-10"><![CDATA[$$t:E \to \left( {N \times N} \right)$$]]></tex-math><mml:math id="mml-eqn-10" display="block"><mml:mi>t</mml:mi><mml:mo>:</mml:mo><mml:mi>E</mml:mi><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>N</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>N</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-11">
<label>(7)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-11.png"/><tex-math id="tex-eqn-11"><![CDATA[$$\forall {\rm \; }g:Graph,{\rm \; }\left( {v,u} \right):Vertex,{\rm \; }e:Edge \cdot \left( {v,u,e \in g} \right) \wedge t\left( {e,v,u} \right)$$]]></tex-math><mml:math id="mml-eqn-11" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>g</mml:mi><mml:mo>:</mml:mo><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>p</mml:mi><mml:mi>h</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>:</mml:mo><mml:mi>V</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>e</mml:mi><mml:mo>:</mml:mo><mml:mi>E</mml:mi><mml:mi>d</mml:mi><mml:mi>g</mml:mi><mml:mi>e</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi><mml:mo>,</mml:mo><mml:mi>e</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>g</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2227;</mml:mo><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>e</mml:mi><mml:mo>,</mml:mo><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p>The convention <inline-formula id="ieqn-38">
<alternatives><inline-graphic xlink:href="ieqn-38.png"/><tex-math id="tex-ieqn-38"><![CDATA[${e_{vu}}$]]></tex-math><mml:math id="mml-ieqn-38"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula> is adopted to represent each edge that connects the pair of vertices <inline-formula id="ieqn-39">
<alternatives><inline-graphic xlink:href="ieqn-39.png"/><tex-math id="tex-ieqn-39"><![CDATA[$\left( {v,u} \right){\rm \; }$]]></tex-math><mml:math id="mml-ieqn-39"><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow></mml:math>
</alternatives></inline-formula>and appears in <inline-formula id="ieqn-40">
<alternatives><inline-graphic xlink:href="ieqn-40.png"/><tex-math id="tex-ieqn-40"><![CDATA[$E$]]></tex-math><mml:math id="mml-ieqn-40"><mml:mi>E</mml:mi></mml:math>
</alternatives></inline-formula> for simplicity, where <inline-formula id="ieqn-41">
<alternatives><inline-graphic xlink:href="ieqn-41.png"/><tex-math id="tex-ieqn-41"><![CDATA[$v$]]></tex-math><mml:math id="mml-ieqn-41"><mml:mi>v</mml:mi></mml:math>
</alternatives></inline-formula> and <inline-formula id="ieqn-42">
<alternatives><inline-graphic xlink:href="ieqn-42.png"/><tex-math id="tex-ieqn-42"><![CDATA[$u$]]></tex-math><mml:math id="mml-ieqn-42"><mml:mi>u</mml:mi></mml:math>
</alternatives></inline-formula> are said to be the end vertices of an edge <inline-formula id="ieqn-43">
<alternatives><inline-graphic xlink:href="ieqn-43.png"/><tex-math id="tex-ieqn-43"><![CDATA[${e_{vu}}$]]></tex-math><mml:math id="mml-ieqn-43"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula>. The following formula describes this concept of the model:</p>
<p><disp-formula id="eqn-12">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-12.png"/><tex-math id="tex-eqn-12"><![CDATA[$$\forall {\rm \; }v,u:Vertex,$$]]></tex-math><mml:math id="mml-eqn-12" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi><mml:mo>:</mml:mo><mml:mi>V</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-13">
<label>(8)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-13.png"/><tex-math id="tex-eqn-13"><![CDATA[$$\exists {e_{vu}}:Edge \cdot t\left( {{e_{vu}},v,u} \right) \wedge \left( {{e_{vu}} \in E} \right)$$]]></tex-math><mml:math id="mml-eqn-13" display="block"><mml:mi mathvariant="normal">&#x2203;</mml:mi><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>:</mml:mo><mml:mi>E</mml:mi><mml:mi>d</mml:mi><mml:mi>g</mml:mi><mml:mi>e</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2227;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:mi>E</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>The Creation of the Graph Model</title>
<p>The graph model of the crowd in a determined place is created by locating each individual as a graph point (vertex) within a specific area at an exact time using appropriate technology, for example, BLE. Each graph vertex, in the real-world set, has attributes to store the intersection of latitude and longitude lines, which represent the coordinates of that vertex. The coordinates are used to identify the exact location of the vertex in the place.</p>
<p>The proposed model focuses on modelling the distance between crowd individuals to observe the violation of social distancing rules. The distance (in meters) between each pair of vertices is calculated to be the weight of the undirected edge between that pair. Times and dates are other possible pieces of information (attributes) that might be assigned to each edge.</p>
<p>The type of graph model based on a related technology for capturing vertex locations is a complete undirected weighted graph. Graph <inline-formula id="ieqn-44">
<alternatives><inline-graphic xlink:href="ieqn-44.png"/><tex-math id="tex-ieqn-44"><![CDATA[$G$]]></tex-math><mml:math id="mml-ieqn-44"><mml:mi>G</mml:mi></mml:math>
</alternatives></inline-formula> is considered a complete graph if there is a unique edge connecting every pair of its distinct vertices. If <inline-formula id="ieqn-45">
<alternatives><inline-graphic xlink:href="ieqn-45.png"/><tex-math id="tex-ieqn-45"><![CDATA[$G$]]></tex-math><mml:math id="mml-ieqn-45"><mml:mi>G</mml:mi></mml:math>
</alternatives></inline-formula> has <inline-formula id="ieqn-46">
<alternatives><inline-graphic xlink:href="ieqn-46.png"/><tex-math id="tex-ieqn-46"><![CDATA[$n$]]></tex-math><mml:math id="mml-ieqn-46"><mml:mi>n</mml:mi></mml:math>
</alternatives></inline-formula> vertices the graph is called <inline-formula id="ieqn-47">
<alternatives><inline-graphic xlink:href="ieqn-47.png"/><tex-math id="tex-ieqn-47"><![CDATA[${K_n}$]]></tex-math><mml:math id="mml-ieqn-47"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula> and the number of its edges is <inline-formula id="ieqn-48">
<alternatives><inline-graphic xlink:href="ieqn-48.png"/><tex-math id="tex-ieqn-48"><![CDATA[$n\left( {n - 1} \right)/2$]]></tex-math><mml:math id="mml-ieqn-48"><mml:mi>n</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:math>
</alternatives></inline-formula>.</p>
<p>Mathematically, graphs can be represented in several ways, such as via adjacency lists and adjacency matrices. The adjacency matrix is considered one of the graph representation alternatives adopted in this work. To create a corresponding adjacency matrix <inline-formula id="ieqn-49">
<alternatives><inline-graphic xlink:href="ieqn-49.png"/><tex-math id="tex-ieqn-49"><![CDATA[$A$]]></tex-math><mml:math id="mml-ieqn-49"><mml:mi>A</mml:mi></mml:math>
</alternatives></inline-formula> of the complete graph <inline-formula id="ieqn-50">
<alternatives><inline-graphic xlink:href="ieqn-50.png"/><tex-math id="tex-ieqn-50"><![CDATA[${K_n}$]]></tex-math><mml:math id="mml-ieqn-50"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula>, suppose the total number of vertices is <inline-formula id="ieqn-51">
<alternatives><inline-graphic xlink:href="ieqn-51.png"/><tex-math id="tex-ieqn-51"><![CDATA[$n$]]></tex-math><mml:math id="mml-ieqn-51"><mml:mi>n</mml:mi></mml:math>
</alternatives></inline-formula>; then, the definition of the adjacency matrix <inline-formula id="ieqn-52">
<alternatives><inline-graphic xlink:href="ieqn-52.png"/><tex-math id="tex-ieqn-52"><![CDATA[$A$]]></tex-math><mml:math id="mml-ieqn-52"><mml:mi>A</mml:mi></mml:math>
</alternatives></inline-formula> can be expressed with the following formula:</p>
<p><disp-formula id="eqn-14">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-14.png"/><tex-math id="tex-eqn-14"><![CDATA[$$\forall i,j \in \left\{ {1,2, \ldots ,n} \right\},i \ne j$$]]></tex-math><mml:math id="mml-eqn-14" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>&#x2260;</mml:mo><mml:mi>j</mml:mi></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-15">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-15.png"/><tex-math id="tex-eqn-15"><![CDATA[$$\forall {\rm \; }v,u:Vertex,{e_{vu}}:Edge \cdot (\left( {v,u,{e_{vu}} \in {K_n}} \right) \wedge \left( {w\left( {{e_{vu}}} \right) = x} \right)$$]]></tex-math><mml:math id="mml-eqn-15" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mrow><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi><mml:mo>:</mml:mo><mml:mi>V</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>:</mml:mo><mml:mi>E</mml:mi><mml:mi>d</mml:mi><mml:mi>g</mml:mi><mml:mi>e</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2227;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>w</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>x</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-16">
<label>(10)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-16.png"/><tex-math id="tex-eqn-16"><![CDATA[$$\to$$]]></tex-math><mml:math id="mml-eqn-16" display="block"><mml:mo stretchy="false">&#x2192;</mml:mo></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-17">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-17.png"/><tex-math id="tex-eqn-17"><![CDATA[$${[A]_{i,j}} = w\left( {{e_{vu}}} \right)$$]]></tex-math><mml:math id="mml-eqn-17" display="block"><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>A</mml:mi><mml:msub><mml:mo stretchy="false">]</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>w</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Conceptual Design and Implementation Choice</title>
<p>This section presents a conceptual view of the system&#x2019;s major components. Our vision of the overall system architecture falls within the scope of IoT edge-based architecture. The traditional IoT edge-based architecture consists of four layers: A sensing layer, an edges layer, a communication layer, and a cloud layer [<xref ref-type="bibr" rid="ref-33">33</xref>].</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>High-level architecture of the proposed system design</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-1.png"/>
</fig>
<p>The high-level architecture of the core system components, shown in <xref ref-type="fig" rid="fig-1">Fig. 1</xref>, consists of three main layers, namely, the sensing layer, middleware layer, and data storage layer. <xref ref-type="fig" rid="fig-1">Fig. 1</xref> demonstrates the communication between these three layers in terms of their inputs and outputs. The following subsections briefly describe each layer, focusing mainly on the detail of the data storage layer.</p>
<sec id="s4_1">
<label>4.1</label>
<title>Implementation of the Graph Model</title>
<p>Managing a massive amount of stored data (big data) requires a type of data model that can support its characteristics, namely, volume, velocity, variety, and veracity. These characteristics are not fully supported in the traditional relational data models. However, owing to the dynamic nature of the NoSQL data model, it is suitable to deal with critical issues of big data that are related to its characteristics, such as efficiency, scalability, and availability [<xref ref-type="bibr" rid="ref-33">33</xref>,<xref ref-type="bibr" rid="ref-34">34</xref>]. A graph database, as a form of the data model, has demonstrated the ability to express and manage connected sensor-based data in various IoT systems [<xref ref-type="bibr" rid="ref-35">35</xref>,<xref ref-type="bibr" rid="ref-36">36</xref>], and is an example of a dynamic big data schema.</p>
<p>This study introduces a Neo4j graph database implementation of the complete weighted graph data model, discussed previously in Section 3, to model the violation of distancing regulations within a particular place. Neo4j is one of the most popular Java-based open-source native graph database systems and is used to implement the property graph data model efficiently. In the Noe4j graph model, data are structured as nodes, relationships, and properties attached to the nodes or relationships. It provides robust transactional storage of big data and supports full ACID features (atomicity, consistency, isolation, durability) to maintain the integrity of stored data. Neo4j also supports deep graph analysis and querying using a query language named &#x201C;Cypher&#x201D; [<xref ref-type="bibr" rid="ref-37">37</xref>]. It is a reliable graph database system for large and rich graph modelling of crowds. Consequently, Neo4j is considered an appropriate implementation platform for the proposed weighted graph model presented in this paper.</p>
<p>Noe4j&#x2019;s declarative query language, Cypher, is similar to SQL but specialized for graphs. The Cypher language is considered a simple and easy to learn language that allows users to store, retrieve, and manipulate data stored in a graph database. The Cypher syntax is declarative and is expressed in a logical way for matching patterns of nodes and relationships in graphs. For example, the keywords &#x201C;MATCH/ RETURN&#x201D; work similarly to the &#x201C;SELECT&#x201D; statement in SQL to project nodes or relationships that satisfy given constraints. Additionally, the keywords &#x201C;CREATE/ MERGE&#x201D; are used to create new nodes in the graph, similarly to the &#x201C;INSERT&#x201D; statement in SQL. The following figure (<xref ref-type="fig" rid="fig-2">Fig. 2</xref>) provides an example of a complete directed weighted graph consisting of 11 nodes and 54 relationships.</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>A complete directed weighted graph used to represent a group of individuals and the physical distances between them</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-2.png"/>
</fig>
<p>Because the output of the proposed transformational system in the middleware layer, discussed in the following subsections, is an executable Neo4j Cypher query script file, the Noe4j database engine can run Cypher script files to construct, or update, the graph representation of the real-world group in the system. Then, several predefined queries that support decision makers might be executed on the stored graph to retrieve insight results. The following snapshot of the Cypher script (<xref ref-type="table" rid="table-10">Listing 1</xref>) illustrates the executable code used to generate three graph nodes, A, B, and C, using CREATE statements, in addition to three undirected and weighted relationships with a randomly computed distance weight between them, using MERGE statements.</p>
<table-wrap id="table-10">
<label>Listing 1</label>
<caption>
<title>A snapshot of the Neo4j Cypher script used to create three nodes including their interrelations</title>
</caption>
<table>
<colgroup>
<col/>
</colgroup>
<tbody>
<tr>
<td><monospace>CREATE(v0:person { vId: &#x0027;A&#x0027; })</monospace></td>
</tr>
<tr>
<td><monospace>CREATE(v1:person { vId: &#x0027;B&#x0027; })</monospace></td>
</tr>
<tr>
<td><monospace>CREATE(v2:person { vId: &#x0027;C&#x0027; })</monospace></td>
</tr>
<tr>
<td><monospace>MERGE (v0)-[e0:DISTANCE {weight: apoc.number.format(rand()&#x002A;10, &#x0027;#.##;(#.##)&#x0027;)}]-(v1)</monospace></td>
</tr>
<tr>
<td><monospace>MERGE (v0)-[e1:DISTANCE {weight: apoc.number.format(rand()&#x002A;10, &#x0027;#.##;(#.##)&#x0027;)}]-(v2)</monospace></td>
</tr>
<tr>
<td><monospace>MERGE (v1)-[e11:DISTANCE {weight: apoc.number.format(rand()&#x002A;10, &#x0027;#.##;(#.##)&#x0027;)}]-(v2)</monospace></td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Nodes of the Neo4j crowd graph represent people (individuals) in a crowd, whereas undirected and weighted edges represent the actual distances between individuals at a corresponding time point. Thus, the graph created at a specific time interval represents the status of the social distancing rule application at that given point in time. In the real world, the person node holds properties to represent the location of an individual who wears a sensor or is attached to a communication device.</p>
<p>Each person node in the crowd graph is located near another person node within a particular distance. The distance between them is represented in the graph by a relationship between two person nodes. Each distance relationship has a calculated weight property to represent the measure between each pair of individuals. The weight of each distance is computed using Formula 7, as mentioned previously in Section 3.1 and Section 3.2.</p>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Technology and Connectivity of the Sensing Layer</title>
<p>This layer consists of wearable devices connected to a wireless network. In this layer, a WSN (e.g., Wi-Fi and Bluetooth, Zonal Intercommunication Global-standard [ZigBee], and fifth generation cellular wireless [5G]) and a suitable tag-based detection technology were combined to collect required information about physical distancing between individuals during a corresponding time interval. Thus, the physical distancing was tracked using wearable devices or tracker badges and transmitted to the nearest edge point for analysis and processing.</p>
<p>As a design choice, Bluetooth smart badges were considered IoT wearable devices. These cost-effective badges are based on BLE technology, which facilitates short-range communication and offers an adequate level of indoor tracking accuracy. Additionally, beacon devices were used to expand the Bluetooth coverage range of the closed area because the standard beacons have an approximate range of 70 m. Thus, based on the dimensions of the closed area, the number of required beacons could be determined. <xref ref-type="fig" rid="fig-3">Fig. 3</xref> shows the Bluetooth network infrastructure using multiple BLE beacons and cloud beacons that were connected to the proposed IoT edge-based cloud system.</p>
<p>Because one of the objectives of the proposed design was to introduce a social distancing tracking solution, cloud beacons, which have the capability of data backup, configuration, and application of updated settings to all other connected BLE beacons, were employed to monitor other BLE beacons and send their collected data over the Internet to the cloud backend data storage. They were also used to increase the collection of distancing data for more than one closed area. Owing to the Wi-Fi connectivity feature available in cloud beacons, they can upload data to the edge server and then to the centralized cloud storage over Wi-Fi. It is worth mentioning that the range of Wi-Fi networks can be up to 200 m greater than the standard Bluetooth range.</p>
<p>As a result, each person approaching the area covered by the proposed physical distancing monitoring system is asked to wear the Bluetooth smart badge assigned by a previously configured unique ID to sense and report distance changes within the group to the decision maker via the wireless network infrastructure. The assigned ID of each badge represents a specific location and direction (if required) of an individual within the group inside the closed area. The approximate distances within the group of individuals and a timestamp are detected and transferred via the Wi-Fi connection to the edge point and then stored in the backend data storage.</p>
<p>This approach also considers information security issues and individual privacy since the distributed Bluetooth badges and the cloud beacons only monitor and record anonymous data at each point in the area, excluding any information that can identify an individual. It should be noted that detailed specification regarding algorithms and techniques used for detecting distances between individuals is outside the scope of this paper.</p>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>Defined Structure and Queries of the Data Storage Layer</title>
<p>The collected and processed information in the middleware layer is stored in the system using a centralized cloud database that supports big data storage, future processing, and retrieval. The stored data might be used for real-time or post processing, archiving, querying, analysis, or prediction.</p>
<p>The graph-oriented database system was selected as a backend data model to gain the benefits of the graph data structure. This is because of the nature of the sensed data stored in the database and the capability of graph databases to perform efficient query processing and deep graph analytics. Importantly, the data storage is physically located in the cloud storage as a centralized cloud database.</p>
<fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>Bluetooth-based (BLE) network infrastructure</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-3.png"/>
</fig>
<p>To enable the system to calculate the degree to which the existing group is violating the social distancing regulation, the number of edges, with distance values &#x003C; &#x003D; 2 m, is counted and compared with the total number of edges between group individuals (with distance &#x003E; 2 m and &#x003C; &#x003D; 4 m). Additionally, the number of individuals involved in the graph is considered to examine the size of the graph. In the proposed proof of concept, this can be achieved using several simple Neo4j Cypher query statements:</p>
<p>Q1: What is the number of attached nodes in the graph?</p>
<p><monospace>MATCH (n:person)-[r:DISTANCE]-&#x003E;(m:person) WHERE toFloat(r.weight) &#x003C; 4.0</monospace></p>
<p><monospace>RETURN COUNT(n)</monospace></p>
<p>Q2: What is the number of the considered edges in the graph?</p>
<p><monospace>MATCH (n:person)-[r:DISTANCE]-&#x003E;(m:person) WHERE toFloat(r.weight) &#x003C; 4.0</monospace></p>
<p><monospace>RETURN COUNT(r)</monospace></p>
<p>Q3: What is the number of edges with no violation of distancing measure in the graph?</p>
<p><monospace>MATCH (n:person)-[r:DISTANCE]-&#x003E;(m:person) WHERE toFloat(r.weight) &#x003E;&#x003D; 2</monospace></p>
<p><monospace>AND toFloat(r.weight) &#x003C; 4.0</monospace></p>
<p><monospace>RETURN COUNT(r)</monospace></p>
<p>Q4: What is the number of edges with mild violation of distancing measure in the graph?</p>
<p><monospace>MATCH (n:person)-[r:DISTANCE]-&#x003E;(m:person) WHERE toFloat(r.weight) &#x003E; 1.40</monospace></p>
<p><monospace>AND toFloat(r.weight) &#x003C; 2.0</monospace></p>
<p><monospace>RETURN COUNT(r)</monospace></p>
<p>Q5: What is the number of edges with high violation of distancing measure in the graph?</p>
<p><monospace>MATCH (n:person)-[r:DISTANCE]-&#x003E;(m:person) WHERE toFloat(r.weight) &#x003E; 0.01</monospace></p>
<p><monospace>AND toFloat(r.weight) &#x003C;&#x003D; 1.39</monospace></p>
<p><monospace>RETURN COUNT(r)</monospace></p>
<p>Based on the results returned from these queries, simple calculations are required to allow the decision support system to generate an appropriate message to send to the decision maker:<list list-type="order"><list-item>
<p>The percentage of individuals who are involved in the group:</p>
<p><monospace>% involved &#x003D; (total nodes - no of nodes out of the group) / total nodes)&#x002A;100</monospace></p></list-item><list-item>
<p>The percentage of individuals who violated the social distancing measures:</p>
<p><monospace>% violation &#x003D; (no of edges with distance less than 2 meters / total nodes)&#x002A;100</monospace></p></list-item></list></p>
</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Overview of Transformation Approach</title>
<p>A major contribution of this study is the design of a model transformation layer, which is considered a middleware layer of the proposed architecture. Three main operations are performed in this layer, namely, constructing a source model that conforms to a defined source metamodel, translating the source model into a target model that conforms to a defined target metamodel, and executing the target model and generating insight reports for decision makers. It is worth mentioning that the mapping rules were implemented using Atlas Transformation Language (ATL). Further details about ATL are presented in Subsection 5.2. The following figure (<xref ref-type="fig" rid="fig-4">Fig. 4</xref>) illustrates the model transformation approach adopted in the proposed system design.</p>
<sec id="s5_1">
<label>5.1</label>
<title>Constructing the Source Model</title>
<p>Two main steps are considered for creating the source model. The first step is to construct a complete graph structure on the fly by gathering all the sensed data, captured at a specific time from IoT sensors, and manipulated as a density matrix in memory based on edges. The second step is to create an eXtensible Markup Language (XML) memory model of the captured complete graph. During the process of building the XML memory model, all nodes that are outside the range of distancing violations are eliminated. This XML memory model implementation [<xref ref-type="bibr" rid="ref-37">37</xref>] represents the simplified matrix and is considered the source of the translation operation in the form of a graph structure.</p>
<fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>The ATL approach of model transformation</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-4.png"/>
</fig>
<p>A common method to represent and parse XML memory models is to use a Document Object Model (DOM) or Java Document Object Model (JDOM) package. Moreover, options other than XML might be used for data formatting and serialization standards, namely JavaScript Object Notation (JSON) and YAML Ain&#x2019;t Markup Language (YAML). XML has the advantage of describing the structure of data using a human-readable and friendly format and it has a flat learning curve. In addition, the XML format relies on a standard means of representing models using the XML Metadata Interchange (XMI) format in the model transformation strategy adopted in this work, as explained in the following subsection. The following algorithm (<xref ref-type="table" rid="table-11">Listing 2</xref>) describes the rules of translating the complete in-memory graph model into the simplified intermediate source graph model of the core transformation step.</p>
<table-wrap id="table-11">
<label>Listing 2</label>
<caption>
<title>Algorithm of building the intermediate graph model for the complete graph density matrix</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<td><italic>STEP 1:</italic></td>
<td><italic>Use A[v][u]</italic><break/><italic>Define enum[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q]</italic></td>
</tr>
<tr>
<td><italic>STEP 2:</italic></td>
<td><italic>Initialize a new XML Graph element</italic></td>
</tr>
<tr>
<td><italic>STEP 3:</italic></td>
<td><italic>for each row i in the A</italic><break/>  <italic> Create a new XML Vertex element as a child of the Graph element</italic><break/>  <italic> Set a Vertex attribute id&#x003D;enum[i]</italic><break/><italic>End for</italic></td>
</tr>
<tr>
<td><italic>STEP 4:</italic></td>
<td> <italic>for each row i in the A</italic><break/>  <italic> for each column j in A</italic><break/>  <italic>   if (A[i][j] &#x003E; 0) AND (A[i][j] &#x2264; 4)</italic><break/>  <italic>     Create a new XML Edge element as a child of Graph element</italic><break/>  <italic>     Set an Edge attribute id&#x003D;&#x201D;auto" and weight&#x003D; A[i][j]</italic><break/>  <italic>     Create a new XML Endpoint element as a child of Edge element</italic><break/>  <italic>     Set an Endpoint attributes ref&#x003D;vertex(i).id</italic><break/>  <italic>     Set an Endpoint attributes ref&#x003D;vertex(j).id</italic></td>
</tr>
<tr>
<td><italic>STEP 5:</italic></td>
<td><italic>for each row node r in Graph element g</italic><break/>  <italic> for each cell node c in r</italic><break/>  <italic>if the values of all cell elements in r are zeros</italic><break/>  <italic>then</italic><break/>  <italic>  Eliminate r</italic></td>
</tr>
</tbody>
</table>
</table-wrap>
<p>This output source model is considered an intermediate textual domain specific language (DSL) for describing the structure of a graph using XML and conforming to a defined metamodel of a source model (<xref ref-type="fig" rid="fig-5">Fig. 5</xref>). <xref ref-type="table" rid="table-12">Listing 3</xref> provides a snapshot of the graph model produced. It is important to note that constructing an intermediate representation, using a language similar to the structure of graph databases, is considered a critical step in the design because it leads to simplifying the process of generating the executable Neo4j Cypher in the transformation chain.</p>
</sec>
<sec id="s5_2">
<label>5.2</label>
<title>The Core Transformation Strategy</title>
<p>To present transformation rules applied to the final executable Neo4j Cypher queries for the intermediate XML graph model, the ATL language was used to express each matching rule of this transformation component in the middleware layer [<xref ref-type="bibr" rid="ref-38">38</xref>]. ATL is a hybrid model transformation language that contains a mix of declarative and imperative constructs to describe rules of transformation in a simple manner. One of the main reasons for adopting the hybrid approach of model transformation is to simplify mapping rules to be easier to read and understand, which is crucial in larger transformation modules from a software engineering perspective.</p>
<table-wrap id="table-12">
<label>Listing 3</label>
<caption>
<title>A snapshot of the generated XML graph model</title>
</caption>
<table>
<colgroup>
<col/>
</colgroup>
<tbody>
<tr>
<td><monospace>&#x003C;Graph&#x003E;</monospace><break/> <monospace>&#x2003;&#x003C;Vertex id&#x003D;&#x201D;v0&#x201D; label&#x003D;&#x201D;A&#x201D; /&#x003E;</monospace><break/> <monospace>&#x2003;&#x003C;Vertex id&#x003D;&#x201D;v1&#x201D; label&#x003D;&#x201D;B&#x201D; /&#x003E;</monospace><break/> <monospace>&#x2003;&#x003C;Vertex id&#x003D;&#x201D;v2&#x201D; label&#x003D;&#x201D;C&#x201D; /&#x003E;</monospace><break/> <monospace>&#x2003;&#x003C;Edge id&#x003D;&#x201D;e0&#x201D; weight&#x003D;&#x201D;0.36&#x201D;&#x003E;</monospace><break/> <monospace>&#x2003;&#x2003;&#x003C;Endpoint ref&#x003D;&#x201D;v0&#x201D; /&#x003E;</monospace><break/> &#x2003;&#x2003;<monospace>&#x003C;Endpoint ref&#x003D;&#x201D;v1&#x201D; /&#x003E;</monospace><break/> &#x2003;<monospace>&#x003C;/Edge&#x003E;</monospace><break/> <monospace>&#x2003;&#x003C;Edge id&#x003D;&#x201D;e1&#x201D; weight&#x003D;&#x201D;2.92&#x201D;&#x003E;</monospace><break/> <monospace>&#x2003;&#x2003;&#x003C;Endpoint ref&#x003D;&#x201D;v0&#x201D; /&#x003E;</monospace><break/> <monospace>&#x2003;&#x2003;&#x003C;Endpoint ref&#x003D;&#x201D;v2&#x201D; /&#x003E;</monospace><break/> <monospace>&#x2003;&#x003C;/Edge&#x003E;</monospace><break/> <monospace>&#x2003;&#x003C;Edge id&#x003D;&#x201D;e2&#x201D; weight&#x003D;&#x201D;1.07&#x201D; label&#x003D;&#x201D;DISTANCE&#x201D;&#x003E;</monospace><break/> <monospace>&#x2003;&#x2003;&#x003C;Endpoint ref&#x003D;&#x201D;v1&#x201D; /&#x003E;</monospace><break/> <monospace>&#x2003;&#x2003;&#x003C;Endpoint ref&#x003D;&#x201D;v2&#x201D; /&#x003E;</monospace><break/> <monospace>&#x2003;&#x003C;/Edge&#x003E;</monospace><break/><monospace>&#x003C;/Graph&#x003E;</monospace></td>
</tr>
</tbody>
</table>
</table-wrap>
<fig id="fig-5">
<label>Figure 5</label>
<caption>
<title>The source graph metamodel</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-5.png"/>
</fig>
<p>The transformational approach of ATL is based on pattern matching, in which a pattern of a source model, expressed using XMI standards, is evaluated and transformed using a set of declarative ATL matching rules into a pattern of a target model, also expressed using XMI format. The approach maintains traceability links between elements in a source model, rules, and the created elements in the target model. The imperative side of ATL can be seen when the developer needs to encode or customize control flows explicitly for complex parts of transformational algorithms. These imperative definitions of mapping rules are used to support the declarative mapping rules in the transformation module. This is implemented in ATL using helper functions, as shown in <xref ref-type="table" rid="table-13">Listing 4</xref>, which demonstrates the definition of two ATL declarative matching rules, Vertex2CreateNodeStmt and Edge2MergeStmt, used to transform the intermediate graph XML model into an executable Neo4j Cypher script. In each rule, one-to-one mapping statements are declared. For instance, each vertex v is mapped into a generated CREATE Cypher script statement for creating a new Neo4j graph node with the same properties of v. Additionally, to specify the concrete syntax of the generated script, helper functions are utilized to express the detailed syntax of the target script. A detailed description of the syntax and semantics of the ATL language are outside the scope of this work but can be found in Jouault et al. [<xref ref-type="bibr" rid="ref-38">38</xref>].</p>
</sec>
</sec>
<sec id="s6">
<label>6</label>
<title>Case Study</title>
<p>In this work, the case study presented was based on a real-world example of actions taken by various global supermarket and grocery store chains around the world, such as Tesco, Waitrose, and Dunnes, to slow the transmission of the COVID-19 virus. As an example of common implemented physical distancing measures, the governments of the United Kingdom and the Republic of Ireland advise maintaining a gap of at least 2 m (6 feet) from others in public places, specifically those who are coughing, sneezing or have a fever [<xref ref-type="bibr" rid="ref-16">16</xref>&#x2013;<xref ref-type="bibr" rid="ref-19">19</xref>]. In more detail, these rules restrict the number of customers allowed in medium-sized stores at a given time to between 10 and 25 persons, which represents 40% of the stores&#x2019; normal capacity. A supermarket consists of one main entrance, several aisles, shelves, fridges, and four cashier desks.</p>
<p>Consequently, initial criteria were defined for categorizing distance properties in the weighted graph model. It can be concluded that an individual is considered out of a group when he or she is located at a distance of more than 4 m from all other individuals in the same group. The distancing rule for reducing the transmission of COVID-19 is based on maintaining a space between individuals of over 2.5 m as much as possible. Thus, to represent the group of people within the crowd that are closer than 2.5 m to each other, an undirected weighted subgraph <inline-formula id="ieqn-53">
<alternatives><inline-graphic xlink:href="ieqn-53.png"/><tex-math id="tex-ieqn-53"><![CDATA[$G$]]></tex-math><mml:math id="mml-ieqn-53"><mml:mi>G</mml:mi></mml:math>
</alternatives></inline-formula> is extracted from the original complete graph <inline-formula id="ieqn-54">
<alternatives><inline-graphic xlink:href="ieqn-54.png"/><tex-math id="tex-ieqn-54"><![CDATA[${K_n}$]]></tex-math><mml:math id="mml-ieqn-54"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:math>
</alternatives></inline-formula>. The weight of each edge <inline-formula id="ieqn-55">
<alternatives><inline-graphic xlink:href="ieqn-55.png"/><tex-math id="tex-ieqn-55"><![CDATA[$w\left( e \right)$]]></tex-math><mml:math id="mml-ieqn-55"><mml:mi>w</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>e</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></inline-formula> represents the actual distance between each pair of individuals that violate the social distancing measure to a particular degree (high, low, or safe). Similarly, another adjacency matrix <inline-formula id="ieqn-56">
<alternatives><inline-graphic xlink:href="ieqn-56.png"/><tex-math id="tex-ieqn-56"><![CDATA[$M$]]></tex-math><mml:math id="mml-ieqn-56"><mml:mi>M</mml:mi></mml:math>
</alternatives></inline-formula> is extracted from <inline-formula id="ieqn-57">
<alternatives><inline-graphic xlink:href="ieqn-57.png"/><tex-math id="tex-ieqn-57"><![CDATA[$A$]]></tex-math><mml:math id="mml-ieqn-57"><mml:mi>A</mml:mi></mml:math>
</alternatives></inline-formula> in which <inline-formula id="ieqn-58">
<alternatives><inline-graphic xlink:href="ieqn-58.png"/><tex-math id="tex-ieqn-58"><![CDATA[$M \subseteq A$]]></tex-math><mml:math id="mml-ieqn-58"><mml:mi>M</mml:mi><mml:mo>&#x2286;</mml:mo><mml:mi>A</mml:mi></mml:math>
</alternatives></inline-formula> implements the undirected weighted subgraph <inline-formula id="ieqn-59">
<alternatives><inline-graphic xlink:href="ieqn-59.png"/><tex-math id="tex-ieqn-59"><![CDATA[$G$]]></tex-math><mml:math id="mml-ieqn-59"><mml:mi>G</mml:mi></mml:math>
</alternatives></inline-formula>. The following formula describes the definition of <inline-formula id="ieqn-60">
<alternatives><inline-graphic xlink:href="ieqn-60.png"/><tex-math id="tex-ieqn-60"><![CDATA[$M$]]></tex-math><mml:math id="mml-ieqn-60"><mml:mi>M</mml:mi></mml:math>
</alternatives></inline-formula>:</p>
<p><disp-formula id="eqn-18">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-18.png"/><tex-math id="tex-eqn-18"><![CDATA[$$\forall G:Graph \cdot O\left( G \right) = n,$$]]></tex-math><mml:math id="mml-eqn-18" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>G</mml:mi><mml:mo>:</mml:mo><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>p</mml:mi><mml:mi>h</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mi>O</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>G</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>n</mml:mi><mml:mo>,</mml:mo></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-19">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-19.png"/><tex-math id="tex-eqn-19"><![CDATA[$$\forall x \in {\rm {\mathbb R}} \cdot \left( {0 < x} \right) \wedge \left( {x < 2.5} \right)$$]]></tex-math><mml:math id="mml-eqn-19" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>x</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mn>0</mml:mn><mml:mo>&#x003C;</mml:mo><mml:mi>x</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2227;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>x</mml:mi><mml:mo>&#x003C;</mml:mo><mml:mn>2.5</mml:mn></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-20">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-20.png"/><tex-math id="tex-eqn-20"><![CDATA[$$\forall e:Edge \cdot \left( {e \in G} \right) \wedge \left( {w\left( e \right) = x} \right),$$]]></tex-math><mml:math id="mml-eqn-20" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>e</mml:mi><mml:mo>:</mml:mo><mml:mi>E</mml:mi><mml:mi>d</mml:mi><mml:mi>g</mml:mi><mml:mi>e</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>e</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>G</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2227;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>w</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>e</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x003D;</mml:mo><mml:mi>x</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>,</mml:mo></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-21">
<label>(11)</label>
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-21.png"/><tex-math id="tex-eqn-21"><![CDATA[$$\forall i,j \in \left\{ {1,2, \ldots ,n} \right\} \wedge i \ne j$$]]></tex-math><mml:math id="mml-eqn-21" display="block"><mml:mi mathvariant="normal">&#x2200;</mml:mi><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>&#x2227;</mml:mo><mml:mi>i</mml:mi><mml:mo>&#x2260;</mml:mo><mml:mi>j</mml:mi></mml:math>
</alternatives></disp-formula></p>
<p><disp-formula id="eqn-22">
<alternatives>
<graphic mimetype="image" mime-subtype="png" xlink:href="eqn-22.png"/><tex-math id="tex-eqn-22"><![CDATA[$${[M]_{i,j}}\left\{ {\matrix{ {x,\; \; \; \; \; \; \; \; \; \; \; 0 \lt x \lt 2.5\; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; } \cr \; \cr {\!\!\!\!\!\!\!\!0,\; \; \; \; \; \; \; \; \; \;\neg \left( {{e_{vu}} \in E} \right) \vee x \ge 2.5\; \; \; \; \; } \cr } } \right.$$]]></tex-math><mml:math id="mml-eqn-22" display="block"><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>M</mml:mi><mml:msub><mml:mo stretchy="false">]</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mtable columnspacing="1em" rowspacing="4pt"><mml:mtr><mml:mtd><mml:mrow><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mn>0</mml:mn><mml:mo>&#x003C;</mml:mo><mml:mi>x</mml:mi><mml:mo>&#x003C;</mml:mo><mml:mn>2.5</mml:mn><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mspace width="thickmathspace"></mml:mspace></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mi mathvariant="normal">&#x00AC;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mi>u</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:mi>E</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2228;</mml:mo><mml:mi>x</mml:mi><mml:mo>&#x2265;</mml:mo><mml:mn>2.5</mml:mn><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace><mml:mspace width="thickmathspace"></mml:mspace></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow><mml:mo stretchy="true" fence="true" symmetric="true"></mml:mo></mml:mrow></mml:math>
</alternatives></disp-formula></p>
<p>From the constructed matrix <inline-formula id="ieqn-61">
<alternatives><inline-graphic xlink:href="ieqn-61.png"/><tex-math id="tex-ieqn-61"><![CDATA[$M$]]></tex-math><mml:math id="mml-ieqn-61"><mml:mi>M</mml:mi></mml:math>
</alternatives></inline-formula>, all individuals in the place who are violating the distancing rule for that place, at a specific time, are captured. The matrix <inline-formula id="ieqn-62">
<alternatives><inline-graphic xlink:href="ieqn-62.png"/><tex-math id="tex-ieqn-62"><![CDATA[$M$]]></tex-math><mml:math id="mml-ieqn-62"><mml:mi>M</mml:mi></mml:math>
</alternatives></inline-formula> is considered a submatrix of <inline-formula id="ieqn-63">
<alternatives><inline-graphic xlink:href="ieqn-63.png"/><tex-math id="tex-ieqn-63"><![CDATA[$A$]]></tex-math><mml:math id="mml-ieqn-63"><mml:mi>A</mml:mi></mml:math>
</alternatives></inline-formula> after eliminating all vertex entries that have a weight equal to zero or greater than 4.</p>
<sec id="s6_1">
<label>6.1</label>
<title>The Simulation Strategy</title>
<p>As proof of concept, a discrete-time simulation model is adopted. It is assumed that the changes in distances between individuals occur only at each discrete time tick. Consequently, a simple algorithm for generating multiple weighted graphs with random distances between their nodes is implemented using Noe4j Cypher script. The Neo4j built-in random function <italic>rand()</italic> is used to generate random weights for all edges in each complete graph to represent distances between individuals rather than to detect real-world locations of individuals inside the store at a specific time. In the simulation, 21 weighted graphs are generated randomly. After inspecting the weights on their edges, all edges with distances of &#x003E; 4 m are eliminated from the graph and their end-point nodes are considered unattached. <xref ref-type="table" rid="table-13">Listing 4</xref> illustrates the Cypher script used to return the updated graph after eliminating edges with weights &#x003E; 4 m.</p>
<table-wrap id="table-13">
<label>Listing 4</label>
<caption>
<title>ATL matching rules for mapping the intermediate model into an executable Cypher script</title>
</caption>
<table>
<colgroup>
<col/>
</colgroup>
<tbody>
<tr>
<td><monospace>MATCH (n:person)-[r:DISTANCE]-&#x003E;(m:person)</monospace></td>
</tr>
<tr>
<td><monospace>WHERE toFloat(r.weight) &#x003E;&#x003D; 4.0</monospace></td>
</tr>
<tr>
<td><monospace>RETURN n.vId, r.weight, m.vId</monospace></td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The simulation then answers the five queries, presented in Subsection 4.3.1, for each of the generated graphs (<xref ref-type="table" rid="table-3">Tab. 3</xref>). The Neo4j 3.5.14 database system is used to run the script, thus producing 21 graphs with a total of 176 nodes, 1040 properties, and 864 relationships, completed after 103 ms. <xref ref-type="fig" rid="fig-6">Fig. 6</xref> provides a snapshot of the creation of the weighted graphs used in the simulation.</p>
<p>A second round of inspection is applied, and it is noted that the simulation results showed three different cases. These cases can be categorized based on the number of nodes falling in the distancing range as no violation, mild violation, and high violation cases. Generated graphs belonging to the no violation case represent the possible potential ideal situation, captured by the system at a specific time tick, when there is no detected violation of social distancing measures inside the store; that is, the majority of distances between individuals range between 2 m and 4 m.</p>
<fig id="fig-6">
<label>Figure 6</label>
<caption>
<title>A snapshot of the generated graph networks used in the simulation</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-6.png"/>
</fig>
<p>Graphs belonging to the mild violation cases demonstrate a situation where some minor or moderate violations of the distancing measures in the store are detected. The group of persons has a small number of nodes falling in the range of 1.4 m and 2 m, whereas the remainder fall in the greater range. However, graphs belonging to the high violation cases show major violations of distancing measures captured by the system. A larger number of nodes violates the social distancing rules inside the store, with distancing ranges starting from 0 m to about 1.39 m.</p>
<table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Simulation results of the 21 generated graphs and their classifications</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Graph no.</th>
<th># Connected nodes</th>
<th># Edges<break/>(distances &#x003C; 4)</th>
<th># No violation cases</th>
<th># Mild violation cases</th>
<th># High violation cases</th>
<th>Category</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>11</td>
<td>19</td>
<td>11</td>
<td>5</td>
<td>3</td>
<td>Mild</td>
</tr>
<tr>
<td>2</td>
<td>11</td>
<td>21</td>
<td>14</td>
<td>4</td>
<td>3</td>
<td>Mild</td>
</tr>
<tr>
<td>3</td>
<td>10</td>
<td>25</td>
<td>17</td>
<td>2</td>
<td>6</td>
<td>High</td>
</tr>
<tr>
<td>4</td>
<td>9</td>
<td>7</td>
<td>7</td>
<td>0</td>
<td>0</td>
<td>No violation</td>
</tr>
<tr>
<td>5</td>
<td>11</td>
<td>29</td>
<td>12</td>
<td>5</td>
<td>12</td>
<td>High</td>
</tr>
<tr>
<td>6</td>
<td>8</td>
<td>10</td>
<td>5</td>
<td>1</td>
<td>4</td>
<td>High</td>
</tr>
<tr>
<td>7</td>
<td>14</td>
<td>25</td>
<td>15</td>
<td>7</td>
<td>3</td>
<td>Mild</td>
</tr>
<tr>
<td>8</td>
<td>7</td>
<td>6</td>
<td>6</td>
<td>0</td>
<td>0</td>
<td>No violation</td>
</tr>
<tr>
<td>9</td>
<td>11</td>
<td>20</td>
<td>12</td>
<td>5</td>
<td>3</td>
<td>Mild</td>
</tr>
<tr>
<td>10</td>
<td>11</td>
<td>14</td>
<td>6</td>
<td>2</td>
<td>6</td>
<td>High</td>
</tr>
<tr>
<td>11</td>
<td>8</td>
<td>5</td>
<td>1</td>
<td>3</td>
<td>1</td>
<td>Mild</td>
</tr>
<tr>
<td>12</td>
<td>11</td>
<td>23</td>
<td>17</td>
<td>5</td>
<td>1</td>
<td>Mild</td>
</tr>
<tr>
<td>13</td>
<td>8</td>
<td>22</td>
<td>13</td>
<td>0</td>
<td>9</td>
<td>High</td>
</tr>
<tr>
<td>14</td>
<td>9</td>
<td>19</td>
<td>10</td>
<td>3</td>
<td>6</td>
<td>High</td>
</tr>
<tr>
<td>15</td>
<td>11</td>
<td>21</td>
<td>11</td>
<td>3</td>
<td>7</td>
<td>High</td>
</tr>
<tr>
<td>16</td>
<td>3</td>
<td>2</td>
<td>2</td>
<td>0</td>
<td>0</td>
<td>No violation</td>
</tr>
<tr>
<td>17</td>
<td>11</td>
<td>19</td>
<td>12</td>
<td>7</td>
<td>0</td>
<td>Mild</td>
</tr>
<tr>
<td>18</td>
<td>11</td>
<td>18</td>
<td>9</td>
<td>1</td>
<td>8</td>
<td>High</td>
</tr>
<tr>
<td>19</td>
<td>11</td>
<td>26</td>
<td>15</td>
<td>9</td>
<td>2</td>
<td>Mild</td>
</tr>
<tr>
<td>20</td>
<td>11</td>
<td>21</td>
<td>9</td>
<td>2</td>
<td>10</td>
<td>High</td>
</tr>
<tr>
<td>21</td>
<td>8</td>
<td>13</td>
<td>3</td>
<td>1</td>
<td>9</td>
<td>High</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s6_2">
<label>6.2</label>
<title>Technical Discussion</title>
<p>According to the simulation results demonstrated in <xref ref-type="table" rid="table-3">Tab. 3</xref>, it is possible at this stage of system development to detect the distancing measure violations for a group of individuals using simple graph database queries, rather than machine learning and computer vision techniques. From the 21 randomly generated graphs, the system detects the class of violation and its degree, as demonstrated in the following chart. <xref ref-type="fig" rid="fig-7">Fig. 7</xref> summarizes the results showing the difference in violation of social distancing measures for each case. The simulation produces results of 10 high violation, 8 mild violation, and 3 no violation cases. For simplicity, a selected graph from each category, represented in <xref ref-type="table" rid="table-3">Tab. 3</xref>, is considered in the following subsections to demonstrate in more detail the simulation results of Graphs 4, 11, and 21.</p>
<fig id="fig-7">
<label>Figure 7</label>
<caption>
<title>A summary of the experiment results</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-7.png"/>
</fig>
<sec id="s6_2_1">
<label>6.2.1</label>
<title>Detecting No Violation of Social Distancing Measures</title>
<p>The graph generated in case 4 is considered for demonstrating the detection of no violation of distancing measures. A subgraph representation of individuals inside the store and their distances that range between 2 m and 4 m only are considered.</p>
<p>This range of distances is considered a safe and acceptable measure for coronavirus and the need to maintain separation between the customers in the store as much as possible. For illustration only, the graph nodes are positioned manually in possible locations inside the store sketch, maintaining the distances generated between them, to present a possible visualization in this proof of concept. In <xref ref-type="fig" rid="fig-8">Fig. 8</xref>, it is evident that the original completed graph has become two subgraphs. The first graph consists of four vertices and three edges, whereas the second graph contains five nodes and four relationships only.</p>
<fig id="fig-8">
<label>Figure 8</label>
<caption>
<title>A case representing no violation of social distancing measures inside a supermarket</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-8.png"/>
</fig>
<p>Based on the simulation results illustrated in <xref ref-type="table" rid="table-3">Tab. 3</xref>, which provide the answers to the predefined queries Q1&#x2013;Q5, the system should output the message shown in <xref ref-type="table" rid="table-4">Tab. 4</xref> to the decision maker.</p>
<table-wrap id="table-4">
<label>Table 4</label>
<caption>
<title>Results of generated Graph 4 and the output message to decision support</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Q1</th>
<th>Q2</th>
<th>Q3</th>
<th>Q4</th>
<th>Q5</th>
<th>% Node Involved</th>
<th>% Violation</th>
<th>Message to User</th>
</tr>
</thead>
<tbody>
<tr>
<td>9</td>
<td>7</td>
<td>7</td>
<td>0</td>
<td>0</td>
<td>82</td>
<td>0</td>
<td>There are no violations of physical distancing measures in the store.</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s6_2_2">
<label>6.2.2</label>
<title>Detecting a Moderate (Mild) Violation of Social Distancing Measures</title>
<p>Like the steps applied to the first case, the generated graph in case 11 is considered to demonstrate the detection of a mild violation of distancing measures. Subgraphs of persons in the store in which some nodes fall in the range of 1.4 m and 2.0 m are considered, while the remainder exceed that range.</p>
<p>The chosen distance range in this case is considered to represent a low degree of transmission of the COVID-19 virus in public. Like the first case, the graph vertices are located manually inside the store sketch, maintaining the distances generated between them, to provide a visualization for decision makers. <xref ref-type="fig" rid="fig-9">Fig. 9</xref> shows three small subgraphs derived from the original graph. The first graph consists of two nodes and an edge, and each of the second and third graphs has three nodes and two relationships.</p>
<fig id="fig-9">
<label>Figure 9</label>
<caption>
<title>A case representing mild/moderate (limited) violation of social distancing measures inside a supermarket</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-9.png"/>
</fig>
<p>Like the previous case, based on the simulation results and answers to the predefined queries Q1&#x2013;Q5 in <xref ref-type="table" rid="table-3">Tab. 3</xref>, the system should output the message shown in <xref ref-type="table" rid="table-5">Tab. 5</xref> to the decision maker.</p>
<table-wrap id="table-5">
<label>Table 5</label>
<caption>
<title>Results of generated Graph 11 and the output message to decision support</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Q1</th>
<th>Q2</th>
<th>Q3</th>
<th>Q4</th>
<th>Q5</th>
<th>% Node involved</th>
<th>% Violation</th>
<th>Message to user</th>
</tr>
</thead>
<tbody>
<tr>
<td>8</td>
<td>5</td>
<td>1</td>
<td>3</td>
<td>1</td>
<td>73</td>
<td>60</td>
<td>There are moderate violations in the store at the time of this message. Advice to customers might be required.</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s6_2_3">
<label>6.2.3</label>
<title>Detecting a High Violation of Social Distancing Measures</title>
<p>Like the steps applied in the previous cases, the generated graph in case 21 is considered for demonstrating the detection of a high violation of social distancing rules that leads to a high degree of transmission of the virus. Subgraphs for this situation with a distancing range between 0.01 m and 1.39 m are considered.</p>
<fig id="fig-10">
<label>Figure 10</label>
<caption>
<title>A case representing high violation of social distancing measures inside a supermarket</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-10.png"/>
</fig>
<p>As for the previous cases, <xref ref-type="fig" rid="fig-10">Fig. 10</xref> demonstrates that there are two subgraphs that violate the distancing measures inside the virtual store. The first graph is considered a large graph and accounts for about 64% of the total number of the nodes in the original graph (7 nodes and 12 relationships). The second subgraph is a smaller graph with two vertices and one relationship. Like the past cases, based on the simulation results and the answers to the predefined queries Q1&#x2013;Q5 in <xref ref-type="table" rid="table-3">Tab. 3</xref>, the system should output the message shown in <xref ref-type="table" rid="table-6">Tab. 6</xref> to the decision maker.</p>
<table-wrap id="table-6">
<label>Table 6</label>
<caption>
<title>Results of generated graph 21 and the output message to decision support</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Q1</th>
<th>Q2</th>
<th>Q3</th>
<th>Q4</th>
<th>Q5</th>
<th>% Node involved</th>
<th>% Violation</th>
<th>Message to user</th>
</tr>
</thead>
<tbody>
<tr>
<td>8</td>
<td>13</td>
<td>3</td>
<td>1</td>
<td>9</td>
<td>72</td>
<td>77</td>
<td>There are high violations in the store at the time of this message. Urgent action must be taken.</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
</sec>
<sec id="s6_3">
<label>6.3</label>
<title>Scalability and Limitation of the Proposed Approach</title>
<p>Before discussing the scalability details of the proposed design, it should be recalled that the main objective of the system is to detect violations of COVID-19 physical distancing measures. To evaluate scalability, a larger test case to detect distancing violations of a crowd of people (121 persons) was designed. The Neo4j 3.5.14 database system was utilized to run the Cypher script, shown in <xref ref-type="table" rid="table-15">Listing 5</xref>, to produce a larger graph with 121 nodes and 2020 relationships (edges) in 176 ms.</p>
<table-wrap id="table-15">
<label>Listing 5</label>
<caption>
<title>Neo4j Cypher script used to generate a larger graph with 121 nodes</title>
</caption>
<table>
<colgroup>
<col/>
</colgroup>
<tbody>
<tr>
<td><monospace># Creating two groups and edges between them</monospace></td>
</tr>
<tr>
<td><monospace>UNWIND $group1 AS cycle1</monospace></td>
</tr>
<tr>
<td><monospace>UNWIND $group2 AS cycle2</monospace></td>
</tr>
<tr>
<td><monospace>MERGE (x1:per1 { vId: cycle1.vId })</monospace></td>
</tr>
<tr>
<td><monospace>MERGE (y1:per2 { vId: cycle2.vId })</monospace></td>
</tr>
<tr>
<td><monospace>MERGE (x1)-[e0:DISTANCE {weight: apoc.number.format(rand()&#x002A;10, &#x0027;#.##;(#.##)&#x0027;)}]-&#x003E;(y1)</monospace></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><monospace># Eliminating edges that have weight &#x003E; 4.</monospace></td>
</tr>
<tr>
<td><monospace>MATCH (x1)-[e0:DISTANCE]-&#x003E;(y1)</monospace></td>
</tr>
<tr>
<td><monospace>WHERE toFloat(e0.weight) &#x003E;&#x003D; 4.0 OR (toFloat(e0.weight) &#x003E;&#x003D; 0 AND toFloat(e0.weight) &#x003C;&#x003D; 0.1)</monospace></td>
</tr>
<tr>
<td><monospace>DELETE e0</monospace></td>
</tr>
<tr>
<td><monospace>RETURN x.vId, e0.weight, y.vId</monospace></td>
</tr>
</tbody>
</table>
</table-wrap>
<p><xref ref-type="table" rid="table-7">Tab. 7</xref> shows the number of generated elements of the graph, including the number of created nodes and the number of created or matched edges. It also lists the time the system took to assess the graph structure and edges with weights &#x003E; 4 m.</p>
<table-wrap id="table-7">
<label>Table 7</label>
<caption>
<title>Total number of elements in the generated graph and the time of their creation</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th></th>
<th>#Nodes</th>
<th>#Edges</th>
<th>#Deleted edges</th>
<th>Time (ms)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Group1</td>
<td>41</td>
<td>420</td>
<td>267</td>
<td>29</td>
</tr>
<tr>
<td>Group2</td>
<td>20</td>
<td>400</td>
<td>241</td>
<td>33</td>
</tr>
<tr>
<td>Group3</td>
<td>20</td>
<td>400</td>
<td>256</td>
<td>28</td>
</tr>
<tr>
<td>Group4</td>
<td>20</td>
<td>400</td>
<td>263</td>
<td>40</td>
</tr>
<tr>
<td>Group5</td>
<td>20</td>
<td>400</td>
<td>259</td>
<td>46</td>
</tr>
<tr>
<td>Total</td>
<td>121</td>
<td>2020</td>
<td>1286</td>
<td>176</td>
</tr>
</tbody>
</table>
</table-wrap>
<fig id="fig-11">
<label>Figure 11</label>
<caption>
<title>Snapshot of the larger graph for evaluating the scalability of the proposed approach</title>
</caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="fig-11.png"/>
</fig>
<p>The concept of connected graphs was considered in orchestrating the generation of edges between nodes to make this case more realistic. The 121 nodes were distributed into five groups of nodes, each of which represented a subgraph. Then, edges were defined between nodes in every pair of neighboring graphs. This strategy is illustrated in <xref ref-type="fig" rid="fig-11">Fig. 11</xref>.</p>
<p>Like the strategy of assessing graphs in the original cases discussed in Section 6.2, the predefined queries Q1&#x2013;Q5 were considered to determine the level of distancing violation. For simplicity, <xref ref-type="table" rid="table-8">Tab. 8</xref> shows the triples of Group1 and Group2, including their connected nodes and edges. These triples are presented following the format: (NODE EDGE[weight] NODE).</p>
<table-wrap id="table-8">
<label>Table 8</label>
<caption>
<title>Resulting graph triples of the simulation of the large graph</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th colspan="7">120 Graph triples</th>
</tr>
</thead>
<tbody>
<tr>
<td style="background:#C6C6C6;">A6 0.86 A36</td>
<td>A5 3.19 A26</td>
<td>A19 2.25 A34</td>
<td style="background:#C6C6C6;">A9 1.35 A26</td>
<td>A14 3.02 A37</td>
<td style="background:#C6C6C6;">A17 1.36 A29</td>
<td style="background:#C6C6C6;">A14 0.18 A21</td>
</tr>
<tr>
<td>A11 3.34 A37</td>
<td style="background:#C6C6C6;">A17 0.43 A26</td>
<td style="background:#838383;">A11 1.91 A34</td>
<td>A0 3.77 A26</td>
<td style="background:#C6C6C6;">A6 0.18 A38</td>
<td>A9 3.67 A29</td>
<td style="background:#C6C6C6;">A10 0.27 A21</td>
</tr>
<tr>
<td>A20 2.58 A24</td>
<td style="background:#C6C6C6;">A8 0.29 A26</td>
<td style="background:#C6C6C6;">A3 0.94 A34</td>
<td>A7 3.7 A27</td>
<td>A18 3.02 A38</td>
<td>A11 3.92 A29</td>
<td style="background:#C6C6C6;">A20 0.27 A21</td>
</tr>
<tr>
<td>A10 3.55 A24</td>
<td>A11 2.68 A26</td>
<td style="background:#838383;">A15 1.71 A34</td>
<td>A16 2.8 A27</td>
<td>A7 2.95 A38</td>
<td style="background:#C6C6C6;">A10 0.65 A29</td>
<td>A9 2.7 A21</td>
</tr>
<tr>
<td>A12 3.82 A24</td>
<td style="background:#838383;">A14 1.6 A26</td>
<td>A18 2.96 A35</td>
<td style="background:#C6C6C6;">A5 1.06 A27</td>
<td style="background:#C6C6C6;">A16 0.82 A38</td>
<td>A19 3.65 A30</td>
<td>A17 2.38 A21</td>
</tr>
<tr>
<td>A7 3.86 A24</td>
<td style="background:#C6C6C6;">A20 1.05 A26</td>
<td>A15 2.07 A35</td>
<td>A19 3.55 A27</td>
<td>A17 3.61 A38</td>
<td style="background:#C6C6C6;">A15 0.41 A30</td>
<td>A11 3.73 A21</td>
</tr>
<tr>
<td style="background:#C6C6C6;">A5 0.53 A24</td>
<td style="background:#C6C6C6;">A0 0.36 A27</td>
<td style="background:#C6C6C6;">A3 0.27 A27</td>
<td>A6 2.41 A29</td>
<td>A19 3.1 A38</td>
<td>A20 3.83 A30</td>
<td>A8 2.83 A22</td>
</tr>
<tr>
<td>A13 3.39 A33</td>
<td>A1 2.62 A27</td>
<td style="background:#C6C6C6;">A18 0.91 A27</td>
<td>A15 2.57 A29</td>
<td style="background:#C6C6C6;">A8 0.57 A38</td>
<td style="background:#C6C6C6;">A5 1.6 A30</td>
<td style="background:#C6C6C6;">A0 0.36 A22</td>
</tr>
<tr>
<td style="background:#C6C6C6;">A20 0.69 A33</td>
<td style="background:#838383;">A15 1.86 A24</td>
<td>A15 3.3 A37</td>
<td style="background:#C6C6C6;">A4 0.75 A35</td>
<td>A20 2.92 A38</td>
<td>A8 2.06 A30</td>
<td style="background:#C6C6C6;">A5 1.08 A22</td>
</tr>
<tr>
<td>A12 2.38 A34</td>
<td>A3 3.6 A25</td>
<td>A0 2.43 A37</td>
<td style="background:#C6C6C6;">A8 0.45 A35</td>
<td style="background:#C6C6C6;">A12 0.47 A38</td>
<td style="background:#C6C6C6;">A14 0.85 A31</td>
<td style="background:#C6C6C6;">A6 0.24 A22</td>
</tr>
<tr>
<td>A5 2.48 A34</td>
<td>A4 3.52 A25</td>
<td>A9 3.36 A37</td>
<td>A2 3.97 A35</td>
<td style="background:#C6C6C6;">A15 1.05 A39</td>
<td>A10 3.59 A31</td>
<td style="background:#C6C6C6;">A10 0.95 A22</td>
</tr>
<tr>
<td style="background:#C6C6C6;">A18 1 A34</td>
<td style="background:#C6C6C6;">A7 1.07 A25</td>
<td style="background:#C6C6C6;">A10 0.24 A37</td>
<td style="background:#C6C6C6;">A0 1.29 A35</td>
<td>A10 2.78 A39</td>
<td style="background:#C6C6C6;">A0 1.31 A31</td>
<td style="background:#838383;">A1 1.81 A22</td>
</tr>
<tr>
<td style="background:#C6C6C6;">A7 0.95 A34</td>
<td style="background:#C6C6C6;">A14 0.37 A25</td>
<td style="background:#C6C6C6;">A16 1.19 A37</td>
<td>A3 2.83 A35</td>
<td>A4 2.53 A39</td>
<td>A5 3.77 A31</td>
<td style="background:#C6C6C6;">A11 0.24 A22</td>
</tr>
<tr>
<td>A7 2.6 A33</td>
<td>A15 2.1 A25</td>
<td style="background:#C6C6C6;">A12 1.35 A37</td>
<td>A6 2.11 A35</td>
<td style="background:#C6C6C6;">A20 1.21 A39</td>
<td>A11 2.55 A31</td>
<td style="background:#C6C6C6;">A16 0.48 A22</td>
</tr>
<tr>
<td style="background:#C6C6C6;">A15 0.41 A28</td>
<td>A3 3.14 A36</td>
<td style="background:#C6C6C6;">A7 0.31 A37</td>
<td style="background:#C6C6C6;">A19 0.22 A29</td>
<td>A14 2.93 A39</td>
<td>A3 3.94 A31</td>
<td style="background:#C6C6C6;">A14 1.07 A22</td>
</tr>
<tr>
<td style="background:#C6C6C6;">A14 0.25 A28</td>
<td>A8 2.87 A36</td>
<td style="background:#838383;">A1 1.92 A37</td>
<td>A3 2.78 A29</td>
<td style="background:#C6C6C6;">A1 0.83 A39</td>
<td style="background:#838383;">A9 1.5 A31</td>
<td style="background:#C6C6C6;">A17 1.23 A22</td>
</tr>
<tr>
<td>A2 2.32 A28</td>
<td>A18 2.38 A36</td>
<td>A3 3.62 A37</td>
<td>A0 2.77 A28</td>
<td style="background:#C6C6C6;">A6 0.54 A39</td>
<td>A16 2.41 A31</td>
<td>A2 2.95 A22</td>
</tr>
<tr>
<td style="background:#C6C6C6;">A18 1.3 A28</td>
<td style="background:#C6C6C6;">A14 0.61 A36</td>
<td style="background:#C6C6C6;">A2 0.15 A33</td>
<td style="background:#C6C6C6;">A11 0.44 A28</td>
<td style="background:#C6C6C6;">A7 1.36 A40</td>
<td>A2 3.68 A32</td>
<td>A9 2.12 A22</td>
</tr>
<tr>
<td>A7 3.98 A28</td>
<td style="background:#C6C6C6;">A11 1.27 A23</td>
<td style="background:#C6C6C6;">A15 0.28 A32</td>
<td>A18 3.93 A33</td>
<td>A9 2.22 A40</td>
<td>A12 2.02 A32</td>
<td>A15 3.92 A23</td>
</tr>
<tr>
<td>A10 2.85 A28</td>
<td style="background:#C6C6C6;">A10 1.13 A23</td>
<td style="background:#C6C6C6;">A8 0.8 A32</td>
<td>A19 3.81 A33</td>
<td>A19 3.84 A40</td>
<td>A1 2 A32</td>
<td>A2 2.11 A23</td>
</tr>
<tr>
<td>A8 2.07 A33</td>
<td>A1 3.05 A24</td>
<td style="background:#838383;">A16 1.43 A40</td>
<td>A5 2.54 A32</td>
<td style="background:#C6C6C6;">A10 1.23 A40</td>
<td>A0 2.13 A32</td>
<td>A1 2.79 A23</td>
</tr>
<tr>
<td>A7 3.98 A28</td>
<td style="background:#C6C6C6;">A11 1.27 A23</td>
<td style="background:#C6C6C6;">A9 1 A36</td>
<td>A17 2.69 A32</td>
<td style="background:#C6C6C6;">A1 0.82 A40</td>
<td>A13 2.02 A32</td>
<td>A6 2.68 A23</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>A17 2.75 A23</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Based on the results shown in <xref ref-type="table" rid="table-7">Tab. 7</xref> and <xref ref-type="table" rid="table-8">Tab. 8</xref>, no problems are apparent with the horizontal scaling of the proposed system design. As with any expansion of the graph size, the system is able to record all of the triples to be assessed using the predefined queries Q1Q5 and provide the percentage of violations to output an appropriate message to the decision maker, as shown in <xref ref-type="table" rid="table-9">Tab. 9</xref>.</p>
<table-wrap id="table-9">
<label>Table 9</label>
<caption>
<title>Results of the generated larger graph and the output message to decision support</title>
</caption>
<table>
<colgroup>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>Q1</th>
<th>Q2</th>
<th>Q3</th>
<th>Q4</th>
<th>Q5</th>
<th>% Node involved</th>
<th>% Violation</th>
<th>Message to user</th>
</tr>
</thead>
<tbody>
<tr>
<td>40</td>
<td>154</td>
<td>83</td>
<td>8</td>
<td>64</td>
<td>100</td>
<td>47</td>
<td>There are high violations in the store at the time of this message. Urgent actions must be taken.</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Overall, the proposed approach employed various utilizations of IoT devices, edge/cloud computing, and BLE beacons for indoor localization, detection, and monitoring. Consequently, the main objective of the system design presented is achievable. An advantage of the proposed design is the ability to use the recorded data in the closed area to analyze and understand group behavior inside that area using only simple graph database query processing. For deeper analysis, the Neo4j Graph Data Science library introduced by Neo4j enables data scientists to make valuable predictions.</p>
<p>Another advantage is that the proposed design can be considered vertically scalable by increasing the number of IoT devices, including BLE beacons and Bluetooth badges, to accommodate larger crowds and coverage areas. A potential extension of the proposed system architecture is the adoption of smartphones or smart watches as alternatives to Bluetooth badges because all smart devices are currently equipped with Bluetooth connectivity. This would enable the design presented to be expanded to include, for instance, a mobile application installed in smart devices to notify individuals about the status of their current location, which could also apply to outdoor areas.</p>
</sec>
</sec>
<sec id="s7">
<label>7</label>
<title>Conclusion</title>
<p>This paper presented a conceptual design for an indoor physical distancing monitoring system based on a graph database and edge processing. The IoT edge-based system architecture introduced consists of several components; each of the components is responsible for performing and managing a variety of tasks. These components comprise wearable devices and WSN infrastructure (sensing layer), data processing at edge points (middleware layer), and a cloud graph database (data storage layer). By using the BLE beacon technology in the proposed design for indoor detecting physical distancing, the network infrastructure presented has the advantages of low energy consumption, signal range and accuracy of BLE standards, and cloud beacons. A graph database is used to represent the distancing between individuals in a group, and distancing measures are implemented via graph database queries as an alternative solution to that of the traditional tracking and localization system. A Neo4j graph database system was used to conduct several experiments as proof of concept of the overall design idea. These system layers are glued by a strategy of model transformation aimed at generating the final executable Neo4j Cypher script code from a high-level graph model (intermediate). The mapping rules are implemented using the commonly known hybrid transformation language, ATL.</p>
<p>Experimental results indicate the proposed design would allow decision makers to detect COVID-19 social distancing measures within an enclosed area. The proposed system includes a notification sent to an authorized person informing them about the status of physical distancing measures at a specific time and advising when urgent action is required. Based on the recorded and analyzed data, the number of individuals permitted to be inside the monitored area at a specific time of the day or on a particular day of the week can be reduced. Conversely, the permitted number of individuals can be increased in areas in which rules of social distancing have been followed without violation.</p>
</sec>
</body>
<back><fn-group>
<fn fn-type="other">
<p><bold>Funding Statement:</bold> The author(s) received no specific funding for this study.</p>
</fn>
<fn fn-type="conflict">
<p><bold>Conflicts of Interest:</bold> The authors declare that they have no conflicts of interest to report regarding the present study.</p>
</fn>
</fn-group>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1">
<label>1</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>G.</given-names> <surname>Pal</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Li</surname></string-name> and <string-name><given-names>K.</given-names> <surname>Atkinson</surname></string-name></person-group>, &#x201C;<article-title>Multi-agent big-data lambda architecture model for e-commerce analytics</article-title>,&#x201D; <source>Data</source>, vol. <volume>3</volume>, no. <issue>4</issue>, pp. <fpage>58</fpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-2"><label>2</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>B.</given-names> <surname>Leang</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Ean</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Ryu</surname></string-name> and <string-name><given-names>K. H.</given-names> <surname>Yoo</surname></string-name></person-group>, &#x201C;<article-title>Improvement of kafka streaming using partition and multi-threading in big data environment</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>19</volume>, no. <issue>1</issue>, pp. <fpage>134</fpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-3"><label>3</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>G. J.</given-names> <surname>Milne</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Xie</surname></string-name> and <string-name><given-names>D.</given-names> <surname>Poklepovich</surname></string-name></person-group>, &#x201C;<article-title>A modelling analysis of strategies for relaxing COVID-19 social distancing</article-title>,&#x201D; <source>MedRxiv</source>, vol. <volume>2020</volume>, pp. <fpage>1</fpage>&#x2013;<lpage>17</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-4"><label>4</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Polenta</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Rignanese</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Sernani</surname></string-name>, <string-name><given-names>N.</given-names> <surname>Falcionelli</surname></string-name>, <string-name><given-names>D. N.</given-names> <surname>Mekuria</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>An internet of things approach to contact tracing&#x2014;the bubbleBox system</article-title>,&#x201D; <source>Information</source>, vol. <volume>11</volume>, no. <issue>7</issue>, pp. <fpage>347</fpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-5"><label>5</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Z.</given-names> <surname>Allam</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Dey</surname></string-name> and <string-name><given-names>D. S.</given-names> <surname>Jones</surname></string-name></person-group>, &#x201C;<article-title>Artificial intelligence (AI) provided early detection of the coronavirus (COVID-19) in china and will influence future urban health policy internationally</article-title>,&#x201D; <source>AI</source>, vol. <volume>1</volume>, no. <issue>2</issue>, pp. <fpage>156</fpage>&#x2013;<lpage>165</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-6"><label>6</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Bekkali</surname></string-name> and <string-name><given-names>M.</given-names> <surname>Matsumoto</surname></string-name></person-group>, &#x201C;<article-title>RFID indoor tracking based on inter-tags distance measurement</article-title>,&#x201D; <source>Wireless Telecommunications Symposium</source>, <publisher-name>IEEE</publisher-name>, <publisher-loc>Pomona, CA</publisher-loc>, pp. <fpage>1</fpage>, <year>2007</year>.</mixed-citation></ref>
<ref id="ref-7"><label>7</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>T. Y. H.</given-names> <surname>Angela</surname></string-name>, <string-name><given-names>V.</given-names> <surname>Viswanathan</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Lees</surname></string-name> and <string-name><given-names>W.</given-names> <surname>Cai</surname></string-name></person-group>, &#x201C;<article-title>Analyzing the effectiveness of wearable wireless sensors in controlling crowd disasters</article-title>,&#x201D; In <source>Procedia Computer Science,</source> vol. <volume>29</volume>, <publisher-name>Elsevier</publisher-name>, <publisher-loc>Netherlands</publisher-loc>, pp. <fpage>1590</fpage>&#x2013;<lpage>1599</lpage>, <year>2014</year>.</mixed-citation></ref>
<ref id="ref-8"><label>8</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Ahmed</surname></string-name>, <string-name><given-names>T. B.</given-names> <surname>Pedersen</surname></string-name> and <string-name><given-names>H.</given-names> <surname>Lu</surname></string-name></person-group>, &#x201C;<article-title>Finding dense locations in indoor tracking data</article-title>,&#x201D; in <source>IEEE 15th Int. Conf. on Mobile Data Management</source>, vol. <volume>1</volume>, <publisher-name>IEEE</publisher-name>, <publisher-loc>Brisbane, Australia</publisher-loc>, pp. <fpage>189</fpage>&#x2013;<lpage>194</lpage>, <year>2014</year>.</mixed-citation></ref>
<ref id="ref-9"><label>9</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>X.</given-names> <surname>Xu</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Ding</surname></string-name> and <string-name><given-names>T.</given-names> <surname>Sun</surname></string-name></person-group>, &#x201C;<article-title>A fast density peaks clustering algorithm based on pre-screening</article-title>,&#x201D; in <source>IEEE Int. Conf. on Big Data and Smart Computing (BigComp)</source>, <publisher-name>IEEE</publisher-name>, <publisher-loc>Shanghai, China</publisher-loc>, pp. <fpage>513</fpage>&#x2013;<lpage>516</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-10"><label>10</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Martella</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Van Steen</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Van Halteren</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Conrado</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Li</surname></string-name></person-group>, &#x201C;<article-title>Crowd textures as proximity graphs</article-title>,&#x201D; <source>IEEE Communications Magazine</source>, vol. <volume>52</volume>, no. <issue>1</issue>, pp. <fpage>114</fpage>&#x2013;<lpage>121</lpage>, <year>2014</year>.</mixed-citation></ref>
<ref id="ref-11"><label>11</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Nikodem</surname></string-name>, <string-name><given-names>M.</given-names> <surname>S&#x0142;abicki</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Surmacz</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Mr&#x00F3;wka</surname></string-name> and <string-name><given-names>C.</given-names> <surname>Do&#x0142;&#x0119;ga</surname></string-name></person-group>, &#x201C;<article-title>Multi-camera vehicle tracking using edge computing and low-power communication</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>20</volume>, no. <issue>11</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>16</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-12"><label>12</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>F.</given-names> <surname>Jamil</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Ahmad</surname></string-name>, <string-name><given-names>N.</given-names> <surname>Iqbal</surname></string-name> and <string-name><given-names>D. H.</given-names> <surname>Kim</surname></string-name></person-group>, &#x201C;<article-title>Towards a remote monitoring of patient vital signs based on IoT-based blockchain integrity management platforms in smart hospitals</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>20</volume>, no. <issue>8</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>26</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-13"><label>13</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Kolakowski</surname></string-name>, <string-name><given-names>V.</given-names> <surname>Djaja-Josko</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Kolakowski</surname></string-name> and <string-name><given-names>K.</given-names> <surname>Broczek</surname></string-name></person-group>, &#x201C;<article-title>UWB/BLE tracking system for elderly people monitoring</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>20</volume>, pp. <fpage>6</fpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-14"><label>14</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>N.</given-names> <surname>Vallez</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Krauss</surname></string-name>, <string-name><given-names>J. L.</given-names> <surname>Espinosa-Aranda</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Pagani</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Seirafi</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>Automatic museum audio guide</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>20</volume>, no. <issue>3</issue>, pp. <fpage>779</fpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-15"><label>15</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>N.</given-names> <surname>Gao</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Xiao</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Meng</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>Cost-effective wearable indoor localization and motion analysis via the integration of UWB and IMU</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>20</volume>, no. <issue>2</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>23</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-16"><label>16</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>Shen</surname></string-name>, <string-name><given-names>Q.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Pang</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Xu</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Li</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>ANTspin: Efficient absolute localization method of RFID tags via spinning antenna</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>19</volume>, no. <issue>9</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>20</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-17"><label>17</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>J. H.</given-names> <surname>Huh</surname></string-name> and <string-name><given-names>K.</given-names> <surname>Seo</surname></string-name></person-group>, &#x201C;<article-title>An indoor location-based control system using bluetooth beacons for IoT systems</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>17</volume>, no. <issue>12</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>22</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-18"><label>18</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>F. S.</given-names> <surname>Dani&#x015F;</surname></string-name> and <string-name><given-names>A. T.</given-names> <surname>Cemgil</surname></string-name></person-group>, &#x201C;<article-title>Model-based localization and tracking using bluetooth low-energy beacons</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>17</volume>, no. <issue>11</issue>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-19"><label>19</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>O.</given-names> <surname>Belmonte-Fern&#x00E1;ndez</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Puertas-Cabedo</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Torres-Sospedra</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Montoliu-Col&#x00E1;s</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Trilles-Oliver</surname></string-name></person-group>, &#x201C;<article-title>An indoor positioning system based on wearables for ambient-assisted living</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>17</volume>, no. <issue>12</issue>, pp. <fpage>36</fpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-20"><label>20</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Lewandowski</surname></string-name>, <string-name><given-names>B.</given-names> <surname>P&#x0142;aczek</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Bernas</surname></string-name> and <string-name><given-names>P.</given-names> <surname>Szyma&#x0142;a</surname></string-name></person-group>, &#x201C;<article-title>Road traffic monitoring system based on mobile devices and Bluetooth low energy beacons</article-title>,&#x201D; <source>Wireless Communications and Mobile Computing</source>, <publisher-loc>Egypt</publisher-loc>, vol. <volume>2018</volume>, pp. <fpage>12</fpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-21"><label>21</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>B.</given-names> <surname>Yu</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Xu</surname></string-name> and <string-name><given-names>Y.</given-names> <surname>Li</surname></string-name></person-group>, &#x201C;<article-title>Bluetooth low energy (BLE) based mobile electrocardiogram monitoring system</article-title>,&#x201D; in <source>IEEE Int. Conf. on Information and Automation</source>, <publisher-name>IEEE</publisher-name>, <publisher-loc>Chengdu, China</publisher-loc>, pp. <fpage>763</fpage>&#x2013;<lpage>767</lpage>, <year>2012</year>.</mixed-citation></ref>
<ref id="ref-22"><label>22</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>D.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>L. T.</given-names> <surname>Yang</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Zhao</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Guo</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>Real-time locating systems using active RFID for internet of things</article-title>,&#x201D; <source>IEEE Systems Journal</source>, vol. <volume>10</volume>, no. <issue>3</issue>, pp. <fpage>1226</fpage>&#x2013;<lpage>1235</lpage>, <year>2014</year>.</mixed-citation></ref>
<ref id="ref-23"><label>23</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>G.</given-names> <surname>Paolini</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Masotti</surname></string-name>, <string-name><given-names>F.</given-names> <surname>Antoniazzi</surname></string-name>, <string-name><given-names>T. S.</given-names> <surname>Cinotti</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Costanzo</surname></string-name></person-group>, &#x201C;<article-title>Fall detection and 3-D indoor localization by a custom RFID reader embedded in a smart e-health platform</article-title>,&#x201D; <source>IEEE Transactions on Microwave Theory and Techniques</source>, vol. <volume>67</volume>, no. <issue>12</issue>, pp. <fpage>5329</fpage>&#x2013;<lpage>5339</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-24"><label>24</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>El-Absi</surname></string-name>, <string-name><given-names>A. A. H.</given-names> <surname>Abbas</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Abuelhaija</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Solbach</surname></string-name> and <string-name><given-names>T.</given-names> <surname>Kaiser</surname></string-name></person-group>, &#x201C;<article-title>Distance and tag aware localization in indoor terahertz systems</article-title>,&#x201D; in <source>First International Workshop on Mobile Terahertz Systems (IWMTS)</source>, <publisher-name>IEEE</publisher-name>, <publisher-loc>Duisburg, Germany</publisher-loc>, pp. <fpage>1</fpage>&#x2013;<lpage>5</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-25"><label>25</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>P.</given-names> <surname>Kriz</surname></string-name>, <string-name><given-names>F.</given-names> <surname>Maly</surname></string-name> and <string-name><given-names>T.</given-names> <surname>Kozel</surname></string-name></person-group>, &#x201C;<article-title>Improving indoor localization using Bluetooth low energy beacons</article-title>,&#x201D; <source>Mobile Information Systems</source>, vol. <volume>2016</volume>, pp. <fpage>1</fpage>&#x2013;<lpage>11</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-26"><label>26</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>P.</given-names> <surname>Spachos</surname></string-name> and <string-name><given-names>K. N.</given-names> <surname>Plataniotis</surname></string-name></person-group>, &#x201C;<article-title>BLE beacons for indoor positioning at an interactive IoT-based smart museum</article-title>,&#x201D; <source>IEEE Systems Journal</source>, vol. <volume>14</volume>, no. <issue>3</issue>, pp. <fpage>3483</fpage>&#x2013;<lpage>3493</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-27"><label>27</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Jabbari</surname></string-name>, <string-name><given-names>K. J.</given-names> <surname>Almalki</surname></string-name>, <string-name><given-names>B. Y.</given-names> <surname>Choi</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Song</surname></string-name></person-group>, &#x201C;<article-title>ICE-MoCha: Intelligent crowd engineering using mobility characterization and analytics</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>19</volume>, no. <issue>5</issue>, pp. <fpage>1025</fpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-28"><label>28</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>F.</given-names> <surname>Zafari</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Gkelias</surname></string-name> and <string-name><given-names>K. K.</given-names> <surname>Leung</surname></string-name></person-group>, &#x201C;<article-title>A survey of indoor localization systems and technologies</article-title>,&#x201D; <source>IEEE Communications Surveys &#x0026; Tutorials</source>, vol. <volume>21</volume>, no. <issue>3</issue>, pp. <fpage>2568</fpage>&#x2013;<lpage>2599</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-29"><label>29</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>B.</given-names> <surname>Matthias</surname></string-name>, <string-name><given-names>F.</given-names> <surname>Burkert</surname></string-name>, <string-name><given-names>F.</given-names> <surname>Schmidt</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Hinz</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Hartmann</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>Integrating pedestrian simulation, tracking and event detection for crowd analysis</article-title>,&#x201D; in <source>IEEE Int. Conf. on Computer Vision Workshops (ICCV Workshops)</source>, <publisher-name>IEEE</publisher-name>, <publisher-loc>Barcelona, Spain</publisher-loc>, pp. <fpage>150</fpage>&#x2013;<lpage>157</lpage>, <year>2011</year>.</mixed-citation></ref>
<ref id="ref-30"><label>30</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>V.</given-names> <surname>Galpin</surname></string-name>, <string-name><given-names>N.</given-names> <surname>Zo&#x0144;</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Wilsdorf</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Gilmore</surname></string-name></person-group>, &#x201C;<article-title>Mesoscopic modelling of pedestrian movement using carma and its tools</article-title>,&#x201D; <source>ACM Transactions on Modeling and Computer Simulation (TOMACS)</source>, vol. <volume>28</volume>, no. <issue>2</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>26</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-31"><label>31</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y.</given-names> <surname>Jia</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Qi</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Shang</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Jiang</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Li</surname></string-name></person-group>, &#x201C;<article-title>A practical approach to constructing a knowledge graph for cybersecurity</article-title>,&#x201D; <source>Engineering</source>, vol. <volume>4</volume>, no. <issue>1</issue>, pp. <fpage>53</fpage>&#x2013;<lpage>60</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-32"><label>32</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>K.</given-names> <surname>Jiang</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Yang</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Zhang</surname></string-name> and <string-name><given-names>Z.</given-names> <surname>Xiao</surname></string-name></person-group>, &#x201C;<article-title>A flexible multi-layer map model designed for lane-level route planning in autonomous vehicles</article-title>,&#x201D; <source>Engineering</source>, vol. <volume>5</volume>, no. <issue>2</issue>, pp. <fpage>305</fpage>&#x2013;<lpage>318</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-33"><label>33</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>A. F.</given-names> <surname>Subahi</surname></string-name></person-group>, &#x201C;<article-title>Edge-based IoT medical record system: Requirements, recommendations and conceptual design</article-title>,&#x201D; in <source>IEEE Access</source>, vol. <volume>7</volume>, <publisher-name>IEEE</publisher-name>, <publisher-loc>USA</publisher-loc>, pp. <fpage>94150</fpage>&#x2013;<lpage>94159</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-34"><label>34</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Younas</surname></string-name></person-group>, &#x201C;<article-title>Research challenges of big data</article-title>,&#x201D; <source>Service Oriented Computing and Applications</source>, vol. <volume>13</volume>, no. <issue>2</issue>, pp. <fpage>105</fpage>&#x2013;<lpage>107</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-35"><label>35</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>A. F.</given-names> <surname>Subahi</surname></string-name> and <string-name><given-names>K. E.</given-names> <surname>Bouazza</surname></string-name></person-group>, &#x201C;<article-title>An intelligent IoT-based system design for controlling and monitoring greenhouse temperature</article-title>,&#x201D; in <source>IEEE Access</source>, vol. <volume>8</volume>, <publisher-name>IEEE</publisher-name>, <publisher-loc>USA</publisher-loc>, pp. <fpage>125488</fpage>&#x2013;<lpage>125500</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-36"><label>36</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>I.</given-names> <surname>Robinson</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Jim</surname></string-name> and <string-name><given-names>E.</given-names> <surname>Emil</surname></string-name></person-group>, <source>Graph Databases: New Opportunities for Connected Data</source>, <publisher-name>O&#x2019;Reilly Media</publisher-name>, <publisher-loc>USA</publisher-loc>, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-37"><label>37</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>Y. W.</given-names> <surname>Chiou</surname></string-name></person-group>, &#x201C;<article-title>APIs for XML: DOM, SAX, and JDOM</article-title>,&#x201D; in <source>Perspectives on Information Systems Development</source>, <publisher-loc>Boston, MA</publisher-loc>: <publisher-name>Springer</publisher-name>, pp. <fpage>299</fpage>&#x2013;<lpage>308</lpage>, <year>2002</year>.</mixed-citation></ref>
<ref id="ref-38"><label>38</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>F.</given-names> <surname>Jouault</surname></string-name> and <string-name><given-names>I.</given-names> <surname>Kurtev</surname></string-name></person-group>, &#x201C;<article-title>Transforming models with ATL</article-title>,&#x201D; in <source>Int. Conf. on Model Driven Engineering Languages and Systems</source>, <publisher-loc>Berlin, Heidelberg</publisher-loc>: <publisher-name>Springer</publisher-name>, pp. <fpage>128</fpage>&#x2013;<lpage>138</lpage>, <year>2005</year>.</mixed-citation></ref></ref-list></back></article>