|
|
| Line 1: |
Line 1: |
| ==ABS==
| | :''Click on a term below for more information.'' |
| (Expr) absolute value of the expression
| | <p></p> |
| [[Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)]]
| | {| style="background-color: transparent; width: {{{width|100%}}}" |
| | | <p></p> |
| ==ABSOLUTE== | | | width="20%" align="{{{align|left}}}" valign="{{{valign|top}}}" | |
| (Expr) absolute value of the expression
| | * A|Aa |
| ==Expr % Expr== | | **[[Language Reference 1#ABS|ABS]] |
| value of the first expression modulo the value of
| | **[[Language Reference 1#ABSOLUTE|ABSOLUTE]] |
| the second expression (assumes that the values
| | **[[Language Reference 1#AND|AND]] |
| of the expressions are integers)
| | **[[Language Reference 1#ARCSIN|ARCSIN]] |
| | | **[[Language Reference 1#ARCTAN|ARCTAN]] |
| ==AND==
| | **[[Language Reference 1#ARCTAN|ARCTAN]] |
| TRUE (1) if all sub-expressions evaluate to
| | * B|Bb |
| TRUE and FALSE (0) otherwise
| | **[[Language Reference 1#BITWISE AND|BITWISE AND]] |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | | **[[Language Reference 1#BITWISE NOT|BITWISE NOT]] |
| | | **[[Language Reference 1#BITWISE OR|BITWISE OR]] |
| ==ARCCOS==(Expr) inverse cos of the value of the expression [[Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)]]
| | **[[Language Reference 1#BITWISE XOR|BITWISE XOR]] |
| | | * C|Cc |
| ==ARCSIN==
| | **[[Language Reference 1#CEILING|CEILING]] |
| (Expr) inverse sine of the value of the expression [[Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)]]
| | **[[Language Reference 1#CLAMP|CLAMP]] |
| | | **[[Language Reference 1#CLASSIFIED_DIST|CLASSIFIED_DIST]] |
| ==ARCTAN==
| | **[[Language Reference 1#CLASSIFIED_DIST_M|CLASSIFIED_DIST_M]] |
| (Expr) inverse tan of the value of the expression [[Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)]]
| | **[[Language Reference 1#CLASSIFY|CLASSIFY]] |
| | | **[[Language Reference 1#CONTAINS|CONTAINS]] |
| ==ARCTAN==
| | **[[Language Reference 1#CONTAINS LINK|CONTAINS LINK]] |
| (Expr, Expr) inverse tan where first expression is x offset
| | **[[Language Reference 1#COS|COS]] |
| and second is y offset. Providing two
| | **[[Language Reference 1#CRITICAL SECTION|CRITICAL SECTION]] |
| expressions gives more information about the
| | * D|Dd |
| quadrant.
| | **[[Language Reference 1#DEBUG|DEBUG]] |
| [[Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)]] | | **[[Language Reference 1#DECISION|DECISION]] |
| | | **[[Language Reference 1#DIRECTION|DIRECTION]] |
| ==BITWISE OR==
| | **[[Language Reference 1#DISTANCE|DISTANCE]] |
| (Expr, Expr) Bitwise OR of two values[[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
| | <p></p> |
| ==BITWISE AND==
| | | width="20%" align="{{{align|left}}}" valign="{{{valign|top}}}" | |
| (Expr, Expr) Bitwise AND of two values[[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
| | * E|Ee |
| ==BITWISE XOR==
| | **[[Language Reference 1#ELSE|ELSE]] |
| (Expr, Expr) Bitwise exclusive-OR of two values[[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
| | **[[Language Reference 1#EQUAL TRUE|EQUAL TRUE]] |
| ==BITWISE NOT==
| | **[[Language Reference 1#EXP|EXP]] |
| Expr Bitwise NOT of a value[[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
| | **[[Language Reference 1#Expr % Expr|Expr % Expr]] |
| | | * F|Ff |
| ==EXP==
| | **[[Language Reference 1#FIND|FIND]] |
| (Expr) base of the natural logarithm (e) to the power of
| | **[[Language Reference 1#FIND LINK|FIND LINK]] |
| the expression
| | **[[Language Reference 1#FIND NEXT|FIND NEXT]] |
| | | **[[Language Reference 1#FIND NEXT LINK|FIND NEXT LINK]] |
| | | **[[Language Reference 1#FIRST|FIRST]] |
| ==CEILING==
| | **[[Language Reference 1#FIRST LINK|FIRST LINK]] |
| (Expr) smallest integer larger than the expression value[[Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)]]
| | **[[Language Reference 1#FLOOR|FLOOR]] |
| | | * G|Gg |
| ==CLAMP==
| | **[[Language Reference 1#GEOMETRIC MEAN|GEOMETRIC MEAN]] |
| (Expr, MinExpr, MaxExpr) clamp the value X of the expression to the range
| | **[[Language Reference 1#GREATER OR EQUAL|GREATER OR EQUAL]] |
| [Min, Max]: if X < Min then return Min; if X < Max return Max. Otherwise return X.
| | **[[Language Reference 1#GREATER THAN|GREATER THAN]] |
| [[Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)]] | | * H|Hh |
| | | **[[Language Reference 1#HEAD|HEAD]] |
| ==CLASSIFY==
| | * I|Ii |
| (X) if the value of the variable X is equal to one of
| | **[[Language Reference 2#IF Expr|IF Expr]] |
| CLASS Number: Expr the classes listed, then return the result of the.
| | **[[Language Reference 2#IF Expr THEN Expr ELSE|IF Expr THEN Expr ELSE]] |
| : associated expression. Otherwise return 0.
| | **[[Language Reference 2#INSERT|INSERT]] |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | | **[[Language Reference 2#INSERT HEAD|INSERT HEAD]] |
| ENDFN
| | **[[Language Reference 2#INSERT TAIL|INSERT TAIL]] |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | | **[[Language Reference 2#INTERPOLATE|INTERPOLATE]] |
| | | **[[Language Reference 2#INTERPOLATE|INTERPOLATE]] |
| ==CLASSIFY==
| | **[[Language Reference 2#IS EMPTY|IS EMPTY]] |
| (X) return the result of the kth expression in the list,
| | **[[Language Reference 2#IS EMPTY LINKS|IS EMPTY LINKS]] |
| Expr where k = X – minimum value of the variables
| | <p></p> |
| : (this may be non-0 only for layers)
| | | width="20%" align="{{{align|left}}}" valign="{{{valign|top}}}" | |
| :
| | * J|Jj |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | | * K|Kk |
| ENDFN
| | * L|Ll |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | | **[[Language Reference 2#LESS OR EQUAL|LESS OR EQUAL]] |
| | | **[[Language Reference 2#LESS THAN|LESS THAN]] |
| | | **[[Language Reference 2#LINKED|LINKED]] |
| ==CLASSIFY==
| | **[[Language Reference 2#LOG|LOG]] |
| (X): ( Number+) return the kth number in the list, where
| | **[[Language Reference 2#LOG NORMAL CDF|LOG NORMAL CDF]] |
| k = X – minimum value of the variable (this
| | **[[Language Reference 2#LOG NORMAL PDF|LOG NORMAL PDF]] |
| may be non-0 only for layers)[[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
| | **[[Language Reference 2#LOG NORMAL TEMPORAL PDF|LOG NORMAL TEMPORAL PDF]] |
| | | **[[Language Reference 2#LOOKUP|LOOKUP]] |
| ==CLASSIFY==
| | * M|Mm |
| (X): Filename uses the table in the named file, which is
| | **[[Language Reference 2#MAX|MAX]] |
| assumed to consist of class:value pairs. Rarely
| | **[[Language Reference 2#MAX POSITION|MAX POSITION]] |
| used.
| | **[[Language Reference 2#MEAN|MEAN]] |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | | **[[Language Reference 2#MIN|MIN]] |
| | | **[[Language Reference 2#MIN POSITION|MIN POSITION]] |
| ==CLASSIFY== | | * N|Nn |
| (X): Filename Key uses the table in the named file, which is
| | **[[Language Reference 2#NEGEXP|NEGEXP]] |
| assumed to consist of class:value pairs. The key
| | **[[Language Reference 2#NEXT|NEXT]] |
| is used to specify a sub-table in a multi-table
| | **[[Language Reference 2#NEXT LINK|NEXT LINK]] |
| file. Rarely used.
| | **[[Language Reference 2#NORMAL CDF|NORMAL CDF]] |
| | | **[[Language Reference 2#NORMAL PDF|NORMAL PDF]] |
| Classified functions use the variable as an index into the list of numbers or expressions that follow. The “CLASS” keyword is optional. This variable must be non-negative. If “CLASS # :” is used, then the number refers to the value of the indexing variable. If a class is not specified for a given value, its expression is implicitly ZERO. Interpolation tables are very similar except that the variable is assumed to be continuous instead of classified. An interpolated value between classes is returned. Lookup tables are also similar, except that both the variable and classes are assumed to be continuous values. An interpolated value between classes is also returned. Rarely used.
| | **[[Language Reference 2#NORMAL TEMPORAL PDF|NORMAL TEMPORAL PDF]] |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | | **[[Language Reference 2#NOT EQUAL|NOT EQUAL]] |
| | | <p></p> |
| ==CLASSIFIED_DIST==
| | | width="20%" align="{{{align|left}}}" valign="{{{valign|top}}}" | |
| draw a value from a discrete distribution, where CLASS Number: Expr each expression determines the relative : probability of its associated class being drawn. ENDFN The CLASS keyword is optional.
| | * O|Oo |
| | | **[[Language Reference 3#ONE|ONE]] |
| ==CLASSIFIED_DIST==
| | **[[Language Reference 3#OR|OR]] |
| ( Number+) in this form, the classes are assumed to start at zero. Only constant probabilities can be given.
| | **[[Language Reference 3#OVER INDEX SEQUENCE|OVER INDEX SEQUENCE]] |
| ==CLASSIFIED_DIST==
| | * P|Pp |
| in this form, the classes are assumed to start at Expr zero :
| | **[[Language Reference 3#PAUSE|PAUSE]] |
| ENDFN
| | **[[Language Reference 3#PAUSE (#Value)IF|PAUSE (#Value)IF]] |
| | | **[[Language Reference 3#PAUSE IF|PAUSE IF]] |
| ==CLASSIFIED_DIST[M]==
| | **[[Language Reference 3#PREV|PREV]] |
| In this form, the classes in a one-dimensional
| | **[[Language Reference 3#PREV LINK|PREV LINK]] |
| array M, and so start at zero.
| | * Q|Qq |
| ==COS==
| | * R|Rr |
| (Expr) interpret the value of the expression as an angle
| | **[[Language Reference 3#RECOMPUTE|RECOMPUTE]] |
| theta in degrees, and return cos(theta) [[Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)]]
| | **[[Language Reference 3#REGION CENTRED|REGION CENTRED]] |
| | | **[[Language Reference 3#REGION COST SURFACE|REGION COST SURFACE]] |
| ==CRITICAL SECTION==
| | **[[Language Reference 3#REGION LEAST COST PATH|REGION LEAST COST PATH]] |
| (Flag) Enter (if Flag is TRUE) or exit (if Flag is FALSE) a critical section. A critical section gives priority to this application, and is used for
| | **[[Language Reference 3#REGION LOCATION|REGION LOCATION]] |
| synchronizing access to shared variables
| | **[[Language Reference 3#REGION LOCATION LIST|REGION LOCATION LIST]] |
| (i.e. shared with another application).[[Model Builder's Guide Chapter 9#Control Expressions]]
| | **[[Language Reference 3#REGION RECT|REGION RECT]] |
| | | **[[Language Reference 3#REGION WHOLE MAP|REGION WHOLE MAP]] |
| | | **[[Language Reference 3#REMOVE|REMOVE]] |
| ==DEBUG==
| | **[[Language Reference 3#REMOVE ALL LINKS|REMOVE ALL LINKS]] |
| Update the simulation probe, if it is loaded and
| | **[[Language Reference 3#REMOVE LINK|REMOVE LINK]] |
| The event is selected. Used to debug/verify
| | **[[Language Reference 3#RESIZE|RESIZE]] |
| event behaviour.[[Model Builder's Guide Chapter 9#Control Expressions]]
| | **[[Language Reference 3#RESPONSE|RESPONSE]] |
| | | **[[Language Reference 3#ROUND|ROUND]] |
| ==DECISION==
| | * S|Ss |
| Expr approximation of line between end cells
| | <p></p> |
| Cost surface and least-cost path regions are advanced features that are best understood with an example model.
| | | width="20%" align="{{{align|left}}}" valign="{{{valign|top}}}" | |
| [[Model Builder's Guide Chapter 9#Region Functions]] | | **[[Language Reference 3#SEED()|SEED()]] |
| | | **[[Language Reference 3#SELECTAT|SELECTAT]] |
| | | **[[Language Reference 3#SET|SET]] |
| ==DECISION==
| | **[[Language Reference 3#SET LINK|SET LINK]] |
| Expr known location indices. If there is a decision expression, then only those cells for which this
| | **[[Language Reference 3#SETAT|SETAT]] |
| expression returns TRUE will be included.
| | **[[Language Reference 3#SHIFT LEFT|SHIFT LEFT]] |
| [[Model Builder's Guide Chapter 9#Region Functions]] | | **[[Language Reference 3#SHIFT RIGHT|SHIFT RIGHT]] |
| | | **[[Language Reference 3#SIN|SIN]] |
| ==DECISION== Expr location indices stored in one-dimensional X.
| | **[[Language Reference 3#SIZE LINKS|SIZE LINKS]] |
| [[Model Builder's Guide Chapter 9#Region Functions]] | | **[[Language Reference 3#SKEWED NORMAL CDF|SKEWED NORMAL CDF]] |
| | | **[[Language Reference 3#SKEWED NORMAL PDF|SKEWED NORMAL PDF]] |
| ==DECISION== Expr location index. If there is a decision expression,
| | **[[Language Reference 3#SKEWED NORMAL TEMPORAL PDF|SKEWED NORMAL TEMPORAL PDF]] |
| then only those cells for which this expression
| | **[[Language Reference 3#SORT|SORT]] |
| returns TRUE will be included.
| | **[[Language Reference 3#SORT LINKS|SORT LINKS]] |
| [[Model Builder's Guide Chapter 9#Region Functions]] | | **[[Language Reference 3#STRICT ORDERED|STRICT ORDERED]] |
| | | **[[Language Reference 3#SUM|SUM]] |
| ==DECISION==
| | * T|Tt |
| Expr defines a region centred on the current cell.
| | **[[Language Reference 3#TAIL|TAIL]] |
| If there is a decision expression, then only
| | **[[Language Reference 3#TAN|TAN]] |
| those cells for which this expression returns
| | * U|Uu |
| TRUE will be included.
| | **[[Language Reference 3#UNIFORM|UNIFORM]] |
| | | **[[Language Reference 3#UNIFORM TEMPORAL PDF|UNIFORM TEMPORAL PDF]] |
| DistanceType is either CARDINAL or EUCLIDEAN (the default). Cardinal distance between two cells is the minimum number of cardinal steps (up, down, left, right) to reach one cell from the other. Euclidean distance is the straight-line distance between two points. The WRAPPED flag, if present indicates that the region wraps around the sides (vertically and horizontally) of the landscape (e.g. a location x positions beyond the right-hand side of a raster will be mapped to x positions in from the left-hand side of the raster). If not present, the landscape does not wrap.
| | * V|Vv |
| [[Model Builder's Guide Chapter 9#Region Functions]] | | * W|Ww |
| | | **[[Language Reference 3#WAIT UNTIL|WAIT UNTIL]] |
| ==DIRECTION==
| | **[[Language Reference 3#WHILE|WHILE]] |
| (Expr, Expr) angle in degrees between two location indices
| | * X|Xx |
| [[Model Builder's Guide Chapter 9#Continuous Functions (Miscellaneous)]] | | * Y|Yy |
| | | * Z|Zz |
| ==DISPLAY== Display on the screen the labelled Label: Expr values computed with the expressions listed.
| | **[[Language Reference 3#ZERO|ZERO]] |
| …. If no label is given, the expression must
| | <p></p> |
| ENDFN be a variable, and this is used for the label.
| | |} |
| [[Model Builder's Guide Chapter 9#Output Expressions]] | |
| ==DISPLAY== Same as above, but only display if the DECISION Expr decision expression evaluates to TRUE
| |
| Label: Expr The keyword DECISION can be replaced by
| |
| …. a “?”
| |
| ENDFN
| |
| [[Model Builder's Guide Chapter 9#Output Expressions]] | |
| OUTPUT RECORD(OutputVar) Output to the record file of output variable the labelled values computed with the Label: Expr expressions listed. If no label is given, the
| |
| …. Expression must be a variable and this is
| |
| ENDFN used as label.
| |
| [[Model Builder's Guide Chapter 9#Output Expressions]]
| |
| OUTPUT RECORD(OutputVar) Same as above, but only output if the DECISION Expr decision expression evaluates to TRUE
| |
| Label: Expr
| |
| ….
| |
| ENDFN
| |
| | |
| ==DISTANCE== | |
| (Expr, Expr) distance between two location indices (normally
| |
| obtained using the Location variable). Thus,
| |
| DISTANCE(loc1, loc2) is
| |
| sqrt(sqr(loc1.x – loc2.x) + sqr(loc1.y – loc2.y))
| |
| [[Model Builder's Guide Chapter 9#Continuous Functions (Miscellaneous)]] | |
| | |
| ==ELSE==
| |
| expression evaluates to TRUE and the set of
| |
| … sub-expressions after the ELSE otherwise. Note
| |
| ENDFN that “ELSE IF expr” forms can be strung
| |
| together[[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| | |
| ==EQUAL TRUE==
| |
| (1) if the sub-expressions all evaluate to
| |
| the same value and FALSE (0) otherwise
| |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | |
| | |
| ==FLOOR==
| |
| (Expr) largest integer smaller than the expression value[[Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)]]
| |
| | |
| ==GEOMETRIC MEAN==
| |
| geometric mean of the sub-expressions (nth
| |
| root of the product for n expressions)
| |
| | |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | |
| | |
| ==GREATER OR EQUAL==
| |
| TRUE (1) if the sub-expression evaluations are
| |
| all ordered according to the relation >=, and
| |
| FALSE (0) otherwise
| |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | |
| | |
| ==GREATER THAN==
| |
| TRUE (1) if the sub-expression evaluations are
| |
| all ordered according to the relation >, and
| |
| FALSE (0) otherwise
| |
| | |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | |
| | |
| ==IF Expr==
| |
| Procedural IF statement to process
| |
| … sub-expressions denoted by “…” only if the
| |
| ENDFN expression evaluates to TRUE[[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| | |
| ==IF Expr==
| |
| Procedural IF statement to process the first set
| |
| … of sub-expressions denoted by “…”if the
| |
| ==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.[[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| | |
| ==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#Classified and Discrete Functions]] | |
| ENDFN
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| | |
| ==INTERPOLATE==
| |
| (X): ( Number+) same as above, except the classes are
| |
| implicitly 0, …. k-1
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| ==INTERPOLATE==
| |
| (X) same as above, except the values in the | |
| CLASS Number: Expr table are obtained by evaluating expressions
| |
| :
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
| |
| ENDFN
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| | |
| ==INTERPOLATE==(X) same as above, except the classes are
| |
| Expr implicitly 0, …, k-1
| |
| :
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| ENDFN
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| | |
| ==INTERPOLATE==(X): Filename uses the table in the named file, which is
| |
| assumed to consist of class:value pairs
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| ==INTERPOLATE==(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#Classified and Discrete Functions]] | |
| | |
| ==LESS OR EQUAL==
| |
| TRUE (1) if the sub-expression evaluations are
| |
| all ordered according to the relation <=, and
| |
| FALSE (0) otherwise
| |
| | |
| ORDERED same as LESS OR EQUAL
| |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | |
| | |
| ==LESS THAN==
| |
| TRUE (1) if the sub-expression evaluations are
| |
| all ordered according to the relation <, and
| |
| FALSE (0) otherwise
| |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | |
| | |
| ==LOG==
| |
| (Expr) natural logarithm of the value of the expression.
| |
| Logarithms in other bases can be computed as
| |
| logb(x) = ln(x) / ln(b)
| |
| [[Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)]] | |
| | |
| ==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#Probability Density and Cumulative Density Functions]] | |
| ==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#Probability Density and Cumulative Density Functions]] | |
| | |
| ==LOG NORMAL TEMPORAL PDF==
| |
| (Expr, Expr, Expr) temporal log normal probability density
| |
| function
| |
| [[Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions]] | |
| | |
| ==LOOKUP==
| |
| (X): ( Number+) same as above, except the classes are
| |
| implicitly 0, …. k-1
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| ==LOOKUP==
| |
| (X) same as above, except the values in the
| |
| CLASS Number: Expr table are obtained by evaluating expressions
| |
| :
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
| |
| ENDFN
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
| |
| ==LOOKUP== | |
| (X) same as above, except the classes are
| |
| Expr implicitly 0, …, k-1
| |
| :
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| ENDFN
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| ==LOOKUP==
| |
| (X): Filename uses the table in the named file, which is
| |
| assumed to consist of class:value pairs
| |
| [[Model Builder's Guide Chapter 9#Classified and Discrete Functions]] | |
| ==LOOKUP==
| |
| (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#Classified and Discrete Functions]] | |
| | |
| Expr EQ Expr TRUE if the values of the two expressions are
| |
| equal; otherwise FALSE [[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| Expr == Expr alternate form of EQ comparison (Note: two equal signs distinguish this from an assignment)[[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| | |
| Expr NEQ Expr TRUE if the values are not equal; otherwise
| |
| FALSE[[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| Expr != Expr alternate form of NOT EQUAL comparison[[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| | |
| Expr < Expr TRUE if the value of the first expression is less
| |
| than the value of the second expression;
| |
| otherwise FALSE[[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| Expr <= Expr TRUE if the value of the first expression is less
| |
| than or equal to the value of the second
| |
| expression; otherwise FALSE[[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| | |
| Expr > Expr TRUE if the value of the first expression is
| |
| greater than the value of the second
| |
| expression; otherwise FALSE[[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| Expr >= Expr TRUE if the value of the first expression is
| |
| greater than or equal to the value of the
| |
| second expression; otherwise FALSE[[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| | |
| !Expr Negates the expression Boolean value[[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| | |
| Expr AND Expr TRUE if values of both expressions are
| |
| TRUE and FALSE otherwise[[Model Builder's Guide Chapter 9#Boolean Functions]]
| |
| | |
| Expr OR Expr TRUE if value of at least one expression is
| |
| TRUE and FALSE otherwise
| |
| | |
| ==MAX POSITION==
| |
| (Expr) Return the maximum 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
| |
| [[Model Builder's Guide Chapter 9#Bit-Vector Functions]] | |
| | |
| ==MEAN==
| |
| average of the sub-expressions
| |
| | |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | |
| ==MAX==
| |
| maximum of the sub-expressions
| |
| | |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | |
| | |
| ==MIN==
| |
| minimum of the sub-expressions
| |
| | |
| [[Model Builder's Guide Chapter 9#Composite Functions]] | |
| | |
| ==MIN POSITION==
| |
| (Expr) Return the minimum 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
| |
| [[Model Builder's Guide Chapter 9#Bit-Vector Functions]] | |
| | |
| ==NEGEXP==
| |
| (Expr) draw a value from a negative exponential distribution, where the expression specifies the
| |
| mean
| |
| POISSION(Expr) draw a value from a Poisson distribution
| |
| | |
| ==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#Probability Density and Cumulative Density Functions]]
| |
| | |
| ==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#Probability Density and Cumulative Density Functions]]
| |
| | |
| ==NORMAL TEMPORAL PDF==
| |
| (Expr, Expr, Expr) temporal normal probability density function
| |
| [[Model Builder's Guide Chapter 9#Probability Density and Cumulative Density Functions]]
| |
| | |
| ==NOT EQUAL==
| |
| FALSE (0) if the sub-expressions all evaluate to
| |
| the same value and TRUE (1) otherwise
| |
| | |
| [[Model Builder's Guide Chapter 9#Composite Functions]]
| |
| | |
| ==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).
| |
| | |
| ==OR==
| |
| TRUE (1) if at least one sub-expression
| |
| evaluates to TRUE and FALSE (0) otherwise
| |
| [[Model Builder's Guide Chapter 9#Composite Functions]]
| |
| | |
| ==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]]
| |
| | |
| ==PAUSE==
| |
| Halts the simulation and displays a dialog
| |
| box to which the user must respond to continue[[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| | |
| ==PAUSE IF==
| |
| Expr If the expression evaluates to TRUE, halts the
| |
| simulation and displays a dialog box to which
| |
| the user must respond to continue[[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| | |
| ==PAUSE==
| |
| (#Value) Pauses the simulation for the specified number
| |
| of milliseconds and then continues[[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| | |
| ==PAUSE (#Value)IF==
| |
| Expr If the expression evaluates to TRUE, Pauses the
| |
| simulation for the specified number of
| |
| milliseconds and then continues[[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| | |
| ==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]]
| |
| | |
| ==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]]
| |
| | |
| ==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]]
| |
| | |
| ==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]]
| |
| | |
| ==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.
| |
| | |
| ==REGION COST SURFACE==
| |
| (EndLocation, MaxCost, CostSurface)
| |
| DECISION Expr
| |
| COST Expr[[Model Builder's Guide Chapter 9#Region Functions]]
| |
| | |
| ==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]]
| |
| | |
| ==REGION COST SURFACE==
| |
| (EndLocation, MaxCost, CostSurface)
| |
| DECISION Expr
| |
| COST Expr[[Model Builder's Guide Chapter 9#Region Functions]]
| |
| ==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]]
| |
| ==REGION LEAST COST PATH==
| |
| (StartLocation, EndLocation)
| |
| DECISION Expr
| |
| COST Expr[[Model Builder's Guide Chapter 9#Region Functions]]
| |
| ==REGION LEAST COST PATH==(StartLocation, EndLocation, LeastCostNeighbs)
| |
| DECISION Expr[[Model Builder's Guide Chapter 9#Region Functions]]
| |
| ==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]]
| |
| | |
| ==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.
| |
| | |
| ==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.
| |
| | |
| ==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]]
| |
| | |
| ==REGION VECTOR== (StartLocation, EndLocation) defines region consisting of cells along an
| |
| | |
| ==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]]
| |
| | |
| ==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]]
| |
| ==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)]]
| |
| | |
| ==ROUND==
| |
| (Expr) expression value rounded to the nearest integer[[Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)]]
| |
| | |
| ==SEED()==
| |
| Gets the random number seed[[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| ==SEED==
| |
| (Expr) Sets the random number seed. Value returned is
| |
| next seed.[[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| | |
| ==SETAT==
| |
| (Expr, PositionList, #Type) Set 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
| |
| [[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
| |
| ==SETAT==
| |
| (Expr, PositionList,#Type,#Prob) Same as above, except each position is set
| |
| with probability #Prob
| |
| [[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
| |
| ==SELECTAT==
| |
| (Expr, PositionList) FALSE(0) if none of the bits in PositionList are
| |
| set in the specified expression value and
| |
| TRUE(1) otherwise
| |
| [[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
| |
| | |
| ==SHIFT LEFT==
| |
| (Expr, Expr) Shifts value of first expression to the left by
| |
| number of bits specified by second expression[[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
| |
| ==SHIFT RIGHT==
| |
| (Expr, Expr) Shifts value of first expression to the right by
| |
| number of bits specified by second expression[[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
| |
| | |
| ==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)]]
| |
| | |
| ==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]]
| |
| | |
| ==STRICT ORDERED==
| |
| same as LESS THAN
| |
| [[Model Builder's Guide Chapter 9#Composite Functions]]
| |
| | |
| ==TAN==
| |
| (Expr) interpret the value of the expression as an angle
| |
| theta in degrees, and return tan(theta) [[Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric 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
| |
| | |
| ==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
| |
| | |
| ==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]]
| |
| | |
| ==WHILE==
| |
| Expr While loop: process sub-expressions denoted by
| |
| … “…” while the expression evaluates to TRUE
| |
| ENDFN
| |
| [[Model Builder's Guide Chapter 9#Control Expressions]]
| |
| | |
| ==ZERO==
| |
| return 0.0
| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
|
| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
|
| |
| | |
| | |
| | |
| ==REMOVE==
| |
| ALL(LinkedVariable) clears variable. No return value
| |
| SIZE(LinkedVariable) number of elements, entries or nodes
| |
| ==IS EMPTY==
| |
| (LinkedVariable) TRUE if and only if variable has 0 elements
| |
| [[Model Builder's Guide Chapter 9#General Set, List and Graph Functions]]
| |
| ==FIRST==
| |
| (LinkedVariable) returns position of first element, entry or
| |
| node[[Model Builder's Guide Chapter 9#General Set, List and Graph Functions]]
| |
| ==NEXT==
| |
| (LinkedVariable, PosVariable) returns position of element, entry or node
| |
| following position provided[[Model Builder's Guide Chapter 9#General Set, List and Graph Functions]]
| |
| ==PREV==
| |
| (LinkedVariable, PosVariable) returns position of element, entry or node
| |
| preceding position provided[[Model Builder's Guide Chapter 9#General Set, List and Graph Functions]]
| |
| ==REMOVE==
| |
| (LinkedVariable, PosVariable) remove and deletes element, entry or node
| |
| at position
| |
| | |
| Variable [=] GET(LinkedVariable, PosVariable) get element, entry or node at position
| |
| X [=] GET(LinkedVariable, PosVariable, Index) get single value in a given index
| |
| ==SET==
| |
| (LinkedVariable, PosVariable, Variable) set element, entry or node at position
| |
| ==SET==
| |
| (LinkedVariable, PosVariable, entryIndex, Value)
| |
| set value at specified index of element,
| |
| entry or node at position[[Model Builder's Guide Chapter 9#General Set, List and Graph Functions]]
| |
| ==FIND==
| |
| (LinkedVariable, , TmpVariable Condition) return first position of an element, entry or
| |
| node that satisfies the condition[[Model Builder's Guide Chapter 9#General Set, List and Graph Functions]]
| |
| ==FIND NEXT==
| |
| (LinkedVariable, PosVariable, TmpVariable, Condition)
| |
| return next position of an element, entry or
| |
| node that satisfies the condition[[Model Builder's Guide Chapter 9#General Set, List and Graph Functions]]
| |
| ==SORT==
| |
| (LinkedVariable, TmpVariable1, TmpVariable2, Condition)
| |
| sort elements, entries or nodes according to
| |
| condition[[Model Builder's Guide Chapter 9#General Set, List and Graph Functions]]
| |
| | |
| ==CONTAINS==
| |
| (SetVariable, ElementVariable) TRUE if and only if set variable “contains”
| |
| variable provided, where two elements are
| |
| identical if they have identical values[[Model Builder's Guide Chapter 9#Set Functions]]
| |
| ==INSERT==
| |
| (SetVariable, ElementVariable) add element to set. Only changes set if it
| |
| doesn’t already contain the element
| |
| SetVariable = UNION(Set1, Set2) take union of two set variables
| |
| SetVariable = INTERSECTION(Sete1, Set2) take intersection of two set variables
| |
| SetVariable = SUBTRACT(Sete1, Set2) subtract second set variable from first
| |
| [[Model Builder's Guide Chapter 9#Set Functions]]
| |
| | |
| ==HEAD==
| |
| (ListVariable) returns position of first entry [[Model Builder's Guide Chapter 9#List Functions]]
| |
| ==TAIL==
| |
| (ListVariable) returns position of last entry[[Model Builder's Guide Chapter 9#List Functions]]
| |
| ==INSERT HEAD==
| |
| (ListVariable, EntryElement) add an entry to front of list[[Model Builder's Guide Chapter 9#List Functions]]
| |
| ==INSERT TAIL==
| |
| (ListVariable, EntryElement) add an entry to end of list[[Model Builder's Guide Chapter 9#List Functions]]
| |
| ==INSERT BEFORE==(ListVariable, Index, EntryElement)
| |
| add an entry before given index[[Model Builder's Guide Chapter 9#List Functions]]
| |
| ==INSERT AFTER==(ListVariable, Index, EntryElement)
| |
| add an entry after given index[[Model Builder's Guide Chapter 9#List Functions]]
| |
| ==INSERT AT==(ListVariable, Index, EntryElement) add an entry at given index
| |
| [[Model Builder's Guide Chapter 9#List Functions]]
| |
| ==REMOVE HEAD==(ListVariable) removes and deletes first entry[[Model Builder's Guide Chapter 9#List Functions]]
| |
| ==REMOVE TAIL== (ListVariable) removes and deletes last entry[[Model Builder's Guide Chapter 9#List Functions]]
| |
| ==REMOVE AT INDEX==(ListVariable, Index) removes and deletes entry at given index
| |
| | |
| Variable [=] GET HEAD(ListVariable) returns first entry
| |
| Variable [=] GET TAIL(ListVariable) returns first entry
| |
| Variable [=] GET AT INDEX(ListVariable, Index) returns entry at given index
| |
| Pos = POS AT INDEX(ListVariable, Index) returns position at given index
| |
| [[Model Builder's Guide Chapter 9#List Functions]]
| |
| | |
| ==ADD ROOT==(TreeVariable, EntryElement) add root element of a tree
| |
| [[Model Builder's Guide Chapter 9#Tree Functions]]
| |
| ==INSERT LEFT CHILD==(TreeVariable, PosVariable, EntryElement)
| |
| add child to a node on the left of current
| |
| children[[Model Builder's Guide Chapter 9#Tree Functions]]
| |
| ==INSERT RIGHT CHILD==(TreeVariable, PosVariable, EntryElement)
| |
| add child to a node on the right of current
| |
| children[[Model Builder's Guide Chapter 9#Tree Functions]]
| |
| ==INSERT CHILD==(TreeVariable, PosVariable, EntryElement, Index)
| |
| add child to a node at given index (from
| |
| left)
| |
| | |
| n = CHILDREN(TreeVariable, PosVariable) number of children at a given position
| |
| Pos = PARENT(TreeVariable, PosVariable) Position of parent of a node
| |
| Pos = LEFT CHILD(TreeVariable, PosVariable) Position of leftmost child of a node
| |
| Pos = RIGHT CHILD(TreeVariable, PosVariable) Position of rightmost child of a node
| |
| Pos = CHILD(TreeVariable, PosVariable, Index) Position of indexed (from left) child of a
| |
| node
| |
| Pos = NEXT SIBLING(TreeVariable, PosVariable) Position of next sibling to right of a node
| |
| Pos = PREV SIBLING(TreeVariable, PosVariable) Position of previous sibling to right of a
| |
| node
| |
| | |
| Pos = NEXT DFS(TreeVariable, PosVariable) Position of next node in depth-first
| |
| pre-order traversal of a tree. If the position
| |
| variable is NULL, then the root is returned
| |
| Pos = NEXT POSTORDER DFS(TreeVariable, PosVariable)
| |
| Position of next node in depth-first
| |
| post-order traversal of a tree. If the position
| |
| variable is NULL, then the root is returned
| |
| Variable [=] GET LEFT CHILD(TreeVariable, PosVariable)
| |
| returns entry of leftmost child for a given
| |
| node
| |
| Variable [=] GET RIGHT CHILD(TreeVariable, PosVariable)
| |
| returns entry of rightmost child for a given
| |
| node
| |
| Variable [=] GET CHILD(TreeVariable, PosVariable, Index)
| |
| returns entry of child with given index
| |
| (from left) for a given node
| |
| [[Model Builder's Guide Chapter 9#Tree Functions]]
| |
| | |
| ==REMOVE ALL LINKS==
| |
| (GraphVariable) clears links of a graph variable
| |
| ==SIZE LINKS==
| |
| (GraphVariable) number of links in graph
| |
| ==IS EMPTY LINKS==
| |
| (GraphVariable) TRUE if and only if graph has 0 links
| |
| [[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==FIRST LINK==
| |
| (GraphVariable) returns position of first link[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==NEXT LINK==
| |
| (GraphVariable, PosVariable) returns position of link following position
| |
| provided[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==PREV LINK==
| |
| (GraphVariable, PosVariable) returns position of link preceding position
| |
| provided
| |
| Variable [=] GET LINK(GraphVariable, PosVariable)
| |
| get link at position[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==CONTAINS LINK==
| |
| (GraphVariable, LinkVariable) TRUE if and only if graph variable contains
| |
| variable provided[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==REMOVE LINK==
| |
| (GraphVariable, PosVariable) remove and deletes link at position[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==SET LINK==
| |
| (GraphVariable, PosVariable, LinkVariable)
| |
| Set link at position[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==SET LINK==
| |
| (GraphVariable, PosVariable, entryIndex, Value)
| |
| Set value at specified index of link at
| |
| position[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==FIND LINK==
| |
| (GraphVariable, TmpVariable, Condition)
| |
| Return first position of link that satisfies the
| |
| condition[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==FIND NEXT LINK==
| |
| (GraphVariable, PosVariable, TmpVariable, Condition)
| |
| Return next position of a link that satisfies
| |
| the condition[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==SORT LINKS==
| |
| (GraphVariable, TmpVariable1, TmpVariable2, Condition)
| |
| Sort links according to condition[[Model Builder's Guide Chapter 9#Graph Functions]]
| |
| ==LINKED==
| |
| (GraphVariable, NodeVariable1, NodeVariable2, LinkType)
| |
| TRUE if the nodes are linked. Set LinkType
| |
| to 0 for direct links and 1 for indirect
| |
| [[Model Builder's Guide Chapter 9#Graph Functions]]
| |