Jump to content

Language Reference 2

From SELESwiki
Revision as of 18:32, 18 October 2006 by Fei (talk | contribs) (LESS OR EQUAL)

IF Expr

Procedural IF statement to process

…	sub-expressions denoted by “…” only if the 

ENDFN expression evaluates to TRUEModel 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


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 FALSEModel Builder's Guide Chapter 9#Boolean Functions Expr != Expr alternate form of NOT EQUAL comparisonModel 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 FALSEModel 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 FALSEModel 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 FALSEModel 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 FALSEModel Builder's Guide Chapter 9#Boolean Functions

!Expr Negates the expression Boolean valueModel Builder's Guide Chapter 9#Boolean Functions

Expr AND Expr TRUE if values of both expressions are TRUE and FALSE otherwiseModel 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

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

USAGE:

  MAX POSITION(Expr)
      

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

VALUE:

?????

SEE ALSO: Model Builder's Guide Chapter 9#Bit-Vector Functions

Example 1:

    MAX POSITION(12)

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

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

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

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

USAGE:

  MIN POSITION(Expr)
      

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

VALUE:

?????

SEE ALSO: Model Builder's Guide Chapter 9#Bit-Vector Functions

Example 1:

    MIN POSITION(12)

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

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

NEGEXP

(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

DESCRIPTION: draw a value from a normal distribution

USAGE:

  x=NORMAL(Expr1,Expr2)

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

VALUE: A single value sampled from a normal distribution.

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

SEE ALSO: Model Builder's Guide Chapter 9#Composite Functions

EXAMPLES: <add carriage return here> Example 1:

  x = NORMAL(10,5)

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

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


NORMAL CDF

(Expr, Expr, Expr) normal cumulative density function, where the first expression is the value, the second is the mean and the third is the standard deviation Model Builder's Guide Chapter 9#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