Changes for page KIML Layout Options

Last modified by Alexander Schulz-Rosengarten on 2023/09/11 16:17

From version 28.1
edited by uru
on 2015/01/28 15:54
Change comment: There is no comment for this version
To version 19.1
edited by msp
on 2014/03/08 20:04
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.uru
1 +XWiki.msp
Content
... ... @@ -1,6 +1,8 @@
1 -
1 +{{warning}}
2 +This is preliminary and incomplete documentation. You've been warned.
3 +{{/warning}}
2 2  
3 -KIML defines a whole set of standard layout options that many layout algorithms support. When an option is supported by an algorithm, that algorithm may override the option's default value. Algorithms may also provide more specialized documentation for layout options.
5 +KIML defines a whole set of standard layout options that many layout algorithms support. Whether an algorithm supports a layout option depends on the option and on the algorithm. When an option is supported by an algorithm, that algorithm may override the option's default value. Algorithms may also provide more specialized documentation for layout options.
4 4  
5 5  **Contents**
6 6  
... ... @@ -35,7 +35,7 @@
35 35  Default
36 36  )))
37 37  |(((
38 -[[Alignment>>doc:||anchor="alignment"]]
40 +Alignment
39 39  )))|(((
40 40  de.cau.cs.kieler.alignment
41 41  )))|(((
... ... @@ -46,7 +46,7 @@
46 46  AUTOMATIC
47 47  )))
48 48  |(((
49 -[[Aspect Ratio>>doc:||anchor="aspectRatio"]]
51 +Aspect Ratio
50 50  )))|(((
51 51  de.cau.cs.kieler.aspectRatio
52 52  )))|(((
... ... @@ -146,7 +146,7 @@
146 146  
147 147  )))
148 148  |(((
149 -[[Layout Hierarchy>>doc:||anchor="layoutHierarchy"]]
151 +Layout Hierarchy
150 150  )))|(((
151 151  de.cau.cs.kieler.layoutHierarchy
152 152  )))|(((
... ... @@ -212,7 +212,7 @@
212 212  )))
213 213  |(% colspan="1" %)(% colspan="1" %)
214 214  (((
215 -
217 +Port Spacing
216 216  )))|(% colspan="1" %)(% colspan="1" %)
217 217  (((
218 218  de.cau.cs.kieler.portSpacing
... ... @@ -349,22 +349,6 @@
349 349  )))
350 350  |(% colspan="1" %)(% colspan="1" %)
351 351  (((
352 -[[Additional Port Space>>doc:||anchor="addPortSpace"]]
353 -)))|(% colspan="1" %)(% colspan="1" %)
354 -(((
355 -de.cau.cs.kieler.additionalPortSpace
356 -)))|(% colspan="1" %)(% colspan="1" %)
357 -(((
358 -Margins
359 -)))|(% colspan="1" %)(% colspan="1" %)
360 -(((
361 -Nodes
362 -)))|(% colspan="1" %)(% colspan="1" %)
363 -(((
364 -0, 0, 0, 0
365 -)))
366 -|(% colspan="1" %)(% colspan="1" %)
367 -(((
368 368  Animate
369 369  )))|(% colspan="1" %)(% colspan="1" %)
370 370  (((
... ... @@ -397,7 +397,7 @@
397 397  )))
398 398  |(% colspan="1" %)(% colspan="1" %)
399 399  (((
400 -[[Comment Box>>doc:||anchor="commentBox"]]
386 +Comment Box
401 401  )))|(% colspan="1" %)(% colspan="1" %)
402 402  (((
403 403  de.cau.cs.kieler.commentBox
... ... @@ -483,7 +483,7 @@
483 483  )))
484 484  |(% colspan="1" %)(% colspan="1" %)
485 485  (((
486 -[[Hypernode>>doc:||anchor="hypernode"]]
472 +Hypernode
487 487  )))|(% colspan="1" %)(% colspan="1" %)
488 488  (((
489 489  de.cau.cs.kieler.hypernode
... ... @@ -581,7 +581,7 @@
581 581  )))
582 582  |(% colspan="1" %)(% colspan="1" %)
583 583  (((
584 -[[No Layout>>doc:||anchor="noLayout"]]
570 +No Layout
585 585  )))|(% colspan="1" %)(% colspan="1" %)
586 586  (((
587 587  de.cau.cs.kieler.noLayout
... ... @@ -597,22 +597,6 @@
597 597  )))
598 598  |(% colspan="1" %)(% colspan="1" %)
599 599  (((
600 -[[Port Anchor Offset>>doc:||anchor="portAnchor"]]
601 -)))|(% colspan="1" %)(% colspan="1" %)
602 -(((
603 -de.cau.cs.kieler.klay.layered.portAnchor
604 -)))|(% colspan="1" %)(% colspan="1" %)
605 -(((
606 -Object
607 -)))|(% colspan="1" %)(% colspan="1" %)
608 -(((
609 -Ports
610 -)))|(% colspan="1" %)(% colspan="1" %)
611 -(((
612 -
613 -)))
614 -|(% colspan="1" %)(% colspan="1" %)
615 -(((
616 616  Port Index
617 617  )))|(% colspan="1" %)(% colspan="1" %)
618 618  (((
... ... @@ -693,22 +693,6 @@
693 693  )))
694 694  |(% colspan="1" %)(% colspan="1" %)
695 695  (((
696 -Thickness
697 -)))|(% colspan="1" %)(% colspan="1" %)
698 -(((
699 -de.cau.cs.kieler.thickness
700 -)))|(% colspan="1" %)(% colspan="1" %)
701 -(((
702 -Float
703 -)))|(% colspan="1" %)(% colspan="1" %)
704 -(((
705 -Edges
706 -)))|(% colspan="1" %)(% colspan="1" %)
707 -(((
708 -1.0
709 -)))
710 -|(% colspan="1" %)(% colspan="1" %)
711 -(((
712 712  Zoom to Fit
713 713  )))|(% colspan="1" %)(% colspan="1" %)
714 714  (((
... ... @@ -760,8 +760,6 @@
760 760  
761 761  = Detailed Documentation =
762 762  
763 -This section explains every layout option in more detail.
764 -
765 765  == The Most Important Options ==
766 766  
767 767  While most layout options are used to affect how the active layout algorithm computes concrete coordinates for the graph elements, there are some layout options that have a special role in KIML.
... ... @@ -770,15 +770,19 @@
770 770  
771 771  {{id name="layoutAlgorithm"/}}
772 772  
773 -The option with identifier {{code language="none"}}de.cau.cs.kieler.algorithm{{/code}} specifies which layout algorithm to use for a graph or subgraph. The value can be either the identifier of a layout algorithm or the identifier of a layout type. In the latter case the algorithm with highest priority of that type is applied. It is possible to set different values for this option on subgraphs of a hierarchical graph, where a subgraph is identified by a parent node. A layout algorithm is responsible to process only the direct content of a given parent node. An exception from this rule is made when the [[Layout Hierarchy>>doc:||anchor="layoutHierarchy"]] option is active.
725 +The option with identifier {{code language="none"}}de.cau.cs.kieler.algorithm{{/code}} specifies which layout algorithm to use for the content of a composite node. The value can be either the identifier of a layout algorithm or the identifier of a layout type. In the latter case the algorithm with highest priority of that type is applied.
774 774  
775 -The following layout has been created by setting a force-based layout algorithm on the inner hierarchy level and a layer-based layout algorithm on the top level.
727 +The following layout types are predefined:
776 776  
777 -[[image:attach:layout_algorithm.png]]
729 +* **Layered** - The layer-based method emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.
730 +* **Orthogonal** - Orthogonal methods follow the "topology-shape-metrics" approach, which first applies a planarization technique, resulting in a planar representation of the graph, then compute an orthogonal shape, and finally determine concrete coordinates for nodes and edge bend points by applying a compaction method.
731 +* **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces.
732 +* **Circular** - Circular layout algorithms emphasize biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent properties of the graph.
733 +* **Tree** - Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.
778 778  
779 -==== Available Algorithms and Libraries ====
735 +=== Available Algorithms and Libraries ===
780 780  
781 -* **The [[KLay Project>>doc:Layout Algorithms (KLay)]]** - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and labels.
737 +* **The [[KLay Project>>doc:Layout Algorithms (KLay)]]** - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and edge labels.
782 782  * **Randomizer** - Distributes the nodes randomly; not very useful, but it can show how important a good layout is for understanding a graph.
783 783  * (((
784 784  **Box Layout** - Ignores edges, places all nodes in rows. Can be used to layout collections of unconnected boxes, such as Statechart regions.
... ... @@ -787,14 +787,6 @@
787 787  * **OGDF** ((% style="color: rgb(0,0,0);" %)[[www.ogdf.net>>url:http://www.ogdf.net/||shape="rect"]](%%)) - A self-contained C++ class library for the automatic layout of diagrams. The version that is shipped with KIELER is compiled as an executable that reads files in OGML format and outputs the computed concrete layout.
788 788  * **Graphviz** ([[www.graphviz.org>>url:http://www.graphviz.org/||shape="rect"]]) - An open source graph visualization tool with several graph layout programs, web and interactive graphical interfaces, auxiliary tools, libraries, and language bindings. Graphviz needs to be installed separately in order to be used within KIELER, since it is called in a separate process using the DOT language for communication.
789 789  
790 -==== Predefined Layout Types ====
791 -
792 -* **Layered** - The layer-based method emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.
793 -* **Orthogonal** - Orthogonal methods follow the "topology-shape-metrics" approach, which first applies a planarization technique, resulting in a planar representation of the graph, then compute an orthogonal shape, and finally determine concrete coordinates for nodes and edge bend points by applying a compaction method.
794 -* **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces.
795 -* **Circular** - Circular layout algorithms emphasize biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent properties of the graph.
796 -* **Tree** - Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.
797 -
798 798  === Diagram Type ===
799 799  
800 800  {{id name="diagramType"/}}
... ... @@ -810,6 +810,15 @@
810 810  * **Use Case Diagram** - Use case diagrams as defined by the UML.
811 811  * **Unconnected Boxes** - Sets of nodes that have no connections and are treated as resizable boxes. This is related to mathematical [[packing problems>>url:http://en.wikipedia.org/wiki/Packing_problem||shape="rect"]]. Example: Regions in [[doc:SCCharts SyncCharts]].
812 812  
761 +== Other Options ==
762 +
763 +* **Layout Hierarchy** ({{code language="none"}}de.cau.cs.kieler.layoutHierarchy{{/code}}) - If this option is supported and active, the layout algorithm is requested to process the full hierarchy contained in the input node. This means that instead of executing another algorithm on each hierarchy level, all levels are arranged in a single algorithm execution.
764 +* **Hypernode** ({{code language="none"}}de.cau.cs.kieler.hypernode{{/code}}) - A node that is marked as hypernode has a special role in the graph structure, since all its incident edges are treated as parts of the same [[hyperedge>>url:http://en.wikipedia.org/wiki/Hypergraph||shape="rect"]]. Example: relation vertices in [[Ptolemy>>url:http://ptolemy.eecs.berkeley.edu/||shape="rect"]] models.
765 +* **Comment Box** ({{code language="none"}}de.cau.cs.kieler.commentBox{{/code}}) - A node that is marked as comment box is treated as a label that needs to be placed somewhere. This is different to normal node labels, which are usually regarded as fixed.
766 +* **No Layout** ({{code language="none"}}de.cau.cs.kieler.noLayout{{/code}}) - Elements that are marked with this option are excluded from layout. This is used to identify diagram objects that should not be regarded as graph elements.
767 +
768 +This section explains every layout option in more detail.
769 +
813 813  === Edge Routing ===
814 814  
815 815  {{id name="edgeRouting"/}}
... ... @@ -819,88 +819,14 @@
819 819  * POLYLINE
820 820  Edges consist of one or more segments defined by a list of bend points.
821 821  * ORTHOGONAL
822 -Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically.
823 -* SPLINES
824 -Edges are routed as splines (smooth curves).
779 +Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically, but never at an angle.
780 +* SPLINE
781 +Edges are routed as splines (smooth curves). (% style="color: rgb(153,51,0);" %)**TODO:** Add more documentation on how the returned bend points are to be interpreted.
825 825  * UNDEFINED
826 -No particular edge routing style is selected. Usually this value points to the default setting of the selected layout algorithm.
783 +No particular edge routing style is selected. The result produced by the layout algorithm may be undefined.
827 827  
828 -[[image:attach:edge_routing.png]]
785 +(% style="color: rgb(153,51,0);" %)**TODO:** Add an image illustrating the different routing styles.
829 829  
830 -When used as layout option, the edge routing is set for a whole graph or subgraph, i.e. on a parent node. However, the property is additionally used for the output of the layout algorithm in order to mark individual edges. If the edge routing assigned to an edge is anything other than SPLINES, the bend points of that edge are interpreted with their normal meaning, i.e. straight lines are drawn between consecutive bend points. If, on the other hand, a layout algorithm marks an edge with the value SPLINES, the bend points have to be interpreted as control points for a series of cubic splines following this procedure:
831 -
832 -1. Start at the source point of the edge.
833 -1. As long as there are at least three bend points left:
834 -11. Draw a cubic spline segment to the third bend point with the other two bend points as control points.
835 -11. Use the third bend point as start point for the next segment.
836 -11. Consume the three bend points and proceed to the next segment.
837 -1. Check the number of remaining bend points:
838 -11. Two bend points – draw a cubic spline segment to the target point of the edge.
839 -11. One bend point – draw a quadratic spline segment to the target point of the edge.
840 -11. No bend point – draw a straight line to the target point of the edge.
841 -
842 -== Other Options ==
843 -
844 -=== Additional Port Space ===
845 -
846 -{{id name="addPortSpace"/}}
847 -
848 -This option controls additional port space left around the set of ports on each side:
849 -
850 -[[image:attach:addPortSpace.png]]
851 -
852 -This option is only relevant if port constraints are {{code language="none"}}FREE{{/code}}, {{code language="none"}}FIXED_SIDE{{/code}}, or {{code language="none"}}FIXED_ORDER{{/code}}. If size constraints include {{code language="none"}}PORTS{{/code}}, the additional port space, together with the port spacing and the size of ports, determines a lower bound on the node size.
853 -
854 -=== Alignment ===
855 -
856 -{{id name="alignment"/}}
857 -
858 -Determines the alignment of a node in relation to other nodes of the same row or column. For layer-based algorithms, for instance, this option controls how a node is positioned inside its assigned layer.
859 -
860 -=== Aspect Ratio ===
861 -
862 -{{id name="aspectRatio"/}}
863 -
864 -The aspect ratio of a drawing is the ratio of its total width to its total height. This option gives some control over that ratio, although in most cases it is only interpreted as a hint on how to arrange multiple connected components, hence the actual aspect ratio will probably be different from what has been specified with the option.
865 -
866 -=== Comment Box ===
867 -
868 -{{id name="commentBox"/}}
869 -
870 -A node that is marked as comment box is treated as a label that needs to be placed somewhere. In contrast to normal node labels (modeled with a KLabel instance), comment boxes may have connections to other nodes, as in the following example.
871 -
872 -[[image:attach:comment_box.png]]
873 -
874 -=== (% style="line-height: 1.5625;" %)Hypernode(%%) ===
875 -
876 -{{id name="hypernode"/}}
877 -
878 -A node that is marked as hypernode has a special role in the graph structure, since all its incident edges are treated as parts of the same [[hyperedge>>url:http://en.wikipedia.org/wiki/Hypergraph||shape="rect"]]. Example: relation vertices in [[Ptolemy>>url:http://ptolemy.eecs.berkeley.edu/||shape="rect"]] models.
879 -
880 -=== Layout Hierarchy ===
881 -
882 -{{id name="layoutHierarchy"/}}
883 -
884 -If this option is supported and active, the layout algorithm is requested to process the full hierarchy contained in the input node. This means that instead of executing another algorithm on each hierarchy level, all levels are arranged in a single algorithm execution.
885 -
886 -=== No Layout ===
887 -
888 -{{id name="noLayout"/}}
889 -
890 -Elements that are marked with this option are excluded from layout. This is used to identify diagram objects that should not be regarded as graph elements.
891 -
892 -=== Port Anchor Offset ===
893 -
894 -{{id name="portAnchor"/}}
895 -
896 -
897 -
898 -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.
899 -
900 -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:
901 -
902 -[[image:attach:KLay Layered Layout Options@port_anchors.png]]
903 -
904 904  === Port Offset ===
905 905  
906 906  {{id name="portOffset"/}}
... ... @@ -911,9 +911,3 @@
911 911  
912 912  * The port constraints on a node are set to FREE, FIXED_SIDES or FIXED_ORDER.
913 913  * The port constraints on a node are set to FIXED_RATIO or FIXED_POS, and the size of the node is not fixed. (Note that this is especially true for ports of compound nodes.)
914 -
915 -=== Port Spacing ===
916 -
917 -{{id name="portSpacing"/}}
918 -
919 -The port spacing determines how much space KLay Layered should leave between the ports of each side. This option is only relevant if the node size depends on the ports, that is, if the size constraints include {{code language="none"}}SizeConstraint.PORTS{{/code}}.
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -10751029
1 +9470012
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/10751029/KIML Layout Options
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9470012/KIML Layout Options