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, we propagate these up to the root of the tree using the following mechanism.
More formally, if G1 and G2 are nodes in the goal hierarchy, and V(G1) and V(G2) represent their respective values, 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.
Each node must be associated with a label, consisting of at most 8 characters, a description, consisting of at most 256 character, and a unique identifier, a positive integer (32bits), for searching purposes. 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 create 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. 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.