Language Reference 2

IF Expr
DESCRIPTION: Procedural IF statement to process the first set of sub-expressions denoted by “…”if the

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1://Note this example is out of context. //See identifyPatches.lse for the working example. IF (PatchId EQ 0) // not visited... pId = pId + 1 NumPatches[PatchLayer] = NumPatches[PatchLayer] + 1 ENDFN

Example 2://Note this example is out of context. //See stats.lse for the working example. IF pos MaxPS[i] = patchVar[rArea] MinPS[i] = patchVar[rArea] ENDFN

SAMPLE MODELS: Model Builder's Guide Chapter 9

IF Expr THEN Expr ELSE
Expr	if value of the IF expression is TRUE (>= 1), 	then return the value of the THEN expression, otherwise return value of the ELSE expression

(Expr ? Expr : Expr)	Same as above, but this form can be used as an	embedded sub-expression DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: //Note this example is out of context. //See Spreading.lse for the working example. distInc = IF SpreadType EQ 0 THEN 1 ELSE MAX(0,d - SOURCE d)

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

INSERT
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: //Note this example is out of context. //See nn.lse for the working example. INSERT(nnGraph[currType], patchVar)

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

INSERT HEAD
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

INSERT LINK
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: //Note this example is out of context. //See nn.lse for the working example. INSERT LINK(nnGraph[currType], patchPos, nPos2, edgeVar)

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

INSERT TAIL
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: //Note this example is out of context. //See identifyPatches.lse for the working example INSERT TAIL(patchList[currType], patchVar)

Example 2: //Note this example is out of context. //See identifyPatches.lse for the working example INSERT TAIL(coreAreaList[PatchLayer], patchVar)

SAMPLE MODELS: Model Builder's Guide Chapter 9

INTERPOLATE
(X) return an interpolated value where the value of	CLASS Number: Number	variable X is placed between two classes or at :	either end of the table. Model Builder's Guide Chapter 9 ENDFN Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS:  (X): ( Number+)	same as above, except the classes are implicitly 0, …. k-1 Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS:  (X)	same as above, except the values in the CLASS Number: Expr	table are obtained by evaluating expressions : Model Builder's Guide Chapter 9 ENDFN Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS:  (X)	same as above, except the classes are Expr	implicitly 0, …, k-1 :			Model Builder's Guide Chapter 9 ENDFN Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS:  (X): Filename	uses the table in the named file, which is 		assumed to consist of class:value pairs Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS:  (X): Filename Key	uses the table in the named file, which is assumed to consist of class:value pairs. The key is used to specify a sub-table in a multi-table file. Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: 

IS EMPTY
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

IS EMPTY LINKS
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

LINKED
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

LOCATION
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: //Note this example is out of context. //See ConvexHull.lse for the working example. EdgeLocation = LOCATION(EdgeRow, EdgeCol) Example 2:

SAMPLE MODELS: 

LOG(Expr)
DESCRIPTION: The logarithm operator

USAGE: x=LOG(Expr) REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE:

SEE ALSO: Model Builder's Guide Chapter 9

Example 1: x=LOG(0.773) (The result of x gives -0.111820506)

SAMPLE MODELS: 

LOG NORMAL
Model Builder's Guide Chapter 9

DESCRIPTION: This is a function that randomly picks a value within the range of the parameters given. LOG NORMAL(Expr,Expr) draw a value from a log normal distribution, where the first expression specifies the mean and the second specifies the standard deviation of the underlying normal distribution

USAGE: LOG NORMAL(mean,stdev)

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: mean=0 stdev=1 x=LOG NORMAL PDF(mean,stdev) =x (The result of x varies each time one clicks on Run Edits)

SAMPLE MODELS: 

LOG NORMAL CDF
LOG NORMAL CDF(Expr, Expr, Expr) log normal cumulative density function, where the first expression specifies the value, the second is the mean and the third is the standard deviation Model Builder's Guide Chapter 9

DESCRIPTION: The LOG NORMAL CDF function gives the probability of values smaller and equal to the first expression value one assigns to the function. The second and third parameters define the shape of the distribution curve.

USAGE: LOG NORMAL CDF(x, mean, stdev)

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: mean=5 stdev=1 x=5 ProbabilityOfx=LOG NORMAL CDF(x, mean,stdev) =ProbabilityOfx (The probability of x gives 1.00051376407207)

SAMPLE MODELS: 

LOG NORMAL PDF
LOG NORMAL PDF(Expr, Expr, Expr) log normal probability density function, where the first expression specifies the value, the second is the mean and the third is the standard deviation Model Builder's Guide Chapter 9

show prob at a value DESCRIPTION: The LOG NORMAL PDF function shows the probability of a specific value x for a given function.

USAGE: LOG NORMAL PDF(x, mean, stdev) REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: mean=5 stdev=1 x=5 ProbabilityOfx=LOG NORMAL PDF(x, mean,stdev) =ProbabilityOfx (The Probability of x is 0.001272344308166)

SAMPLE MODELS: 

LOG NORMAL TEMPORAL PDF
(Expr, Expr, Expr) temporal log normal probability density function Model Builder's Guide Chapter 9

LOOKUP
(X): ( Number+)	same as above, except the classes are implicitly 0, …. k-1 Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS:  (X)	same as above, except the values in the CLASS Number: Expr	table are obtained by evaluating expressions :		Model Builder's Guide Chapter 9 ENDFN Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS:  (X)	same as above, except the classes are Expr	implicitly 0, …, k-1 :			Model Builder's Guide Chapter 9 ENDFN Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS:  (X): Filename	uses the table in the named file, which is 		assumed to consist of class:value pairs Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS:  (X): Filename Key	uses the table in the named file, which is assumed to consist of class:value pairs. The key is used to specify a sub-table in a multi-table file Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: 

MAX
maximum of the sub-expressions

Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: <links to sample models where this function is used>

MAX POSITION
DESCRIPTION: A Bit-Vector function that returns the maximun 0-based bit position that is set to one in the expression value(interpreted as a bit-vector),or-1 if no bits are set

USAGE: MAX POSITION(Expr) REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: ?????

SEE ALSO: Model Builder's Guide Chapter 9

Example 1: MAX POSITION(12)

SAMPLE MODELS: <links to sample models where this function is used>

MEAN
average of the sub-expressions

Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: <links to sample models where this function is used>

MIN
minimum of the sub-expressions

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: //Note this example is out of context.//See Spreading.lse for the working example TimeSinceFire = MIN(TimeSinceFire+1, MaxTSF) Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

MIN POSITION
DESCRIPTION: A Bit-Vector function that returns the minimun 0-based bit position that is set to one in the expression value(interpreted as a bit-vector),or-1 if no bits are set

USAGE: MIN POSITION(Expr) REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: ?????

SEE ALSO: Model Builder's Guide Chapter 9

Example 1: MIN POSITION(12)

<figure out an end example indicator. For example, ***>

SAMPLE MODELS: <links to sample models where this function is used>

NEGEXP
DESCRIPTION: NEGEXP(Expr) Draws a value from a negative exponential distribution, where the expression specifies the mean

USAGE: NEGEXP(mean)

Example 1: mean=50 x=NEGEXP(mean) =x (the result of x varies each time one clicks on Run Edits

Example 2: Determine number of fires to initiate based on a negative exponential distribution NUMCLUSTERS = ROUND(NEGEXP(meanFiresPerYear)) Model Builder's Guide Chapter 9

NEXT
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: //Note this example is out of context. //See centroid.lse for the working example. nextPos = NEXT(patchList[i], pos1)

Example 2: //Note this example is out of context. //See nn.lse for the working example. pos = NEXT(nnGraph[pType], pos)

SAMPLE MODELS: Model Builder's Guide Chapter 9

NEXT LINK
DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: //Note this example is out of context. //See nn.lse for the working example. pos = NEXT LINK(nnGraph[pType], pos)

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

NORMAL
DESCRIPTION: draw a value from a normal distribution

USAGE: x=NORMAL(value,mean)

REQUIRED ARGUMENTS: Expr1 is the mean, and Expr2 is the variance.

VALUE: A single value sampled from a normal distribution.

NOTES: <define gaussian distribution, web refs?, etc>

SEE ALSO: Model Builder's Guide Chapter 9

Example 1: value=12 mean=3 x=NORMAL(value,mean) =x (The result of x is 22.7723105807491)

<figure out an end example indicator. For example, ***>

SAMPLE MODELS: <links to sample models where this function is used>

NORMAL CDF
(Expr, Expr, Expr)	normal cumulative density function, where the 			first expression is the value, the second is the			mean and the third is the standard deviation Model Builder's Guide Chapter 9

DESCRIPTION: Please see the following pages for more information about cumulative density function /Cumulative probability & probability density functions /Related Distributions

USAGE: x=NORMAL CDF(value, mean, stdev)

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: value=5 mean=5 stdev=2 x=NORMAL CDF(value, mean, stdev) =x (the result of x gives 0.5, which means the probability of this function is 0.5)

Example2: value=10 mean=5 stdev=0.2 x=NORMAL CDF(value, mean, stdev) =x (the result of x gives 0.9999999, which means the probability of this function is 0.9999999)

SAMPLE MODELS: <links to sample models where this function is used>

NORMAL PDF
(Expr, Expr, Expr)	normal probability density function, where the 			first expression is the value, the second is the 			mean and the third is the standard deviation Model Builder's Guide Chapter 9

DESCRIPTION: Please see the following pages for more information about normal probability density function /Normal Probability Density Function /Probability density function-Wiki USAGE: x=NORMAL PDF(value, mean, stdev)

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: SAMPLE MODELS: <links to sample models where this function is used>

NORMAL TEMPORAL PDF
(Expr, Expr, Expr) 	temporal normal probability density function Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE: x=NORMAL TEMPORAL PDF(value, mean, stdev)

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: value=5 mean=5 stdev=2 x=NORMAL TEMPORAL PDF(value, mean, stdev) =x (The result of x is 0.39894228034270)

Example 2: value=10 mean=17 stdev=5 x=NORMAL TEMPORAL PDF(value, mean, stdev) =x (The result of x is 0.03257687577270)

SAMPLE MODELS: <links to sample models where this function is used>