| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (13 out of 14)

The Variable and Parameter Classes

Within the G2 system-defined class hierarchy, variable and parameter are subclasses of the VARIABLE-OR-PARAMETER class of objects. The VARIABLE and PARAMETER classes are reserved, abstract classes, as is the G2-VARIABLE class from which each of the variable type classes stem. The variable and parameter type classes are:

G2-variable subclasses Parameter subclasses
logical-variable
logical-parameter
quantitative-variable
quantitative-parameter
float-variable
float-parameter
integer-variable
integer-parameter
symbolic-variable
symbolic-parameter
text-variable
text-parameter

You can create subclasses from any of those classes.

In addition to the value type subclasses, the variable hierarchy includes these other classes:

GFI is a superseded capability. For more information, see Appendix F, Superseded Practices.

The sensor class has been replaced by the g2-variable subclasses. While G2 supports sensors for use in existing KBs, we recommend that the sensor class not be used in new KB development.

Each of the data service classes is a mixin class. For a description of mixin classes and how to use them, see Using Mixin Classes.


Note: While G2 permits the use of parameters and variables of the non-specific type quantitative, for efficiency, we recommend that you use an item of specific data type, integer or float, whenever possible.

Variables and parameters have these class-specific attributes:

Attribute Variable Parameter
Options


Tracing and breakpoints


Data type


Initial value


Last recorded value


History keeping spec


Validity interval


Formula


Simulation details


Initial value for simulation


Data server


Default update interval


The G2 Simulator is a superseded capability. For more information, see Appendix F, Superseded Practices.

Common Attributes

The common attributes of variables and parameters are:

Attribute Description
Options
Controls whether or not G2 can backward or forward chain or data seek from the variable, or forward chain from the parameter.
Allowable values:
Refer to Specifying Forward and Backward Chaining
Default value:
Refer to Specifying Forward and Backward Chaining



Tracing-and-breakpoints
Sets tracing and breakpoints, overriding the Tracing-message-level and Breakpoint-level attributes in the Debugging Parameters system table.
Allowable values:
See the description in Debugging Parameters.
Default value:
default




Data-type
Indicates the variable's data type or, for numeric variables, the units of measure in use.
Allowable values:
Refer to Specifying the Type
Default value:
Refer to Specifying the Type

Initial-value
The initial value (if any).
Allowable values:
Any valid value of an applicable data type for the item.
Default value:
Refer to Specifying an Initial Value

Last-recorded-value
The value G2 obtained for the variable or parameter
Allowable values:
Any valid value of an applicable data type for the item
Default value:
For variables:
no value

For parameters:
Refer to Specifying an Initial Value



History-keeping-spec
Describes whether to maintain a history of the values for this item and if so, in which manner.
Allowable values:
Refer to History Keeping in G2
Default value:
do not keep history

Variable-Specific Attributes

The class-specific attributes of variables are:

Attribute Description
Validity-interval
The length of time that the last-recorded-value remains current.
Allowable values:
any time-interval
indefinite
supplied


Default value:
supplied




Formula
A formula through which to calculate the variable value.
Allowable values:
Any logical-, arithmetic-, symbolic-, or text-expression.
Default value:
none




Simulation-details
Specifies what simulation is in effect.
Allowable values:
See Appendix F, Superseded Practices.
Default value:
no simulation formula yet

Notes:
The G2 Simulator is a superseded capability. For more information, see Appendix F, Superseded Practices.



Initial-value-for-simulation
The initial value for simulated variables that use discrete-state and continuous-state simulation formulas.
Allowable values:
any number
default


Default value:
default

Notes:
The G2 Simulator is a superseded capability. For more information, see Appendix F, Superseded Practices.



Data-server
The data server for this variable.
Allowable values:
See Specifying a Data Server
Default value:
inference engine




Default-update-interval
The interval at which G2 should collect a value for the variable.
Allowable values:
any non-negative-number
none


Default value:
none

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (13 out of 14)

Copyright © 1997 Gensym Corporation, Inc.