# Digital Twins, Virtual Devices, and Augmentations for Self-Organising Cyber-Physical Collectives +
## 3 Motivation and Related Work
### Reference Example: Self-Organising Navigation and Exploration in Dynamic Environments  
Virtual nodes can support situated computations in dynamic environments, for example, in applications where the underlying structure of the environment needs to be mapped (i.e., represented) on a distributed system and exploited computationally. The challenge is to adapt distributed state and behaviour to continuous changes--including those induced by the computation itself (e.g., through hard or soft control on mobility of devices). For instance, consider a post-disaster scenario, in which an urban area has been hit by a natural disaster (e.g., an earthquake or a hurricane) which damaged the local infrastructure, occluding roads and making the pre-existing information about road connections obsolete. A similar scenario occurred in central Italy between 2016 and 2017, when a tragic seismic sequence caused multiple building collapses that in turn occluded roads [24; 25]; the geophysics changes induced by the earthquakes [26] triggered landslides [27] and avalanches [28] few weeks later, continuously disrupting the actual shape of the road infrastructure. Consider for this scenario a team of explorers who can sense their own position. The explorers could be human beings equipped with a portable device or unmanned ground vehicles (UGV). We assume that devices are able to communicate to every other device, either directly (e.g., via long-range wireless links such as LoRaWAN), or through the support of a local network node, (e.g., leveraging a temporary emergency network access using airborne base stations [29]), or through to the cloud (for instance, in the case the event did not disrupt the cellular network infrastructure, or in the case it had been recovered quickly enough). In other words, we assume that the network is not segmented, or that at least that segmentations are momentary (e.g., cellular network signal losses, or temporary occlusion of the line-of-sight connection with the airborne base station). The goal is toexplore the area and build a reachability map. To do so, the system runs an aggregate program that collectively computes paths among devices in real time, considering their current position. The aggregate system considers _logically_ connected devices within some range, and spawns a new virtual device situated at its current position whenever no other device is logically reachable (isolation), or all the reachable devices are considered \"too far away\". The idea is to exploit logical connectivity to create a live physical reachability map quickly, at the expense of some virtualisation overhead, as it is likely that devices separated by a short space are directly reachable in physical space. A similar scenario is crowd-aware navigation. The system we consider counts hundreds of nodes deployed in an urban environment: these may include infrastructural elements (e.g., fog nodes), smart city devices, smartphones, and wearables held by people. The system is programmed via aggregate computing [22], and collectively computes an estimate of the local crowding in order to handle \"navigation requests\" in a crowd-sensitive fashion--extending over the crowd tracking example seen in [21]. The system's goal is to react to navigation requests to reach a Point of Interest (PoI), providing as a response a route that does not get across overly crowded areas. Of course, since the phenomenon is dynamic, such a route may need to be readjusted at runtime. One possible collective solution is to leverage multiple _gradients_[30] to build a spatial data structure carrying information about position and direction of neighbouring nodes, distorting the information about distance considering the crowding level (e.g., as perceived with Bluetooth proximities), and thus making overcrowded areas appear naturally farther away than they actually are to model the inconvenience and risk of passing through these locations. Further, these gradients can be leveraged to sustain a collective infrastructure known as the self-healing \"channel\".