DIM

The DIM function calculates the positive difference of the instantaneous values of two expressions a1 and a2.
DIM(a1,a2) = 0 if a1 < a2

DIM(a1,a2) =a1-a2 if a1 > a2
 
Caution:  
DIM is a discontinuous function and must be used with caution.

Format

DIM(a1,a2)

Arguments

 
a1
Any valid function expression.
a2
Any valid function expression.

Example

The following function returns 0 as long as TIME < 5, and TIME - 5 for TIME > 5. TIME is the current simulation time.
DIM(TIME,5)