Changes for page KIML Layout Options

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

From version 15.1
edited by cds
on 2013/06/03 12:41
Change comment: Migrated to Confluence 5.3
To version 17.1
edited by msp
on 2014/03/07 16:46
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.cds
1 +XWiki.msp
Content
... ... @@ -74,7 +74,7 @@
74 74  )))|(((
75 75  Parents
76 76  )))|(((
77 --1.0
77 +
78 78  )))
79 79  |(% colspan="1" %)(% colspan="1" %)
80 80  (((
... ... @@ -105,7 +105,7 @@
105 105  )))
106 106  |(% colspan="1" %)(% colspan="1" %)
107 107  (((
108 -Diagram Type
108 +[[Diagram Type>>doc:||anchor="diagramType"]]
109 109  )))|(% colspan="1" %)(% colspan="1" %)
110 110  (((
111 111  de.cau.cs.kieler.diagramType
... ... @@ -128,7 +128,7 @@
128 128  )))|(((
129 129  Parents
130 130  )))|(((
131 -UNDEFINED
131 +
132 132  )))
133 133  |(% colspan="1" %)(% colspan="1" %)
134 134  (((
... ... @@ -144,7 +144,7 @@
144 144  Labels
145 145  )))|(% colspan="1" %)(% colspan="1" %)
146 146  (((
147 -UNDEFINED
147 +
148 148  )))
149 149  |(((
150 150  [[Edge Routing>>doc:||anchor="edgeRouting"]]
... ... @@ -155,7 +155,7 @@
155 155  )))|(((
156 156  Parents
157 157  )))|(((
158 -UNDEFINED
158 +
159 159  )))
160 160  |(% colspan="1" %)(% colspan="1" %)
161 161  (((
... ... @@ -253,7 +253,7 @@
253 253  Edges
254 254  Nodes
255 255  )))|(((
256 --1.0
256 +
257 257  )))
258 258  |(((
259 259  Layout Hierarchy
... ... @@ -267,7 +267,7 @@
267 267  false
268 268  )))
269 269  |(((
270 -Layout Algorithm
270 +[[Layout Algorithm>>doc:||anchor="layoutAlgorithm"]]
271 271  )))|(((
272 272  de.cau.cs.kieler.algorithm
273 273  )))|(((
... ... @@ -352,7 +352,7 @@
352 352  )))|(((
353 353  Nodes
354 354  )))|(((
355 -UNDEFINED
355 +
356 356  )))
357 357  |(% colspan="1" %)(% colspan="1" %)
358 358  (((
... ... @@ -400,8 +400,24 @@
400 400  Ports
401 401  )))|(% colspan="1" %)(% colspan="1" %)
402 402  (((
403 -UNDEFINED
403 +
404 404  )))
405 +|(% colspan="1" %)(% colspan="1" %)
406 +(((
407 +Port Spacing
408 +)))|(% colspan="1" %)(% colspan="1" %)
409 +(((
410 +de.cau.cs.kieler.portSpacing
411 +)))|(% colspan="1" %)(% colspan="1" %)
412 +(((
413 +Float
414 +)))|(% colspan="1" %)(% colspan="1" %)
415 +(((
416 +Nodes
417 +)))|(% colspan="1" %)(% colspan="1" %)
418 +(((
419 +
420 +)))
405 405  |(((
406 406  Position
407 407  )))|(((
... ... @@ -505,13 +505,60 @@
505 505  Parents
506 506  )))|(% colspan="1" %)(% colspan="1" %)
507 507  (((
508 --1.0
524 +
509 509  )))
510 510  
511 511  = The Most Important Options =
512 512  
513 -**TODO:** Write a bit of documentation about the most important layout options and how to use them, possibly with a simple example or something.
529 +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.
514 514  
531 +== Layout Algorithm ==
532 +
533 +{{id name="layoutAlgorithm"/}}
534 +
535 +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.
536 +
537 +The following layout types are predefined:
538 +
539 +* **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.
540 +* **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.
541 +* **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces.
542 +* **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.
543 +* **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.
544 +
545 +=== Available Algorithms and Libraries ===
546 +
547 +* **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.
548 +* **Randomizer** - Distributes the nodes randomly; not very useful, but it can show how important a good layout is for understanding a graph.
549 +* (((
550 +**Box Layout** - Ignores edges, places all nodes in rows. Can be used to layout collections of unconnected boxes, such as Statechart regions.
551 +)))
552 +* **Fixed Layout** - Does not compute a new layout, but leaves all nodes and edges where they are. If the Position and Bend Points options are set for the elements of the graph, the pre-defined layout is applied.
553 +* **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.
554 +* **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.
555 +
556 +== Diagram Type ==
557 +
558 +{{id name="diagramType"/}}
559 +
560 +Diagram types are used to classify graphical diagrams for setting default layout option values for a set of similar diagrams. The diagram type of an element is specified with the layout option {{code language="none"}}de.cau.cs.kieler.diagramType{{/code}}. Layout algorithms can declare which diagram types they support well, and give a priority value for each supported type. KIML decides at runtime which layout algorithm has the highest priority for a given diagram, so that the most suitable algorithm is always used. Usual values for such priorities are between 1 and 10, where the highest value should only be assigned if the algorithm is especially designed for diagrams of the respective type, or if it has proven to be very adequate for them. Lower values should be given if the algorithm is able to draw the diagrams correctly, but with lower quality of the resulting layout.
561 +
562 +The following diagram types are predefined:
563 +
564 +* **General** - This type is automatically assigned to all diagrams for which no specific type is declared. A layout algorithm that has the highest priority on the //General// diagram type is taken as the default algorithm when no further information on a diagram is available to KIML.
565 +* **State Machine** - All kinds of state machines, automata, and activity diagrams. Examples: [[doc:SCCharts SyncCharts]], UML Activity diagrams.
566 +* **Data Flow Diagram** - Actor-oriented diagrams, where connections are mostly done between //ports// of nodes. These diagrams can only be handled properly by very special layout algorithms, such as those developed in the [[KLay project>>doc:Layout Algorithms (KLay)]].
567 +* **Class Diagram** - Class diagrams such as Ecore diagrams for the [[EMF>>url:http://www.eclipse.org/modeling/emf/||shape="rect"]] or UML Class diagrams.
568 +* **Use Case Diagram** - Use case diagrams as defined by the UML.
569 +* **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]].
570 +
571 +== Other Options ==
572 +
573 +* **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.
574 +* **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.
575 +* **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.
576 +* **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.
577 +
515 515  = Detailed Documentation =
516 516  
517 517  This section explains every layout option in more detail.
... ... @@ -518,8 +518,6 @@
518 518  
519 519  == Edge Routing ==
520 520  
521 -
522 -
523 523  {{id name="edgeRouting"/}}
524 524  
525 525  This option influences the way in which edges are routed between the nodes they connect. The following settings are available:
... ... @@ -537,8 +537,6 @@
537 537  
538 538  == Port Offset ==
539 539  
540 -
541 -
542 542  {{id name="portOffset"/}}
543 543  
544 544  The port offset is used to specify how much space a layout algorithm should leave between a port and the border of its node. This is usually zero, but doesn't have to be. If the offset is not defined for a given port, a layout algorithm can try to infer the offset from the port's coordinates and its node's size in the input graph. This of course requires both properties to be set to sensible values.
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -9469964
1 +9470006
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9469964/KIML Layout Options
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9470006/KIML Layout Options