Show last authors
1 KLay Layered supports a whole bunch of layout options. Every single one of them is documented here.
2
3 **Contents**
4
5
6
7 {{toc/}}
8
9 = Overview =
10
11 For a general introduction on layout options, see [[the KIML documentation>>doc:KIML Layout Options]]. KLay Layered supports layout options defined by KIML and defines additional custom layout options.
12
13 == Supported KIML Layout Options ==
14
15 KLay Layered supports the following standard layout options defined by KIML. Note that the default value may be altered (highlighted yellow). These layout options are documented on [[KIML's Layout Options page>>doc:KIML Layout Options]].
16
17 |=(((
18 Option
19 )))|=(((
20 ID
21 )))|=(((
22 Type
23 )))|=(((
24 Applies to
25 )))|=(((
26 Default
27 )))
28 |(% colspan="1" %)(% colspan="1" %)
29 (((
30 Additional Port Space
31 )))|(% colspan="1" %)(% colspan="1" %)
32 (((
33 de.cau.cs.kieler.additionalPortSpace
34 )))|(% colspan="1" %)(% colspan="1" %)
35 (((
36 Margins
37 )))|(% colspan="1" %)(% colspan="1" %)
38 (((
39 Nodes
40 )))|(% colspan="1" %)(% colspan="1" %)
41 (((
42 0, 0, 0, 0
43 )))
44 |(((
45 Alignment
46 )))|(((
47 de.cau.cs.kieler.alignment
48 )))|(((
49 Enum
50 )))|(((
51 Nodes
52 )))|(((
53 AUTOMATIC
54 )))
55 |(((
56 Aspect Ratio
57 )))|(((
58 de.cau.cs.kieler.aspectRatio
59 )))|(((
60 Float
61 )))|(((
62 Parents
63 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
64 (((
65 1.6
66 )))
67 |(((
68 Border Spacing
69 )))|(((
70 de.cau.cs.kieler.borderSpacing
71 )))|(((
72 Float
73 )))|(((
74 Parents
75 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
76 (((
77 20
78 )))
79 |(% colspan="1" %)(% colspan="1" %)
80 (((
81 Comment Box
82 )))|(% colspan="1" %)(% colspan="1" %)
83 (((
84 de.cau.cs.kieler.commentBox
85 )))|(% colspan="1" %)(% colspan="1" %)
86 (((
87 Boolean
88 )))|(% colspan="1" %)(% colspan="1" %)
89 (((
90 Nodes
91 )))|(% colspan="1" %)(% colspan="1" %)
92 (((
93 false
94 )))
95 |(((
96 Debug Mode
97 )))|(((
98 de.cau.cs.kieler.debugMode
99 )))|(((
100 Boolean
101 )))|(((
102 Parents
103 )))|(((
104 false
105 )))
106 |(% colspan="1" %)(% colspan="1" %)
107 (((
108 Diagram Type
109 )))|(% colspan="1" %)(% colspan="1" %)
110 (((
111 de.cau.cs.kieler.diagramType
112 )))|(% colspan="1" %)(% colspan="1" %)
113 (((
114 String
115 )))|(% colspan="1" %)(% colspan="1" %)
116 (((
117
118 )))|(% colspan="1" %)(% colspan="1" %)
119 (((
120
121 )))
122 |(((
123 [[Direction>>doc:||anchor="direction"]]
124 )))|(((
125 de.cau.cs.kieler.direction
126 )))|(((
127 Enum
128 )))|(((
129 Parents
130 )))|(((
131 UNDEFINED
132 )))
133 |(% colspan="1" %)(% colspan="1" %)
134 (((
135 Edge Label Placement
136 )))|(% colspan="1" %)(% colspan="1" %)
137 (((
138 de.cau.cs.kieler.edgeLabelPlacement
139 )))|(% colspan="1" %)(% colspan="1" %)
140 (((
141 Enum
142 )))|(% colspan="1" %)(% colspan="1" %)
143 (((
144 Labels
145 )))|(% colspan="1" %)(% colspan="1" %)
146 (((
147 UNDEFINED
148 )))
149 |(((
150 Edge Routing
151 )))|(((
152 de.cau.cs.kieler.edgeRouting
153 )))|(((
154 Enum
155 )))|(((
156 Parents
157 )))|(% class="highlight-yellow" data-highlight-colour="yellow" %)(% class="highlight-yellow" data-highlight-colour="yellow" %)
158 (((
159 POLYLINE
160 )))
161 |(% colspan="1" %)(% colspan="1" %)
162 (((
163 Hypernode
164 )))|(% colspan="1" %)(% colspan="1" %)
165 (((
166 de.cau.cs.kieler.hypernode
167 )))|(% colspan="1" %)(% colspan="1" %)
168 (((
169 Boolean
170 )))|(% colspan="1" %)(% colspan="1" %)
171 (((
172 Nodes
173 )))|(% colspan="1" %)(% colspan="1" %)
174 (((
175 false
176 )))
177 |(% colspan="1" %)(% colspan="1" %)
178 (((
179 Label Side
180 )))|(% colspan="1" %)(% colspan="1" %)
181 (((
182 de.cau.cs.kieler.labelSide
183 )))|(% colspan="1" %)(% colspan="1" %)
184 (((
185 Enum
186 )))|(% colspan="1" %)(% colspan="1" %)
187 (((
188 Parents
189 )))|(% colspan="1" %)(% colspan="1" %)
190 (((
191 SMART
192 )))
193 |(((
194 Label Spacing
195 )))|(((
196 de.cau.cs.kieler.labelSpacing
197 )))|(((
198 Float
199 )))|(((
200 Edges
201 Nodes
202 )))|(((
203 -1.0
204 )))
205 |(((
206 Layout Hierarchy
207 )))|(((
208 de.cau.cs.kieler.layoutHierarchy
209 )))|(((
210 Boolean
211 )))|(((
212 Parents
213 )))|(((
214 false
215 )))
216 |(% colspan="1" %)(% colspan="1" %)
217 (((
218 Minimal Height
219 )))|(% colspan="1" %)(% colspan="1" %)
220 (((
221 de.cau.cs.kieler.minHeight
222 )))|(% colspan="1" %)(% colspan="1" %)
223 (((
224 Float
225 )))|(% colspan="1" %)(% colspan="1" %)
226 (((
227 Nodes
228 Parents
229 )))|(% colspan="1" %)(% colspan="1" %)
230 (((
231 0.0
232 )))
233 |(% colspan="1" %)(% colspan="1" %)
234 (((
235 Minimal Width
236 )))|(% colspan="1" %)(% colspan="1" %)
237 (((
238 de.cau.cs.kieler.minWidth
239 )))|(% colspan="1" %)(% colspan="1" %)
240 (((
241 Float
242 )))|(% colspan="1" %)(% colspan="1" %)
243 (((
244 Nodes
245 Parents
246 )))|(% colspan="1" %)(% colspan="1" %)
247 (((
248 0.0
249 )))
250 |(% colspan="1" %)(% colspan="1" %)
251 (((
252 No Layout
253 )))|(% colspan="1" %)(% colspan="1" %)
254 (((
255 de.cau.cs.kieler.noLayout
256 )))|(% colspan="1" %)(% colspan="1" %)
257 (((
258 Boolean
259 )))|(% colspan="1" %)(% colspan="1" %)
260 (((
261
262 )))|(% colspan="1" %)(% colspan="1" %)
263 (((
264 false
265 )))
266 |(% colspan="1" %)(% colspan="1" %)
267 (((
268 Node Label Placement
269 )))|(% colspan="1" %)(% colspan="1" %)
270 (((
271 de.cau.cs.kieler.nodeLabelPlacement
272 )))|(% colspan="1" %)(% colspan="1" %)
273 (((
274 EnumSet
275 )))|(% colspan="1" %)(% colspan="1" %)
276 (((
277 Nodes
278 )))|(% colspan="1" %)(% colspan="1" %)
279 (((
280
281 )))
282 |(((
283 Port Constraints
284 )))|(((
285 de.cau.cs.kieler.portConstraints
286 )))|(((
287 Enum
288 )))|(((
289 Nodes
290 )))|(((
291 UNDEFINED
292 )))
293 |(% colspan="1" %)(% colspan="1" %)
294 (((
295 Port Label Placement
296 )))|(% colspan="1" %)(% colspan="1" %)
297 (((
298 de.cau.cs.kieler.portLabelPlacement
299 )))|(% colspan="1" %)(% colspan="1" %)
300 (((
301 Enum
302 )))|(% colspan="1" %)(% colspan="1" %)
303 (((
304 Nodes
305 )))|(% colspan="1" %)(% colspan="1" %)
306 (((
307 OUTSIDE
308 )))
309 |(% colspan="1" %)(% colspan="1" %)
310 (((
311 Port Offset
312 )))|(% colspan="1" %)(% colspan="1" %)
313 (((
314 de.cau.cs.kieler.offset
315 )))|(% colspan="1" %)(% colspan="1" %)
316 (((
317 Float
318 )))|(% colspan="1" %)(% colspan="1" %)
319 (((
320 Ports
321 )))|(% colspan="1" %)(% colspan="1" %)
322 (((
323
324 )))
325 |(% colspan="1" %)(% colspan="1" %)
326 (((
327 Port Side
328 )))|(% colspan="1" %)(% colspan="1" %)
329 (((
330 de.cau.cs.kieler.portSide
331 )))|(% colspan="1" %)(% colspan="1" %)
332 (((
333 Enum
334 )))|(% colspan="1" %)(% colspan="1" %)
335 (((
336 Ports
337 )))|(% colspan="1" %)(% colspan="1" %)
338 (((
339 UNDEFINED
340 )))
341 |(% colspan="1" %)(% colspan="1" %)
342 (((
343 Port Spacing
344 )))|(% colspan="1" %)(% colspan="1" %)
345 (((
346 de.cau.cs.kieler.portSpacing
347 )))|(% colspan="1" %)(% colspan="1" %)
348 (((
349 Float
350 )))|(% colspan="1" %)(% colspan="1" %)
351 (((
352 Nodes
353 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
354 (((
355 10
356 )))
357 |(((
358 Priority
359 )))|(((
360 de.cau.cs.kieler.priority
361 )))|(((
362 Int
363 )))|(((
364 Edges
365 Nodes
366 )))|(((
367
368 )))
369 |(% colspan="1" %)(% colspan="1" %)
370 (((
371 Randomization Seed
372 )))|(% colspan="1" %)(% colspan="1" %)
373 (((
374 de.cau.cs.kieler.randomSeed
375 )))|(% colspan="1" %)(% colspan="1" %)
376 (((
377 Int
378 )))|(% colspan="1" %)(% colspan="1" %)
379 (((
380 Parents
381 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
382 (((
383 1
384 )))
385 |(% colspan="1" %)(% colspan="1" %)
386 (((
387 Separate Connected Components
388 )))|(% colspan="1" %)(% colspan="1" %)
389 (((
390 de.cau.cs.kieler.separateConnComp
391 )))|(% colspan="1" %)(% colspan="1" %)
392 (((
393 Boolean
394 )))|(% colspan="1" %)(% colspan="1" %)
395 (((
396 Parents
397 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
398 (((
399 true
400 )))
401 |(% colspan="1" %)(% colspan="1" %)
402 (((
403 Size Constraint
404 )))|(% colspan="1" %)(% colspan="1" %)
405 (((
406 de.cau.cs.kieler.sizeConstraint
407 )))|(% colspan="1" %)(% colspan="1" %)
408 (((
409 EnumSet
410 )))|(% colspan="1" %)(% colspan="1" %)
411 (((
412 Nodes
413 )))|(% colspan="1" %)(% colspan="1" %)
414 (((
415
416 )))
417 |(% colspan="1" %)(% colspan="1" %)
418 (((
419 Size Options
420 )))|(% colspan="1" %)(% colspan="1" %)
421 (((
422 de.cau.cs.kieler.sizeOptions
423 )))|(% colspan="1" %)(% colspan="1" %)
424 (((
425 EnumSet
426 )))|(% colspan="1" %)(% colspan="1" %)
427 (((
428 Nodes
429 )))|(% colspan="1" %)(% colspan="1" %)
430 (((
431 DEFAULT_MINIMUM_SIZE
432 )))
433 |(% colspan="1" %)(% colspan="1" %)
434 (((
435 Spacing
436 )))|(% colspan="1" %)(% colspan="1" %)
437 (((
438 de.cau.cs.kieler.spacing
439 )))|(% colspan="1" %)(% colspan="1" %)
440 (((
441 Float
442 )))|(% colspan="1" %)(% colspan="1" %)
443 (((
444 Parents
445 )))|(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)(% class="highlight-yellow" colspan="1" data-highlight-colour="yellow" %)
446 (((
447 20
448 )))
449
450 == Custom Layout Options ==
451
452 |=(((
453 Option
454 )))|=(((
455 ID
456 )))|=(((
457 Type
458 )))|=(((
459 Applies to
460 )))|=(((
461 Default
462 )))|=(% colspan="1" %)(% colspan="1" %)
463 (((
464 Dependency
465 )))
466 |(((
467 [[Crossing Minimization>>doc:||anchor="crossingMinimization"]]
468 )))|(((
469 de.cau.cs.kieler.klay.layered.crossMin
470 )))|(((
471 Enum
472 )))|(((
473 Parents
474 )))|(((
475 LAYER_SWEEP
476 )))|(% colspan="1" %)(% colspan="1" %)
477 (((
478
479 )))
480 |(((
481 [[Cycle Breaking>>doc:||anchor="cycleBre"]]
482 )))|(((
483 de.cau.cs.kieler.klay.layered.cycleBreaking
484 )))|(((
485 Enum
486 )))|(((
487 Parents
488 )))|(((
489 GREEDY
490 )))|(% colspan="1" %)(% colspan="1" %)
491 (((
492
493 )))
494 |(((
495 [[Edge Spacing Factor>>doc:||anchor="edgeSpacingFactor"]]
496 )))|(((
497 de.cau.cs.kieler.klay.layered.edgeSpacingFactor
498 )))|(((
499 Float
500 )))|(((
501 Parents
502 )))|(((
503 0.5
504 )))|(% colspan="1" %)(% colspan="1" %)
505 (((
506
507 )))
508 |(% colspan="1" %)(% colspan="1" %)
509 (((
510 [[Edge Label Side Selection>>doc:||anchor="edgeLabelSideSelection"]]
511 )))|(% colspan="1" %)(% colspan="1" %)
512 (((
513 de.cau.cs.kieler.klay.layered.edgeLabelSideSelection
514 )))|(% colspan="1" %)(% colspan="1" %)
515 (((
516 Enum
517 )))|(% colspan="1" %)(% colspan="1" %)
518 (((
519 Parents
520 )))|(% colspan="1" %)(% colspan="1" %)
521 (((
522 SMART
523 )))|(% colspan="1" %)(% colspan="1" %)
524 (((
525
526 )))
527 |(% colspan="1" %)(% colspan="1" %)
528 (((
529 [[Feedback Edges>>doc:||anchor="feedbackEdges"]]
530 )))|(% colspan="1" %)(% colspan="1" %)
531 (((
532 de.cau.cs.kieler.klay.layered.feedBackEdges
533 )))|(% colspan="1" %)(% colspan="1" %)
534 (((
535 Boolean
536 )))|(% colspan="1" %)(% colspan="1" %)
537 (((
538 Parents
539 )))|(% colspan="1" %)(% colspan="1" %)
540 (((
541 false
542 )))|(% colspan="1" %)(% colspan="1" %)
543 (((
544
545 )))
546 |(% colspan="1" %)(% colspan="1" %)
547 (((
548 [[Fixed Alignment>>doc:||anchor="fixedAlignment"]]
549 )))|(% colspan="1" %)(% colspan="1" %)
550 (((
551 de.cau.cs.kieler.klay.layered.fixedAlignment
552 )))|(% colspan="1" %)(% colspan="1" %)
553 (((
554 Enum
555 )))|(% colspan="1" %)(% colspan="1" %)
556 (((
557 Parents
558 )))|(% colspan="1" %)(% colspan="1" %)
559 (((
560 NONE
561 )))|(% colspan="1" %)(% colspan="1" %)
562 (((
563 nodePlace=BRANDES_KOEPF
564 )))
565 |(% colspan="1" %)(% colspan="1" %)
566 (((
567 [[Interactive Reference Point>>doc:||anchor="interactiveReferencePoint"]]
568 )))|(% colspan="1" %)(% colspan="1" %)
569 (((
570 de.cau.cs.kieler.klay.layered.interactiveReferencePoint
571 )))|(% colspan="1" %)(% colspan="1" %)
572 (((
573 Enum
574 )))|(% colspan="1" %)(% colspan="1" %)
575 (((
576 Parents
577 )))|(% colspan="1" %)(% colspan="1" %)
578 (((
579 CENTER
580 )))|(% colspan="1" %)(% colspan="1" %)
581 (((
582
583 )))
584 |(% colspan="1" %)(% colspan="1" %)
585 (((
586 [[Layer Constraint>>doc:||anchor="layerConstraint"]]
587 )))|(% colspan="1" %)(% colspan="1" %)
588 (((
589 de.cau.cs.kieler.klay.layered.layerConstraint
590 )))|(% colspan="1" %)(% colspan="1" %)
591 (((
592 Enum
593 )))|(% colspan="1" %)(% colspan="1" %)
594 (((
595 Nodes
596 )))|(% colspan="1" %)(% colspan="1" %)
597 (((
598 NONE
599 )))|(% colspan="1" %)(% colspan="1" %)
600 (((
601
602 )))
603 |(% colspan="1" %)(% colspan="1" %)
604 (((
605 [[Linear Segments Deflection Dampening>>doc:||anchor="deflectionDampening"]]
606 )))|(% colspan="1" %)(% colspan="1" %)
607 (((
608 de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening
609 )))|(% colspan="1" %)(% colspan="1" %)
610 (((
611 Float
612 )))|(% colspan="1" %)(% colspan="1" %)
613 (((
614 Parents
615 )))|(% colspan="1" %)(% colspan="1" %)
616 (((
617 0.3
618 )))|(% colspan="1" %)(% colspan="1" %)
619 (((
620 nodePlace=LINEAR_SEGMENTS
621 )))
622 |(% colspan="1" %)(% colspan="1" %)
623 (((
624 [[Maximal Iterations>>doc:||anchor="maximalIterations"]]
625 )))|(% colspan="1" %)(% colspan="1" %)
626 (((
627 de.cau.cs.kieler.klay.layered.nodeLayering
628 )))|(% colspan="1" %)(% colspan="1" %)
629 (((
630 Int
631 )))|(% colspan="1" %)(% colspan="1" %)
632 (((
633 Parents
634 )))|(% colspan="1" %)(% colspan="1" %)
635 (((
636 10.000.000
637 )))|(% colspan="1" %)(% colspan="1" %)
638 (((
639 nodeLayering=NETWORK_SIMPLEX
640 )))
641 |(% colspan="1" %)(% colspan="1" %)
642 (((
643 [[Merge Edges>>doc:||anchor="mergeEdges"]]
644 )))|(% colspan="1" %)(% colspan="1" %)
645 (((
646 de.cau.cs.kieler.klay.layered.mergePorts
647 )))|(% colspan="1" %)(% colspan="1" %)
648 (((
649 Boolean
650 )))|(% colspan="1" %)(% colspan="1" %)
651 (((
652 Parents
653 )))|(% colspan="1" %)(% colspan="1" %)
654 (((
655 false
656 )))|(% colspan="1" %)(% colspan="1" %)
657 (((
658
659 )))
660 |(% colspan="1" %)(% colspan="1" %)
661 (((
662 [[Merge Hierarchy-Crossing Edges>>doc:||anchor="mergeHierarchyEdges"]]
663 )))|(% colspan="1" %)(% colspan="1" %)
664 (((
665 de.cau.cs.kieler.klay.layered.mergeHierarchyPorts
666 )))|(% colspan="1" %)(% colspan="1" %)
667 (((
668 Boolean
669 )))|(% colspan="1" %)(% colspan="1" %)
670 (((
671 Parents
672 )))|(% colspan="1" %)(% colspan="1" %)
673 (((
674 true
675 )))|(% colspan="1" %)(% colspan="1" %)
676 (((
677 layoutHierarchy=true
678 )))
679 |(((
680 [[Node Layering>>doc:||anchor="nodeLayering"]]
681 )))|(((
682 de.cau.cs.kieler.klay.layered.nodeLayering
683 )))|(((
684 Enum
685 )))|(((
686 Parents
687 )))|(((
688 NETWORK_SIMPLEX
689 )))|(% colspan="1" %)(% colspan="1" %)
690 (((
691
692 )))
693 |(% colspan="1" %)(% colspan="1" %)
694 (((
695 [[Node Placement>>doc:||anchor="nodePlacement"]]
696 )))|(% colspan="1" %)(% colspan="1" %)
697 (((
698 de.cau.cs.kieler.klay.layered.nodePlace
699 )))|(% colspan="1" %)(% colspan="1" %)
700 (((
701 Enum
702 )))|(% colspan="1" %)(% colspan="1" %)
703 (((
704 Parents
705 )))|(% colspan="1" %)(% colspan="1" %)
706 (((
707 BRANDES_KOEPF
708 )))|(% colspan="1" %)(% colspan="1" %)
709 (((
710
711 )))
712 |(% colspan="1" %)(% colspan="1" %)
713 (((
714 [[Port Anchor Offset>>doc:||anchor="portAnchor"]]
715 )))|(% colspan="1" %)(% colspan="1" %)
716 (((
717 de.cau.cs.kieler.klay.layered.portAnchor
718 )))|(% colspan="1" %)(% colspan="1" %)
719 (((
720 Object
721 )))|(% colspan="1" %)(% colspan="1" %)
722 (((
723 Ports
724 )))|(% colspan="1" %)(% colspan="1" %)
725 (((
726
727 )))|(% colspan="1" %)(% colspan="1" %)
728 (((
729
730 )))
731 |(((
732 [[Thoroughness>>doc:||anchor="thoroughness"]]
733 )))|(((
734 de.cau.cs.kieler.klay.layered.thoroughness
735 )))|(((
736 Int
737 )))|(((
738 Parents
739 )))|(((
740 7
741 )))|(% colspan="1" %)(% colspan="1" %)
742 (((
743
744 )))
745
746 = Detailed Documentation =
747
748 This section explains every layout option in more detail. See [[the KIML documentation>>doc:KIML Layout Options]] for more information on KIML layout options. Those options are only mentioned here if KLay Layered adds some custom behavior.
749
750 == Crossing Minimization ==
751
752
753
754 {{id name="crossingMinimization"/}}
755
756 Crossing minimization determines the ordering of nodes in each layer, which influences the number of edge crossings. This option switches between one of several algorithms that can be used to minimize crossings. Possible values are:
757
758 * LAYER_SWEEP
759 The layer sweep algorithm iterates multiple times over the layers, trying to find node orderings that minimize the number of crossings. The algorithm uses randomization to increase the odds of finding a good result. To improve its results, consider increasing the //Thoroughness// option, which influences the number of iterations done. The //Randomization// seed also influences results.
760 * INTERACTIVE
761 Orders the nodes of each layer by comparing their positions before the layout algorithm was started. The idea is that the relative order of nodes as it was before layout was applied is not changed. This of course requires valid positions for all nodes to have been set on the input graph before calling the layout algorithm. The interactive layer sweep algorithm uses the //Interactive Reference Point// option to determine which reference point of nodes are used to compare positions.
762
763 == Cycle Breaking ==
764
765
766
767 {{id name="cycleBreaking"/}}
768
769 KLay Layered tries to position nodes in a way that all edges point rightwards. This is not possible if the input graph has cycles. Such cycles have to be broken by reversing as few edges as possible. The reversed edges end up pointing leftwards in the resulting diagram. There are different cycle breaking algorithms available:
770
771 * GREEDY
772 This algorithm reverses edges greedily. The algorithm tries to avoid edges that have the //Priority// property set.
773 * INTERACTIVE
774 The interactive algorithm tries to reverse edges that already pointed leftwards in the input graph. This requires node and port coordinates to have been set to sensible values.
775
776 == Direction ==
777
778
779
780 {{id name="direction"/}}
781
782 The layout direction influences where the majority of edges in the final layout will point to. With data flow diagrams, this will usually be to the right. With control flow diagrams, it might be downwards. The layout direction defaults to {{code language="none"}}UNDEFINED{{/code}}. This causes KLay Layered to calculate a layout direction based on the {{code language="none"}}ASPECT_RATIO{{/code}} setting. As of now, if the aspect ratio is >=1 (that is, if the diagram should be wider than it is high), the direction is set to {{code language="none"}}RIGHT{{/code}}. Otherwise, it is set to {{code language="none"}}DOWN{{/code}}.
783
784 == Edge Spacing Factor ==
785
786
787
788 {{id name="edgeSpacingFactor"/}}
789
790 The edge spacing factor determines the amount of space between edges, relative to the regular //Spacing// value. The idea is that we don't need as much space between edges as we do between nodes.
791
792 [[image:attach:edgeSpacingFactor.png]]
793
794 == Edge Label Side Selection ==
795
796
797
798 {{id name="edgeLabelSideSelection"/}}
799
800 Determines how KLay Layered places edge labels. The following strategies are available:
801
802 * ALWAYS_UP
803 Always places edge labels above the edge.
804 * ALWAYS_DOWN
805 Always places edge labels below the edge.
806 * DIRECTION_UP
807 Places edge labels above edges pointing right, and below edges pointing left.
808 * DIRECTION_DOWN
809 Places edge labels below edges pointing right, and above edges pointing left.
810 * SMART
811 Uses a heuristic that determines the best edge label placement, also taking the placement of port labels into account.
812
813 == Feedback Edges ==
814
815
816
817 {{id name="feedbackEdges"/}}
818
819 Feedback edges are edges that feed the output of a node back to be the input of a previous node. This option controls how feedback edges are routed if port constraints are FREE. This influences how much emphasis is put on feedback edges.
820
821 With feedback edges:
822
823 [[image:attach:feedback_on.png]]
824
825 Without feedback edges:
826
827 [[image:attach:feedback_off.png]]
828
829 == Fixed Alignment ==
830
831
832
833 {{id name="fixedAlignment"/}}
834
835 The BRANDES_KOEPF node placement algorithm computes several different node placements. One of the placements is chosen by the algorithm, usually the one that takes the least amount of space. With this option, a particular result can be chosen.
836
837 This option should usually be left alone.
838
839 == Interactive Reference Point ==
840
841
842
843 {{id name="interactiveReferencePoint"/}}
844
845 Interactive layering, crossing minimization, and cycle breaking algorithms use node positions to sort nodes into layers or to determine the order of nodes in each layer. However, it is unclear if for example the top left corners of nodes should be compared, or the bottom left corners — different settings might lead to different results. The interactive reference point determines which part of nodes is used to compare their positions. It provides the following settings:
846
847 * TOP_LEFT
848 The top left corner of a node is taken as the reference point.
849 * CENTER
850 The center of a node is taken as the reference point.
851
852 == Layer Constraint ==
853
854
855
856 {{id name="layerConstraint"/}}
857
858 The layer a node is placed in is usually computed by the layer assignment algorithms. However, sometimes certain nodes need to be placed in the first or in the last layer (for example, nodes that represent inputs from the outside). The layer constraint option can be set on such nodes to do just that.
859
860 [[image:attach:layer_constraints.png]]
861
862 {{note}}
863 This option can also be set to {{code language="none"}}FIRST_SEPARATE{{/code}} and {{code language="none"}}LAST_SEPARATE{{/code}}. These are for internal use only and should not have been publicly exposed in the first place. Using them can result in layout problems.
864 {{/note}}
865
866 == Linear Segments Deflection Dampening ==
867
868
869
870 {{id name="deflectionDampening"/}}
871
872 {{note}}
873 This is a very advanced layout option that you normally shouldn't worry about.
874 {{/note}}
875
876 The linear segments node placer can sometimes place nodes in a way that results in unnecessarily large diagrams. This option dampens how much the nodes are moved around. A dampening factor of 1.0 disables dampening and just lets the node placer do what it wants. A more conservative dampening factor of 0.3 (the default) restricts the freedom of the node placer a bit more.
877
878 == Maximal Iterations ==
879
880
881
882 {{id name="maximalIterations"/}}
883
884 Delimits the amount of depth-first-search iterations performed by the network simplex layering strategy. Large, highly connected graphs might require a long time to be processed. This property serves as a timeout after which an exception is raised.
885
886 == Merge Edges ==
887
888
889
890 {{id name="mergeEdges"/}}
891
892 In the KGraph model, edges can either connect to nodes through ports or directly. In the latter case, KLay Layered will introduce a virtual port for each edge, which results in all edges connecting to the node at different points in the final drawing. If this option is switched on, KLay Layered will only generate up to one input and one output port for each node. The option is set on a parent node and applies to all of its children, but not to the parent node itself.
893
894 [[image:attach:merging.png]]
895
896 == Merge Hierarchy-Crossing Edges ==
897
898
899
900 {{id name="mergeHierarchyEdges"/}}
901
902 If hierarchical layout is active, this option is the hierarchical equivalent to //Merge Edges//. If set to true on a compound node, all hierarchy-crossing edges that start or end inside that compound node are eligible for merging.
903
904 [[image:attach:merge_hierarchy_edges.png]]
905
906 == Node Layering ==
907
908
909
910 {{id name="nodeLayering"/}}
911
912 Decides which algorithm is used to compute the layer each node is placed in. We have different algorithms available, with different optimization goals:
913
914 * NETWORK_SIMPLEX
915 This algorithm tries to minimize the length of edges. This is the most computationally intensive algorithm. The number of iterations after which it aborts if it hasn't found a result yet can be set with the [[Maximal Iterations>>doc:||anchor="maximalInterations"]] option.
916 * LONGEST_PATH
917 A very simple algorithm that distributes nodes along their longest path to a sink node.
918 * INTERACTIVE
919 Distributes the nodes into layers by comparing their positions before the layout algorithm was started. The idea is that the relative horizontal order of nodes as it was before layout was applied is not changed. This of course requires valid positions for all nodes to have been set on the input graph before calling the layout algorithm. The interactive node layering algorithm uses the //Interactive Reference Point// option to determine which reference point of nodes are used to compare positions.
920
921 == Node Placement ==
922
923
924
925 {{id name="nodePlacement"/}}
926
927 Decides which algorithm is used to compute the y coordinate of each node. This influences the length of edges, the number of edge bends, and the height of the diagram. We have different algorithms available, with different optimization goals:
928
929 * BRANDES_KOEPF
930 Minimizes the number of edge bends at the expense of diagram size: diagrams drawn with this algorithm are usually higher than diagrams drawn with other algorithms.
931 * LINEAR_SEGMENTS
932 Computes a balanced placement.
933 * BUCHHEIM_JUENGER_LEIPERT
934 Also computes a balanced placement, but a little faster.
935 * SIMPLE
936 Minimizes the area at the expense of... well, pretty much everything else.
937
938 == Port Anchor Offset ==
939
940
941
942 {{id name="portAnchor"/}}
943
944 Since ports have a size, we need a concrete point inside the port that edges should start or end in. In KLay Layered, this is referred to as the //port anchor//. By default, the center of each port is used as its port anchor, but this behavior can be overridden by setting an explicit port anchor.
945
946 In the following example, the port anchor of the left port was moved upwards, while the port anchor of the second port was moved downwards:
947
948 [[image:attach:port_anchors.png]]
949
950 == Thoroughness ==
951
952
953
954 {{id name="thoroughness"/}}
955
956 There are heuristics in use all over KLay Layered whose results often improve with the number of iterations computed. The thoroughness is a measure for telling KLay Layered to compute more iterations to improve the quality of results, at the expense of performance.