Use What-If Scenarios for End-to-End Simulation Tests

Use what-if scenarios to run scenario-based simulation tests for your assets. What-If scenarios help test and validate your asset monitoring and management setup.

For example, you can simulate a one-minute spike in temperature for your temperature sensor. If you have a rule defined, you can check if a corresponding incident is raised in the system. If you are connected to other enterprise systems like the Oracle Fusion Cloud Maintenance, you can verify that a corresponding maintenance work order is created in the external system.

A what-if scenario lets you override the actual incoming sensor data for an asset with the scenario data. You can choose the period of time for which the scenario runs. The what-if scenario lets you test all the various entities associated with the asset type, such as rules, metrics, and anomalies. So, for example:

  • You can create scenarios that trigger your rules, which in turn trigger incidents, warnings, device actions, or device alerts.
  • You can look at how the scenario affects metrics (KPIs) that are using the overridden sensor attributes.
  • You can verify if anomalies are registered against positive test cases.

To define a what-if scenario for an asset type, create a pattern-based or formula-based simulation for one or more of its sensor attributes. Then run the what-if scenario for a real asset and a chosen period of time.

When the what-if scenario runs for the asset, the real sensor data gets overwritten by the simulation scenario data. The Digital Twin view of the asset reflects the fact that a what-if scenario is active for the asset.

You can verify how the associated organizational entities are affected both during and after the test.

Create a What-If Scenario for an Asset Type

A what-if scenario contains scenario-based simulations for one or more sensor attributes of the asset type. You can run the what-if scenario for any asset of the asset type.

  1. Click Menu (Menu icon), and then click Design Center.
  2. Select Asset Types from the Design Center sub-menu.
  3. Select an asset type from the Asset Types list.
    You can also search for an asset type.
  4. Click What-If Scenarios.
  5. Click the Create WhatIf (Create WhatIf icon) icon.
  6. Enter a name for the what-if scenario in the Name field.
    For example, Abnormal Temperature Spikes.
  7. (Optional) Provide an optional Description text for the scenario.
  8. Click Upload Image and upload an optional asset image.
    This custom asset image replaces the standard asset image when the what-if scenario is active for an asset.
  9. Under Target, click Add Add icon to add a target sensor attribute.
  10. Select a Sensor Attribute for the Asset Reference.
    This is the asset sensor attribute for which you wish to create a simulation scenario. For example, you may wish to create a voltage fluctuation or a temperature spike.
    The Asset Reference is your selected asset type. It's already populated for you.
  11. Choose the simulation Type.
    You can choose between predefined wave patterns, such as sine curves or square waves, and formula-based simulation values.
  12. If you chose Pattern Based for the simulation Type, then select a wave pattern under Pattern.
    Depending on the wave pattern you select, you need to specify the required parameters for pattern generation.
    • For most wave patterns, you need to specify a maximum (Max) and minimum (Min) value.
    • For regular wave patterns, such as sine waves and square waves, you need to additionally specify the desired Wavelength of the patterns.
    • For a constant wave pattern, specify the constant Value.
    As an example, say you have a temperature sensor attribute that normally ranges between 10 and 20. You may wish to introduce random spikes by choosing a Random pattern between 20 (Min) and 30 (Max).
    The message interval for the what-if scenario is the same as the message interval for the sensor attribute. When choosing a wavelength, you should keep the message interval in mind, so that the pattern is recognizable in the charts. For example, a sine curve for a sensor attribute with a wavelength of 500 seconds and a message interval of 10 seconds will have 50 data point plots in each wave pattern unit.
  13. If you chose Formula for the simulation Type, then use the formula editor to enter a formula.
    The formula can use available functions, such as aggregation functions, trigonometric functions, mathematical, string, and time functions. You can also use other sensor attribute values as properties, use various operators such as logical and arithmetic operators, and use constants.
    The following formula increases the speed of a truck by 10% for every message interval of the speed sensor.
    Formula-based scenario uses the following formula: speed * 1.1

    Note:

    The speed will increase to high values rapidly depending on the messaging interval of the sensor. You should configure the runtime accordingly, and monitor the parameters when playing the scenario for an asset.
  14. (Optional) Click Add Add icon to add additional target sensor attributes and define corresponding simulations.
  15. Click Save to save the what-if scenario.

Play a What-If Scenario for an Asset

You can play a what-if scenario for an asset from the digital twin page of the asset. Only one what-if scenario can run at a time.

  1. In the Operations Center, navigate to the asset page for your asset.
    See View Asset Details if you need help accessing the digital twin page for an asset.
  2. Click the Asset Controls icon Asset Controls icon that appears to the right of the navigation breadcrumbs.
  3. Under What-If Scenarios, click Initiate against the what-if scenario that you wish to run against the asset.
    To see your what-if scenario, you must have already created the scenario for the corresponding asset type.
  4. In the Initiate What-If Scenario dialog that appears, specify an Expires After value and click OK.
    The Expires After value determines the duration for which the what-if scenario remains active.
    The what-if scenario is now active for your asset. You can see the sensor attribute values and charts change per the scenario.
    A banner appears indicating that the what-if scenario is active for the asset.
    What-If banner

  5. (Optional) Click Stop if you wish to stop the what-if scenario before its duration expires.