<divclass="alert-warning">NOTE: The text in this section is extracted from ETSI TS 103 410-5 (V2.1.1) <ahref="#[0]">[0]</a>, and therefore falls inside the <ahref="https://www.etsi.org/intellectual-property-rights">ETSI IPR Policy</a></div>
### <a id="4.2.1"></a>General Overview
An overview of the SAREF4INMA ontology is provided in [Figure 1](#Figure_1), where orange rectangles are used to denote classes created in SAREF4INMA, while white rectangles denote classes reused from other ontologies, such as SAREF or SAREF4BLDG. For all the entities described in [the technical specification ETSI TS 103 410-5](#[0]), it is indicated whether they are defined in the SAREF4INMA extension or elsewhere by the prefix included before their identifier, i.e. if the element is defined in SAREF4INMA the prefix is s4inma, while if the element is reused from another ontology it is indicated by a prefix according to [the Namespace Declarations section](#namespacedeclarations)(e.g. saref refers to SAREF and s4bldg refers to SAREF for building).
Arrows are used to represent properties between classes and to represent some RDF, RDF-S and OWL constructs, more precisely:
* Plain arrows with white triangles represent the [rdfs:subClassOf](http://www.w3.org/2000/01/rdf-schema#subClassOf) relation between two classes. The origin of the arrow is the class to be declared as subclass of the class at the destination of the arrow.
* Dashed arrows between two classes indicate a local restriction in the origin class, i.e. that the object property can be instantiated between the classes in the origin and the destination of the arrow. The identifier of the object property is indicated within the arrow.
* Dashed arrows with no identifier are used to represent the [rdf:type](http://www.w3.org/1999/02/22-rdf-syntax-ns#type) relation, indicating that the element in the origin of the arrow is an instance of the class in the destination of the arrow.
Datatype properties are denoted by rectangles attached to the classes, in an UML-oriented way. Dashed boxes represent local restrictions in the class, i.e. datatype properties that can be applied to the class they are attached to.
Individuals are denoted by rectangles in which the identifier is underlined.
Note that [Figure 1](#Figure_1) aims at showing a global overview of the main classes of SAREF4INMA and their mutual relations. More details on the different parts of [Figure 1](#Figure_1) are provided from clause 4.2.2 to clause 4.2.4.
This clause focuses on the classes of SAREF4INMA that describe an item produced in a factory. The classes of interest, which are [s4inma:Item](#s4inma:Item), [s4inma:ItemCategory](#s4inma:ItemCategory), [s4inma:MaterialCategory](#s4inma:MaterialCategory), [s4inma:Batch](#s4inma:Batch), [s4inma:ItemBatch](#s4inma:ItemBatch), [s4inma:MaterialBatch](#s4inma:MaterialBatch) and [s4inma:ID](#s4inma:ID), are shown in [Figure 3](#Figure_3).
An Item is a tangible object that represents either the goods produced by an organization's production process or individually traced supplies (i.e. sub-assemblies of supplies). An item can be individually traced using an ID. SAREF4INMA allows to use several types of IDs, such as the Global Trade Item Number (GTIN) defined by GS1 (<a href="https://www.gs1.org/">https://www.gs1.org/</a>), used by organizations to uniquely identify their trade items as products or services that are priced, ordered or invoiced at any point in the supply chain. There are four GTIN formats (GTIN-8, GTIN-12, GTIN13, GTIN-14) and SAREF4INMA defines classes and properties for each of them. SAREF4INMA defines also classes and properties to associate items to the International Registration Data Identifier (IRDI), which is based on the international standards ISO/IEC 11179-6 [[i.4]](#[i.4]), ISO 29002 [[i.5]](#[i.5]) and ISO 6532 [[i.6]](#[i.6]). An example of relevant standard that uses IRDIs is the eCl@ss specification (<a href="https://www.eclass.eu/en/">https://www.eclass.eu/en/</a>) for grouping materials, products and services. Other types of IDs are defined in SAREF4INMA, such as the Universally Unique Identifier (UUID), or can be further defined ad-hoc by the ontology users by creating new classes as subclasses of the [s4inma:ID](#s4inma:ID) class.
An Item can recursively consist of other items (e.g. a shaver consists of a shaver head, motor and body) and can be the feature of interest of a observation (e.g. a shaver can be the feature of interest of a temperature observation made by a welding machine used to join different parts in the production of the shaver). An item is created exactly in one ItemBatch, which describes a uniform collection of items produced at a certain time using a certain production equipment. An ItemBatch consists of a set of items with similar properties (e.g. a certain brand and model of sensors made using a certain production line). An ItemBatch is a specialization of the more general Batch, which can be further specialized in a MaterialBatch. The difference between ItemBatch and MaterialBatch is that individual items can be traced in an ItemBatch (e.g. it is possible to trace an individual metal sheet in an ItemBatch), whereas it is not possible to exactly trace material in a MaterialBatch, (e.g. it is not possible to trace the exact piece of raw plastic material from a MaterialBatch, as the raw plastic is a volume, not identifiable in a specific sheet like in the case of metal sheets).
Material batches can be equipped with quality certificates, such as the BS EN 10204:2004 [[i.7]](#[i.7]) category 3.1 steel quality certificate (<ahref="https://standardsdevelopment.bsigroup.com">https://standardsdevelopment.bsigroup.com</a>). These certificates provide additional information about the material in the batch. Furthermore, MaterialBatches belong to some MaterialCategory, which describes a certain type of material (e.g. a certain type of steel sheets). Analogously, item batches belong to some ItemCategory, which describes a single type of Items (e.g. a certain type of sensor). An ItemCategory is in turn produced by some ProductionEquipmentCategory (see clause 4.2.3). The essential properties of each Item in all ItemBatches are the same. However, each ItemBatch might use different MaterialBatches and/or different ProductionEquipment. Therefore, small deviations between batches might occur, while the essential properties of all Items related to an ItemCategory are similar.
<figure>
<imgsrc="diagrams/ItemBatch.png"alt="Item, Batch and related classes"/>
<figcaptionid="Figure_2">Figure 2: Item, Batch and related classes</figcaption>
</figure>
### <a id="4.2.3"></a>Production Equipment and Factory
This clause focuses on the classes that describe how a production equipment is organized and how it can exchange information within the factory. The classes of interest are: [s4inma:ProductionEquipment](#s4inma:ProductionEquipment),[s4inma:ProductionEquipmentCategory](#s4inma:ProductionEquipmentCategory),[s4inma:WorkCenter](#s4inma:WorkCenter), [s4inma:Area](#s4inma:Area), [s4inma:Site](#s4inma:Site), and [s4inma:Factory](#s4inma:Factory), and are shown in [Figure 3](#Figure_3).
<figure>
<imgsrc="diagrams/ProductionEquipmentAndFactory.png"alt="Production Equipment, Factory and related classes"/>
<figcaptionid="Figure 3">Figure 3: Production Equipment, Factory and related classes</figcaption>
</figure>
A ProductionEquipmentCategory describes the kind of production equipment required for producing a certain item, i.e. a category of machine. An organization might have multiple instances of the same category of machines. Each individual machine is represented by a ProductionEquipment, which is a subclass of [saref:Device](https://saref.etsi.org/core/Device), which is in turn a subclass of [s4bldg:PhysicalObject](https://saref.etsi.org/saref4bldg/PhysicalObject). The latter is part of the SAREF for Building extension [[i.3]](#[i.3]), which defines the [saref:Device](https://saref.etsi.org/core/Device) class as a subclass of the more general [s4bldg:PhysicalObject](https://saref.etsi.org/saref4bldg/PhysicalObject) class, following a pattern that allows to locate devices within the building. Analogously, SAREF4INMA reuses the same pattern to locate a production equipment in the factory.
In order to locate the ProductionEquipment, a factory layout can be created. A factory is represented by the [s4inma:Factory](#s4inma:Factory) class (which is subclass of the [s4bldg:Building](https://saref.etsi.org/saref4bldg/Building) class) and can be further divided into smaller spaces using the [s4bldg:BuildingSpace](https://saref.etsi.org/saref4bldg/BuildingSpace) class. For the scope of SAREF4INMA, two types of BuildingSpaces are defined, namely Site and Area. A Factory can be further divided in sites, which according to IEC 62264 [[i.11]](#[i.11]) are identified physical, geographical, and/or logical component groupings of a manufacturing enterprise. A Site can be divided in areas which are defined by IEC 62264 [[i.11]](#[i.11]) as physical, geographical or logical groupings of resources determined by the site. An Area contains one or multiple work centers, which are a subclass of the [s4inma:ProductionEquipment](#s4inma:ProductionEquipment) class and are defined according to IEC 62264 [[i.11]](#[i.11]) as equipment elements under an area in a role-based equipment hierarchy that performs production, storage or material movement.
Note that as a subclass of [saref:Device](https://saref.etsi.org/core/Device), a production equipment in SAREF4INMA inherits all the properties of devices defined in SAREF. This includes the possibility to associate a device (and therefore a production equipment) with a number of functions. For the purpose of SAREF4INMA, a new class of functions is created, namely the [s4inma:ProductionEquipmentFunction](#s4inma:ProductionEquipmentFunction) class, which can be populated with subclasses that describe relevant functions, depending on the use case under consideration.
### <a id="4.2.4"></a>Observation
An important aspect of SAREF4INMA is the ability to trace back production process observations to individual items or batches. The modelling of observations in SAREF4INMA totally relies on the observations model proposed in SAREF. This modelling include the [saref:FeatureOfInterest](https://saref.etsi.org/core/FeatureOfInterest) class that provides the means to refer to the real world phenomena that is being observed in the given observation (e.g. a shaver is an item resulting from a certain production process and it can be defined as the feature of interest of a temperature observation made by a welding machine used to join different parts in the production of the shaver). The reader shall refer to the SAREF specification for details about the modelling of observations. The following properties are reused in SAREF4INMA to complete the model of observations:
*[saref:isPropertyOf](https://saref.etsi.org/core/isPropertyOf)(and its inverse [saref:hasProperty](https://saref.etsi.org/core/hasProperty)) to link the property being observed with the feature of interest.
*[saref:observes](https://saref.etsi.org/core/observes)(and its inverse [saref:isObservedBy](https://saref.etsi.org/core/isObservedBy)) to link a given observation with the feature of interest being observed.
*[saref:madeBy](https://saref.etsi.org/core/madeBy) has been included as complement of the [saref:madeExecution](https://saref.etsi.org/core/madeExecution) as its inverse, to link a observation and the device that produces it.
Within the SAREF4INMA use cases there is a need to distinguish between actual measurements and expected ones. For the former could be represented by stating a property value for a [saref:FeatureKind](https://saref.etsi.org/core/FeatureKind), while the latter could be stated stating the value of a [saref:FeatureOfInterest](https://saref.etsi.org/core/FeatureOfInterest) that related to the [saref:FeatureKind](https://saref.etsi.org/core/FeatureKind), or by stating an [saref:Observation](https://saref.etsi.org/core/Observation). This enables the calculation of deviations between planned and actual production process observations.
As a [saref:Device](https://saref.etsi.org/core/Device) can recursively consist of devices, a ProductionEquipment in SAREF4INMA can also consist of other devices, such sensors and actuators. A device (e.g. production equipment and its sensors) can make observations. These observation scan be related to a specific [s4inma:Batch](#s4inma:Batch) or [s4inma:Item](#s4inma:Item)(which are both subclasses of the [saref:FeatureOfInterest](https://saref.etsi.org/core/FeatureOfInterest) class) via the hasFeatureOfInterest relation. Moreover, according to the observations model in SAREF, observations are related to the property they observe (e.g. welding temperature) and its unit of measure (e.g. degrees Celsius).
<divclass="alert-warning">NOTE: The text in this section is extracted from ETSI TS 103 410-5 (V2.1.1) <ahref="#[0]">[0]</a>, and therefore falls inside the <ahref="https://www.etsi.org/intellectual-property-rights">ETSI IPR Policy</a></div>
This example instantiation is referred to using the ex prefix. This prefix is different from the s4inma prefix, which indicates the SAREF4INMA ontology on which the ex example instantiation is built upon.
The example is shown in [Figure 4](#Figure_4) and represents an instance of a shaver (i.e. the ex:Shaver10023) of the [s4inma:Item](#s4inma:Item) class, which is an item created in a certain batch (represented by the ex:PhilBrau_S40_Premium_Gold_Shaver_ItemBatch392 instance), which in turn belongs to a category of items called PhilBrau S40 Premium Gold Shaver ItemCategory. This item category is represented by the ex: PhilBrau_S40_Premium_Gold_Shaver _ItemCategory instance of the [s4inma:ItemCategory](#s4inma:ItemCategory) class, it has model number ex:nr98647656 and manufacturer PhilBrau, and is produced using a certain production equipment category, namely the ex:Lazor_Series_8030_ProdEquipCategory instance of the [s4inma:ProductionEquipmentCategory](#s4inma:ProductionEquipmentCategory) class.
The ex:Lazor_Series_8030_ProdEquipCategory instance is the general category of a specific production equipment, namely the ex:Laser_Cutting_Machine_1 instance of a laser cutting machine created specifically for this example (i.e. the ex:LaserCuttingMachine class created in this example as a subclass of the [s4inma:ProductionEquipment](#s4inma:ProductionEquipment) class).
[Figure 5](#Figure_5) further shows that the Shaver10023 item recursively consists of other three items, namely the ShaverHead3002, StepMotor083 and ShaverBody9440 items. In other words, SAREF4INMA allows to describe an item as a whole (i.e. the shaver) or in its parts (i.e. the shaver head, motor and body). The ShaverBody9440 item is created in the PhilBrau_S40-S50_Generic_Body_ItemBatch3290 item batch, which in turn consists of material from other batches, namely the Torx screws_D2mm_L8mm MaterialBatch323 and ABS_Plastic_Role_8mm_MaterialBatch742. These material batches belong to two different material categories classes created specifically for this example, respectively the ex:Screw class (with its ex:Torx_screws_D2mm_L8mm_MaterialCategory instance) and the ex:Plastic class (with its ex:ABS_Plastic_Role_8mm_MaterialCategory instance), which are both subclasses of [s4inma:MaterialCategory](#s4inma:MaterialCategory). In other words, the body of a shaver is an item created in a batch that is made of other materials such as screws and plastic.
<figure>
<imgsrc="diagrams/S4INMA Material example.png"alt="Material example "/>
<figcaptionid="Figure_5">Figure 5: Material example </figcaption>
</figure>
The example instantiation further defines two types of production equipment categories, namely the Lazor_Series_8030_ProdEquipCategory and the WandI_Welding_Series_1000_ProdEquipCategory. These categories represent a certain model of production equipment and not the individual machines, since an organization might have multiple machines of the same model. In particular, there is one laser cutting machine of type Lazor_Series_8030_ProdEquipCategory, namely the Laser_Cutting_Machine_1, and two welding machines, namely Welding_Machine_1 and Welding_Machine_2, which are shown in [Figure 6](#Figure_6).
These machines are instances of the ex:WeldingMachine and the ex:LaserCuttingMachine classes created for this example, which are both subclasses of the [s4inma:ProductionEquipment](#s4inma:ProductionEquipment) class, which is in turn a subclass of [saref:Device](https://saref.etsi.org/core/Device), which is in turn a subclass of [s4bldg:PhysicalObject](https://saref.etsi.org/saref4bldg/PhysicalObject). The subclass relation of [saref:Device](https://saref.etsi.org/core/Device) ensures that a [s4inma:ProductionEquipment](#s4inma:ProductionEquipment) can reuse SAREF functionality by inheritance, such as the possibility to perform functions, be composed by other devices such as sensors (e.g. temperature sensors), control properties (e.g. welding temperature) and make observations. For example, the Welding_Machine_2 production equipment can perform a JoiningFunction (ex:JoiningFunction instance), controls the WeldingTemperature property, and further consists of the WeldingMachineTemperatureSensor1.
<figcaptionid="Figure_6">Figure 6: Production Equipment example</figcaption>
</figure>
The Welding Machine Temperature Sensor 1 makes some temperature observation during the production of Shaver10023 in intervals of ten seconds. [Figure 7](#Figure_7) shows some example observations related to the production of the Shaver10023 item and the reuse of the SAREF model for observations. For example, the ex:Welding_Machine_2_Observation_W101520 instance is observed by the WeldingMachineTemperatureSensor1, relates to the WeldingTemperature property, has value 223 and unit of measure degree Celsius, has timestamp 2019-01-28T12:11:10 and has the item Shaver10023 as feature of interest.
<figure>
<imgsrc="diagrams/S4INMA Observation example.png"alt="Observation example "/>
<figcaptionid="Figure_7">Figure 7: Observation example </figcaption>
</figure>
Since a [s4inma:ProductionEquipment](#s4inma:ProductionEquipment) is a subclass of a [saref:Device](https://saref.etsi.org/core/Device) and consequently of [s4bldg:PhysicalObject](https://saref.etsi.org/saref4bldg/PhysicalObject), it is possible to assign each production equipment instance to a physical location within the factory. [Figure 8](#Figure_8) shows an instance of a [s4inma:Factory](#s4inma:Factory) class, which in turn is defined in SAREF4INMA as a [s4bldg:Building](https://saref.etsi.org/saref4bldg/Building) subclass. This instance (ex:Eindhoven_BIC) represents a factory that can be decomposed into Site and Area, building spaces, which are all subclasses of [s4bldg:BuildingSpaces](https://saref.etsi.org/saref4bldg/BuildingSpaces). Moreover, the welding machines and the laser cutting machine are part of the Welding_WorkCenter, which is a WorkCenter located in the Area BIC_Site_A_Area_19, which is in its turn located in the Site BIC_Site_A in the Eindhoven BIC building.
*<aid="[0]">[0]</a> [ETSI TS 103 410-5 (V2.1.1)](https://www.etsi.org/deliver/etsi_ts/103400_103499/10341005): "SmartM2M; Extension to SAREF; Part 5: Industry and Manufacturing Domains".
*<aid="[3]">[3]</a> [ETSI TS 103 673](https://www.etsi.org/deliver/etsi_ts/103600_103699/103673/): "SmartM2M; SAREF Development Framework and Workflow, Streamlining the Development of SAREF and its Extensions".
*<aid="[i.9]">[i.9]</a> ISO/IEC 11578:1996: "Information technology -- Open Systems Interconnection -- Remote Procedure Call (RPC)".
*<aid="[i.10]">[i.10]</a> Recommendation ITU-T X.667/ISO/IEC 9834-8:2005: "Information technology -- Procedures for the operation of object identifier registration authorities: Generation of universally unique identifiers and their use in object identifiers".
*<aid="[i.11]">[i.11]</a> IEC 62264 (all parts): "Enterprise-control system integration".
*<aid="[i.12]">[i.12]</a> ETSI TR 103 781 (V1.1.1): "SmartM2M; Study for SAREF ontology patterns and usage guidelines".