Next: Testing the design overall
Up: Designing and testing influence
Previous: Designing and testing influence
Syntax
-
BD>grid :
BD-B ,B , ..., B
BD*X ,X , ..., X
BD*Y ,Y , ..., Y
BD*R ,R , ..., R
BD*C ,C , ..., C
BD*U ,U , ..., U
BD*V ,V , ..., V
BD*A ,A , ..., A
BD*A ,A , ..., A
BD*
BD*A ,A , ..., A
-
BD>grid : [ @L [(C)] ]
-
BD>grid0 :
BD-B ,B , ..., B
BD*X ,X , ..., X
BD*Y ,Y , ..., Y
BD*R ,R , ..., R
BD*C ,C , ..., C
BD*U ,U , ..., U
BD*V ,V , ..., V
-
BD>grid0 : [ @L [(C)] ]
where are the names of n bases or elements;
, , , , and
are real numbers; are integers in [1,15];
and are integers.
L is the name of a label, and C is a valid input
channel number: an integer such that .
The GRID: command is used to define various basic features for
the quantities to appear on an influence diagram. Once used, its
essential features can be examined by issuing the LOOK: command
with argument grid , and the TESTGRID: command can be
used to test the design. The command typically is spread over
[B/D] command lines. For the second form of the command an address is
given, and the remaining lines should then be placed following
the given address. The inputs to the command are as follows.
- Line 2:
- defines a list of bases (or elements in their
role as bases containing only one element) which are to be viewed as
nodes. If the name of any base or element given here is already defined as a
node, the former definition is overwritten and any arcs connecting this
node to any other are removed before the new arcs are defined.
- Lines 3 and 4:
- We consider the coordinate system for the
influence diagram as a unit square, with bottom left coordinate (0,0)
and top right coordinate (1,1). A location for the centre of each node
in this square should be given on lines 3 and 4, such that the centre of
node locates at .
- Line 5:
- We give the radius of every node to appear on the
diagram. That is, will be the radius of the node associated
with the base . It is possible to indicate here, by setting
, that [B/D] should use it's default radius.
- Line 6:
- We give the colour to be associated with every node to
appear on the diagram. That is, will be the colour attached to
the node associated with the base . Each value of
is an integer in [1,15], representing a colour. A table showing the
colours represented by these integers is shown in Table 11.3.
The colour give for the node determines (1) the colour used to draw the
node; (2) the colour of any arc leaving the node; (3) the colour used to
shade the outer sectors of any nodes to which there is a directed arc
connected to this node, and which represent collections which are to be
adjusted by this node.
| Monochrome | 4 Colours (UNIX) | 8 Colours (Deskjet 500C) | 16 Colours (EGA/VGA) |
1 | black | black | black | darkgray |
2 | black | red | red | lightred |
3 | black | blue | blue | lightblue |
4 | black | green | green | green |
5 | black | red | magenta | lightmagenta |
6 | black | blue | cyan | lightcyan |
7 | black | green | yellow | yellow |
8 | black | red | green | lightgreen |
9 | black | blue | red | red |
10 | black | green | blue | blue |
11 | black | red | magenta | magenta |
12 | black | blue | cyan | brown |
13 | black | green | yellow | darkgray |
14 | black | red | green | lightgray |
15 | black | blue | red | cyan |
Table 11.3: Colours available for graphics images
- Lines 7 and 8:
- We label the nodes by their base or element
names. In the same way that we locate the centre of the node, we locate
the centre of the node label in the unit square. That is, the centre of
the label to be attached to node will be located at
.
- Lines 9 to :
- The remaining n lines are used to
define the arcs and their directions. Each is an integer
between 0 and 31 inclusive which will set the type of the arc
drawn from node to node . The possible values and their
meanings are shown in Table 11.4. An arc can consist of (1) a
path correlation, if appropriate; (2) a label summarising arc influence;
and (3) the arc itself: a directed straight line connecting two nodes.
In addition, two further styles may be selected: (4) the arc information can
be made to be proportional either to the actual resolution at a
destination node, or to the overall uncertainty at the destination node; and
(5) arc diagnostic information only might be shown.
These possibiliies may be selected separately. An integer in is used to set
the arc type. The binary representation of this integer
is used to determine what possibilities are selected. The integer has a
5 bit binary representation, with a bit equal to 1 if a style is
selected, and 0 otherwise. For example, arc style 19 (10011 binary)
has the first, second, and fifth style bits set, and
consists of a straight line and a label, and the labelling information
is primarily diagnostic.
Bit | Bit value | Interpretation |
1 | 0 | No arc line drawn |
| 1 | Arc line drawn |
2 | 0 | No label drawn |
| 1 | Label drawn |
3 | 0 | No path correlation label drawn |
| 1 | Path correlation label drawn |
4 | 0 | Arc label information proportional to overall nodal
uncertainty |
| 1 | Arc label information proportional to overall nodal
resolution |
5 | 0 | Arc diagnostic information not to cover the entire
label. |
| 1 | Arc diagnostic information to cover the entire label.
|
Table 11.4: Arc styles
Notice that we would define and to draw an
arc from node to node . If then, if
appropriate, the information concerning arc influence and a diagnostic
quantity will be drawn in the form of a bar overlaying part of the arc.
The real numbers input need not necessarily be in the format
suggested. Suppose that there are n nodes being defined. The numeric
information following the GRID: and GRID0: commands
consists of and real numbers respectively. These
numbers must be supplied in the order indicated, but you are free to
split the input over several lines, as many numbers per line as you wish
(possibly interspersed with blank lines) subject to the usual limitation
of no more than 253 characters per physical line. A number must not be
split over two or more lines. Any input on the same physical line as
the last number required will be ignored.
Consider the code given in Figure 11.3 for a fictitious example.
This defines three nodes for collections named intelligence,
environment, and heredity respectively. The nodes are centred at
(0.3,0.5), (0.7,0.7), and (0.7,0.3) respectively; and their names are
placed respectively underneath, above, and underneath the nodes. Each
node will be drawn with a radius equal to 0.04. There are only two
directed arcs, one from the environment node to the intelligence node;
and the other connecting the heredity node to the intelligence node. The
resulting diagram should resemble Figure 11.4.
Figure 11.3: Example influence diagram design
Figure 11.4: A crude influence diagram
The GRID0: command is identical to the GRID: command
except that no arcs are defined. This is useful when designing
the partial correlation diagram, as arcs connecting the nodes on such
diagrams are generated according to various other criteria. Notice that
the ARC: command can be used to specify arc connections
piecemeal.
Next: Testing the design overall
Up: Designing and testing influence
Previous: Designing and testing influence
David Wooff
Wed Oct 21 15:14:31 BST 1998