Language Reference 4

Variable [=] Variable
Matrix assignment is indicated using “[=]” instead of “=”. The proper dimensions of the component arrays must be met Assign variable of same dimension, or a 	single value to all entriesModel Builder's Guide Chapter 9

Variable [=] Variable + Variable
sum variables of same dimension (or with a 	constant)Model Builder's Guide Chapter 9

Variable [=] Variable - Variable
subtract variables of same dimension (or	with a constant)Model Builder's Guide Chapter 9

Variable [=] Variable * Variable
matrix or scalar multiplication. Model Builder's Guide Chapter 9

Variable [=] TRANSPOSE(Variable)
matrix transpositionModel Builder's Guide Chapter 9

Variable [=] Variable^-1
invert a matrixModel Builder's Guide Chapter 9

Variable = SUM(Variable)
sum all entries in a matrixModel Builder's Guide Chapter 9

Variable [=] SUM ROWS (Variable)
sum all rows of a matrix (result has one	value per column)Model Builder's Guide Chapter 9

Variable [=] SUM COLS(Variable)
sum all columns of a matrix Model Builder's Guide Chapter 9

Variables [=] SORT(Variable, Expr)
sort rows of an input matrix where rank is given by Expr. The system variable “Index” can appear in the expression and will take on the range of indices in the input array. The resulting sorted matrix will be assigned. Model Builder's Guide Chapter 9

Variable [=] MPM_MULT(Variable, Variable)
Performs a “matrix population model” (MPM) integer-based multiplication. Assumes that first matrix is two-dimensional and that second is a vector. The result is 	two-dimensional, where entries above diagonal represent "offspring", entries on the diagonal represent "survivors" and entries below the diagonal represent "succeeders" Model Builder's Guide Chapter 9

Variable [=] CONTAG(Variable, Variable)
Creates a “temporal contagion” matrix. Given probabilities (first parameter) for a set of states and a two-dimensional contagion array (values –1 to 1 indicating affinity), generates a matrix where each row is a prob. dist. For transitions given the row value, and the overall target dist. will be met. Model Builder's Guide Chapter 9

WEIBULL
WEIBULL(Expr, Expr)draw a value from a Weibull distribution, where the first expression specifies the beta and the second specifies alpha (Note:terminology varies between sources. The version here is equivalent to that in Excel, with reversal of parameters.)

DESCRIPTION: This is a probability distribution function. In SELES, probability distributions have the behavior of selecting a value from the distribution, rather than computing the result of a deterministic function. Each time a distribution is evaluated, the value returned may be different. This is one way that stochasticity can be incorporated into SELES models. Please see the following pages for more information Weibull Distribution distribution-Wiki

USAGE: WEIBULL(β,α) when alpha=1, WEIBULL returns the exponential distribution with: γ=1/β. If x, alpha, or beta is nonnumeric, WEIBULL returns the #VALUE! error value. If x < 0, WEIBULL returns the #NUM! error value. If alpha ≤ 0 or if beta ≤ 0, WEIBULL returns the #NUM! error value. Note that the order of the parameters listed is the reverse of that in the Microsoft Excel.

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: beta=5 alpha=4 x=WEIBULL(beta,alpha) =x (The result of x varies each time one clicks on Run Edits because the model picks a random value for the defined function)

SAMPLE MODELS: 

WAIT UNTIL
Expr	Suspend execution until the expression returns 			TRUE (1). This is intended for controlling communication and synchronization with an external application. Model Builder's Guide Chapter 9

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: 

WHILE
Expr While loop: process sub-expressions denoted by “…” while the expression evaluates to TRUE ENDFN

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1: //Note this example is out of context. //See stats.lse WHILE (pos) patchVar [=] GET(coreAreaList[i], pos) pos = NEXT(coreAreaList[i], pos) // i = patchVar[rType] patchSize = patchVar[rArea] patchCoreSize = patchVar[rCoreArea] patchPerim = patchVar[rPerim] CASD2[i] = CASD2[i] + (patchCoreSize - MCA2[i])^2 tCASD2 = tCASD2 + (patchCoreSize - tMCA2)^2 ENDFN

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9

ZERO
return 0.0

DESCRIPTION:

USAGE:

REQUIRED ARGUMENTS:

VALUE:

SEE ALSO:

Example 1:

Example 2:

SAMPLE MODELS: Model Builder's Guide Chapter 9