A goal hierarchy is similar to AND/OR trees except that nodes can be
influenced by other elements. These can be other nodes in the tree or
the source of the influence may be anonymous. To maintain the treeness
of this structure, the influences are shown as directed edges with a
different color, font, or thickness. The following figure shows an
example goal hierarchy.
As can be seen in the diagram, inner nodes are shown using circles, while leaf nodes are shown as boxes. Each node has a label and a description (not shown). An arc over the edges connecting a parent to its children indicates that an OR grouping of those edges. The external influences are shown using directed edges (with a red color).
The goal hierarchy is used to determine the value or level of satisficication of a goal. For example, the root goal is satisfied if both goals A1 and B1 are satisfied and one of C1 and D1 is satisfied. Furthermore, the root goal has a negative anonymous external influence with the value e2 that can affect its satisfiability. Similarly, the goal A1 is satisfied if A21 and A22 are satisfied. The goal B1 is satisfied if the leaf M3 is satisfied. The goal C1 is satisfied if both C2 and M7 are satisfied. The goal D1 is satisfied if one of M8 or D2 is satisfied and so on.
The binary values are insufficient for our goal hierarchy. Instead we use values between 0 and 100. Now we can define a goal satisfied if its values has reached a level between 0 and 100 (e.g. 90).
In this application, only leaf nodes have values. These values are computed externally by querying a database. Based on the values of the leaf nodes and an associated weight for each node, we propagate these up to the root of the tree using the following mechanism.
If a goal has multiple children that are grouped in an AND, then its value is the weighted average of its children. In other words, each node has a weight factor associated with it. The weight factor, w is a positive integer (i.e. w > 0). For example, if the weight of M1 is w1 and the weight of M2 is w2, then the value of A22 is computed as
If a goal has multiple children that are grouped in an OR, then its value is the value of the child whose weighted value is greater than other children. For example, if the weights of M4, M5, and M6 are w4, w5, and w6 respectively, and (M4 * w4) is greater than (M5 * w5), and (M6 * w6), then the value of C2 is M4 (not M4 * w4). Similarly, if the weight of M8 is w8 and the weight of D2 is w2, then the value of D1 is the maximum weighted value of the leaf nodes M8 and D2 or the maximum of (M8 * w8), (D2 * w2). Note that the value of D2 is the weighted average value of the leaf nodes M9 and M10.
Compute the value of each OR group first. For example, to compute the value of R, compute the value of the OR group of C1 and D1, which is the maximum of the value of C1 times its weight and D1 times its weight. Call this value V1.
Compute the weighted average value of last part with other nodes in the AND group. For example, to compute the value of R, we find the weighted average of the values of A1, B1, and V1.
More formally, if G1 and G2 are nodes in the goal hierarchy, and
V(G1) and V(G2) represent their respective values, we have:
More formally, if G1 and G2 are nodes in the goal hierarchy, and V(G1) and
V(G2) represent their respective values, and w1 and w2 are their respective
weights, we have:
If a goal has a positive/negative external influence, then the value of the influence is added/subtracted from the value of that goal. For example, the value of R with its influence is its value without influence minus e2. Similarly, the value of goal A1 with its influence is its value without influence plus e1. The value of goal C1 is its values plus the value of D2.
V(R) = ( V(A1) * wA1 + V(B1) * wB1 + V(C1) * wC1 ) / (wA1 + wB1 + wC1) -e2
Similarly, the value of C1 can be computed:
V(C1) = ( V(C2) * wC2 + V(M7) * wM7 ) / (wC2 + wM7) + V(D2)
And, the value of C2 is computed as:
V(C2) = V(M4)
Each node must be associated with a label, consisting of at most 8 characters, a description, consisting of at most 256 character, a unique identifier, a positive integer (32bits), for searching purposes, and a weight factor. Neither Labels nor descriptions need be unique. Descriptions can be null but labels must not. Furthermore, labels cannot begin with a white space. If a label beings with a white space, the leading white space must be removed.
In case of errors, if using the batch mode, the application should provide a line number and terminate the loading without applying any changes.
If an XML document is not valid, the application must print the line number and terminate gracefully.
The user can similarly creates an XML document containing all the values for the leaf nodes
and direct the application to read them in batch. In this case, the diagram should be
updated only after all values are re-computed. In case of batch processing, any missing
values for a leaf node is to be assumed 0.
External influences have a default value of 0 unless specified by the user. The values of an external influence must have identical sign to its definition, otherwise, an error occurs. The application must print the number of the last line and terminate gracefully.
The application must maintain the values of the ideal curve for search and query explained
later. These points can be entered interactively or using a batch system (via an XML file). If a user does
not provide an ideal curve for a goal, the application should create an ideal line between
the start and end points by default.
Here are a list queries that must be supported:
All the specified numbers are based on the execution of the application on ECF facility.