aiSee User Manual: Rank Assignment

After the folding phase, all the visible nodes are determined. If all the visible nodes have been specified by the user using valid coordinates, the graph is drawn immediately. However, if the coordinates of at least one node are missing, an appropriate layout has to be calculated. The first pass places the nodes in discrete ranks. All nodes of the same rank appear at the same vertical position.

There are many possibilities for assigning rank. The normal method is to calculate a spanning tree by determining the strongly connected components of the graph. All edges should be oriented top-down. A heuristic tries to find a minimum set of edges that cannot be oriented top-down.

A faster method is to calculate the spanning tree of a graph by depth first search (DFS). However, the order in which the nodes are visited has a substantial influence on the layout. The initial order of the nodes is the order given by the graph specification. aiSee offers various versions of the DFS method:

A further possibility for influencing the layout is edge priority. Higher priority edges are preferable when calculating the spanning tree. After partitioning, an optional fine-tuning phase tries to improve the ranks in order to avoid very long edges. See graph attribute finetuning.