Creating a Model


A model is an abstraction of the product’s features, and defines what the product is, what it can do, and what services it can provide. This section shows how to create a model and define custom features for the model.

Before You Start

Ensure that the features that are required for the model have been designed, and that the features are not in the standard feature library. For information about how to design features for a model, see Device Modeling.

About This Task

This task enables you to create a model and configure the following features in EnOS.

  • Attributes
  • Measurement points
  • Service
  • Event

Limitations

Currently, EnOS has the following limitations for each OU.

  • The maximum number of private models you can create is 1,000.
  • The maximum number of attributes/measurement points/services/events you can create for each model is 5,000.

Step 1: Creating a Model

  1. In the EnOS Management Console, select Models to open the Model page.
  2. Click the New Model button and fill in the fields in the GUI, among which:
    • Category: Static extension info of the product, such as manufacturer and device model.
    • Create From: See Model Relationship.
  3. Click OK.

Step 2: Defining Custom Model Features

  1. From the list of created models, find the model that needs feature definition and click edit.
  2. Click the Feature Definition tab and click Edit followed by Add > Create Custom Feature to set one or more features according to the product attributes.

Create Custom Feature

Select Create Custom Feature to add custom feature definitions accordingly.

Adding Attributes

  1. On the Add Feature page, select Attributes from the Feature Type dropdown list and fill in the fields in the GUI. For more information about the Data Type, see Data Types.
  2. Click OK to finish creating the attribute.

Adding Measurement Points

  1. On the Add Feature pop-up window, select Measurement Points from the Feature Type drop-down list and fill in the fields in the GUI, among which:

    • Point Type: Select the type of measurement point, which usually distinguishes the features of the data ingested by the measurement points. When storing data, the different types of measurement data are stored separately according to their types. When reading data, different types of measurement data can also be processed differently. The description of each point type is as per the below.

      • AI: The AI type measurement point usually ingests time series data of numerical type. When reading data, you can choose to aggregate data with specific algorithms.
      • DI: The DI type measurement point usually ingests device status data. When reading data, you can choose to only query the device status change data.
      • PI: The PI type measurement point is usually used for calculating electric power data. When reading data, you can choose to aggregate the data with specific algorithms.
      • Generic: The measurement point for all other types of data, especially data of non-numerical types.

      Note

      If the measurement point data has been stored in the time series database (TSDB), the point type cannot be modified. Changing the point type may result in failure when querying stored historical data. For more information, see Configuring TSDB Storage.


    • Data Type: The data types available will differ according to the selected Point Type.

      • AI Point Type: Available data types for selection are int, float, and double.
      • DI Point Type: Only int data type is available.
      • PI Point Type: Only double data type is available.
      • Generic: Available data types for selection are int, float, double, enum, string, timestamp, date, struct, array, and file.

      For more information, see Data Types.


    • Quality Indicator: Whether the measurement point is an indicator of the data quality. If set to Yes, the configurations are as follows:

      • Value: Sets the data type of the measurement point. Only three types are supported: int, float, and double.
      • Quality Indicator: The data quality indicator (data type: array) that is predefined by the system. It cannot be changed. You can click View to see the predefined quality indicator parameters as well as their descriptions.


  2. Click OK to create the measurement point.

  3. To create more measurement points, repeat the steps above.

    Note

    When measurement points are created, you must configure the storage policy for the measurement point data as soon as possible. Otherwise, the measurement point data will not be stored in TSDB by default after the device is connected to EnOS Cloud. For more information about configuring storage policy, see Configuring TSDB Storage.

Adding Service

  1. On the Add Feature pop-up window, select Service from the Feature Type drop-down list and fill in the fields in the GUI.
  2. Click OK to create the service.
  3. To create more services, repeat the steps above.

Note

You can create a maximum of 50 services for a single model.

Adding Event

  1. On the Add Feature pop-up window, select Event from the Feature Type drop-down list and fill in the fields in the GUI, among which:
    • Severity:
      • Information: Refers to the general notifications reported by the devices, such as a notification on job completion.
      • Warning: The warning messages or exceptions reported by a running device. These events may lead to malfunctioning.
      • Error: The error messages or emergencies reported by a running device. These events severely impact a device so that it is unable to operate properly and must be addressed immediately.
  2. Click OK to create the event.
  3. To create more events, repeat the steps above.

Note

You can create a maximum of 50 events for a single model.

Import from Standard Feature Library

  1. Select Import from Standard Feature Library.
  2. Choose the feature that you need from the list in Select Standard Feature and click OK.
  3. In Add Feature, modify the feature details as needed.
  4. Click Confirm to finish adding the feature from the library.

Note

  • You can add the same standard feature definition to the same model multiple times as long as their Identifier are different.
  • The Feature Type, Standard ID, Data Type and Unit of standard feature definitions cannot be edited.

Publish the Feature Definition

After adding the feature definitions, click Publish.

Step 3: (Optional) Adding a Tag

A tag describes the common information shared by models of the same type. It can be used to distinguish model objects by describing their categories such as domain, type, and scope. For example, by adding a domain:solar tag to a model, you are specifying that the model falls in the solar field.

  1. From the list of created models, find the target model and click Edit.
  2. Under the Basic Information tab, click Edit in the Tags section.
  3. On the pop-up window, click New tag, and enter the key-value pair (key:value) for the new tag.
  4. Click OK to save the tag.

Results

When the feature definition of the model is completed, the system will automatically generate a model for the product in JSON format.

Note

  • After add the features for your model, you need to click Publish. Otherwise, the features would not be saved.
  • The model is locked during editing mode, and other users cannot edit it until your publish the changes or cancel and exit the editing mode.