VIOL returns the number of violations or exceedances for a variable.
VIOL(VarNum, Grouping, Statistic, Limit,optional GroupOffset/StartDate, Grouping/EndDate)
VarNum: The variable number to count violations for.
GROUPING: Used to set the dates to calculate the statistic to compare to the Limit. Valid Settings are:
||Days. For Daily variables, all values are compared to the limit, for Daily Detail variables the Statistic is calculated for the day and compared to the limit)|
||Compare all values to the limit (the statistic is ignored). Typically used with daily detail variables where you want to count every time the value is in violation. For example, with a grouping of "V" with an hourly variable you could have up to 24 violations in a day.|
||Seasons - Winter, Spring, Summer, Fall.|
|"W1" - "W20"
||Week (where 1-20 defines the week) (Click here for definition of "Week")|
||Rolling Annual Average, calculates the xx number of monthly averages and then calculates the "Statistic" of those values. IE If the report dates are Dec 1, 2007 thru Dec 31st, 2007 a grouping of "RMA12" would calc the Monthly Average for Jan 2007, Feb 2007... Dec 2007 and then calc the stat of those Monthly Averages.|
||Last xx number of months. IE If the report dates are Dec 1, 2007 thru Dec 31st, 2007 a grouping of "MA12" would calc the stat for Jan 1, 2007 thru Dec 31st, 2007.|
||Date range of Limit.|
Statistic: The statistic to calculate:
||Geometric Mean (Zeros (0) are ignored)|
||Geometric Mean (Convert 0 to 1)|
||Geometric Mean (Add one to all)|
||The total or sum|
||The Median value|
||The "Average Median"|
|"" or None
||No Stat, compare all values to limit|
Limit: The Limit Name to compare the statistic to. Limits are entered for each variable using Variable Edit - Limits Tab. The common settings are:
||Daily Max Limit|
||Daily Min Limit |
||Weekly Max Limit|
||Monthly Max Limit|
||Monthly Min Limit|
||Compare stat to constant x, ie >30|
||Compare stat to contant x|
||Compare Value to variable's Entry Max|
||Compare Value to variable's Entry Min|
GroupOffset/StartDate: OPTIONAL. Used with the Grouping parameter to set the dates to calculate the stat for. Sets the number of Groups (set by the Grouping Parameter) to be added to set the dates. See examples below. If this field is a date string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the start date to calculate the stat for.
Grouping/EndDate: OPTIONAL. Used to set which dates to calculate the stat for. If the Grouping is a date literal string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the end date to calculate the stat for. Common Settings are:
"R" Report Dates
Click here for available Grouping options
For industrial pretreatment, you can use a TRC qualifier in parenthesis to count the number of TRC violations. Valid Settings are:
TRC_I For type 1 TRC limits. Multiplies the limit by 1.4 before comparing the value to it. Example DMAX(TRC_I).
TRC_II For type 2 TRC limits. Multiplies the limit by 1.2 before comparing the value to it. Example DMAX(TRC_II).
This function is used to locate the count of violations into a report. There are many varieties of violations available including: Daily, Weekly, Monthly, Quarterly, and Yearly. Violations can be based on several different methods of calculation including: Average, Total, and several variations of Geometric mean. There are also several ways to determine if data is a violation, options to determine which violations to display,(Daily Maximum, Daily Minimum, both Max and Min, Weekly Maximum, Weekly Minimum, and so on). Also, notice below there are several different possibilities for Weekly as there are several different definition for "week".
The following names can be used to look at both a max and min limits: DBOTH (compare to both the DMIN, DMAX limit), MBOTH (compare to both the MMIN and MAX limit)...
For variable 4011, calculate the Monthly (grouping "M") Average and compare the value to the Monthly Max Limit. If the report dates are set to one month (i.e. 1/1/2004 through 1/31/2004) this function will calculate the monthly average for Janurary and compare the value to the January limit for variable 4011. If the report dates are set to 12 months (i.e. 1/1/2004 through 12/31/2004) this function will calculate the monthly average for each month of the year and compare each value to the corresponding limit for variable 4011.
For variable 4081 (a daily parameter) compare every value entered for the report dates to both the Daily Min and Daily Max limit. For daily variables with a grouping of "D" the Stat is ignored.
For variable 5001 (an hourly parameter) calculate the daily Geometric Mean (where 0 and negative values are converted to a 1, i.e. GMEAN1) for each day of the report and compare the calculated value to the Daily Max Limit.
For variable 4013 compare every value for the report dates to the Weekly Max limit. This is typically used when variable 4013 is a calculated Weekly Average (ie uses the WAVG math toolbox function).
For variable 4011 compare every value, no stat, for the report dates to the Daily Max limit.
For variable 4011 compare every value, no stat, for next month (i.e. offset of 2 and grouping of "M") to the Daily Max limit.
Viol(81,"V"," ","ENTRYMIN") + Viol(81,"V"," ","ENTRYMAX")
For variable 81 compare every value, no stat, for the report dates to the Variables Entry Min and Entry Max.
For variable 4011 compare every value to determine if the average is greater than 300.
For variable 4011 compare every value to determine if the average is less than 300.
Compares all values in the report date range for variable 4011 to the Daily Max limit * 1.4. IE if the limit is 30, this will count the number of values > 42 (30 * 1.4)
Calculates the Monthly Average for the current month and the previous 11 months and then calculate the Average of those values and compare the value to AMAX limit.
No Related Articles Available.
No Attachments Available.
No Related Links Available.
No user comments available for this article.
Created on 2/3/2008 7:23 AM.|
Last Modified on 4/24/2014 10:53 AM.|
Last Modified by Scott Dorner.|
Article has been viewed 4111 times.|
Rated 6 out of 10 based on 4 votes.|
| Print Article|
| Email Article