# Improving Conceptual Modeling with Object-Process Methodology Stereotypes
## 5 A Stereotype Example: The Optimal Light Power Consumption IoT System
### Building the Needed Stereotype  
Designing a stereotype must be carried out carefully, so modelers and reviewers can be confident that the stereotype is robust and using it is beneficial. In the stereotype **Embedded Device Attribute Set** for representing IoT embedded devices, we want to include global IoT attributes, which any IoT device can potentially have. One such attribute is its geographic **Location**, which is often needed to know where some signal of an IoT sensor, for example, is coming from. To represent **Location**, we created the stereotype **GPS Coordinate Set**, with **Latitude** and **Longitude** as its parts (see Figure 13a). Both **Latitude** and **Longitude** are numerical values, se we define them as computational objects, and since the values are measured in degrees with decimal points, we set their units to be **deg**. We define the value range of **Latitude** to be \(-90\) to \(90\) degrees (written [**-90.90**]) and that of **Longitude** to be \(-180\) to \(180\), [**-180.180**], degrees.  
Having defined this base stereotype, we can use it as one of the attributes of the stereotype **Embedded Device Attribute Set**, as shown in Figure 13b. This stereotype consists of **Location**, to which the **GPS Coordinate Set** stereotype is anchored, shown in its semibolded view. **Embedded Device Attribute Set** has additional five computational attributes: **Cost**, measured in **5**, **Reliability**, measured in **%**, **Material** (a string) and **Power Consumption**, measured in **mA**. **Dimension Set** is similar to the stereotype **GPS Coordinate Set**, as it too bundles the three spatial coordinates, each of which is a computational object. Like **GPS Coordinate Set**, **Dimension Set** could also be defined as a stereotype. Having defined the **GPS Coordinate Set** stereotype, we can anchor it with confidence to the **Location** attribute of the **Embedded Device Attribute Set** without having to spend time and intellectual effort in defining its components (**Latitude** and **Longitude**) and their ranges.  
The strings inside curly braces, e.g., **[pc]** for **Power Consumption**, are aliases for use in computational processes. Not all the attributes can have units or value ranges. We may be able to define the cost and power consumption value ranges as greater than zero, but we leave undefined the possible dimensions and materials of our **Embedded Device Attribute Set**.  
The next stereotype we define is geared for sensors in IoT systems. **Sensor** is a physical object whose function is the physical process **Sensing**. Since our IoT system and its microcontroller use digitized values and calculation, we define a digital twin process for **Sensing**, called **DT Sensing**. OPM digital twins of their physical counterparts are  
Figure 13: (**a**) The GPS Coordinate Set stereotype (**b**) The Embedded Device Attribute Set model, which serves as a stereotype.  
computational by definition, so **DT Sensing** is computation. As such, it enables defining the specific connection to the hardware and the specific protocol used, e.g., MQTT [2; 36; 37; 38] or AMQP [2; 39].  
Since **Sensor** is an embedded device, in Figure 14 we incorporate the **Embedded Device Attribute Set** stereotype into the **Sensor** stereotype, using **Sensor Attribute Set** as the anchor. The result is the attribute **<<Embedded Device Attribute Set>> Sensor Attribute Set**. Using semi-folded object presentation (Figure 14), we can see the parts of this attribute: **Cost, Dimension Set**, etc. Additional sensor-specific attributes, including **Resolution** and **Response Time**, have been added, each with a defined value range and measurement units. **Accuracy Set** consists of one or more **Accuracy** objects, each exhibiting the attribute **Accuracy Condition**.