I’m going to use a light-hearted example to introduce a simple but powerful new feature in DPL 9: Perform and Continue. If you’ve used DPL, you probably know about the perform feature, a way of creating “perform links” which reduce the redundancy in a decision tree. Often when building an asymmetric tree there are sections which are repeated – some groups of nodes are the same on different paths.
Consider the personal decision problem of what to drink. Beer and wine are both enjoyable, but they involve certain risks.
Perhaps your brother-in-law has a bad habit of leaving the beer in the sun, so it might be skunky. The wine could be corked. For either beverage, you could end up with a cloudy glass, and have the flavor spoiled by a note of detergent. This decision and these risks could be modelled using the tree below.
Of course, the Glass Dirty? node is repeated, and an experienced DPL modeller would use a perform link to simplify the tree as follows.
The (a) on the bottom path indicates that the branches of Corked? are followed by Glass Dirty?, as defined by the (a) following Skunky? on the top path. The (a) on the top path is called a perform definition, the one on the bottom path a perform reference, and the two of them collectively a perform link.
If you’ve done this before, you may notice that there’s a blue triangle after the (a) for the perform reference, which wouldn’t have been there if we’d built this model in DPL 8. In DPL 9, you can attach more nodes (i.e., you can Continue) after a perform reference. For example, you might observe that the Wine alternative has the possible upside of Cheese.
These are obviously small trees and setting them up inefficiently wouldn’t really be a problem, but as decision trees get more complex, the ability to eliminate redundancies and break work up into modules can be critical to success. What do you do if the decision review board looks and the model and suggests that a hybrid strategy might add value? You say, “No problem!”, and build this tree.
Which is the same as this tree with no perform links: