Language Reference 3: Difference between revisions
No edit summary |
No edit summary |
||
| Line 27: | Line 27: | ||
between sources. The version here is equivalent | between sources. The version here is equivalent | ||
to that in Excel, with reversal of parameters). | to that in Excel, with reversal of parameters). | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==OR== | ==OR== | ||
| Line 119: | Line 129: | ||
the overall target dist. will be met. | the overall target dist. will be met. | ||
[[Model Builder's Guide Chapter 9#Matrix Functions]] | [[Model Builder's Guide Chapter 9#Matrix Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==PAUSE== | ==PAUSE== | ||
Halts the simulation and displays a dialog | Halts the simulation and displays a dialog | ||
box to which the user must respond to continue[[Model Builder's Guide Chapter 9#Control Expressions]] | box to which the user must respond to continue[[Model Builder's Guide Chapter 9#Control Expressions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
| Line 128: | Line 156: | ||
(#Value) Pauses the simulation for the specified number | (#Value) Pauses the simulation for the specified number | ||
of milliseconds and then continues[[Model Builder's Guide Chapter 9#Control Expressions]] | of milliseconds and then continues[[Model Builder's Guide Chapter 9#Control Expressions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==PAUSE IF== | ==PAUSE IF== | ||
Expr If the expression evaluates to TRUE, halts the | Expr If the expression evaluates to TRUE, halts the | ||
| Line 133: | Line 171: | ||
the user must respond to continue[[Model Builder's Guide Chapter 9#Control Expressions]] | the user must respond to continue[[Model Builder's Guide Chapter 9#Control Expressions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==PAUSE (#Value)IF== | ==PAUSE (#Value)IF== | ||
| Line 138: | Line 185: | ||
simulation for the specified number of | simulation for the specified number of | ||
milliseconds and then continues[[Model Builder's Guide Chapter 9#Control Expressions]] | milliseconds and then continues[[Model Builder's Guide Chapter 9#Control Expressions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==PREV== | ==PREV== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==PREV LINK== | ==PREV LINK== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==RECOMPUTE== | ==RECOMPUTE== | ||
| Line 147: | Line 224: | ||
recomputed before next selection | recomputed before next selection | ||
[[Model Builder's Guide Chapter 9#Control Expressions]] | [[Model Builder's Guide Chapter 9#Control Expressions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION CENTRED== | ==REGION CENTRED== | ||
| Line 154: | Line 240: | ||
those cells for which this expression returns | those cells for which this expression returns | ||
TRUE will be included. | TRUE will be included. | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION COST SURFACE== | ==REGION COST SURFACE== | ||
| Line 159: | Line 254: | ||
DECISION Expr | DECISION Expr | ||
COST Expr[[Model Builder's Guide Chapter 9#Region Functions]] | COST Expr[[Model Builder's Guide Chapter 9#Region Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION COST SURFACE== | ==REGION COST SURFACE== | ||
| Line 172: | Line 276: | ||
cumulative cost from the cost function | cumulative cost from the cost function | ||
[[Model Builder's Guide Chapter 9#Region Functions]] | [[Model Builder's Guide Chapter 9#Region Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION COST SURFACE== | ==REGION COST SURFACE== | ||
| Line 177: | Line 290: | ||
DECISION Expr | DECISION Expr | ||
COST Expr[[Model Builder's Guide Chapter 9#Region Functions]] | COST Expr[[Model Builder's Guide Chapter 9#Region Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION COST SURFACE== | ==REGION COST SURFACE== | ||
(EndLocation, MaxCost, CostSurface, LeastCostNeighbs, AnchorLoc) | (EndLocation, MaxCost, CostSurface, LeastCostNeighbs, AnchorLoc) | ||
| Line 189: | Line 312: | ||
cumulative cost from the cost function | cumulative cost from the cost function | ||
[[Model Builder's Guide Chapter 9#Region Functions]] | [[Model Builder's Guide Chapter 9#Region Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION LEAST COST PATH== | ==REGION LEAST COST PATH== | ||
(StartLocation, EndLocation) | (StartLocation, EndLocation) | ||
DECISION Expr | DECISION Expr | ||
COST Expr[[Model Builder's Guide Chapter 9#Region Functions]] | COST Expr[[Model Builder's Guide Chapter 9#Region Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION LEAST COST PATH==(StartLocation, EndLocation, LeastCostNeighbs) | ==REGION LEAST COST PATH==(StartLocation, EndLocation, LeastCostNeighbs) | ||
DECISION Expr[[Model Builder's Guide Chapter 9#Region Functions]] | DECISION Expr[[Model Builder's Guide Chapter 9#Region Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION LEAST COST PATH==(StartLocation, EndLocation, LeastCostNeighbs, AnchorLoc) | ==REGION LEAST COST PATH==(StartLocation, EndLocation, LeastCostNeighbs, AnchorLoc) | ||
DECISION Expr | DECISION Expr | ||
| Line 207: | Line 360: | ||
Iteration is a common aspect of models (even if it is very procedural). Most programming languages offer a “for-loop” of some kind. SELES presently provides “over index sequence” expressions as a slightly more declarative (although also more cumbersome) expression for iterating. While-loops can also be used. | Iteration is a common aspect of models (even if it is very procedural). Most programming languages offer a “for-loop” of some kind. SELES presently provides “over index sequence” expressions as a slightly more declarative (although also more cumbersome) expression for iterating. While-loops can also be used. | ||
[[Model Builder's Guide Chapter 9#Region Functions]] | [[Model Builder's Guide Chapter 9#Region Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION LOCATION== | ==REGION LOCATION== | ||
| Line 216: | Line 378: | ||
this expression returns TRUE will be | this expression returns TRUE will be | ||
included. | included. | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION LOCATION LIST== | ==REGION LOCATION LIST== | ||
| Line 225: | Line 396: | ||
which this expression returns TRUE will be | which this expression returns TRUE will be | ||
included. | included. | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION LOCATION LIST== | ==REGION LOCATION LIST== | ||
| Line 237: | Line 417: | ||
TRUE will be included | TRUE will be included | ||
[[Model Builder's Guide Chapter 9#Region Functions]] | [[Model Builder's Guide Chapter 9#Region Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION VECTOR== (StartLocation, EndLocation) defines region consisting of cells along an | ==REGION VECTOR== (StartLocation, EndLocation) defines region consisting of cells along an | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REGION WHOLE MAP== | ==REGION WHOLE MAP== | ||
| Line 247: | Line 445: | ||
returns TRUE will be included. | returns TRUE will be included. | ||
[[Model Builder's Guide Chapter 9#Region Functions]] | [[Model Builder's Guide Chapter 9#Region Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REMOVE== | ==REMOVE== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REMOVE ALL LINKS== | ==REMOVE ALL LINKS== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==REMOVE LINK== | ==REMOVE LINK== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==RESIZE== | ==RESIZE== | ||
| Line 257: | Line 493: | ||
when size is not known prior to simulation. | when size is not known prior to simulation. | ||
[[Model Builder's Guide Chapter 9#Control Expressions]] | [[Model Builder's Guide Chapter 9#Control Expressions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==RESPONSE== | ==RESPONSE== | ||
(Expr, #A, #B, #C) two-sided version of a standard response | (Expr, #A, #B, #C) two-sided version of a standard response | ||
| Line 264: | Line 510: | ||
else return 1 | else return 1 | ||
[[Model Builder's Guide Chapter 9#Continuous Functions (Miscellaneous)]] | [[Model Builder's Guide Chapter 9#Continuous Functions (Miscellaneous)]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==ROUND(Expr)== | ==ROUND(Expr)== | ||
| Line 291: | Line 546: | ||
(Expr) Sets the random number seed. Value returned is | (Expr) Sets the random number seed. Value returned is | ||
next seed.[[Model Builder's Guide Chapter 9#Control Expressions]] | next seed.[[Model Builder's Guide Chapter 9#Control Expressions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SELECTAT== | ==SELECTAT== | ||
DESCRIPTION: | DESCRIPTION: | ||
| Line 316: | Line 581: | ||
==SET== | ==SET== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SET LINK== | ==SET LINK== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SETAT== | ==SETAT== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SETAT(Expr,PositionList,#Type)== | ==SETAT(Expr,PositionList,#Type)== | ||
DESCRIPTION: | DESCRIPTION: | ||
| Line 419: | Line 714: | ||
(Expr) interpret the value of the expression as an angle | (Expr) interpret the value of the expression as an angle | ||
theta in degrees, and return sin(theta) [[Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)]] | theta in degrees, and return sin(theta) [[Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SIZE LINKS== | ==SIZE LINKS== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SKEWED NORMAL CDF== | ==SKEWED NORMAL CDF== | ||
(Expr, Expr, Expr, Expr) skewed normal cumulative density function, where the first expression specifies the value, | (Expr, Expr, Expr, Expr) skewed normal cumulative density function, where the first expression specifies the value, | ||
the second is the mode, and the third and fourth are the left and right standard deviations | the second is the mode, and the third and fourth are the left and right standard deviations | ||
[[Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions]] | [[Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SKEWED NORMAL PDF== | ==SKEWED NORMAL PDF== | ||
| Line 432: | Line 756: | ||
of the mode. | of the mode. | ||
[[Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions]] | [[Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SKEWED NORMAL TEMPORAL PDF== | ==SKEWED NORMAL TEMPORAL PDF== | ||
| Line 438: | Line 771: | ||
function | function | ||
[[Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions]] | [[Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SORT== | ==SORT== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SORT LINKS== | ==SORT LINKS== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==STRICT ORDERED== | ==STRICT ORDERED== | ||
same as LESS THAN | same as LESS THAN | ||
[[Model Builder's Guide Chapter 9#Composite Functions]] | [[Model Builder's Guide Chapter 9#Composite Functions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==SUM== | ==SUM== | ||
DESCRIPTION: | DESCRIPTION: | ||
| Line 483: | Line 855: | ||
==TAIL== | ==TAIL== | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==TAN== | ==TAN== | ||
DESCRIPTION: | DESCRIPTION: | ||
| Line 510: | Line 892: | ||
==UNIFORM== | ==UNIFORM== | ||
(Expr, Expr) draw a value from a uniform distribution, where the first expression determines the minimum value and the second determines the maximum | (Expr, Expr) draw a value from a uniform distribution, where the first expression determines the minimum value and the second determines the maximum | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==UNIFORM TEMPORAL PDF== | ==UNIFORM TEMPORAL PDF== | ||
| Line 525: | Line 916: | ||
root can be computed with1/n as the power. | root can be computed with1/n as the power. | ||
| Expr | absolute value of the expression | | Expr | absolute value of the expression | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==WAIT UNTIL== | ==WAIT UNTIL== | ||
| Line 530: | Line 930: | ||
communication and synchronization with | communication and synchronization with | ||
an external application. [[Model Builder's Guide Chapter 9#Control Expressions]] | an external application. [[Model Builder's Guide Chapter 9#Control Expressions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==WHILE== | ==WHILE== | ||
| Line 536: | Line 945: | ||
ENDFN | ENDFN | ||
[[Model Builder's Guide Chapter 9#Control Expressions]] | [[Model Builder's Guide Chapter 9#Control Expressions]] | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
==ZERO== | ==ZERO== | ||
return 0.0 | return 0.0 | ||
DESCRIPTION: | |||
USAGE: | |||
REQUIRED ARGUMENTS: | |||
VALUE: | |||
SEE ALSO: | |||
Example 1: | |||
Example 2: | |||
SAMPLE MODELS: | |||
<links to sample models where this function is used> | |||
Revision as of 20:15, 18 October 2006
ONE
return 1.0
- Number return value of the number specified
<Constant> return value of a named constant <Constant>[Expr] return value of a named vector constant <Constant>[Expr, Expr] return value of a named array constant <Macro>[Expr] return value of expression at specified index in macro
(Expr, Expr) draw a value from a normal distribution, where the first expression specifies the mean and the second specifies the standard deviation
(Expr, Expr, Expr) draw a value from a skewed normal distribution, where the first expression specifies the mode and the second and third specify the standard deviations to the left and right of the mode (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
(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: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
OR
DESCRIPTION: A Boolean function operator that returns TRUE(1) if value of at least one expression is TRUE(1) and FALSE(0) otherwise.
USAGE:
x=Expr OR Expr
REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value
VALUE: Either TRUE(1) or FALSE(0)
SEE ALSO: Model Builder's Guide Chapter 9#Composite Functions
Example 1:
x=(2*8==16) OR (2>5)(TRUE) =1
Example 2:
x=(2*8!=4*4) OR (2>5) (FALSE) =0
<figure out an end example indicator. For example, ***>
SAMPLE MODELS: <links to sample models where this function is used>
OVER INDEX SEQUENCE
(Expr, Expr) defines linear sequence of location indices. DECISION Expr If there is a decision expression, then only those cells for which this expression returns TRUE will be included. The system variable Index holds the value of the index at each value in the sequence
Over region expressions are very frequently used to visit all cells in a landscape that meet some condition (e.g. to compute the size of the forest at initiation). Model Builder's Guide Chapter 9#Region Functions OVER RegionFunction Apply a set of sub-expressions at all spatial
Expression locations specified by a region function
: ENDFN Model Builder's Guide Chapter 9#Region Functions AT LOCATION #Expr Apply a set of state-changes at a specified
Expression location
: ENDFN Model Builder's Guide Chapter 9#Region Functions
Matrix assignment is indicated using “[=]” instead of “=”. The proper dimensions of the component arrays must be met.
Variable [=] Variable assign variable of same dimension, or a single value to all entries Variable [=] Variable + Variable sum variables of same dimension (or with a constant) Variable [=] Variable - Variable subtract variables of same dimension (or with a constant) Variable [=] Variable * Variable matrix or scalar multiplication.
Variable [=] TRANSPOSE(Variable) matrix transposition Variable [=] Variable^-1 invert a matrix Variable = SUM(Variable) sum all entries in a matrix Variable [=] SUM ROWS (Variable) sum all rows of a matrix (result has one value per column) Variable [=] SUM COLS(Variable) sum all columns of a matrix
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.
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"
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#Matrix Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
PAUSE
Halts the simulation and displays a dialog box to which the user must respond to continueModel Builder's Guide Chapter 9#Control Expressions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
PAUSE
(#Value) Pauses the simulation for the specified number of milliseconds and then continuesModel Builder's Guide Chapter 9#Control Expressions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
PAUSE IF
Expr If the expression evaluates to TRUE, halts the simulation and displays a dialog box to which the user must respond to continueModel Builder's Guide Chapter 9#Control Expressions
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
PAUSE (#Value)IF
Expr If the expression evaluates to TRUE, Pauses the simulation for the specified number of milliseconds and then continuesModel Builder's Guide Chapter 9#Control Expressions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
PREV
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
PREV LINK
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
RECOMPUTE
Only valid in consequent expressions of ProbInit and also when ProbInit recompute flag has been set. Causes prob. surface to be recomputed before next selection Model Builder's Guide Chapter 9#Control Expressions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION CENTRED
(Expr, Expr [,DistanceType][,WRAPPED]) DECISION Expr defines a region centred on the current cell. If there is a decision expression, then only those cells for which this expression returns TRUE will be included. DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION COST SURFACE
(EndLocation, MaxCost, CostSurface) DECISION Expr COST ExprModel Builder's Guide Chapter 9#Region Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION COST SURFACE
(EndLocation, MaxCost, CostSurface, LeastCostNeighbs, AnchorLoc)
DECISION Expr
COST Expr
Defines a region surrounding a cell with cumulative costs less than MaxCost. Stops growing when EndLocation is reached or all costs are greater than MaxCost. Second form also records gradient and anchor location layers. The CostSurface layer records the cumulative cost from the cost function Model Builder's Guide Chapter 9#Region Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION COST SURFACE
(EndLocation, MaxCost, CostSurface) DECISION Expr COST ExprModel Builder's Guide Chapter 9#Region Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION COST SURFACE
(EndLocation, MaxCost, CostSurface, LeastCostNeighbs, AnchorLoc)
DECISION Expr
COST Expr
Defines a region surrounding a cell with cumulative costs less than MaxCost. Stops growing when EndLocation is reached or all costs are greater than MaxCost. Second form also records gradient and anchor location layers. The CostSurface layer records the cumulative cost from the cost function Model Builder's Guide Chapter 9#Region Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION LEAST COST PATH
(StartLocation, EndLocation) DECISION Expr COST ExprModel Builder's Guide Chapter 9#Region Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
==REGION LEAST COST PATH==(StartLocation, EndLocation, LeastCostNeighbs) DECISION ExprModel Builder's Guide Chapter 9#Region Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
==REGION LEAST COST PATH==(StartLocation, EndLocation, LeastCostNeighbs, AnchorLoc) DECISION Expr Defines a region with cells that approximate the least-cost path between two cells. The first generates the cost function internally. The latter two use input information from a pre-computed cost surface region. Providing both the gradient and anchor location layers provides the most accurate approximation.
Iteration is a common aspect of models (even if it is very procedural). Most programming languages offer a “for-loop” of some kind. SELES presently provides “over index sequence” expressions as a slightly more declarative (although also more cumbersome) expression for iterating. While-loops can also be used. Model Builder's Guide Chapter 9#Region Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION LOCATION
(Expr) DECISION Expr
defines the region consisting of a of a single
location index. If there is a decision
expression, then only those cells for which
this expression returns TRUE will be
included.
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION LOCATION LIST
(Number+) DECISION Expr
defines the region consisting of a set of a set
of known location indices. If there is a
decision expression, then only those cells for
which this expression returns TRUE will be
included.
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION LOCATION LIST
(X,n) defines the region consisting of a set of n location indices stored in one-dimensional X.
REGION RECT
(Expr, Expr, Expr, Expr) defines a rectangular region. If there is a DECISION Expr decision expression defined, then only those cells for which this expression returns TRUE will be included Model Builder's Guide Chapter 9#Region Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
==REGION VECTOR== (StartLocation, EndLocation) defines region consisting of cells along an DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REGION WHOLE MAP
DECISION Expr
defines the region consisting of the entire
landscape. If there is a decision expression,
then only those cells for which this expression returns TRUE will be included. Model Builder's Guide Chapter 9#Region Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REMOVE
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REMOVE ALL LINKS
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
REMOVE LINK
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
RESIZE
(Variable, Expr) Changes size (number of entries) in a global variable. Values are not maintained. Useful for when size is not known prior to simulation. Model Builder's Guide Chapter 9#Control Expressions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
RESPONSE
(Expr, #A, #B, #C) two-sided version of a standard response function for the value X of the first expression: if (X < A) return e^(-(X-A)^2/(2*(C^2)) else if (X > B) return e^(-(X-B)^2/(2*(C^2)) else return 1 Model Builder's Guide Chapter 9#Continuous Functions (Miscellaneous) DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
ROUND(Expr)
DESCRIPTION: The rounding operator
USAGE:
x=ROUND(Expr)
REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value
VALUE: Expression value rounded to the nearest integer
SEE ALSO: Model Builder's Guide Chapter 9#Expressions:
Example 1:
x=ROUND(0.773) =1
SAMPLE MODELS: <links to sample models where this function is used>
SEED
(Expr) Sets the random number seed. Value returned is next seed.Model Builder's Guide Chapter 9#Control Expressions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SELECTAT
DESCRIPTION: A Bit-Vector function that returns FALSE(0) if none of the bits in PositionList are set in the specified expression value and TRUE(1) otherwise
USAGE:
(Expr,PositionList)
REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value PositionList is a semi-colon separated sequence of integer or ranges (lower-upper) indicating positions in the integer (0-31).
VALUE: Either FALSE(0) or TRUE(1)
SEE ALSO: Model Builder's Guide Chapter 9#Bit-Vector Functions
Example 1:
yet to be determined
<figure out an end example indicator. For example, ***>
SAMPLE MODELS: <links to sample models where this function is used>
SET
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SET LINK
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SETAT
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SETAT(Expr,PositionList,#Type)
DESCRIPTION: A Bit-Vector function that sets the value specified by the expression, at the positions in PositionList to: FALSE(0) if Type is 0, TRUE(1) if Type is 1, and flip the bits if Type=2.
USAGE:
(Expr,PositionList,#Type)
REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value PositionList is a semi-colon separated sequence of integer or ranges (lower-upper) indicating positions in the integer (0-31).
VALUE: Any integer value
SEE ALSO: Model Builder's Guide Chapter 9#Bit-Vector Functions
Example 1:
The PositionList 1;4-6;27 indicates bits at positions 1,4,5,6 and 27.
<figure out an end example indicator. For example, ***>
SAMPLE MODELS: <links to sample models where this function is used>
SETAT(Expr,PositionList,#Type,#Prob)
(Expr, PositionList,#Type,#Prob) Same as above, except each position is set with probability #Prob Model Builder's Guide Chapter 9#Bit-Vector Functions DESCRIPTION: A Bit-Vector function that sets the value specified by the expression, at the positions in PositionList to: FALSE(0) if Type is 0, TRUE(1) if Type is 1; flip the bits if Type=2; note that each position is set with probability #Prob.
USAGE:
(Expr,PositionList,#Type,#Prob)
REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value PositionList is a semi-colon separated sequence of integer or ranges (lower-upper) indicating positions in the integer (0-31).
VALUE: Any integer value
SEE ALSO: Model Builder's Guide Chapter 9#Bit-Vector Functions
Example 1:
The PositionList 1;4-6;27;30 indicates bits at positions 1,4,5,6 and 27, each associated with probability 30%.
<figure out an end example indicator. For example, ***>
SAMPLE MODELS: <links to sample models where this function is used>
SHIFT LEFT
DESCRIPTION: A Bit-Vector function that shifts value of first expression to the left by number of bits specified by second expression
USAGE:
SHIFT LEFT(Expr,Expr)
REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value
VALUE: Any integer value
SEE ALSO: Model Builder's Guide Chapter 9#Bit-Vector Functions
Example 1:
SHIFT LEFT(7,5) means that position 7 will be shifted to position 2
<figure out an end example indicator. For example, ***>
SAMPLE MODELS: <links to sample models where this function is used>
SHIFT RIGHT
DESCRIPTION: A Bit-Vector function that shifts value of first expression to the right by number of bits specified by second expression
USAGE:
SHIFT RIGHT(Expr,Expr)
REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value
VALUE: Any integer value
SEE ALSO: Model Builder's Guide Chapter 9#Bit-Vector Functions
Example 1:
SHIFT RIGHT(7,5) means that position 7 will be shifted to position 12
<figure out an end example indicator. For example, ***>
SAMPLE MODELS: <links to sample models where this function is used>
SIN
(Expr) interpret the value of the expression as an angle theta in degrees, and return sin(theta) Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions) DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SIZE LINKS
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SKEWED NORMAL CDF
(Expr, Expr, Expr, Expr) skewed normal cumulative density function, where the first expression specifies the value, the second is the mode, and the third and fourth are the left and right standard deviations Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SKEWED NORMAL PDF
(Expr, Expr, Expr, Expr) skewed normal probability density function, where the first expression specifies the value, the second is the mode and the third and fourth are the standard deviations to the left and right of the mode. Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SKEWED NORMAL TEMPORAL PDF
(Expr, Expr, Expr, Expr) temporal skewed normal probability density function Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SORT
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SORT LINKS
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
STRICT ORDERED
same as LESS THAN Model Builder's Guide Chapter 9#Composite Functions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
SUM
DESCRIPTION: Returns the number that is the sum of all the expressions.
USAGE:
x=SUM
Expr
...
ENDFN
REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value.
VALUE: the sum of all the arguments.
SEE ALSO: <a link to the composite functions section of seles modellers guide>
EXAMPLES: <add carriage return here> Example 1:
y = 3
x = SUM
y
y+2
5
ENDFN
<figure out an end example indicator. For example, ***>
SAMPLE MODELS: <links to sample models where this function is used> Model Builder's Guide Chapter 9#Composite Functions
DIVIDE successive division of the sub-expressions
Model Builder's Guide Chapter 9#Composite Functions
TAIL
DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
TAN
DESCRIPTION: The tan function operator
USAGE:
x=TAN(Expr)
REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value.
VALUE: Interpret the value of the expression as an angle theta in degrees, and return cos(theta)
SEE ALSO: <a link to the composite functions section of seles modellers guide>
Example 1:
x=TAN(90) =-286411217403671.25
<figure out an end example indicator. For example, ***>
SAMPLE MODELS: <links to sample models where this function is used> Model Builder's Guide Chapter 9#Composite Functions
UNIFORM
(Expr, Expr) draw a value from a uniform distribution, where the first expression determines the minimum value and the second determines the maximum DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
UNIFORM TEMPORAL PDF
(Expr, Expr, Expr) temporal uniform probability density expression Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions
<Variable> value of an independent variable <Variable>[Expr] value of a vector global variable <Variable>[Expr, Expr] value of an array global variable Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)
(Expr) value of the expression Expr + Expr sum of two expressions Expr - Expr value of the first expression minus the value of the second expression Expr * Expr product of two expressions Expr / Expr value of the first expression divided by value of the second expression Expr ^ Expr value of the first expression to the power of the value of the second expression. An nth root can be computed with1/n as the power. | Expr | absolute value of the expression DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
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#Control Expressions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
WHILE
Expr While loop: process sub-expressions denoted by
… “…” while the expression evaluates to TRUE
ENDFN Model Builder's Guide Chapter 9#Control Expressions DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>
ZERO
return 0.0 DESCRIPTION: USAGE: REQUIRED ARGUMENTS: VALUE: SEE ALSO: Example 1: Example 2: SAMPLE MODELS: <links to sample models where this function is used>