## 5 Case Study: Smart Conservation of Cultural Heritage
### Modeling a Smart Cultural Heritage Space  
Based on the context model described in Section 3.2 a number of required subclasses were identified for the realization of a smart conservation ecosystem. The results of the instantiation of the model for the case study are shown in Table 4. The subclasses involved are as follows:  
* Thing (user): Includes the three types of users, i.e., the curators and the conservators who are recipients of proactive notifications about conservation issues and the visitors of the cultural space.
* Thing (device): Includes (a) the IoT infrastructure, i.e., sensors for environmental monitoring, beacons for location and proximity measurements and smart devices for environmental regulation and (b) devices of visitors and staff that are recipients of notifications, but also allow user localization.
* Location: Includes the building layout (rooms and corridors) and the points of interest (POIs), which are tagged locations of artifacts.
* Time: Includes the different timeframes that affect the environment, i.e., closer hours (minimal effect), visit hours (normal effect) and rush hour (maximum effect).
* Activity: Includes IoT activity (sensor measurement and manipulation of environmental devices), visitor activity (their movement and behaviour in the cultural space) and notification activity (for visitors and staff).  
Although the main classes are designed for generic CA ecosystems, they are easily adapted to the case study of the preventive conservation of CH. Figure 8 shows indicative examples with objects of the main classes that comprise part of the context model instantiation used in the present scenario. Specifically, a room with an artifact and a beacon installed on it are depicted with indicative object properties. Both the room and the artifact have a profile that stores the environmental preferences and visitor restrictions (such as the number of maximum visitors, or their minimum allowed proximity). The artifact profile is active on Monday during visiting hours (other possible profiles are active on other days). The artifact is paired with a beacon, which measures proximity with other BLE devices. Finally, the position is absolute for the POI (in terms of coordinates) and relative for the room (in terms of building layout).  
The implemented subclasses and produced observation tuples model all the contextual situations that are applicable to the conservation process. Examples of such observation tuples are shown in Table 5, which illustrates two cases, each one of them composed of two tuples. The first case represents the measurement of abnormal temperature value that triggers the manipulation of an air conditioning device. The asserted context for the second tuple stores the triggered rule and the relevant contextual data, which in this case, is the previous observation. The second case represents an irregular visitor behavior, which is captured by the proximity of the visitor's device to a beacon installed on an artifact (POI location). This observation triggers a staff notification activity, which is targeted to the device of the closest available staff member. All relevant asserted contexts, such as the  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Main Class** & **Subclasses** \\ \hline User & Visitor, curator, conservator \\ Device & Sensor, beacon, visitor device, environmental device, staff device \\ Location & Room, corridor, POI \\ Time & Visit hours, rush hour, closed hours \\ Activity & Sensor measurement, environmental device manipulation, visitor activity, \\ visitor device notification, staff device notification \\ \hline \hline \end{tabular}
\end{table}
Table 4: Modeling the smart conservation.  
Figure 8: Examples of main class objects.  
observation of visitor behavior, the triggered rule, the available staff (from their profiles and working hours) and their proximity are stored in the tuple in order to record the context involved in the reasoning.