Appendix A - Part 3 of 3
Keywords
Keywords fall under the following categories:
- Parameter Type Qualifiers - specifications restricting the legal values of Function parameters. These are listed in the Analytica User Guide.
- Parts of Expressions - Keywords used for modifying Commands, logical operators, and parts of conditional statements.
Parts of Expressions
And
A logical operator. Returns "true" only if both its operands are true. Syntax: x and y.
Or
A logical disjunction operator returning true if either x or y or both are true. Syntax: x or y.
Not x
A logical negation operator (if x is false (0) then true, else false).
If
Part of a conditional statement. Syntax: if x then y else c. If x is true (not zero) Analytica returns the value of y, otherwise it returns the value of z. The else part is required. x, y and/or z may be arrays.
Then
Keyword used as part of a Conditional Statement. Then must be used with If and Else. syntax: if x then y else z.
Else
A keyword used in conditional statements. Syntax: if x then y else z.
Of
Separator for object attribute reference. Syntax: attribute of object.
Classes
Object classes are listed below. Other classes form a hierarchy, and generally fall under the following parent classes:
- Object
- Variable
- Model
Each specified object class inherits the behavior of its parent class. The following classes have a parent class of Object.
Attribute
An object class. attributes are properties of objects, such as Title, Description, Definition, or value. It is possible to create new attributes. Prompting for the new attribute is controlled with the Askattribute Command.
Object
A category of object, such as a variable, attribute, or class (!).
Command
An instruction from the user to Analytica.
Function
A user-defined mathematical function that computes a value from its parameters.
Keyword
A term used for various purposes, e.g., a Qualifier specifying non-default evaluation for a User-Defined Function or a logical or conditional operator.
Localvar
A local variable or parameter within a Function. Used internally by Analytica.
Module
A model contains a collection of variables and other objects.
Variable
A basic component of an Analytica model. variables can represent any kind of quantity. They generally have four attributes: a Title, Units, Description, and Definition.
Sysfunction
A Function that is pre-defined in Analytica.
Sysvar A pre-defined variable that controls the way things are printed, plotted, etc.
Variable
An element of a model that can have a value.
Any
A term used by Analytica to identify a parameter of a Command or a Function that can match any object class. Used internally.
Variable classes
The following classes have a parent class of Variable.
Chance v
Any variable, usually one defined with an uncertainty distribution, or that evaluates to a distribution of values.
Constant v
A variable v that has a known, fixed values, e.g., the atomic number of an element.
Decision v
A variable v represents something that can be chosen or controlled by the decision-maker. A Decision variable cannot be probabilistic.
Determ v
Deterministic node type.
Index v
A variable v, represents something that is a set of scalar values, a dimension along a table.
Objective v
The objective, or criterion variable which the model is minimizing or maximizing.
Module classes
The following classes have a parent class of Module.
Model m
The root model in a model hierarchy, which saves to a file.
Linkmodule m
A Module is saved to a file separate from the one used to save its parent model.
Linklibrary m
A Library usually contains user-defined functions, and is saved to a file separate from the one used to save its parent model.
Library m
A Library usually contains user-defined functions, and is embedded in the model that contains it.
Form m
A Form usually contains input nodes and outputnodes, and is embedded in the model that contains it.
Button classes
The following classes have a parent class of Button.
Text f
A Text node contains arbitrary text.
Picture p
A Picture contains a graphic pasted in from another application.
Sysfunctions
Sysfunctions fall under the following categories:
- Mathematical functions - functions such as Sine, Cosine, and Tangent.
- Array functions - functions for creating and manipulating arrays.
- Probability Distribution functions - functions for creating probability distributions.
- Special functions - functions used for specialized activities such as sensitivity analysis and dynamic simulation.
- Statistical functions - functions for statistical analyses, such as computing the mid value or variance of a sample distribution.
Sysfunctions are summarized in the Analytica Reference.
Sysvars
Sysvars fall under the following categories:
- Graphing System variables - Sysvars that control the display of graphs. These are described in the Macintosh Developer’s Guide, because they are only available on the Macintosh.
- Other System variables - Sysvars for controlling other aspects of the display.
Other System variables
Abbreviation
System variable determining Analytica' ability to understand abbreviations. Abbr: 1 means abbreviations accepted, abbr: 0 means abbreviations are not permitted
Prompt
System variable. There are three types of prompts: an Outer-level prompt (">"), a dialog prompt (":"), and a "continue" prompt ("continue:").
Numberwidth
A System variable that controls the width used in printing out numbers. Default is 4. values less than 4 aren't recommended. If NumberWidth is set to 12 or more, numbers will be printed in floating point "E" format (e.g., 1.234456789E+12). The value 0 means "free format", and Analytica will choose what width it likes. syntax: numberw: x
Run System variable that indexes a sample distribution.
Samplesize
System variable that determines the number of elements in a sample distribution. samplesize:100 is the default; samplesize: 32000 the maximum in the Professional and Free editions. In Enterprise, Optimizer, and ADE, the limit is 2 billion.
Sampletype
System variable specifying the procedure for sampling a distribution, i.e., Median Latin Hypercube (Sampletype: 0), Random Latin Hypercube (Sampletype: 1), or Simple Monte Carlo (Sampletype: 2).
Time
System variable, usually used as an index for Dynamic. For dynamic models, this must be assigned a list of the time points (e.g. years) at which the Dynamic variables are to be evaluated.
Checking
System variable telling Analytica to examine all of the Check attributes in a model and to flag the first incidence of a Definition that is in conflict with its Check. checking:1 switches it on (default); checking:0 switches it off.
Typechecking
A test that Analytica runs to see if a variable matches its Type assignment. TypeChecking: 1 switches it on; TypeChecking: 0 switches it off.
Verbosity
System variable. Controls how "chatty" Analytica is. verb: 1 verbose; verb: 2 does not print tables unless explicitly requested; verb: 4 prints "evaluating " when it is; verb: 8 is Filetrace; verb: 16 is debug mode.
Heapsize
Holds the amount of memory needed to evaluate the model, based on the last time it was evaluated. Used to aid Analytica in determining whether enough memory is available to evaluate a model.
It
Used internally by Analytica. "It" refers to the value of the last computed expression.
Syntax
Arithmetic Operators
+ (plus), - (minus), * (times), / (divide), ^ (to the power of).
Assignment Operator
: (Colon).
Comparison Operators
< (less than), <= (less than or equal to), = (equal), >= (greater than or equal to), > (greater than).
Logical Operators
And Or Not
Conditional Operators
If Then Else
Comments Surrounded by "squiggled" brackets.
Arrays
Literal (one-dimensional list) arrays are enclosed in square brackets []. Negative values must be enclosed in parentheses or set off by commas. As the last argument to table, an array is a list enclosed in parentheses.
Command
The name of the command-name is followed by a list of parameters. You do not need parentheses around the parameter list. Parameters may be separated by commas (optional).
Function calls
The name of the function or user-defined function is followed by a list of parameters, enclosed in parens (optionally). Separating commas are optional.
Esoteric/Obsolete/Not Implemented objects
The following is a partial list of esoteric or unimplemented objects. If you are familiar with an object or command that doesn't appear anywhere in this list, or in the above lists of objects, chances are it is obsolete and is no longer implemented.
Bigbrother
Bigbrother controls the file IAC and startup behavior of Analytica. If the value is 0 at startup, Analytica displays an Open Project dialog box, shows a Diagram window when opening the project, and ignores IAC file input (it still recognizes AppleEvent input). If the value is 1 at startup, Analytica does not display an Open Project dialog box, and does not show a Diagram window when opening a project. Analytica responds to IAC file input as well as AppleEvent input.
Dyninputs
A computed attribute for dynamic variables, which contains a list of the variables and functions (at previous Time period(s)) on which the variable depends.
Dynoutputs
A computed attribute for dynamic variables, which contains a list of the variables and functions (at subsequent Time period(s)) which depend on the variable.
Needs
An attribute of a model listing the other models or versions that contain objects that are used by the model. This is used when reading in a model from a file to make sure all other required models are also read in.
Neededby
An attribute of a model listing the other models that need this model.
Fixedcheck
A computed attribute, containing a compiled version of Check.
Fixeddef
A Computed attribute, containing a compiled version of a
Definition. Used internally by Analytica.
Paramtypes
The types of the parameters of a function, derived from the
Parameters attribute.
Paramnames
The names of the parameters of a function, derived from the Parameters attribute (used internally to re-generate a definition when an identifier changes).
Help
Returns help about a feature in Analytica. Not yet implemented.
Infromrec
Infromrec should never be set by the user. It is a system Function that is used by Analytica to determine whether or not a record file is being read. Analytica prints a call to Infromrec when it reads a record file. The user should never remove any call to Infromrec from a file.
Levels
The number of levels of dependency to display in response to the Tree command.
Makerect (x)
To rectangularize a non-rectangular array (not yet implemented).
Normal_fracs
System variable used in calculating normal distributions.
Origcontains
When reading Contains attribute in a model file, a copy is initially stored in this attribute.
Pred
Internal function for "previous time" syntax. Syntax: v[time-1].
Usinglocal
Internal function for "Using ... Do" and "For ... Do" syntaxes.
Enable comment auto-refresher