DegradationRule(Param, DegradationRuleCode)

Returns the degradation constant for a given degradation rule and parameter.

Purpose

The function DegradationRule gets the degradation constant for a given degradation rule and parameter.

Syntax

double DegradationRule(string Param, string DegradationRuleCode)

Return Value

If the code is successful, it displays the degradation constant for a given degradation rule and parameter as double.

Note: This capability is used in Analysis forms and is designed for equations.

Arguments

Parameter Description
Param Optional. The string containing the name of the parameter whose degradation is to be returned.
DegradationRuleCode Optional. The string containing the code of a Degradation Rule constant to be returned. If this argument is missing, the function uses the degradation rule of the current analysis object.

DegradationRule example

This example uses the degradation constant and shelf life values to calculate the degraded concentration of a parameter for vitamin C from the average.

Dim ao As Object = RowTag(1, _OBJECTKEY, "AVERAGED")
Dim kt As Double = DegradationRule("","")  *  _ANALYSISHELFLIFE
DIM val As Double
if _ANALYSISPARAM = "VITC" then
   val =  ao * (2.71828128^(kt)) 
else
    val = ao
end if
return val
DegradationRule("", "DR1_SS");