Hierarchic Swimlane Layout

Hierarchic swimlane layout is a specialized variant of incremental hierarchic layout in which it is possible for a user to define placement constraints for nodes.

In yEd, these constraints can be created using dedicated group node types, which are available in the palette section Swimlane Nodes and Table Nodes. These group nodes display columns, rows, or both. When calculating a swimlane layout, these columns and rows will keep their relative positions and the group’s content nodes will stay in their respective column and/or row albeit the nodes within a given column or row may be rearranged as the algorithm deems appropriate.

Important Notice

Only top level swimlane and table nodes will be used to create placement constraints. Creating a swimlane or table node as the child node of another group node (or another swimlane or table node) will result in that node to be treated as a normal group node, i.e. the node’s columns and/or rows are ignored in this case and will not induce further placement constraints.

Swimlane and table node are placed in special way by the swimlane layout algorithm. For top to bottom and bottom to top oriented layouts (see ‘Orientation’ below), swimlane and table nodes are placed in a horizontal line from left to right with all swimlane or table nodes having the same height. Nodes that do not belong to a swimlane or table node are placed below the leftmost swimlane or table node. For left to right or right to left oriented layouts (again see ‘Orientation’ below), swimlane and table nodes are placed in a vertical line from top to bottom with all swimlane or table nodes having the same width. Nodes that do not belong to a swimlane or table node are placed to the right of the topmost swimlane or table node.

General Tab

Selected Elements Incrementally

If enabled, the selected nodes or edges will be automatically integrated into the current layout. The existing layout will only be slightly adjusted.

Use Drawing As Sketch

If enabled, the current drawing will be interpreted as a sketch of the resulting hierarchical layout. Note that the ‘From Sketch’ settings located in the ‘Layers’ tab can be used to fine-tune sketch parsing.

Orientation

Determines the main layout orientation. The algorithm tries to arrange nodes in such a way that all edges point in the main layout direction.

Top to Bottom
The main layout orientation will be from top to bottom.
Bottom to Top
The main layout orientation will be from bottom to top.
Left to Right
The main layout orientation will be from left to right.
Right to Left
The main layout orientation will be from right to left.

Layout Components Separately

This option cannot be used for swimlane layout.

Symmetric Placement

Determines whether possible symmetries in the placement should be detected and obeyed. This option increases computation time.

Node to Node Distance

Determines the minimal distance between adjacent nodes that reside in the same layer.

Node to Edge Distance

Determines the distance between horizontal edge segments and nodes.

Edge to Edge Distance

Determines the distance between adjacent pairs of horizontal edge segments.

Layer to Layer Distance

Determines the minimal distance between nodes that reside in adjacent layers.

Edges Tab

Routing Style

Orthogonal
Edge paths will be routed in an orthogonal style, i.e. only vertical and horizontal line segments will be used. Orthogonal edge routing increases the height of the layout.
Polyline
Edge paths will be routed as a polyline with a certain number of bends.
Octilinear
Edge paths will be routed in an octilinear style, i.e. the routes consist of line segments whose slope is a multiple of 45 degrees.

Backloop Routing

If enabled, all edges that do not point in the main layout direction will be routed as backloops.

Automatic Edge Grouping

If enabled, the layout algorithm will group edges at either source or target node to create bus-style edge path routings that will result in a more space-efficient layout. Edges are grouped in such a way that no ambiguous paths are created.

Minimum First Segment Length

Determines the minimal length of the first edge segment.

Minimum Last Segment Length

Determines the minimal length of the last edge segment.

Minimum Length

Determines the minimal length of an edge.

Minimum Edge Distance

Determines the distance between adjacent pairs of horizontal edge segments.

Minimum Slope

Determines the minimal slope of the first and last edge segments with polyline edges. This feature is only available for the polyline routing style

Port Constraint Optimization

If enabled, edges will be allowed to connect to all sides of a node if the number of edge crossings can be reduced this way.

Layers Tab

The algorithm puts each node in a horizontal layer together with other nodes. The number of the layer where a node resides is also called node rank.

Layer Assignment Policy

Hierarchical – Optimal
The layer distance of an edge is the absolute difference between the ranks of its source and target node. Layer assignment will be done in such a way that the overall sum of the layer distances of all edges in the layout is minimal.
Hierarchical – Tight Tree Heuristic
A fast heuristic that also tries to minimize the overall sum of layer distances of all edges.
BFS Layering
Ranking based on a breadth first search. All edges will span at most one layer in the resulting drawing. Edges between nodes that belong to the same layer are possible. Places all selected nodes in the first layer. If no nodes are selected then nodes that have no incoming edges are placed in the first layer.
From Sketch
Policy that uses the initial y-coordinates of the nodes to determine a node layering. It tries to find a layering that is similar to the one in the input graph. When this ranking policy is used, the layouter may place nodes that are connected by an edge in the same layer.
Hierarchical – Topmost
All nodes with indegree zero will be assigned the topmost layer of the layout.

Alignment within Layer

Determines the alignment of nodes within one layer.

Top Border of Nodes
The top border of nodes will be aligned.
Center of Nodes
The geometric center of nodes will be aligned.
Bottom Border of Nodes
The bottom border of nodes will be aligned.

From Sketch Settings

These settings influence the strategy used to assign nodes to certain layers when the options ‘Use Drawing As Sketch’, ‘Selected Elements Incrementally’ or ‘Rank Assignment – From Sketch’ are set. The standard strategy assigns two nodes to the same layer if there exists a horizontal line that crosses through both of their bounding boxes.

Scale

Artificially scales the nodes by the given factor before the rank assignment is performed. The bigger the value the greater the likelihood that nodes will be assigned to the same layer.

Halo

Artificially enlarges the nodes by the given value before the rank assignment is performed. The bigger the value the greater the likelihood that nodes will be assigned to the same layer.

Minimum Size

Nodes smaller than the given value will be enlarged to match the given size before the rank assignment is performed. The bigger the value the greater the likelihood that nodes will be assigned to the same layer.

Maximum Size

Nodes larger than the given value will be shrunk to match the given size before the rank assignment is performed. The smaller the value the greater the likelihood that nodes will be assigned to different layers.

Labeling Tab

Options in this tab determine the labeling strategy used by this layouter.

Consider Node Labels

Determines whether node labels should be considered in the layout process.

Edge Labeling

None
Automatic edge labeling is deactivated.
Generic
Edge labels will be automatically placed after the hierarchic layouter has placed the nodes and edges. Edge labels may overlap with other elements if there is not enough space to place the labels properly. The resulting graph layout remains compact.
Hierarchic
Edge labels will be considered in the hierarchic layout process. Nodes and edges will be arranged in such a way that there is enough space for the edge labels not to overlap.

Edge Label Model

Determines which positions will be available for the edge labels.

Best
The default. Chooses the model that fits the specified edge labeling strategy best.
As Is
Uses the individual label models that are currently set on the input graph. Individual models for edge labels can be changed in the edge or edge label property dialog.
Center Slider
Allows labels to be placed somewhere on the corresponding edge path. This option is a good choice for Generic and Hierarchic edge labeling.
Side Slider
Allows labels to be placed along both sides of the edge path. This option is a good choice for Generic edge labeling.
Free
Allows labels to be placed anywhere. This model is a very good choice for Hierarchic edge labeling.
It is not compatible with Generic edge labeling and should therefore not be used in that combination.

Grouping Tab

This tab can be used to configure the behavior of the layout algorithm if used on nested/grouped graphs.

Layering Strategy

Determines the basic policy for the layout process.

Ignore Groups
Group nodes will be ignored for calculating the layers.
Layout Groups
Calculation of layers takes group nodes into account.

Compact Layers

Determines whether the number of layers shall be small.

Vertical Alignment

Determines the layer for nodes that are adjacent to group nodes whose contents span multiple layers. If the nodes can be placed into more than one of these layers, then ‘vertical alignment’ determines their actual layer.

Top
Nodes will be placed into the same layer as the topmost nodes inside the group node.
Center
Nodes will be placed into one of the layers of the middle nodes inside the group node.
Bottom
Nodes will be placed into the same layer as the bottommost nodes inside the group node.

Horizontal Group Compaction

Determines the level of group node compactness.

Weak
Groups will be compacted only lightly.
Strong
Groups will be compacted to the maximum extent.

Swimlanes Tab

Treat groups as swimlanes

This option cannot be used for swimlane layout.

Use sketch for lane order

This option cannot be used for swimlane layout.

Lane spacing

This option cannot be used for swimlane layout.

Minimum insets

This option specifies the minimum distance of nodes to the border of their swimlane or table cell.

Compact Swimlanes

This option determines whether swimlanes and table cells may be shrunk (if possible) in the layout process.