The following headings explain the possible values for the Quality, Timestamp,
Collection-time, and Expiration-time attributes. For information on the Data-value,
Status-value, and Belief-value path attributes, see "Using Data Paths" and "Using
Inference Paths".
Using the Quality Attribute
Quality is a system-generated attribute for data, inference, and control paths that
specifies the status of the path's data. Quality can have any of the values in the
following table:
The order of values for Quality shown in the table above defines the quality
hierarchy, where ok is the highest quality and expired is the lowest. You use the
quality hierarchy to resolve the output path quality for blocks with multiple
inputs, as explained in "Determining Path Attributes for Peer Input Blocks".
A path only has a Quality of no-value before it receives any data. For an explanation of how different types of blocks handle no-value inputs, see "Determining
How Blocks Use No-value Inputs".
A number of blocks optionally require a full history of values before passing a
value. These include some of the history blocks on the Scalar Blocks palette. For
these blocks, if the attribute Require Full History is yes, the output path has a
Quality of no-value when the history is not full. For more information on this
attribute, see "Specifying What to Do With Partial History".
Using the Timestamp Attribute
Timestamp is a system-generated attribute for data, inference, and control paths
that specifies the current real subsecond time at which a path receives a value.
Each time the path receives a new value, Timestamp is updated.
Using the Collection-time Attribute
Collection-time is an attribute for data and inference paths that determines the
time at which data originally entered the diagram. The Collection-time remains
unchanged unless the data is manually overridden. For a description of how
NOL resolves the Collection-time for blocks with multiple inputs, see "Determining Path Attributes for Peer Input Blocks".
Using the Expiration-time Attribute
Expiration-time is an attribute for data and inference paths, which you use with
G2 variables to determine whether and when the current value for a path is
expired.
Expiration-time can have either of the values in the following table:
| If Expiration-time is... | Then... |
|---|---|
|
The value is always valid.
|
|
a number
|
The value will expire or has expired at
the given timestamp.
|
If
Expiration-time is a number, the current value may still be valid, depending on
the status of the Quality attribute for the path. If Quality is not expired and Expiration-time is a number, then Expiration-time specifies the time at which the value
will expire.
Expiration-time path attribute value to save computational
resources or to achieve compatibility with earlier releases. For information, see
"Propagating Expiration Events".
Specifying Validity Interval for a Variable
The Expiration-time depends on the Validity Interval, which determines how long
the value remains valid. Validity Interval is an attribute for all entry points that
you specify in the configuration panel for the block.
|
You can also set the Validity Interval for a variable connected to any block, as described in "Using Variables and Parameters". To do this, specify Validity Interval in the variable's table:
|
The following table describes the possible values for this attribute:
Determining How Blocks Use No-value Inputs
Blocks ignore input paths with a Quality of no-value. This has different implications, depending on the type of block.
|
|
Peer input logic blocks behave the same way as peer input data blocks. For
example, suppose an And Gate has two connected input paths whose status is
.true and whose Quality is ok, and one unconnected input path whose status is
unknown and whose Quality is no-value. The And Gate ignores the no-value input
and places a value of .true with a Quality of ok onto the output path.
|
|
Note: Note that peer input logic blocks can have an inference output path with a
Status-value of unknown and a Quality other than no-value, e.g., ok.
However, the only time a peer input logic block has an inference output
path with a Status-value of unknown and a Quality of no---value is before the
block receives a value.
Non-peer input blocks that require all of their inputs to evaluate never place a
value onto an output path if the block has a no-value input. For example, a Difference block can only evaluate if it has inputs on both of its input paths. If such a
non-peer input block has an input whose Quality is no-value, the block does
nothing. Note that some non-peer input blocks, however, do not require all of
their inputs to evaluate.
|
Determining Path Attributes for Peer Input Blocks
Peer input blocks have multiple input paths that can potentially affect output
path attribute values, as described in "Connecting to Peer Input Blocks". This
table summarizes the general rule for resolving output path attribute values for
peer input blocks:
Determining Whether a Block Uses Expired Inputs
You can determine whether a peer input block includes expired inputs in its
internal calculation. For example, you can ignore input paths for a Summation
block whose Quality attribute is expired. In this case, the resulting output path
would never have a Quality of expired.
| The attribute... | Determines... |
|---|---|
|
Use Expired Inputs
|
Whether to include expired values in the block's
internal calculation, i.e., inputs with a Quality of
expired. The default value is yes.
|
This figure illustrates the configuration panel for a Summation block, which uses
the default value for Use Expired Inputs:
|
If all the inputs to a peer input block are
expired, and Use Expired Inputs is no, the
block does nothing.
Example of Determining Path Attributes Using a Peer Input Block
Suppose you have two Entry Points connected to a Summation block, for example
EP-1 and EP-2. Each Entry Point uses an embedded variable, which specifies
Validity Interval as 5 seconds.
|
The following figure compares the tables for the two input connection paths with
the table for the output connection path for the Summation block when Use
Expired Inputs is
yes. Notice that the Expiration-time of the Summation block's
output path is the minimum of the two input Expiration-time attributes, and the
Quality of the Summation block's output path is expired, which is the lowest
quality of all of the input path qualities.
|
The following figure shows the same tables when Use Expired Inputs is
no. In this
case, NOL ignores the input path associated with EP-1 in the calculation of the
sum because its value has expired; thus, the output path attributes are identical to
the EP-2 input path attributes.
|
| Prev
| Next | Start of Chapter | End of Chapter | Contents | Index | (5 out of 12)
Copyright © 1996, Gensym Corporation, Inc.