key: cord-1024799-4v7fg2yf authors: Montori, Federico; Bedogni, Luca; Fiandrino, Claudio; Capponi, Andrea; Bononi, Luciano title: Performance evaluation of hybrid crowdsensing systems with stateful CrowdSenSim 2.0 simulator() date: 2020-07-22 journal: Comput Commun DOI: 10.1016/j.comcom.2020.07.021 sha: c3bdca9830bfe94250840411c4adb7601d18aebc doc_id: 1024799 cord_uid: 4v7fg2yf Mobile crowdsensing (MCS) has become a popular paradigm for data collection in urban environments. In MCS systems, a crowd supplies sensing information for monitoring phenomena through mobile devices. Depending on the degree of involvement of users, MCS systems can be participatory, opportunistic or hybrid, which combines strengths of above approaches. Typically, a large number of participants is required to make a sensing campaign successful which makes impractical to build and deploy large testbeds to assess the performance of MCS phases like data collection, user recruitment, and evaluating the quality of information. Simulations offer a valid alternative. In this paper, we focus on hybrid MCS and extend CrowdSenSim 2.0 in order to support such systems. Specifically, we propose an algorithm for efficient re-route users that would offer opportunistic contribution towards the location of sensitive MCS tasks that require participatory-type of sensing contribution. We implement such design in CrowdSenSim 2.0, which by itself extends the original CrowdSenSim by featuring a stateful approach to support algorithms where the chronological order of events matters, extensions of the architectural modules, including an additional system to model urban environments, code refactoring, and parallel execution of algorithms. Mobile CrowdSensing (MCS) gained exponential interest in the last years and has become one of the most promising paradigms for data collection in urban environments within the scope of smart cities [2] . MCS systems gather data from sensors typically embedded in citizens' mobile devices, such as smartphones, tablets, and wearables. The number of worldwide smartphones sales is still increasing 5 according to Gartner statistics, reaching 1.55 billion units in 2018 [3] . The crowd analytics market is projected to reach USD 1 142.5 million by 2021, raising from USD 385.1 million of 2016 at a compound annual growth rate of 24.3% [4] . Data acquisition can be either participatory or opportunistic, depending on the degree of involvement of the users in sensing processes. Participatory sensing systems directly tasks users by specifying a 10 set of requests, e.g., to record a sound using the microphone [5] . To be effective and mitigate the risk of obtaining little contribution, participatory approaches require specific incentive mechanisms and recruitment policies [6] . Opportunistic sensing systems do not task users directly user, but rather the applications themselves are responsible for taking sensing decisions that are typically context-aware. Hybrid approaches combine the strengths of both paradigms [7] . A number of applications in the 15 context of public health monitoring, safety and emergency can benefit from hybrid schemes [8] . Public health monitoring is particularly relevant nowadays because of the recent outbreak of the COVID-19 virus and crowdsensing techniques can help mitigate and control the rate of diffusion. The concept of hybrid in MCS is also employed to refer to those systems that mix static sensor networks and mobility provided by MCS. HySense [9] is one of such frameworks. Its objective is to leverage the fixed sensing 20 architecture when mobile nodes contribute too little so to balance sensing opportunities in different regions make the resulting data contribution as uniform as possible. Following a similar principle, the authors of [10] build a multi-sensor platform to create high-resolution pollution maps. The success of a MCS campaign typically relies on large participation of users [11] . Unfortunately, often it is not feasible to develop testbeds and platforms that involve a multitude of citizens 1 . On 25 the one hand, the cost of recruitment scales with the number of users involved and the amount of data collected. On the other hand, the required time for setting up a large-scale sensing campaign is prohibitively long. To this end, simulators offer a valid alternative to assess the performance of MCS systems in city-wide scenarios with large user participation in a reasonable time. Specifically, simulators are well-suited to assess and compare the performance of specific aspects of MCS systems 30 (e.g., the decision process to sense and report data). In this work, we focus on hybrid MCS and provide the researchers in the area with a fundamental tool to assess the performance of such systems. To this end, we extend CrowdSenSim 2.0 [1] by proposing an algorithm to efficiently re-route users that would offer opportunistic contribution towards the location of sensitive MCS tasks that require participatory-type of sensing contribution. This is achieved by re-implemented almost integrally the simulator engine, besides several other improvements. As a matter of fact, the legacy version of CrowdSenSim can simulate with a high level of detail MCS systems in urban scenarios and assess the energy consumption of mobile devices. However, it lacks adaptation to several 40 MCS sensing paradigms like Hybrid and other applications that require features such as statefulness and flexible event triggering. Indeed, as it will be explained in § 3, the original CrowdSenSim featured only stateless use cases and was oriented to model network and energy consumption characteristics rather than algorithmic ones. With respect to the original CrowdSenSim [12] , CrowdSenSim 2.0 makes the following contributions: 2. It optimizes the computational performance by means of a full code refactoring and the introduction of algorithm-level parallelism, which enables researchers to run several MCS algorithms simultaneously or several runs of the same algorithm at the same time. Furthermore, besides the above contributions directly inherent to the simulation platform, the paper makes these additional contributions: • We include a new module in CrowdSenSim 2.0 to support hybrid data collection. Such module enhances the original flow of the simulator by operating a significant change in terms of the applications supported. • We validate the benefits CrowdSenSim 2.0 brings in terms of runtime execution and memory utilization. We also show the impact of simulation parameters, such as the city size, the number 60 of simulated users and the number of path changes, in terms of time performance. • We present two use cases: (i ) an analysis of a stateful distributed data collection algorithm implemented in CrowdSenSim 2.0 and (ii ) a new algorithm for hybrid data collection and its validation evaluated in three different cities. The rest of the paper is structured as follows. Section 2 outlines the main research efforts in the support for such type of data collection. The results are validated for three different cities, i.e., 70 Luxembourg, Bologna and Melbourne. Finally, Section 7 concludes the work. After having scanned the state-of-the-art thoroughly, it has become evident that it does not exist a simulation tool that covers all the components of MCS. This is because MCS is a general paradigm which groups highly heterogeneous requirements, settings and objectives. For example, data collection can be 75 opportunistic or participatory according to the degree of user involvement. Users might contribute freely to a sensing campaign or can be recruited through specific policies. The objectives of MCS research span over a number of areas, including quality and coverage of information over an area of interest, user recruitment, and incentive mechanisms [2, 13] . Thus, such research areas typically propose optimization frameworks or algorithms that are evaluated standalone and often leave apart important 80 components that impact on the correct modeling. These components include realistic user mobility [14] and modeling of urban environments [15] as well as modeling of the network that transfers sensing readings from end-users to the cloud where it is typically processed. For the above reasons, a number of proposed simulation platforms are not suitable to properly evaluate MCS systems because they typically focus on one component at a time [16] . For example, 85 in [17] the authors propose to leverage the capabilities of Network Simulator 3 (NS-3) to simulate ad-hoc scenarios for reporting incidents. NS-3 is a highly detailed simulation tool for networking purposes and models network protocols down to the granularity of the single packet across all the layers of the network stack. This strongly limits scalability, as the level of detail in such simulations is too high and modeling typical MCS sensing campaigns with thousands of users overall contributing 90 during hours/days timescale becomes prohibitive. The same applies to similar simulation tools such as OMNeT++, used in [18] . CupCarbon, proposed in [19] , is a WSN-based simulator in which the researcher can individually deploy both sensors and base stations on realistic urban environments obtained from OpenStreetMap (OSM) 2 . Sensors can be mobile and can have dedicated paths along the roads, which makes it suitable for MCS scenarios. However, CupCarbon limits the size of the scenario, 95 which precludes scalability to thousands of nodes. The most notable effort in the last years is given by CrowdSenSim [12] , a simulator for MCS scenario capable of supporting a high number of users (order of hundreds of thousands) and their motion along the roads of cities imported by OSM without modeling in full the network stack, yet providing a sufficient level of detail on battery consumption statistics and number of tasks executed. The focus of the simulator is heavily energy-driven, implementing a number of algorithms, both in participatory and opportunistic scenarios, aiming to reduce the energy consumption per device. Being primarily implemented for energy consumption oriented scenarios, CrowdSenSim lacks adaptability to many MCS use cases as it does not support a number of features, such as statefulness, that are required by the majority of MCS systems. 3. The CrowdSenSim 2.0 Architecture 105 This section presents the architecture of CrowdSenSim 2.0 by highlighting its novelties over the original CrowdSenSim. In particular, we detail the architecture of the simulator outlining the role of each module and we expose the new features and improvements. We specifically highlight the novelties that allow CrowdSenSim 2.0 to support hybrid CrowdSensing data collection, since such novelties bring a significant conceptual change to the whole architecture compared to the one presented in [1]. The Path Changer module was developed from scratch and integrated with the system by implementing procedures that the other modules can call. Throughout the simulation, the Path Changer module allows users change their path at runtime, upon occurrence of certain conditions. This change The City Layout module allows researchers to define the urban street network of a city-wide scenario 135 over which the participants move. The street network is defined as a set of coordinates where pedestrians can be located, including latitude, longitude, and altitude. Python package to download and simplify street networks from OSM [20] . The map thereby obtained is in a form of a graph graph describing the street network, in which each node corresponds roughly to a change of direction in a street or to a cross. We refer to such graph as the "OSM City Layout". Furthermore, CrowdSenSim 2.0 implements the AOP algorithm [21] to augment the precision of the OSMnx City Layout, with a granularity chosen according to the needs and the objectives of the MCS 145 campaign under study. Fig. 2 (a) shows the map of the city layout and the street network where users can walk. Pedestrian movement is generated over the points, which correspond to the set of downloaded coordinates. This second graph is defined as the "AOP City Layout"; it is much denser than the OSMnx one and much more suitable for generating fluidly mobility traces. [23, 24, 25] . In particular, each event is generated along with its MGRS coordinates with the finest possible granularity (a 1m-sided square area) and 155 such data is then passed to the Simulator Engine module for processing. The User Mobility module defines the initial user placement, at what time they "spawn" in the urban environment and how they move. Users are generated using a spatial distribution function and move according to different possible models. For instance, mobility can be uniformly or randomly distributed, 160 can be based on real traces, or built upon different weights according to the point of interests and time of the day (e.g., following the distribution of Google Popular Times 3 ). Each participant has a certain travel time (e.g., 20 min walk) and its trajectory is generated consequentially as a sequence of events, defined in § 3.1, equally spaced in time. After an event is generated, the participant jumps to a generated uniformly within the interval 1 -1.5 m/s. User mobility is generated as pedestrian trajectories with a random start and end point according whereas the new destination is chosen by the participant itself (further details in § 3.5). In CrowdSenSim 2.0 many options in the generation of events have been made configurable (see the block "Event Configuration" in Fig. 1 ). The distribution function for generating users can be selected when configuring the simulation, e.g., a normal or uniform distribution, whereas in the old version users 185 were generated only uniformly. By selecting among various generation functions, it is now possible to simulate different density of the users throughout the simulation runtime. The amount of time each user moves in the urban environment can be configured like in the original CrowdSenSim. The time interval ∆t between two events has been made configurable as well, while in CrowdSenSim was fixed to 60s. This enables to simulate possibly more complex scenarios, in which the time between updates is 190 not decided at design time, but can change through configuration. This makes the number of supported applications significantly higher. The simulator engine is written in C++ and, as shown in Fig Comparing the performance of multiple algorithms (e.g., for data collection) at a time is often a desirable feature in simulation platforms. CrowdSenSim 2.0 makes it possible to run different algorithms J o u r n a l P r e -p r o o f Journal Pre-proof To enable applications and algorithms that require privacy or fine-grained energy savings mechanisms, CrowdSenSim 2.0 allows the simulated users to be aware of certain information detained by the central 230 entity organizing the sensing campaign. For example, instructions about the amount of yet to be delivered information in a certain area. Therefore, users can be in: • Power-save mode, thus eligible to receive such information when it is piggybacked on another communication (e.g., when they are pushing data). • Active mode, thus eligible to receive such information upon each of their events occur. • Oracle mode, thus aware of such information at any time. When looking at such division from a privacy perspective, users in power-save mode are those with limited access to global information because they are not trustworthy, whereas users in oracle mode have higher privileges. Clearly, the additional state may be implemented in case the simulated scenario requires it. In detail, the Simulator Engine implements a changeDestination() function, which can be invoked by a participant by setting a new GPS coordinate as a destination. This is translated into a Python object through embedding [29] , which then invokes the dedicated function in the Path Changer module. The latter elaborates the path by using the single source Dijkstra algorithm over the AOP City Layout graph, by setting the source and the destination to their closest counterparts in the graph. Alternatively, 255 the OSMnx graph can be used, which allows for faster execution (the graph is much coarser) at the price of a higher approximation. The newly generated list of events is passed on to the Simulator Engine, which then deletes all the events belonging to the calling participant that are yet to be processed and replaces them with the new list, respecting the chronological order of the total list of events. Such operation is performed in linear time, as all the newly generated events as well as the original list 260 remain in chronological order. Fig. 3(b) shows the two types of path change that are implemented: • Type 1, or simply "change of direction" allows for each participant to pick a new destination. • Type 2, or simply "deviation" allows for the user to pick a point of interest and immediately change its path to first get there and then, once such point has been reached, head to the original destination. This results in performing the single-source Dijkstra algorithm twice, however only 265 one call to the Path Change module is performed. As the use of this module changes the original list of events, the boost given by the algorithm level parallelism cannot be used for such type of simulations. The newly developed CrowdSenSim 2.0 has undergone a complete code refactoring procedure as In order to efficiently validate CrowdSenSim 2.0, we referred to an energy consumption analysis of the DDF data collection algorithm originally proposed in [26] that was implemented and practically evaluated in [27] . DDF is a locally stateful data collection algorithm in which participants keep on 285 generating data up to a certain threshold of energy consumption depending on their battery capacity. For the sake of energy-related analysis, we left the energy calculation of the original CrowdSenSim untouched. In detail, we equipped each participant with a mobile device carrying an accelerometer, a pressure sensor, and a temperature sensor. As in [12] , the sensors generate readings with the same sampling frequency. For all the simulations, we resort to 10 000 participants in the center of Luxembourg In order to further strengthen our claim, we also compared the transmission consumption between the two simulators. As we did for the sensors, we did not modify the way in which participants transmit data. Again the values produced by the two simulators match perfectly, validating their equivalence. The code refactoring and the parallel processing feature brought a significant boost in the simulation performance in terms of the time of execution and memory consumption. The benefit of supporting hybrid CrowdSensing scenarios comes at the cost of slowing down the The test is performed in the city of Luxembourg, the number of participants is lowered to 1 000 and 325 the duration of the simulation is reduced to 2 h. The sampling frequency is tuned to 10 s, therefore bringing the total amount of events above 150 000. We ran several simulations in which participants change direction with a given probability for each event. The destination of the path change is kept the same as the original, as defining a new one would not be meaningful to a performance evaluation test. The shortest path calculation is executed through the use of the OSMnx City Layout, which has 330 35, 548 nodes. the execution time, we can state that a large part of the execution is devoted to the shortest path invocation (as no real change happens in the mobility). We also observe that a high number of Type 2 path changes pushes the simulation time to less than 40 min, which is well below the simulated time, also bearing in mind that such a high number of changes is unlikely to happen in a realistic scenario. In order to complement the performance test shown in Fig. 7 (a), we ran further experiments to 340 show the scalability of the simulator, specifically quantifying its behavior by changing (i) the number of users and (ii) the size of the map. Fig. 7 to 3.5km compared to its absolute duration when the radius is 2.0km. This happens even though the area considered is more than doubled, reason being most of the streets (and, consequently, nodes) are grouped in the very center, which is far denser than the outskirts. This difference is less noticeable in cities like Caracas and Tokyo. In this section, we outline our Asymptotic Opportunistic algorithm for Joint Fairness and Satisfaction index (AO-JFS) that was initially proposed in [28] along with its simplified versions AO-F and AO-S. Probabilistic Distributed Algorithms (PDA) [27] . Originally, performance evaluation was conducted using an ad-hoc simulator. The algorithm has been designed for data collection control, that is, 370 preventing the whole scenario from generating too much or excessively less data. Too less data would result in a poor mapping of a phenomenon on an urban (or rural) environment, whereas too much data may result in too much noise to get rid of as well as an unbearable amount of users to reward for data that is much more than required and, consequently, an unnecessary energy consumption. We Hence, the chronological order of the events is not enforced. Therefore, CrowdSenSim 2.0 with its stateful approach is necessary for any MCS algorithm that heavily depends on the chronological sequence 390 of the events. In the rest of the section, we will outline in detail the behavior of AO-JFS. We can model the problem as N different stations (we use the terms stations, users, and participants interchangeably) that adhere to the MCS campaign and perform observations against a given phenomenon. Such number N can vary over time due to mobility, in particular, participants may 395 leave the interested area, whereas new ones may join it. We assume to split our timeline in time slices ∆t i , that represent the atomic units during which a station cannot transmit more than once due to internal clocks. We also assume that the stations will send observations relative to ν certain resources We assume that each participant knows the SI values at all times (i.e., the central entity broadcasts the SI constantly) and, for each atomic time slot, performs a decision of whether to send or not the local measurement of the sensor (for each resource). In detail, at the time ∆t i+1 , each participant calculates a probability of sending the measurement relative to the sensor Ψ j that is basically the inverse of the received SI i,j , therefore P i,j = 1 − CSI i−1,j with CSI i , j being the Constrained Satisfaction Index: with being a very small number (in our case 0.001). This forces the SI to range from a very small number close to 0 to a number close to 1 for the purpose of probability calculation. To prevent contributions to stabilize at a too low or too high SI, we introduced boosters for the probability calculation. We define a booster as an exponent E to which we elevate the CSI in the otherwise. (3) k is the attempting factor, calculated individually by each station on top of the received b as where η > 0 is the number of ∆t i slots elapsed since the last transmission. In the end, the probability is calculated as Note that the term f n (x) indicates the iterative composition as f n (x) = f • f n−1 (x). City. Parallelism is used to test 50 runs of AO-JFS at the same time, each of them using a different 440 random seed. ∆t is set to 10s and w = 30, therefore the time window T is 5min. We set ν = 3, in particular, we used the three sensors mentioned in § 4 as our resources, and fixed the desired amount of observations as M 1 = 7 500, M 2 = 5 000, M 3 = 2 500. We generated users using a uniform distribution and set the total number G as 2 500, 5 000 and 10 000. Fig. 10 shows the number of active users N over time. As the distribution is uniform, N tends to reach a steady state after an initial transient. (PDF) in which the data points are the value of the SI sampled each ∆t. For each sensor, the SI value stabilizes around 1, which is the goal of AO-JFS. In more details, Fig. 11(b) shows the behavior of the SI at G = 5 000, with the number of active users over time N floating around 1 200. This 450 number is in a good balance with the number of required observations, in fact the SI value for all the sensors tends to cluster almost regularly around 1. Fig. 11 (c) shows the behavior of the SI with G = 10 000, with N settling around 2300. This number is very high in comparison to the number of required measurements. Therefore the effort of AO-JFS is in limiting the number of contributions by the participants. This is even more evident for Ψ 3 , the resource for which the fewer contributions are 455 needed, as the respective SI values tend to cluster at a slightly higher value (i.e., around 1.1). On the other hand, Fig. 11(a) shows the SI for G = 2 500 and, consequently, N floating around 500, which is a low number in comparison to the contribution required. Although the behavior of the SI is quite similar to the other plots, we can appreciate a slight difference for Ψ 3 , as its values are more spread. This is due to b being quite high: as the participants are pushed to contribute more, the probability 460 curve gets very high for most of the CSI values in input and causes more likely peaks and troughs in the contribution over time. This section shows the potential of CrowdSenSim 2.0 in supporting hybrid data collection campaigns by implementing a policy that allows to both capture a phenomenon through opportunistic data 465 collection as well as sporadic events through participatory data collection. Without loss of generality, in this section we term tasks the latter and assume that opportunistic data collection occurs in the background through AO-JFS. We implement hybrid collection by allowing the users to be notified by some important events occurred in the vicinity and allow them to change their mind at runtime by deviating from the initial trajectory to move close to the location of the event. Please note that Accomplishment). The scenario works as follows: we assume an urban scenario in which users walk along their 475 pre-defined routes. We also assume that each of such users is provided with a mobile application able to notify them whenever a task occurs -for simplicity, tasks are assumed to be sudden events that cannot be inferred beforehand -together with their location and their duration in time. In order to perform a task, it is sufficient for a participant to be at some point in the coverage area of the task, without the constraint of lingering there for a minimum amount of time. We make this assumption 480 as it does not weakens our evaluation and realistically it is enough for the user to perform the action needed, e.g., to shoot a picture. When a task appears all the users in the city are notified of its presence and can freely decide whether to go and perform it, which translates in deviating from their path in order to cross the area of the task. Mathematically, a task is a tuple T i = lat i , lon i , r i , start i , end i , where lat is its latitude, lon is its longitude, r is the radius of the area pertaining the task, start is the starting time and end is its ending time. A participant can be represented in each moment as P j = lat j , lon j , lat f , lon f , where lat j , lon j are its position and lat f , lon f are its destination. When the task is generated the user is notified and, assuming that lat i , lon i are the coordinates of the point closest to the participant within the area of the task, then we model the probability of the participant to go there (and then go to its original destination) as inversely proportional to the amount of time spent to perform the task in addition to its normal path. Formally, we define the function E(lat 1 , lon 1 , lat 2 , lon 2 ) to output the estimated time to go from the location (lat 1 , lon 1 ) to (lat 2 , lon 2 ). Then we model the probability P for the participant P j to perform task T i as: where T M AX is the maximum amount of time that a person would realistically spend to perform a task. The calculation of such probability is obviously subject to where t is the current time. We intentionally formulate P is fairly simple way. Indeed, modeling as realistically as possible the user behavior is beyond the scope of this paper as it would require sociologically studies. Our point is rather different: we aim to prove that CrowdSenSim 2.0 can support Besides presenting the street networks employed, Fig. 12 also shows the shapes of all the 1 km-sided 500 MGRS squares in the area, which gives also a flavor of its size. All the simulations feature 10 000 participants running by default AO-JFS with the same parameters specified in § 5.3. In addition, each user can run HTA on top of AO-JFS and, therefore, make use of the Path Changer module described in § 3.5. For HTA, we set T M AX to 30 min and deployed randomly a set of tasks throughout the simulation. Each task is assigned to the center of a 100 m-sided MGRS square, has a duration of 30 min 505 and is generated randomly once for each city. For each set of tasks we performed 20 simulations (without algorithm-level parallelism) with and without HTA to evaluate the level of task accomplishment, i.e., how many users have contributed data for it. We performed two sets of simulations for each city, one with 2 tasks and the other with 10 tasks. the other towards the end of the simulation and in the outskirts. The tasks are enough distant in time to let the simulation revert back to a steady state between the end of the first and the beginning of the second. We compare the number of users performing the task within the MGRS area coverage at a minute-level granularity. As expected, HTA allows for a higher number of participants per task 515 with respect to the solely opportunistic approach AO-JFS. We note that three cities share a similar behaviour: tasks in the city center have higher chances of augmenting the participation through HTA than tasks in the periphery. Besides the actual scale, the trend is interesting because the three cities have a different urban tissue which suggests that the re-direction principle could be re-used effectively across different cities. 520 We notice similar results in Fig. 14 Melbourne, being in a grid-shape and hosting a much higher number of streets in a smaller area, shows an evener distribution of users, in fact, tasks get a similar gain of accomplishment due to HTA. Bologna behaves in a fuzzier way: this could be associated with its size, much bigger and less dense than the other two, and its irregularity. This paper presents CrowdSenSim 2.0 4 and its support for hybrid mobile crowdsensing data collection mechanisms. CrowdSenSim 2.0 extends with major advances the existing CrowdSenSim platform for simulations of MCS activities in realistic urban environments. CrowdSenSim 2.0 exhibits three main novel aspects. First, the simulator features a stateful approach that enforces all events to be executed in chronological order with a higher fine-grained temporal resolution. Second, it features two models to 550 generate the city layouts over realistic street networks where users move, based on the popular OSM and the Military Grid Reference System. Third, the simulator supports changes in user trajectories during runtime, which is a fundamental prerequisite for hybrid data collection. In a nutshell, other advances include extensions of the architectural modules, code refactoring, and algorithms' parallel execution that boost performance by making significantly lower the runtime execution and memory utilization. This clearly enables the simulation of larger scale scenarios, which is of paramount importance for research in MCS. We demonstrate that when feeding CrowdSenSim 2.0 and the original CrowdSenSim with the same list of events, they perform identically in terms of mobile device energy consumed for sensing and reporting, thus making CrowdSenSim 2.0 compatible with previous studies. We validate CrowdSenSim 560 2.0 with two use cases. First, we showcase the performance evaluation of a distributed opportunistic algorithm for data collection that shows how the stateful approach is fundamental for specific applications. Second, we show the support to hybrid crowdsensing by developing and validating HTA, an algorithm that re-routes users offering opportunistic contribution towards the location of sensitive MCS tasks that require participatory-type of sensing contribution. A survey on mobile crowdsensing systems: Challenges, solutions and opportunities Gartner says global smartphone sales stalled in the fourth quarter Crowd analytics market worth $1,142.5 million by 585 Participatory sensing Sociabilitydriven user recruitment in mobile crowdsensing internet of things platforms Hybrid crowdsensing: A novel 590 paradigm to combine the strengths of opportunistic and participatory crowdsensing Allergymap: A hybrid mhealth mobile crowdsensing system for allergic diseases epidemiology : a multidisciplinary case study HySense: A hybrid mobile crowdsensing framework for 600 sensing opportunities compensation under dynamic coverage constraint Spatiotemporal scheduling for crowd augmented urban sensing A collaborative internet of things architecture for smart cities and environmental monitoring Crowdsensim: a simulation platform for mobile crowdsensing in realistic 610 urban environments The curse of sensing: Survey of techniques and challenges to cope with sparse and dense data in mobile crowd sensing for internet of things Automotive 615 communications in lte: A simulation-based performance study Temporal reachability in vehicular networks Evaluation of simulation engines for crowdsensing activities Crowdsensing simulation using ns-3 Characterization and evaluation of mobile crowdsensing performance and energy indicators Cupcarbon: A multi-agent and discrete event wireless sensor network design and simulation tool Osmnx: New methods for acquiring, constructing, analyzing, and visualizing 630 complex street networks, Computers, Environment and Urban Systems High-precision design of pedestrian mobility for smart city simulators Universal transverse mercator (utm) and military grid reference system (mgrs Energy-aware and qualitydriven sensor management for green mobile crowd sensing A dynamic-trust-based recruitment framework for mobile crowd sensing Sensquare: A mobile crowdsensing architecture for smart cities A cost-effective distributed framework for data collection in cloud-based mobile crowd sensing architectures Why energy matters? 650 profiling energy consumption of mobile crowdsensing data collection frameworks Distributed data collection control in opportunistic mobile crowdsensing Extending and embedding the Python interpreter Real-time routing with openstreetmap data ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, GIS '11 Urban spatial order: Street network orientation, configuration, and entropy Computer Science, both Summa Cum Laude, from the University of Bologna in 2012 and 2015 respectively. He has been a visiting He participated in several EU projects and he is now WP leader for the H2020 Project Arrowhead Tools. His primary research interests include mobile crowdsensing, service-oriented computing, IoT automation and data analysis for IoT scenarios Luca Bedogni received the masters degree in computer science and Ph.D. degree from the University of He was a post doctoral researcher at the University of Bologna until 2018, when he became assistant professor at 675 the same University. He is currently an Assistant Professor at the University of Modena and Reggio Emilia, Italy, since 2019. He participated in more than 5 international and national projects Claudio Fiandrino joined as a postdoctoral researcher the IMDEA Networks Institute in December 2016 right after having obtained his Ph.D. degree at the University of Luxembourg. He received the Bachelor Degree in Ingegneria Telematica in 2010 and the Master Degree in Computer and Communication Networks Engineering in 2012 both from Politecnico di Torino He is member of IEEE and ACM, served as Publication and Web Chair in IEEE CloudNet He received the Bachelor Degree and the Andrea's work on the impact of human mobility on edge data center deployment in urban environment 695 received the Best Paper Award at IEEE GLOBECOM 2019. He is member of IEEE and ACM, and served as Workshop Co-Chair of MoCS 2019. His primary research interests are in the field of mobile crowdsensing MSC, Summa cum laude Dr. Fiandrino's work is supported by the Juan de la Cierva grant from the Spanish Ministry of Economy and Competitiveness (FJCI-2017-32309).The authors would like to thank the students Emanuele Cortesi and Andrea Zapparoli for their 570 valuable implementation work.