Changes for page The Five Phases

Last modified by Alexander Schulz-Rosengarten on 2023/07/11 10:33

From version 11.1
edited by uru
on 2013/05/27 08:43
Change comment: There is no comment for this version
To version 4.1
edited by cds
on 2012/03/23 15:38
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.uru
1 +XWiki.cds
Content
... ... @@ -8,39 +8,22 @@
8 8  
9 9  The reversed edges have to be restored at some point. There's a processor for that, called ReversedEdgeRestorer. All implementations of phase one must include a dependency on that processor, to be included after phase 5.
10 10  
11 -|=(((
12 -Preconditions
13 -)))|(((
11 +=== Precondition ===
12 +
14 14  * No node is assigned to a layer yet.
15 -)))
16 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
17 -(((
18 -Postconditions
19 -)))|(((
14 +
15 +=== Postcondition ===
16 +
20 20  * The graph is now cycle-free. Still, no node is assigned to a layer yet.
21 -)))
22 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
23 -(((
24 -Remarks
25 -)))|(((
26 -* All implementations of phase one must include a dependency on the {{code language="none"}}ReversedEdgeRestorer{{/code}}, to be included after phase five.
27 -)))
28 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
29 -(((
30 -Implementations
31 -)))|(((
32 -* {{code language="none"}}GreedyCycleBreaker{{/code}}. Uses a greedy approach to cycle-breaking, inspired by \\
33 -** Peter Eades, Xuemin Lin, W. F. Smyth, A fast and effective heuristic for the feedback arc set problem. //Information Processing Letters// 47(6), pp. 319-323, 1993.
34 -* {{code language="none"}}InteractiveCycleBreaker.{{/code}} Detects feedback edges according to the current layout, hence it reacts to the user's placement.
35 -)))
36 -|=(% colspan="1" %)(% colspan="1" %)
37 -(((
38 -Tests
39 -)))|(% colspan="1" %)(% colspan="1" %)
40 -(((
41 -* The graph contains no cycles.
42 -)))
43 43  
19 +=== Remarks ===
20 +
21 +* All implementations of phase one must include a dependency on the ReversedEdgeRestorer, to be included after phase 5.
22 +
23 +=== Current Implementations ===
24 +
25 +* GreedyCycleBreaker. Uses a greedy approach to cycle-breaking.
26 +
44 44  == Phase 2: Layering ==
45 45  
46 46  The second phase assigns nodes to layers. (also called //ranks// in some papers) Nodes in the same layer are assigned the same x coordinate. (give or take) The problem to solve here is to assign each node x a layer i such that each successor of x is in a layer j>i. The only exception are self-loops, that may or may not be supported by later phases.
... ... @@ -49,88 +49,50 @@
49 49  
50 50  Note that nodes can have a property associated with them that constraints the layers they can be placed in.
51 51  
52 -|=(((
53 -Preconditions
54 -)))|(((
35 +=== Precondition ===
36 +
55 55  * The graph is cycle-free.
56 56  * The nodes have not been layered yet.
57 -)))
58 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
59 -(((
60 -Postconditions
61 -)))|(((
39 +
40 +=== Postcondition ===
41 +
62 62  * The graph has a layering.
63 -)))
64 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
65 -(((
66 -Remarks
67 -)))|(((
68 -* Implementations should usually include a dependency on the {{code language="none"}}LayerConstraintHandler{{/code}}, unless they already adhere to layer constraints themselves.
69 -)))
70 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
71 -(((
72 -Implementations
73 -)))|(((
74 -* {{code language="none"}}LongestPathLayerer{{/code}}. Layers nodes according to the longest paths between them. Very simple, and doesn't usually give the best results.
75 -* {{code language="none"}}NetworkSimplexLayerer{{/code}}. A way more sophisticated algorithm whose results are usually very good, inspired by\\
76 -** (((
77 -Emden R. Gansner, Eleftherios Koutsofios, Stephen C. North, Kiem-Phong Vo, A technique for drawing directed graphs. //Software Engineering// 19(3), pp. 214-230, 1993.
78 -)))
79 -* {{code language="none"}}InteractiveLayerer.{{/code}} Detects layers according to the current layout, hence it reacts to the user's placement.
80 -)))
81 -|=(% colspan="1" %)(% colspan="1" %)
82 -(((
83 -
84 -)))|(% colspan="1" %)(% colspan="1" %)
85 -(((
86 -* The set of layerless nodes is empty.
87 -* For every edge that points from layer {{code language="none"}}i{{/code}} to layer {{code language="none"}}j, i<j{{/code}} holds.
88 -* No empty layer exists.
89 -* All nodes that existed prior to this phase are assigned to a layer.
90 -)))
91 91  
44 +=== Remarks ===
45 +
46 +* Implementations should usually include a dependency on the LayerConstraintHandler, unless they already adhere to layer constraints themselves.
47 +
48 +=== Current Implementations ===
49 +
50 +* LongestPathLayerer. Layers nodes according to the longest paths between them. Very simple, but doesn't usually give the best results.
51 +* NetworkSimplexLayerer. A way more sophisticated algorithm whose results are usually very good.
52 +
92 92  == Phase 3: Crossing Reduction ==
93 93  
94 -The objective of phase 3 is to determine how the nodes in each layer should be ordered. The order determines the number of edge crossings, and thus is a critical step towards readable diagrams. Unfortunately, the problem is NP-hard even for only two layers. Did I just hear you say "heuristic"? The usual approach is to sweep through the pairs of layers from left to right and back, along the way applying some heuristic to minimize crossings between each pair of layers. The two most prominent and well-studied kinds of heuristics used here are the barycenter method and the median method. We have currently implemented the former.
55 +The objective of phase 3 is to determine how the nodes in each layer should be ordered. The order determines the number of edge crossings, and thus is a critical step towards readable diagrams. Unfortunately, the problem is NP-hard even for only two layers. Did I just hear you saying "heuristic"? The usual approach is to sweep through the pairs of layers from left to right and back, along the way applying some heuristic to minimize crossings between each pair of layers. The two most prominent and well-studied kinds of heuristics used here are the barycenter method and the median method. We have currently implemented the former.
95 95  
96 96  Our crossing reduction implementations may or may not support the concepts of node successor constraints and layout groups. The former allows a node x to specify a node y!=x that may only appear after x. Layout groups are groups of nodes. Nodes belonging to different layout groups are not to be interleaved.
97 97  
98 -|=(((
99 -Preconditions
100 -)))|(((
59 +=== Precondition ===
60 +
101 101  * The graph has a proper layering. (except for self-loops)
102 102  * An implementation may allow in-layer connections.
103 -* Usually, all nodes are required to have a least fixed port sides.
104 -)))
105 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
106 -(((
107 -Postconditions
108 -)))|(((
63 +* Usually, all Nodes are required to have at least fixed port sides.
64 +
65 +=== Postcondition ===
66 +
109 109  * The order of nodes in each layer is fixed.
110 110  * All nodes have a fixed port order.
111 -)))
112 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
113 -(((
114 -Remarks
115 -)))|(((
116 -* If fixed port sides are required, the {{code language="none"}}PortPositionProcessor{{/code}} may be of use.
69 +
70 +=== Remarks ===
71 +
72 +* If fixed port sides are required, the PortPositionProcessor may be of use.
117 117  * Support for in-layer connections may be required to be able to handle certain problems. (odd port sides, for instance)
118 -)))
119 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
120 -(((
121 -Implementations
122 -)))|(((
123 -* {{code language="none"}}LayerSweepCrossingMinmizer{{/code}}. Does several sweeps across the layers, minimizing the crossings between each pair of layers using a barycenter heuristic. Supports node successor constraints and layout groups. Node successor constraints require one node to appear before another node. Layout groups specify sets of nodes whose nodes must not be interleaved. See [[this page>>doc:Layer Sweep Crossing Minimization]] for more information.
124 -* {{code language="none"}}InteractiveCrossingMinimizer.{{/code}} Detects the order of nodes according to the current layout, hence it reacts to the user's placement.
125 -)))
126 -|=(% colspan="1" %)(% colspan="1" %)
127 -(((
128 -Tests
129 -)))|(% colspan="1" %)(% colspan="1" %)
130 -(((
131 -* All nodes remain in their respective layer.
132 -)))
133 133  
75 +=== Current Implementations ===
76 +
77 +* [[LayerSweepCrossingMinimizer>>doc:Layer Sweep Crossing Minimization]]. Does several sweeps across the layers, minimizing the crossings between each pair of layers using a barycenter heuristic. Supports node successor constraints and layout groups. Node successor constraints require one node to appear before another node. Layout groups specify sets of nodes whose nodes must not be interleaved.
78 +
134 134  == Phase 4: Node Placement ==
135 135  
136 136  So far, the coordinates of the nodes have not been touched. That's about to change in phase 4, which determines the y coordinate. While phase 3 has an impact on the number of edge crossings, phase 4 has an influence on the number of edge bends. Usually, some kind of heuristic is employed to yield a good y coordinate.
... ... @@ -137,95 +137,55 @@
137 137  
138 138  Our node placers may or may not support node margins. Node margins define the space occupied by ports, labels and such. The idea is to keep that space free from edges and other nodes.
139 139  
140 -|=(((
141 -Preconditions
142 -)))|(((
85 +=== Precondition ===
86 +
143 143  * The graph has a proper layering. (except for self-loops)
144 144  * Node orders are fixed.
145 145  * Port positions are fixed.
146 146  * An implementation may allow in-layer connections.
147 147  * An implementation may require node margins to be set.
148 -)))
149 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
150 -(((
151 -Postconditions
152 -)))|(((
92 +
93 +=== Postcondition ===
94 +
153 153  * Each node is assigned a y coordinate such that no two nodes overlap.
154 154  * The height of each layer is set.
155 155  * The height of the graph is set to the maximal layer height.
156 -)))
157 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
158 -(((
159 -Remarks
160 -)))|(((
98 +
99 +=== Remarks ===
100 +
161 161  * Support for in-layer connections may be required to be able to handle certain problems. (odd port sides, for instance)
162 -* If node margins are supported, the {{code language="none"}}NodeMarginCalculator{{/code}} can compute them.
163 -* Port positions can be fixed by using the {{code language="none"}}PortPositionProcessor{{/code}}.
164 -)))
165 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
166 -(((
167 -Implementations
168 -)))|(((
169 -* {{code language="none"}}LinearSegmentsNodePlacer{{/code}}. Builds linear segments of nodes that should have the same y coordinate and tries to respect those linear segments. Linear segments are placed according to a barycenter heuristic. Inspired by\\
170 -** (((
171 -Georg Sander, A fast heuristic for hierarchical Manhattan layout. In //Proceedings of the Symposium on Graph Drawing (GD'95)//, LNCS vol. 1027, pp. 447-458, Springer, 1996.
172 -)))
173 -* {{code language="none"}}BKNodePlacer.{{/code}} Assembles nodes into blocks placed in straight lines in an attempt to minimize the number of edge bends, similar to the linear segments node placer. However, instead of using a barycenter heuristic to place nodes, the placement also tries to minimize the number of edge bends, usually resulting in diagrams that require more space.\\
174 -** (((
175 -Ulrik Brandes and Boris Köpf, Fast and simple horizontal coordinate assignment. In //Proceedings of the 9th International Symposium on Graph Drawing (GD'01)//, LNCS vol. 2265, pp. 33-36, Springer, 2002.
176 -)))
177 -)))
178 -|=(% colspan="1" %)(% colspan="1" %)
179 -(((
180 -
181 -)))|(% colspan="1" %)(% colspan="1" %)
182 -(((
183 -* The nodes of a layer are strictly ordered with regards to their y coordinate.
184 -* Any two nodes of a layer do not overlap with regards to their bounding box (height + margins).
185 -)))
102 +* If node margins are supported, the NodeMarginCalculator can compute them.
103 +* Port positions can be fixed by using the PortPositionProcessor.
186 186  
105 +=== Current Implementations ===
106 +
107 +* LinearSegmentsNodePlacer. Builds linear segments of nodes that should have the same y coordinate and tries to respect those linear segments. Linear segments are placed according to a barycenter heuristic.
108 +
187 187  == Phase 5: Edge Routing ==
188 188  
189 189  In the last phase, it's time to determine x coordinates for all nodes and route the edges. The routing may support very different kinds of features, such as support for odd port sides, (input ports that are on the node's right side) orthogonal edges, spline edges etc. Often times, the set of features supported by an edge router largely determines the intermediate processors used during the layout process.
190 190  
191 -|=(((
192 -Preconditions
193 -)))|(((
113 +=== Precondition ===
114 +
194 194  * The graph has a proper layering. (except for self-loops)
195 195  * Nodes are assigned y coordinates.
196 196  * Layer heights are correctly set.
197 197  * An implementation may allow in-layer connections.
198 -)))
199 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
200 -(((
201 -Postconditions
202 -)))|(((
119 +
120 +=== Postcondition ===
121 +
203 203  * Nodes are assigned x coordinates.
204 204  * Layer widths are set.
205 205  * The graph's width is set.
206 206  * The bend points of all edges are set.
207 -)))
208 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
209 -(((
210 -Remarks
211 -)))|(((
126 +
127 +=== Remarks ===
128 +
212 212  None.
213 -)))
214 -|=(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
215 -(((
216 -Implementations
217 -)))|(((
218 -* {{code language="none"}}OrthogonalEdgeRouter{{/code}}. Routes edges orthogonally. Supports routing edges going into an eastern port around a node. Tries to minimize the width of the space between each pair of layers used for edge routing. Inspired by\\
219 -** (((
220 -Georg Sander, Layout of directed hypergraphs with orthogonal hyperedges. In //Proceedings of the 11th International Symposium on Graph Drawing (GD '03)//, LNCS vol. 2912, pp. 381-386, Springer, 2004.
221 -)))
222 -* {{code language="none"}}PolylineEdgeRouter{{/code}}. Simplest routing style that just inserts bend points at the position of long edge dummy nodes.
223 -* {{code language="none"}}SplineEdgeRouter{{/code}}. A simple method for routing the edges with splines. Uses the long edge dummy nodes as reference points for spline calculation.
224 -)))
225 -|=(% colspan="1" %)(% colspan="1" %)
226 -(((
227 -Tests
228 -)))|(% colspan="1" %)(% colspan="1" %)
229 -(((
230 -* {{code language="none"}}OrthogonalEdgeRouter{{/code}}: For any two succeeding bendpoints of an edge either the y coordinates or the x coordinates are the same. Starting with the same x coordinates, alternating equality is required.
231 -)))
130 +
131 +=== Current Implementations ===
132 +
133 +* ComplexSplineRouter. TODO: Document.
134 +* OrthogonalEdgeRouter. Routes edges orthogonally. Supports routing edges going into an eastern port around a node. Tries to minimize the width of the space between each pair of layers used for edge routing.
135 +* PolylineEdgeRouter. TODO: Document.
136 +* SimpleSplineEdgeRouter. TODO: Document.
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -7111017
1 +884898
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/7111017/The Five Phases
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/884898/The Five Phases