Performing a Subtree

A subsection of a tree may be duplicated (performed) in more than one place in the decision tree. These parts are referred to as subtrees. Making a reference to a subtree from some other part of the decision tree is referred to as performing a subtree.

To perform a subtree, Select the first node in the subtree you wish to perform and the endpoint(s) (you can select more than one endpoint by using Ctrl+click) at which the subtree is to be performed.

Once the perform link is established, DPL puts a label consisting of a single letter on the node at the head of the subtree (the perform definition) and will change the reference endpoint into a node with the same label and same shape as the performed node (the perform reference). In effect, you have copied the subtree to the node where it is referenced, but without the redundancy and inconvenience of actually having two copies of the same group of nodes.

You can have up to 52 performed subtrees in a single diagram. The subtree labeling is automatic. The label closest to the top of the diagram will always be "a". If you add a new label above it, DPL will reassign the label names. If you delete a performed node with a label on it, DPL will delete all the references to it and reallocate the label names.

To break a perform link, select the node that references the labeled node and press Delete. The referencing node will become an endpoint again. If this perform reference was the only reference to the perform node, its label will be removed.

The perform capability is especially useful when you have large trees. You may completely detach a part of the tree, place it in a convenient area of the diagram, and use the perform subtree command to link it to the corresponding end-nodes of your original tree. Zoom Full will show all pieces of the tree in the window. If you combine this technique with the zooming technique explained in Viewing a Tree, you may find it easier to keep track of large trees.

Perform and Continue

When you create a perform link, the perform reference node will be followed by new endpoint. If you have further nodes you want to attach after performing the subtree, you can connect them to this endpoint as you would any other. Note however that only symmetric subtrees (those that end in a single endpoint) can be referenced and then followed by other nodes, or else DPL would not know which subtree endpoint the subsequent nodes should be connected to. If you have a perform link to a multi-endpoint subtree and the perform reference is followed by other nodes, an error will occur when you run the model.

Versions: DPL Professional, DPL Enterprise, DPL Portfolio

See Also

Decision Tree Overview