Skip to main content

DeltaStream

The DeltaStream function is supported in both Studio and Search. It returns the difference between input and output streams. Input and output streams are totalized according to the following rules:

  • The element object status must be equal to the ObjectStatusValue argument, if defined.
  • The element contains an attribute defined in the Attributeslist.

The function automatically discovers elements connected in input and in output and performs the totalization, the difference between totalized input streams and totalized output streams will be returned.

According to the PreviouCase argument, the function will work on the current or previous case.

Prototype

    DeltaStream(PreviousCase; Uom; ObjectStatusValue; ObjectStatusAttribute; Attributelist)

Arguments

    PreviousCase            String      By value (Nullable)

Null (not defined) or empty string or equal to:

'N' -- work on current case
'Y' -- work on previous case

Uom String By value (Nullable)

Null (not defined) or empty -- no UOM conversion;
A valid UOM.

ObjectStatusValue String By value (Nullable)

A Null (Not defined) or empty string if the function has not filtered out elements based on their object
status. Otherwise, a valid string containing the object status value.

ObjectStatusAttribute String By value (Nullable)

A Null (Not defined) or empty string if the function has not filtered out elements based on their object
status. Otherwise, a valid string containing the attribute name.

AttributeList String By value (Nullable)

One or more valid strings, semi-colon separated, containing the attribute names to be totalized. Depending
on the model, different elements may have different attribute names. In such a case, add all attribute names of interest in the totalization.

Returns

    Number

The function returns the difference between the totalized streams in input and the totalized streams in output.

Exception

    Undefined

Undefined is returned if:

- PreviousCase is not empty and not a valid one, or the previous case does not exist
- Empty or invalid AttributeList
- Invalid UOM, if specified

Example 

    DeltaStream( ; ; 'IS' ; 'ObjectStatus' ; 'i_Meas_Mass' )

This will totalize the i_Meas_Mass attribute value of all streams, in input and in output, and will return the difference.