Академический Документы
Профессиональный Документы
Культура Документы
Contents
1 Expressions.................................................................................................................................2
1.1 Operators ............................................................................................................................2
1.1.1
1.1.2
Arithmetic .................................................................................................................................................... 2
Relational ..................................................................................................................................................... 2
VE 2015
Expressions
Custom variables in VistaPro can be defined by combining several variables together using a formula or in
other words an expression. Below describes all the operators, functions and constants available for use in
your own expressions. The expression syntax is Excel like in nature so should be easy to pick up and
understand.
1.1 Operators
1.1.1 Arithmetic
The usual arithmetic operators are supported for addition +, subtraction -, division /, multiplication *,
modulo %, exponentiation ^, and negation -.
Parentheses (, ) can be used to change the precedence of the operators.
For example: (A
+ B + C) / 3
All operators work in the usual way and can be used with variables, constants, or numbers.
For example: X^(-0.5) computes the inverse of the square root of X.
Modulo is defined as the remainder of a division that rounds the quotient towards minus infinity.
That is: A
% B == A - FLOOR(A/B)*B.
1.1.2 Relational
Relational operators are also supported; the result of such an operation is either true or false (i.e., a
boolean value).
Available operators are: equal to ==, not equal to !=, less than <, greater than >, less than or equal to <=,
and greater than or equal to >=.
These can be used with the logical functions described here.
All operators can be used with variables, constants, or numbers.
VE 2015
1.2 Functions
As well as operators, expressions support a standard set of functions that can be used to transform
values. A complete list of all the functions available for you to use is below.
The syntax describes how to use the function in your expressions. Note: square brackets [ ] denote the
argument is optional; while ellipsis ... denote additional arguments can be specified.
Syntax
Description
ABS
ABS( value )
ACOS
ACOS( value )
ASIN
ASIN( value )
ATAN
ATAN( value )
ATAN2
AVG
AVG( value )
CEIL
CEIL( value )
CLAMP
COS
COS( value )
COSH
COSH( value )
DEGREES
DEGREES( value )
EXP
EXP( value )
FLOOR
FLOOR( value )
INRANGE
LOG
LOG10
LOG10( value )
LN
LN( value )
MAX
MIN
MOD
NEG
NEG( value )
NUM
NUM( value )
POS
POS( value )
POW
RADIANS
RADIANS( value )
VE 2015
SIGN
SIGN( value )
SIN
SIN( value )
SINH
SINH( value )
SQRT
SQRT( value )
SUM
SUM( value )
TAN
TAN( value )
TANH
TANH( value )
TRUNCATE
1.2.2 Logical
Name
Syntax
Description
IF
AND
OR
NOT
NOT( condition )
1.3 Constants
A list of common and model related constants is also available to use as well. A constant is just a
numerical value represented with a name. These are defined below.
Description
RA1
RV1
Room Volume.
SA2
OA3
SFA4
- only available for use with Room, Surface and Opening level variables
- only available for use with Opening level variables
VE 2015
2
4
- only available for use with Surface and Opening level variables
- only available for use with Apache System level variables
1.3.2 General
Name
Description
DEG
180
INF
LN10
ln 10
LN2
ln 2
LOG10E
log10
LOG2E
log 2
NAN
PI
RAD
180
SQRT2
SQRT3
TRUE
FALSE
VE 2015