# Modeling Dew Computing in DISSECT-CF-Fog
## 4 Evaluation
### Smart City Scenario  
To further examine the effectiveness of motion prediction in the simulator, we used a smart city scenario, which is another representative IoT use case. Regarding the concept of intelligent cities, smart buses (Smart Public Transit (visited on 24 August 2022)): [[https://www.nexcom.com/applications/DetailByDivision/smart-public-transit](https://www.nexcom.com/applications/DetailByDivision/smart-public-transit)]([https://www.nexcom.com/applications/DetailByDivision/smart-public-transit](https://www.nexcom.com/applications/DetailByDivision/smart-public-transit))) help to organize the fleet in increasing traffic, ensure safety, and enhance the traveling experiences via GPS, motion sensors, and video surveillance systems. In this artificial use case, we modeled the infrastructure of a bus route with five bus stops: (\(A,B,C,D,E\)). Within the city, there are two fog servers (\(node_{1}\), \(node_{2}\)) located 5 km apart each other. The range of the fog servers is set to 2 km. Bus stops \(A\) and \(B\) are within the range of \(node_{1}\), and stations \(D\) and \(E\) are within the range of \(node_{2}\). Stop \(C\) is outside the range of both fog servers. Smart devices on the buses are able to run services (e.g., real-time route planning based on GPS data measured). The bus drives with deterministic movement, at an average speed of 30 km/h in direction \(A\to B\to C\to D\to E\). Stops \(B\) and \(C\) and \(C\) and \(D\) are far apart (3.5 and 4 km, respectively), so it is worth migrating the service to the devices. A total of 10 devices were simulated on 2 buses, and the devices generated 50 bytes of data every 2 min. The simulation modeled 50 min of the operation; the network settings and the specifications of machines were the same used in the previous scenario. The simulation was run in two ways: (i) without motion prediction and (ii) with motion prediction. Since VM startup could be time-consuming in the case of migration, many data may be processed with delays. The results are shown in Table 3. In the first case, it can be observed that only 76.4% of the IoT data were processed in time, but in the second case, this ratio increased to 96.0%, thanks to the proactive migration. In the previous scenario, we mainly focused on the physical environment, such as the different ranges of the computing nodes, the number of used virtual machines, utilization costs, and energy consumption to see how an IoT-Dew-Fog system would behave within such circumstances. The critical point of the system is the following: due to an estimation, we initialized launching the VMs in advance, but later it turned out that VMs were created unnecessarily, which could increase the CPU load and energy consumption. Contrarily, no VM initialization was triggered, but it should have been to serve the higher needs. This time, instead of focusing on the physical environment (i.e., resources, utilization price, etc. ), we examined the accuracy of our proposed proactive strategy. The triggering method of migration was called 250 times during the evaluation. The results of the simulation in this scenario can be seen in Table 3. The table depicts the main monitored metrics during the simulations. We also compared the ratio of the predicted and actual migrations. As we can see from Table 4, false-negative migrations (missing instructions to start a VM) and false-positive attempts (unnecessary instructions to start a VM) occurred two and seven times using the