Jump to content

Language Reference 1: Difference between revisions

From SELESwiki
No edit summary
No edit summary
Line 179: Line 179:
==BITWISE NOT==
==BITWISE NOT==
  Expr Bitwise NOT of a value[[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
  Expr Bitwise NOT of a value[[Model Builder's Guide Chapter 9#Bit-Vector Functions]]
==CEILING(Expr)==
DESCRIPTION:
The ceiling operator
USAGE:
  x=CEILING(Expr)
     
REQUIRED ARGUMENTS:
Expr is any expression that evaluates to single numeric value
VALUE:
Smallest integer larger than the expression value
SEE ALSO:
[[Model Builder's Guide Chapter 9#Expressions:]]
Example 1:
  x=CEILING(0.01)
    =1
<figure out an end example indicator. For example, ***>
SAMPLE MODELS:
<links to sample models where this function is used>
==CEILING==
(Expr) smallest integer larger than the expression value[[Model Builder's Guide Chapter 9#Ceiling]]
==CLAMP==
(Expr, MinExpr, MaxExpr) clamp the value X of the expression to the range
[Min, Max]: if X < Min then return Min; if  X < Max return Max. Otherwise return X.
[[Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)]]
==CLASSIFY==
(X) if the value of the variable X is equal to one of
CLASS Number: Expr the classes listed, then return the result of the.
  : associated expression. Otherwise return 0.
[[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
ENDFN
[[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
==CLASSIFY==
(X) return the result of the kth expression in the list,
Expr where k = X – minimum value of the variables
  : (this may be non-0 only for layers)
  :
[[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
ENDFN
[[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
==CLASSIFY==
(X): ( Number+) return the kth number in the list, where
k = X – minimum value of the variable (this
may be non-0 only for layers)[[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
==CLASSIFY==
(X): Filename uses the table in the named file, which is
assumed to consist of class:value pairs. Rarely
used.
[[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
==CLASSIFY==
(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. Rarely used.
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.
[[Model Builder's Guide Chapter 9#Classified and Discrete Functions]]
==CLASSIFIED_DIST==
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.
==CLASSIFIED_DIST==
( Number+) in this form, the classes are assumed to start at zero. Only constant probabilities can be given.
==CLASSIFIED_DIST==
in this form, the classes are assumed to start at Expr zero    :
ENDFN
==CLASSIFIED_DIST[M]==
In this form, the classes in a one-dimensional
array M, and so start at zero.
==COS==
(Expr) interpret the value of the expression as an angle
theta in degrees, and return cos(theta) [[Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)]]
==CRITICAL SECTION==
(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
synchronizing access to shared variables
(i.e. shared with another application).[[Model Builder's Guide Chapter 9#Control Expressions]]
==DEBUG==
Update the simulation probe, if it is loaded and
The event is selected. Used to debug/verify
event behaviour.[[Model Builder's Guide Chapter 9#Control Expressions]]
==DECISION==
Expr approximation of line between end cells
Cost surface and least-cost path regions are advanced features that are best understood with an example model.
[[Model Builder's Guide Chapter 9#Region Functions]]
==DECISION==
Expr known location indices. 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]]
==DECISION== Expr location indices stored in one-dimensional X.
[[Model Builder's Guide Chapter 9#Region Functions]]
==DECISION== Expr location index. 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]]
==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.
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.
[[Model Builder's Guide Chapter 9#Region Functions]]
==DIRECTION==
(Expr, Expr) angle in degrees between two location indices
[[Model Builder's Guide Chapter 9#Continuous Functions (Miscellaneous)]]
==DISPLAY== Display on the screen the labelled Label: Expr values computed with the expressions listed.
      …. If no label is given, the expression must
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]]




==Expr % Expr==
==Expr % Expr==
value of the first expression modulo the value of
the second expression (assumes that the values
of the expressions are integers)
DESCRIPTION:  
DESCRIPTION:  
The percentage operator
The percentage operator
Line 244: Line 427:
[[Model Builder's Guide Chapter 9#Expressions:]]
[[Model Builder's Guide Chapter 9#Expressions:]]


==LOG(Expr)==
==FLOOR(Expr)==
DESCRIPTION:  
DESCRIPTION:  
The logarithm operator
The flooring operator


USAGE:  
USAGE:  
   x=LOG(Expr)
   x=FLOOR(Expr)
        
        
REQUIRED ARGUMENTS:
REQUIRED ARGUMENTS:
Line 255: Line 438:


VALUE:  
VALUE:  
Natural logarithm of the value of the expression
Largest integer smaller than the expression value


SEE ALSO:  
SEE ALSO:  
Line 261: Line 444:


Example 1:
Example 1:
   x=LOG(0.773)
   x=FLOOR(0.99)
     =-0.111820506
     =0
<figure out an end example indicator. For example, ***>
<figure out an end example indicator. For example, ***>


Line 268: Line 451:
<links to sample models where this function is used>
<links to sample models where this function is used>


==ROUND(Expr)==
DESCRIPTION:
The rounding operator


USAGE:
==LOG(Expr)==
  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
<figure out an end example indicator. For example, ***>
 
SAMPLE MODELS:
<links to sample models where this function is used>
 
==FLOOR(Expr)==
DESCRIPTION:  
DESCRIPTION:  
The flooring operator
The logarithm operator


USAGE:  
USAGE:  
   x=FLOOR(Expr)
   x=LOG(Expr)
        
        
REQUIRED ARGUMENTS:
REQUIRED ARGUMENTS:
Line 303: Line 463:


VALUE:  
VALUE:  
Largest integer smaller than the expression value
Natural logarithm of the value of the expression


SEE ALSO:  
SEE ALSO:  
Line 309: Line 469:


Example 1:
Example 1:
   x=FLOOR(0.99)
   x=LOG(0.773)
     =0
     =-0.111820506
<figure out an end example indicator. For example, ***>
<figure out an end example indicator. For example, ***>


Line 316: Line 476:
<links to sample models where this function is used>
<links to sample models where this function is used>


==CEILING(Expr)==
==ROUND(Expr)==
DESCRIPTION:  
DESCRIPTION:  
The ceiling operator
The rounding operator


USAGE:  
USAGE:  
   x=CEILING(Expr)
   x=ROUND(Expr)
        
        
REQUIRED ARGUMENTS:
REQUIRED ARGUMENTS:
Line 327: Line 487:


VALUE:  
VALUE:  
Smallest integer larger than the expression value
Expression value rounded to the nearest integer


SEE ALSO:  
SEE ALSO:  
Line 333: Line 493:


Example 1:
Example 1:
   x=CEILING(0.01)
   x=ROUND(0.773)
     =1
     =1
<figure out an end example indicator. For example, ***>
<figure out an end example indicator. For example, ***>
Line 339: Line 499:
SAMPLE MODELS:  
SAMPLE MODELS:  
<links to sample models where this function is used>
<links to sample models where this function is used>


==CEILING==
==CEILING==

Revision as of 17:19, 10 October 2006

+

DESCRIPTION: The addition operator

USAGE:

  x=Expr+Expr
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Value of the expression is the sum of two expressions

SEE ALSO: Model Builder's Guide Chapter 9#Expressions:

Example 1:

  x=1+2
   =3

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

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

-

DESCRIPTION: The subtraction operator

USAGE:

  x=Expr-Expr
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Value of the first expression minus the value of the second expression

SEE ALSO: Model Builder's Guide Chapter 9#Expressions:

Example 1:

  x=15-2
   =13

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

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

*

DESCRIPTION: The multiplication operator

USAGE:

  x=Expr*Expr
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Value is the product of two expressions

SEE ALSO: Model Builder's Guide Chapter 9#Expressions:

Example 1:

  x=5*4
   =20

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

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

/

DESCRIPTION: The division operator

USAGE:

  x=Expr/Expr
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Value of the first expression divided by value of the second expression

SEE ALSO: Model Builder's Guide Chapter 9#Expressions:

Example 1:

  x=60/6
   =10

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

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

^

DESCRIPTION: The power operator

USAGE:

  x=Expr^Expr
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: The first expression to the power of the value of the second expression

SEE ALSO: Model Builder's Guide Chapter 9#Expressions:

Example 1:

  x=7^3
   =343

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

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

ABS

(Expr) absolute value of the expression Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)

ABSOLUTE

(Expr) absolute value of the expression

ABS(Expr)

DESCRIPTION: The absolute value operator

USAGE:

  x=ABS(Expr)=|Expr|=Absolute(Expr)
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Absolute value of the expression

SEE ALSO: Model Builder's Guide Chapter 9#Expressions:

Example 1:

  x=ABS(-9)=|-9|=Absolute(-9)
   =9

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

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


AND

TRUE (1) if all sub-expressions evaluate to TRUE and FALSE (0) otherwise Model Builder's Guide Chapter 9#Composite Functions

==ARCCOS==(Expr) inverse cos of the value of the expression Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)

ARCSIN

(Expr) inverse sine of the value of the expression Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)

ARCTAN

(Expr) inverse tan of the value of the expression Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)

ARCTAN

(Expr, Expr) inverse tan where first expression is x offset and second is y offset. Providing two expressions gives more information about the quadrant. Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)

BITWISE OR

(Expr, Expr) Bitwise OR of two valuesModel Builder's Guide Chapter 9#Bit-Vector Functions

BITWISE AND

(Expr, Expr) Bitwise AND of two valuesModel Builder's Guide Chapter 9#Bit-Vector Functions

BITWISE XOR

(Expr, Expr) Bitwise exclusive-OR of two valuesModel Builder's Guide Chapter 9#Bit-Vector Functions

BITWISE NOT

Expr	Bitwise NOT of a valueModel Builder's Guide Chapter 9#Bit-Vector Functions

CEILING(Expr)

DESCRIPTION: The ceiling operator

USAGE:

  x=CEILING(Expr)
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Smallest integer larger than the expression value

SEE ALSO: Model Builder's Guide Chapter 9#Expressions:

Example 1:

  x=CEILING(0.01)
   =1

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

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

CEILING

(Expr) smallest integer larger than the expression valueModel Builder's Guide Chapter 9#Ceiling

CLAMP

(Expr, MinExpr, MaxExpr) clamp the value X of the expression to the range [Min, Max]: if X < Min then return Min; if X < Max return Max. Otherwise return X. Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)

CLASSIFY

(X) if the value of the variable X is equal to one of CLASS Number: Expr the classes listed, then return the result of the.  : associated expression. Otherwise return 0. Model Builder's Guide Chapter 9#Classified and Discrete Functions ENDFN Model Builder's Guide Chapter 9#Classified and Discrete Functions

CLASSIFY

(X) return the result of the kth expression in the list, Expr where k = X – minimum value of the variables

  :	(this may be non-0 only for layers)
  :

Model Builder's Guide Chapter 9#Classified and Discrete Functions ENDFN Model Builder's Guide Chapter 9#Classified and Discrete Functions


CLASSIFY

(X): ( Number+) return the kth number in the list, where k = X – minimum value of the variable (this may be non-0 only for layers)Model Builder's Guide Chapter 9#Classified and Discrete Functions

CLASSIFY

(X): Filename uses the table in the named file, which is assumed to consist of class:value pairs. Rarely used. Model Builder's Guide Chapter 9#Classified and Discrete Functions

CLASSIFY

(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. Rarely used.

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. Model Builder's Guide Chapter 9#Classified and Discrete Functions

CLASSIFIED_DIST

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.

CLASSIFIED_DIST

( Number+) in this form, the classes are assumed to start at zero. Only constant probabilities can be given.

CLASSIFIED_DIST

in this form, the classes are assumed to start at Expr zero  : ENDFN

CLASSIFIED_DIST[M]

In this form, the classes in a one-dimensional array M, and so start at zero.

COS

(Expr) interpret the value of the expression as an angle theta in degrees, and return cos(theta) Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)

CRITICAL SECTION

(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 synchronizing access to shared variables (i.e. shared with another application).Model Builder's Guide Chapter 9#Control Expressions


DEBUG

Update the simulation probe, if it is loaded and The event is selected. Used to debug/verify event behaviour.Model Builder's Guide Chapter 9#Control Expressions

DECISION

Expr approximation of line between end cells Cost surface and least-cost path regions are advanced features that are best understood with an example model. Model Builder's Guide Chapter 9#Region Functions


DECISION

Expr known location indices. 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

==DECISION== Expr location indices stored in one-dimensional X. Model Builder's Guide Chapter 9#Region Functions

==DECISION== Expr location index. 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

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.

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. Model Builder's Guide Chapter 9#Region Functions

DIRECTION

(Expr, Expr) angle in degrees between two location indices Model Builder's Guide Chapter 9#Continuous Functions (Miscellaneous)

==DISPLAY== Display on the screen the labelled Label: Expr values computed with the expressions listed. …. If no label is given, the expression must 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 togetherModel 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 valueModel 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


Expr % Expr

DESCRIPTION: The percentage operator

USAGE:

      x=Expr % Expr 
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Value of the first expression modulo the value of the second expression(assumes that the values of the expression are integers

SEE ALSO: <a link to the composite functions section of seles modellers guide>

Example 1:

          x=19 % 12
           =7

Example 2:

          x=10 % 20
           =10

Example 3:

          x=10 % 10
           =0

<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#Expressions:


EXP(Expr)

DESCRIPTION: (Expr) base of the natural logarithm (e) to the power of the expression USAGE:

  x=EXP(Expr)
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Base of the natural logarithm (e) to the power of the expression

SEE ALSO: <a link to the composite functions section of seles modellers guide>

Example 1:

          x=EXP(3)
           =20.08553692

<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#Expressions:

FLOOR(Expr)

DESCRIPTION: The flooring operator

USAGE:

  x=FLOOR(Expr)
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Largest integer smaller than the expression value

SEE ALSO: Model Builder's Guide Chapter 9#Expressions:

Example 1:

  x=FLOOR(0.99)
   =0

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

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


LOG(Expr)

DESCRIPTION: The logarithm operator

USAGE:

  x=LOG(Expr)
      

REQUIRED ARGUMENTS: Expr is any expression that evaluates to single numeric value

VALUE: Natural logarithm of the value of the expression

SEE ALSO: Model Builder's Guide Chapter 9#Expressions:

Example 1:

  x=LOG(0.773)
   =-0.111820506

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

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

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

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


CEILING

(Expr) smallest integer larger than the expression valueModel Builder's Guide Chapter 9#Ceiling

CLAMP

(Expr, MinExpr, MaxExpr) clamp the value X of the expression to the range [Min, Max]: if X < Min then return Min; if X < Max return Max. Otherwise return X. Model Builder's Guide Chapter 9#Continuous Functions (Arithmetic Functions)

CLASSIFY

(X) if the value of the variable X is equal to one of CLASS Number: Expr the classes listed, then return the result of the.  : associated expression. Otherwise return 0. Model Builder's Guide Chapter 9#Classified and Discrete Functions ENDFN Model Builder's Guide Chapter 9#Classified and Discrete Functions

CLASSIFY

(X) return the result of the kth expression in the list, Expr where k = X – minimum value of the variables

  :	(this may be non-0 only for layers)
  :

Model Builder's Guide Chapter 9#Classified and Discrete Functions ENDFN Model Builder's Guide Chapter 9#Classified and Discrete Functions


CLASSIFY

(X): ( Number+) return the kth number in the list, where k = X – minimum value of the variable (this may be non-0 only for layers)Model Builder's Guide Chapter 9#Classified and Discrete Functions

CLASSIFY

(X): Filename uses the table in the named file, which is assumed to consist of class:value pairs. Rarely used. Model Builder's Guide Chapter 9#Classified and Discrete Functions

CLASSIFY

(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. Rarely used.

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. Model Builder's Guide Chapter 9#Classified and Discrete Functions

CLASSIFIED_DIST

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.

CLASSIFIED_DIST

( Number+) in this form, the classes are assumed to start at zero. Only constant probabilities can be given.

CLASSIFIED_DIST

in this form, the classes are assumed to start at Expr zero  : ENDFN

CLASSIFIED_DIST[M]

In this form, the classes in a one-dimensional array M, and so start at zero.

COS

(Expr) interpret the value of the expression as an angle theta in degrees, and return cos(theta) Model Builder's Guide Chapter 9#Continuous Functions (Trigonometric Functions)

CRITICAL SECTION

(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 synchronizing access to shared variables (i.e. shared with another application).Model Builder's Guide Chapter 9#Control Expressions


DEBUG

Update the simulation probe, if it is loaded and The event is selected. Used to debug/verify event behaviour.Model Builder's Guide Chapter 9#Control Expressions

DECISION

Expr approximation of line between end cells Cost surface and least-cost path regions are advanced features that are best understood with an example model. Model Builder's Guide Chapter 9#Region Functions


DECISION

Expr known location indices. 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

==DECISION== Expr location indices stored in one-dimensional X. Model Builder's Guide Chapter 9#Region Functions

==DECISION== Expr location index. 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

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.

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. Model Builder's Guide Chapter 9#Region Functions

DIRECTION

(Expr, Expr) angle in degrees between two location indices Model Builder's Guide Chapter 9#Continuous Functions (Miscellaneous)

==DISPLAY== Display on the screen the labelled Label: Expr values computed with the expressions listed. …. If no label is given, the expression must 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 togetherModel 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 valueModel 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