Configuring Property Rules


Property rules define the logical relationships between different model properties (attributes and measurement points) through property expressions, mapping the property values of a single model or multiple models. Using property rules can reduce the repetitive mapping of measurement point data during secondary integration and simplify data processing in scenarios without a model, thereby improving data management efficiency.


For example, you can define property rules in the following scenarios:

  • Data mapping across model properties. For instance, the “total power generation” measurement point in a “wind farm” model is the sum of the “current power generation” data from all wind turbine devices within the wind farm. You can set this in the property rule as Wind Farm.Total Power Generation = sum(Wind Turbines.Current Power Generation).

  • Mismatch between raw device data and model property definitions. For example, the raw data format or units provided by a device may not match the model’s requirements, necessitating transformation and mapping through property rules.

  • Dynamic calculation of model properties based on multiple raw data measurement points. For example, the “range efficiency” measurement point in a car model may need to be calculated using the “maximum range” and “battery capacity” data. You can set this property rule as Range Efficiency = Max Range / Battery Capacity.


This file explains how to configure property rules for models. Property rules mainly include the following two types:

  • Default Rules: If only the properties of the current model are referenced as parameters in the expression, configure single-model property expressions in default rules.

  • Cross-Model Rules: If properties of other models need to be referenced as parameters in the expression, a new rule must be created. In cross-model rules, based on the data flow direction, you need to configure upstream expressions (for parsing device-uploaded data) and downstream expressions (for processing cloud-issued commands) respectively.

Prerequisites


Creating Rules


The model has a Default Rule created by default. If you only need to use the default rule, you can skip this step. If you need to reference elements from other models as parameters in the expression, you need to create a new rule.

  1. In the Application Portal’s Developer Console, go to the Models page.

  2. In the Models Created in This OU or Shared Models tab, select Edit to enter the configuration page for the target model.


    Note

    When editing model elements of a shared model, you need to click the custom Custom Configuration button in the top-left corner to switch to the custom configuration interface before making changes. The effective configuration of a shared model = custom configuration + unchanged parts of the original configuration.

3. Select Create Cross-Model Rule, then configure the basic information in the pop-up window according to the following rules, and click OK when done.

  • Name: The name of the rule.

  • Mapping Model: Click Select to check models in the popup. Select the onboarding model as the mapping model.

    • If the current model is not inherited from another model, any model can be selected as the mapping model.

    • If the current model is inherited from another model, only the inherited parent model can be selected as the mapping model.

  • Description: A description of the rule.


For more information about expressions, see Property Rule Expression Description.

Next


Configuring Model Views