Skip to main content
Skip table of contents

Which Formula's/ expressions are supported in Automate Pump by Exception ( APBE)

NDayAvg(V,N)

Description:

The Average value of the Variable (V) is calculated using all the available Readings in the “Last N Days.”

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Average Casing pressure over the past 3 “Days” is 10% more than that in the past 10 “Days.”

Exception Condition: The below Exception Condition shows the syntax and logic used

Mathematical logic:

On the Well SMITH, SOL #3A

Given the last 3 Days only have 2 readings available, the 30th and 28th March Readings, only these two readings are used to calculate the Average over the past 3 days, i.e., (500+400)/2 = 450

Given the last 10 Days only have 6 readings available, only these 6 readings are used to calculate the Average over the past 10 days, i.e., (500+400+378+315+385+338)/6 = 386

Given 450 > 1.1*386 = 424.6, the condition is satisfied, and an alert for SMITH, SOL #3A Well is created as shown below

Invalid file id - 3deed2fd-6e5e-4652-b1cb-c1acb229fd57

Invalid file id - 94a9f395-41da-4985-8edd-7f319d5d38a9

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression. E.g., If we are using NDayAvg(CP,10) and we have only 6 days of data, we compute the Average of 6 Days and not 10 Days.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

NReadingAvg(V,N)

Description:

Returns the Average value of the Variable (V) fetched from the last N available “Readings” on the object, irrespective of the days

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example Alert Config

Alert Requirement: Show an Alert when the Average Casing pressure over the past 3 “Readings” is 10% more than in the past 8 “Readings.”

Exception Condition: The below Exception Condition shows the syntax and logic used

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped. However, the expression is evaluated for other objects, and an alert is generated if the condition is true.

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression. E.g., If we are using NReadingAvg(CP,7) and we have only 5 readings overall, we compute the average of 5 and not 7.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

PercentDeviationFromAvg(V,N)

Description:

Returns the Percentage Deviation of the Current Reading (or Last Available Reading) of the Variable (V) with the average of the last N available “Readings” on the object

Input: V (Decimal) , N (Positive Integer >=1), Output: Decimal

Use Case

This is useful in a case where you want to see if a casing pressure trending up by taking the last 7-day average and comparing it to the 21-day average.

Example Alert Config

Alert Requirement: Show an alert when the Percentage Deviation of the “Current Reading” is more than 30% of the average of the last 7 readings

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 2024497c-9c94-476b-9577-86e34e18d956

  • On JWH ZAV Gas Sales Meter

    • Current Reading: 460

    • Last 7 readings average: (122+369+164+286+85+457+284)/7 = 252.42

Invalid file id - e9007a48-314f-4e93-a7b1-ae44709d3c1e

  • Given (Current Reading- Average of 7 Readings)/Average of 7 Readings = (460-252.42)/252.42 = 0.82, which is more than 0.3, i.e., 30%, the condition is satisfied, and an alert is created on the meter as shown below

Invalid file id - a06822e5-15e6-4468-a88d-e5eff6705c64

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped. However, the expression is evaluated for other objects, and an alert is generated if the condition is true.

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression. E.g., If we are using PercentDeviationFromAvg(Volume,10) and we have only the current Reading and 5 other readings overall, we compute the average of 5 and not 10 readings.

    • The percent Deviation function requires a minimum of 1 reading apart from the Current Reading. If that is also unavailable, the expression evaluation fails, and the object is skipped.

    • If the average of the last N readings is zero, then the expression evaluation fails, and the object is skipped.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

IsNull(V)

Description:

Checks whether the last available Reading on the object for Variable (V) is NULL or not and returns True/False Value

Input: V (Decimal, Date, Picklist) , Output: True/False

Example Alert Config

Alert Requirement: Show an alert when the Last Available “Measured Volume” Reading is NULL on a meter in the selected routes

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - a65b87b4-7f00-47de-a3a1-8e163975f6e4

  • Given that the Last Available Reading for the JWH Flare Meter is March 30th, and the measured volume is NULL, the condition is satisfied, and an alert is created for all meters on which this condition is true.

Invalid file id - a1460333-c42f-44eb-b021-8c5e540e811c

All meters with NULL Values are shown below:

Invalid file id - f72ab0ec-12ee-485e-8d41-5a1df453d5ce

NDayVariance(V,N)

Description

The Variance of values of the Variable (V) fetched from all the available Readings in the “Last N Days” using ‘population variance’ for this function.

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Use Case

Population variance helps in situations where you might want to compare differences between the average of the past month’s oil production against the past year’s.

Example :

Alert Requirement: Show an Alert when the Variance of Casing pressure over the past 5 “Days” is greater than the past 10 “Days”

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - f2334bf1-7c6d-44f4-b5f7-153cc0b1f02c

Mathematical logic:

On the Well SMITH, SOL #3A

Assuming the Current Date as March 30th. Given the last 5 Days only have 3 readings available, 30th, 28th, 26th March Readings, then only those 3 readings are used to calculate the Variance over the past 5 days, i.e., 500, 400, 350

Variance is calculated as Summation of ((Xi - Mean)2)/N

where Xi are the readings, Mean is the Average of those readings, and N is “Number of Days”

For the given data, Mean = (500+400+350)/3 = 416.67,

Variance = ((500-416.67)2 + (400-416.67)2 + (300-416.67)2)/3 = 3888.88

Given the last 10 Days only have 6 readings available, then only those 6 readings are used to calculate the Variance over the past 10 days, i.e., (500,400,350,315,385,338) Variance = 3617.22

Given 3888.88 > 3617.22, the condition is satisfied, and an alert is created for the SMITH, SOL #3A Well, as shown below

Invalid file id - 290f6f04-46cb-423e-a711-2e6dbb53b398

Invalid file id - d8a56ab5-1dc5-40b5-bab9-857afe6e8872

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression. E.g., If we are using NDayVariance(CP,10) and we have only 6 days of data, we compute the Variance of 6 Days and not 10 Days.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

NReadingVariance(V,N)

Description

The Variance of values of the Variable (V) fetched from the “Last N Available Readings” using ‘population variance’ for this function.

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example :

Alert Requirement: Show an Alert when Variance over the past 3 “Readings” is Greater than 1629

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 0ab6b67d-f242-4952-9dd7-6ce417743afc

Mathematical logic:

On the tank SMITH, SOL#30051

Given 3 readings available are captured, only these 3 readings are used to calculate of Variance irrespective of the date, i.e., 153.816, 219.829, 123.053

Variance is calculated as Summation of ((Xi - Mean)2)/N

where Xi are the readings, Mean is the Average of those readings, and N is “Number of Readings”

For the given data, Mean = (153.816+219.829+123.053)/3 = 165.566

Variance = ((153.816-165.566)2 + (219.829-165.566)2 + (123.053-165.566)2)/3 = 1629.9636

Given 1629.9636 > 1629, the condition is satisfied, and an alert is created for the SMITH, SOL#30051 Well, as shown below

Invalid file id - b905fd57-303b-402e-aa19-e4ef5b84a2cd

Invalid file id - e520b755-5544-4079-991c-ebe834b9a7b2

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression. E.g., If we are using NReadingVariance(CP,10) and we have 6 readings, then we compute the Variance of 6 readings and not 10 Readings.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

NDayStdev(V,N)

Description

Standard Deviation of values of the Variable (V) fetched from all the available Readings in the “Last N Days” using ‘population variance’ for this function.

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example :

Alert Requirement: Show an Alert when Standard Deviation of Casing pressure over the past 5 “Days” is greater than that in the past 10 “Days.”

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 23fb64aa-3574-42b4-842e-4b9d47b2f4e8

Mathematical logic:

On the Well SMITH, SOL #3A

Assuming Current Date as March 30th. Given the last 5 Days only have 3 readings available, 30th, 28th, 26th March Readings, then only those 3 readings are used to calculate the standard deviation over the past 5 days, i.e., 500, 400, 350

Standard Deviation is calculated as “Square Root” of [Summation of ((Xi - Mean)2)/N] i.e Square Root of Variance

where Xi are the readings, Mean is the Average of those readings, and N is “Number of Days”

For the given data, Mean = (500+400+350)/3 = 416.67,

Standard Deviation = Square Root of [((500-416.67)2 + (400-416.67)2 + (300-416.67)2)/3] = 62.36

Given the last 10 Days only have 6 readings available, then only those 6 readings are used to calculate the standard deviation over the past 10 days, i.e., (500,400,350,315,385,338). Standard Deviation = 60.14

Given 62.36 >60.14, the condition is satisfied, and an alert is created for the SMITH, SOL #3A Well, as shown below

Invalid file id - 290f6f04-46cb-423e-a711-2e6dbb53b398

Invalid file id - 88b431d1-b57c-4869-93cd-02a30949970e

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

NReadingStdev(V,N)

Description

The Standard Deviation of values of the Variable (V) fetched from the “Last N Available Readings” using ‘population variance’ for this function.

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Use Case

This calculation helps signal variable volatility for readings over a given time frame, such as the last 7 days, using standard deviation.

Example :

Alert Requirement: Show an Alert when Standard Deviation over the past 3 “Readings” is Greater than 40

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - e31439cf-c4a5-4b07-bce3-b03120ce4fed

Mathematical logic:

On the tank SMITH, SOL#30051

Given only 3 readings are available for the last day of readings are reported, then only those 3 readings will are used to calculate the Standard Deviation, i.e., 153.816, 219.829, 123.053

Standard Deviation is calculated as “Square Root” of [Summation of ((Xi - Mean)2)/N] i.e Square Root of Variance

where Xi are the readings, Mean is the Average of those readings, and N is “Number of Readings”

For the given data, Mean = (153.816+219.829+123.053)/3 = 165.566

Standard Deviation = Square Root of [((153.816-165.566)2 + (219.829-165.566)2 + (123.053-165.566)2)/3] = 40.372808

Given 40.372808 > 40, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - b905fd57-303b-402e-aa19-e4ef5b84a2cd

Invalid file id - 5cb1f14c-cf11-4803-a923-0e78b54c3eec

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

MtdAvg(V)

Description

Average of values of the Variable (V) fetched from the Month Readings

Input: V (Decimal), Output: Decimal

Use Case:

This formula is useful for situations where there

is a large disparity between the produced volumes for the current day versus the month-to-date average of produced volumes.

Example :

Alert Requirement: Show an Alert when the Average Oil Production for the “Month is greater than 38

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - a51378e7-cf44-47eb-9e91-e959ed2caa3c

Mathematical logic:

On the tank SMITH, SOL#30051

If there are 30 readings available for a given month, then these 30 readings will be used to calculate Month-to-Date Value i.e Avg MTD = 38.09

Given 38.09 > 38, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - 08d28268-3394-4ce9-a001-cc631d356147

Invalid file id - 8e7a0278-2911-44c4-8cfa-d43e83b7b7ed

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

MtdSum(V)

Description

Sum of values of the Variable (V) fetched from the Month Readings

Input: V (Decimal), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Sum of the Oil Production for the “Month is greater than 1140

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - df4b60c7-e774-4b01-901d-24150033dc6b

Mathematical logic:

On the tank SMITH, SOL#30051

Given only 30 readings are available for a month, then only those 30 readings will be taken for calculation of Month To Date Sum

Given Sum>1140 the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - 94fb962f-3e91-4482-90ce-0bc2a514c238

Invalid file id - 1c705112-2c3c-4818-96cc-f770e315dc90

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

WtdAvg(V)

Description

Average of values of the Variable (V) fetched from the Week Readings

Input: V (Decimal), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Average Oil Production for the “Week is greater than 32.5

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - eec7c526-eaa5-45a0-a915-ef797bfe57fa

Mathematical logic:

On the tank SMITH, SOL#30051

If there are only 4 readings available for the current week (starting Monday), then only these 4 readings will be used to calculate the Week-to-Date value, i.e., Average WTD = 33.15

Given 33.15 > 32.5, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - b6abecc7-2c3d-4b33-8ff6-4dc0861e6e37

Invalid file id - e8c65fe5-0725-4684-affe-8c0b8a0ea864

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

WtdSum(V)

Description

Sum of values of the Variable (V) fetched from the Week Readings

Input: V (Decimal), Output: Decimal

Example :

Alert Requirement: Show an Alert when Sum of Oil Production for the “Week is greater than 99

Exception Condition: The below Exception Condition shows the syntax and logic

Invalid file id - e2b4d537-6aae-45a9-89c6-f30152ded96a

Mathematical logic:

On the tank SMITH, SOL#30051

If there are only 4 readings for the current week (starting Monday), then only these 4 readings will be used to calculate the Week-to-Date value, i.e., Sum WTD = 99.45

Given 99.45 > 99, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - afccda04-f126-4008-815a-942c503f00c6

Invalid file id - 2bddc9f8-0eb3-4fd8-8db8-4fd49f8cd548

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

YtdAvg(V)

Description

Average of values of the Variable (V) fetched from the Year Readings

Input: V (Decimal), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Average of Oil for the “Year is greater than 16

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - edd1e191-33ac-4661-9b6c-21edfb15ab3c

Mathematical logic:

On the Well SMITH, SOL#3C

If there are only 3 readings available for a Year, then only these 3 readings will be used to calculate the Year-to-Date value, i.e., Average YTD = 16.33

Given 16.33 > 16, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - de9354d9-ad71-400e-baed-bcaf564c3f37

Invalid file id - 2f29b948-3d28-4131-bc8a-06b4b85b9481

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

YtdSum(V)

Description

Sum of values of the Variable (V) fetched from the Year Readings

Input: V (Decimal), Output: Decimal

Example :

Alert Requirement: Show an Alert when Sum of Oil for the “Year is greater than 48.5

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 50649963-8cff-4d6b-be98-ecbe353c7cba

Mathematical logic:

On the well SMITH, SOL#3C

For Year, 3 readings are available, so only those three readings will be taken for calculation of Year To Date Sum, i.e., Sum YTD = 49

Given 49 > 48.5, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - 594a0665-ba61-44bb-9376-5f9c0f22f0bc

Invalid file id - 2b7cd051-cdeb-40db-86f0-4aabb7b62b95

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

DayDiff(D1,D2)

Description

Calculates the number of days between the dates D1 and D2

Input: D1 &D2 (mm-dd-yyyy), Output: Integer

Use Case

This function can be used in situations where you count the days between events, such as the lat time a well test or reading was taken.

Example :

Alert Requirement: Show an Alert when Date Difference between the Current Date and the Reading Date is greater than 0 i.e. Daily Compressor Reading requirement

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 547a8398-bb16-4325-bede-e770bf06f716

Mathematical logic:

On the Equipment, ROSS 2503 Compressor

The Last Available Reading is 3/30/2022

The Current Date is 3/31/2022

Given Current Date - Last Available Reading > 0, the condition is satisfied, and an alert is created for ROSS 2503 Compressor, as shown below.

Invalid file id - 16393dd9-c613-4d92-ad5a-48f020b05ad3

Invalid file id - 409af1d6-70e8-488b-ace2-969647f0ce9f

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true.

MonthDiff(D1,D2)

Description

Calculates the number of months between the dates D1 and D2. Only Completed months are taken into account.

  • 1 Month is Calculated on Date-to-Date basis. Eg: If Current Date is April 4th and Reading Date is March 5th, then MonthDiff(CurrentDate()-RD) = 0, but if the Current Date is April 5th, then MonthDiff(CurrentDate()-RD) = 1

Input: D1 &D2 (mm-dd-yyyy), Output: Integer

Example :

Alert Requirement: Show an Alert when Month Difference between the Current Month and the Last Available Reading Month is greater than zero for Well Test Due Requirement

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 2798386e-004a-4d7b-a0a8-fd1a9feaae95

Mathematical logic:

On the Well for Well Test, ROSS 2503

The Last Available Reading is 2/28/2022

The Current Date is 3/31/2022

Given Current Month - Last Available Reading Month> 0, the condition is satisfied, and an alert is created for ROSS 2503, as shown below.

Invalid file id - ce418a6d-1467-4cd9-9137-e49db0895d85

Invalid file id - 3d92bfcf-06a8-43cb-8086-05adce5dbf5d

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

NReadingSum(V1,N)

Description

Sum of values of the Variable (V) fetched from the “Last N Available Readings”

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example :

Alert Requirement: Show an Alert when Sum of NetOilVolume for the “Last 7 readings” is greater than 1375

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 0156c0ed-ecbe-4d9f-ad6f-002fb51a61c7

Mathematical logic:

On the tank SMITH, SOL#30051

Given last 7 readings are available, so those 7 readings will be taken for calculation, i.e., (153.816, 219.829, 123.053, 219.829, 219.16, 219.829, 220.275) = 1375.791

Given 1375.791 > 1375, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - e4330f94-6e25-4e68-bb1d-e1f9d25bf16c

Invalid file id - 2a052744-17b5-4b51-ba54-6cc6e68b10cb

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

NDaySum(V1,N)

Description

The Sum of values of the Variable (V) fetched from all the available readings in the “Last N Days”

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Sum of NetOilVolume for the “Last 10 Days” is not equal to the Sum of NetOilVolume for the “Last 10 readings”

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 701e215d-d01e-49cf-804d-6553c55e0deb

Mathematical logic:

On the tank SMITH, SOL#30051

Assuming Current Date as 30th March

Given the last 7 readings are available, only those 7 readings will be taken for calculation of NReadingSum, i.e., (153.816, 219.829, 123.053, 219.829, 219.16, 219.829, 220.275) = 1375.791

Also, there are 3 readings on the same day in the last 10 Days available readings which will be used for NDaySum, i.e., (153.816, 219.829, 123.053) = 496.698

Given 496.698 is Not Equal to 1375.791, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - e4330f94-6e25-4e68-bb1d-e1f9d25bf16c

Invalid file id - 4a488f7d-a48b-4256-82b7-960da86dd5a3

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

IsStatic(V,N)

Description

Helps to create an Alert when the values of the Variable (V) fetched from all the available Readings in the “Last N Days” are the Same or Carry Forwarded

Input: V (Decimal, Integer, Picklist, Boolean), N (Positive Integer >=1), Output: True/False

Example :

Alert Requirement: Show an Alert when Tubing pressure over the past 3 “Days” is same

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - e905f33f-d446-4e11-902f-3d9e89fcb0c5

Mathematical logic:

On the Well SMITH, SOL #3A

Given Tubing Pressure for the last 3 days is 114

Given 114 is static to True, the condition is satisfied, and an alert is created for SMITH, SOL #3A Well, as shown below

Invalid file id - 9920a1ea-e386-432c-8cd8-2828582a0f34

Invalid file id - d3bc86e3-da0e-44bd-a0ad-2e4a29e7d00d

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

NReadingSumExCurr(V,N)

Description

The Sum of the Variable (V) values fetched from the “Last N Readings” (N) excluding the Current Reading

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Sum of Oil Production for the “Last 7 readings” excluding Current Reading is greater than 410

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 609231cd-e817-46d2-b155-300478924798

Mathematical logic:

On the tank Oil Tank 101

The last 7 readings are available, so those 7 readings will be taken for calculation, i.e., (8.9 , 13.7, 14.11, 13.7, 14.11,13.7, 73.22 = 151.44 )

Given 151.44 > 151, the condition is satisfied, and an alert is created for Oil Tank 101 Tank, as shown below

Invalid file id - ac11e9b2-b87b-45cd-9473-edf4c326e43e

Invalid file id - 01e47ae7-9b26-43eb-8705-1852836b84cc

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

NDaySumExCurr(V,N)

Description

The Sum of values of the Variable (V) fetched from all the available readings in the “Last N Days” (N) excludes the Current Day Reading.

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Sum of NetOilVolume for the “Last 10 days” excluding the current date is not equal to the Sum of NetOilVolume for the “Last 10 readings” excluding the current reading

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 701e215d-d01e-49cf-804d-6553c55e0deb

Mathematical logic:

On the tank SMITH, SOL#30051

Assuming Current Date as April 1st

The last 10 readings are available, so only those 10 readings will be taken for calculation of NReadingSumExCurr, i.e., (153.816, 219.829, 123.053, 219.829, 219.16, 219.829, 220.275, 219.606, 219.606, 220.275) = 2035.278

For NDaySumExCurr, there are 3 readings in the last 10 Days available readings, i.e., (153.816, 219.829, 123.053) = 496.698

Given 496.698 is Not Equal to 1375.791, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - 7fb8cb24-77ff-485c-a999-2946f198a5cf

Invalid file id - 02a6f33e-f896-4f22-8706-3beab34c25e6

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

NReadingAvgExCurr(V,N)

Description

The Average of values of the Variable (V) fetched from the “Last N available Readings” (N) excluding the Current Reading

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Average of Oil Production for the “Last 7 readings” excluding the Current Reading is greater than 21

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 21b0fdf4-c863-4aa2-8142-eacac4d9a6e0

Mathematical logic:

On the tank Oil Stop 1

The last 7 readings are available, so only those 7 readings will be taken for calculation, i.e., (8.9 , 13.7, 14.11, 13.7, 14.11,13.7, 73.22 = 21.634 )

Given 21.634 > 21, the condition is satisfied, and an alert is created for Oil Stop 1 Tank, as shown below

Invalid file id - ac11e9b2-b87b-45cd-9473-edf4c326e43e

Invalid file id - 9736c388-5052-4f9f-a055-488b1ecee86f

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

NDayAvgExCurr(V,N)

Description

The average of values of the Variable (V) fetched from all the available readings in the “Last N Days” (N) excluding the Current Day Reading.

Input: V (Decimal), N (Positive Integer >=1), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Average of NetOilVolume for the “Last 10 days” excluding the current date is not equal to the Average of NetOilVolume for the “Last 10 readings” excluding the current reading

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 16902c78-a802-4dd3-bfb3-45b4a411c645

Mathematical logic:

On the tank SMITH, SOL#30051

Assuming Current Date as April 1st

The last 10 readings are available, so those 10 readings will be taken for calculation of NReadingAvgExCurr, i.e., (153.816, 219.829, 123.053, 219.829, 219.16, 219.829, 220.275, 219.606, 219.606, 220.275) = 203.5278

For NDayAvgExCurr, there are 3 readings in the last 10 Days available readings, i.e., (153.816, 219.829, 123.053) = 165.566

Given 203.5278 is Not Equal to 165.566, the condition is satisfied, and an alert is created for SMITH, SOL#30051 Well, as shown below

Invalid file id - 7fb8cb24-77ff-485c-a999-2946f198a5cf

Invalid file id - 402dae8f-c617-4e6f-9d5f-682ebf253bd4

Note:

  • If there are no readings on the object, then the expression evaluation on that particular object fails, and the object is skipped, but for the other objects, the expression is evaluated, and an alert is generated if the condition is true

  • If there are less number of readings available on an object than what the function demands, but there are no NULL values in between, then the expression evaluation proceeds with the available data and evaluates the expression.

  • If multiple NULL values exist for an object attribute in an expression, the expression evaluation fails, and no alert is created for that object.

CurrentDate(), Day(D1), Month (D1)

Description:

Current Date function fethches and uses the Current Date in expression evaluation

Day(D1) fetches and uses the Date in integer format

Month(D1) fetches and uses the Month in integer format

Example :

Alert Requirement: Show an Alert for “LACT Meter Reading Rule” when the Open Reading is not NULL and the Day is Greater than 15 and also the last available “Reading Date” Month is same as Current Date month

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 9a82e8e1-da0f-481d-b8b3-de09510fe3b3

Mathematical logic:

On the Meter ROSS 2503 LACT

Assuming Current Date as March 30th

Given the Open Reading is not NULL

Given that the Reading Date is greater than 15

Given that the Current Date and Reading Date month is same

Given RD ie 03/16/2022 > 15 , the condition is satisfied, and an is created as shown below

Invalid file id - e8957ec6-ab00-402d-8fc7-9d5d19ac61c8

AddDays(D1,d)

Description:

Adds “d” No. of Days to the Date (D1)

Input: D1 (Date), d (Positive Integer >=1), Output: Decimal

Note: Nested Functions can also be used which are of appropriate data-type

Example :

Alert Requirement: Show a Tank Visit Alert when 7 Days has passed since the Last Reading Date

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 829f44f2-2b19-4345-a626-59217bfbda09

Mathematical logic:

On the tank ROSS 2503 Water Tank 1

The last available reading is 03/28/2022 , 3/28/2022 + 7 Days is 4/4/2022

Also the Current Date is 4/4/2022

Given 4/4/2022 is equal to 4/4/2022 , the condition is satisfied, and an alert for the ROSS 2503 Water Tank 1 Tank is created, as shown below.

Invalid file id - 5ed0b66b-b359-4e28-8bfd-a111b4066dd9

Invalid file id - 98f60da1-b0df-4051-90be-6b3132527118

AddMonths(D1,m)

Description:

Adds “m” No. of Months to the Date (D1)

Input: D1 (Date), m (Positive Integer >=1), Output: Decimal

Note: Nested Functions can also be used which are of appropriate data-type

Example :

Alert Requirement: Show an Alert when the 1 month or more has passed since Last Available Reading Date

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - c54f7c32-a6a5-4fe8-84e4-180e58e817e2

Mathematical logic:

On the tank ROSS 2503 Oil Tank 1

The last available reading is 3/3/2022 + 1 Month is 4/3/2022

Assuming the Current Date is 4/3/2022

Given the condition is satisfied, an alert for the ROSS 2503 Oil Tank 1 Tank is created, as shown below.

Invalid file id - 60d36f5d-8d9f-4a43-a132-6af5a192674a

Invalid file id - 671bb1d3-a059-451e-bf58-a0f1c51e4a9f

AddYears(D1,y)

Description:

Adds “y” No. of years to the Date (D1)

Input: D1 (Date), y (Positive Integer >=1), Output: Decimal

Note: Nested Functions can also be used which are of appropriate data-type

Example :

Alert Requirement: Show an Alert when more than 1 year has passed since the Last Available Reading Date

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 90f3d798-8516-45cb-8e8b-3cb1cf66f3d4

Mathematical logic:

On the tank ROSS 2503 Well

The last available reading is 4/1/2021 + 1 Year is greater than equal to 4/1/2022

Assuming the Current Date is 4/1/2022

Given the condition is satisfied, an alert for the ROSS 2503 Well is created, as shown below.

Invalid file id - a9439b16-5fd8-41f3-9647-cb5bb613c9e1

Invalid file id - 14dbb03f-eff1-4e24-ad38-32b0a09b6d69

Min(V1,V2,V3..)

Description:

Minimum value of the Variables (V1,V2,V3) is calculated from the Last Reading on the object

Input: V1,V2,V3 (Decimal), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Minimum value for Casing pressure or Tubing Pressure is less than 50

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 7b4b459b-473b-4cbc-88aa-134fa3a61b10

Mathematical logic:

On the Well SMITH, SOL #3A

Given the Tubing Pressure and Casing Pressure is respectively 49, 500

Given 49 < 50, the condition is satisfied, and an alert for SMITH, SOL #3A Well is created as shown below

Invalid file id - aeaf00b7-bfcf-4bce-91d6-25db9eb00a33

Invalid file id - 64d8a0dd-ec34-4507-82a7-c86af49975ff

Max(V1,V2,V3..)

Description:

Maximum value of the Variable (V1,V2,V3) is calculated from the Last Reading on the Object

Input: V1,V2,V3 (Decimal), Output: Decimal

Example :

Alert Requirement: Show an Alert when the Maximum value for Casing pressure or Tubing Pressure is greater than 999

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - ba274eb8-d25c-4f76-b71b-038c6b26ada3

Mathematical logic:

On the Well SMITH, SOL #3B

Given the Tubing Pressure and Casing Pressure is respectively 500,1000

Given 1000>999, the condition is satisfied, and an alert for SMITH, SOL #3B Well is created as shown below

Invalid file id - 127e7493-babc-4fb0-8285-e34efbca64e6

Invalid file id - 952429e5-7202-4685-b1b4-7d798b840696

Power(V,P)

Description:

The value of the Variable (V) is calculated using number raised to a power.

Input: V= Base ( Integer, Decimal), P = Power ( Integer, Decimal), Where V is a positive decimal greater than zero, Output: Decimal

Example :

Alert Requirement: Show an Alert when the Tubing Pressure raise to 2 is less than 250

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 6fb734b0-b573-4f86-94ff-fa2a446a9507

Mathematical logic:

On the Well SMITH, SOL #3A

Given the Tubing Pressure is 49

And 49 power 2 = 2401

Given 2401 < 2500, the condition is satisfied, and an alert for SMITH, SOL #3A Well is created as shown below

Invalid file id - aeaf00b7-bfcf-4bce-91d6-25db9eb00a33

Invalid file id - 8504816c-f6a4-4a95-9c8a-ad1e31434d85

Abs(V)

Description:

Returns the Absolute Value (positive value) of the variable (V)

Input: V (Decimal) , Output: Decimal

Example Alert Config

Alert Requirement: Generate an alert if the Absolute value of Percentage Deviation of Gas “Measured Volume” is greater than 9%

Exception Condition: The below Exception Condition shows the syntax and logic used

Invalid file id - 67539313-fc1b-45ee-922e-d31be9610b0d

  • On Test Gas Sales Meter

    • Current Reading: 90

    • Last 7 readings average: (100+100+100+100+100+100+100)/7 = 100

    • Given (Current Reading- Average of 7 Readings)/Average of 7 Readings = (90-100)/100 = -0.1, and Absolute Value of -0.1 is 0.1 which is greater than 0.09, the condition is satisfied, and an alert is created on the meter as shown below

Invalid file id - bdf419b5-42af-42e7-9182-3c840d8fd5df

Invalid file id - 607e490b-50a6-4ae5-bf6f-f1374e1b2ac1

User Manual

APBE User Manual.pdf

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.