# A Context-Aware Edge Computing Framework for Smart Internet of Things
## 5 Experiment and Evaluation  
In this experiment, we will be focusing on extracting high-level context such as the duration and frequency of a parked vehicle. This will allow us to better demonstrate the benefits of the framework.  
To evaluate the effectiveness of CONTESS, we tested its applicability for parking management in a smart city scenario. We implemented this use-case scenario using linked data and semantic web technologies. Firstly, we designed an OWL-based ontology that incorporates all the required components of CONTESS. We used Protege (www.protege.stanford.edu (accessed on 15 March 2023)) to implement the ontology shown in Figure 8. The parking management scenario is taking place in a smart city, where each street contains  
Figure 7: Parking space detection using CONTESS.  
one or more roads and each road contains one or more parking spots. Each street has one or more buildings, where the drivers try to park their vehicles in the nearest parking spot. We used a part of the map of Haidian district, Beijing, China, taken from OpenStreetMaps with the roads map generated by SUMO for our experiments, as shown in Figure 9. As mentioned earlier, CONTESS focuses on context reasoning to improve the selective sensing process. In the context of parking management in a smart city, we focus on extracting the context of parking time and location associated with specific locations and vehicles. For instance, if a vehicle parks nearby a specific location from 9 am to leave after 5 pm, during working days, then it is highly likely that the pattern will continue next time. Such contextual information enables the system to predict future events, hence, better manage the parking assignments. We simulated the vehicle behaviors using the Veins framework (www.veins.car2x.org/ (accessed on 15 March 2023)) of OMNET++ network simulator (www.omnetpp.org/ (accessed on 15 March 2023)) and the traffic generation using SUMO traffic simulator (www.eclipse.org/sumo/ (accessed on 15 March 2023)). We used Apache Jena's triple store to store the inferred knowledge (www.jena.apache.org/ (accessed on 15 March 2023)). The traffic was divided into two classes: (1) randomly generated traffic, where vehicles park randomly and randomly leave the parking spots; and (2) context-related traffic, where the vehicles park regularly at the same location for the same time interval. For context acquisition, semantic reasoning and traffic assignment, CONTESS leverages the Semantic Web Rule Language (SWRL) (www.w3.org/Submission/SWRL/ (accessed on 15 March 2023)). Equation (1) shows an example of SWRL that adds a context property to the triplet store if a vehicle is parked in the same location for given time intervals.  
Figure 8: Parking management scenario ontology.  
Once a vehicle enters the roads that contain the location of the destination, it sends a parking request message. The parking management system assigns the nearest parking location if available, or recommends a specific waiting time according to the parking context of nearby vehicles. The system performance is evaluated based on two metrics: Distance to location (DL)--how far is the assigned parking spot from the desired parking location; and time to park (TP)--the time required for a vehicle to find a parking location.