Complex DOT Flow Charts

The GraphViz software does an excellent job of automatically producing flow charts that represent the account structure within Patchworks. For simple models it is easy to get a page-sized figure that clearly portrays the attribute and account relationships. These figures can be invaluable to help validate and document the inner workings of the model.

The GraphViz software will automatically adjust the size of the chart elements (lines, polygons, and font size) to accomodate the image size that has been requested. Large models present a formatting problem. Charts with exceptionally large numbers of accounts (in the hundreds) may cause the output to be scaled so small that the fonts will be illegible, even on large sized paper.

A solution to this problem is to use the ccomps program (from the GraphViz software) to decompose the flow chart into smaller independent pieces. The ccomps program will examine the structure of an input ".dot" file, and will create an output ".dot" file for each part of the flow chart that could be split apart without cutting through any of the flow chart lines. For example, the flow chart shown in Figure 51, “Account flow chart for the C5_Full sample model” would be split into three independent pieces.

The ccomp is run from the command line, similar to the dot program. The key parameters are the name of the input ".dot" file to be split apart, and the root name or prefix that should be used to label each of the parts that is produced. The following is an example of the ccomp program, using and input file name of accounts.csv and a root name of split.dot.

ccomps -x -o split.dot accounts.dot

In this example, the command will generate three output files: split.dot, split_1.dot and split_2.dot. Each of these files will need to be processed with the dot program to generate a flow chart showing a small sub-section of the model account structure.