Loading...
 

AutoLayout Plug-In

Image
The AutoLayout Plug-In equips Omix with the capability to automatically arrange networks in the diagram. It is a utility that complements the built-in semi-automatic drawing features of Omix (see User Manual).

Using the Plug-In

The AutoLayout Plug-In can be installed in the Plug-In Manager (see Extras menu). After installation the functionality of the plug-in is available as "Automatic Layout..." entry in the layout menu and as button on the toolbar. Furthermore, the context menu of each node symbol provides access to the automatic layout features (pop-up menu entry "Run automatic layout from here..."). 

AutoLayout access button on the toolbar
AutoLayout access button on the toolbar

AutoLayout entry in the 'Edit' menu
AutoLayout entry in the 'Edit' menu

AutoLayout entry in the context menu of network nodes
AutoLayout entry in the context menu of network nodes

1.1.1. Target Items

Basically, automatic layout can be applied on the entire network or on a subset of items only. Here, different options are provided.

1.1.1.1. Unpositioned Items

After importing networks from file or database without positioning information, all network components are not placed in the diagram but only listed in the component view. These components are highlighted in red and can be successively placed manually. Additionally, the AutoLayout Plug-In can be used to find an automatic layout for the unpositioned items.

If the network contains unpositioned items, you have three different options to handle these items:

  1. perform the layout only on positioned items - meaning that the layout is only applied on the items already placed in the diagram.
  2. perform the layout only on unpositioned items - meaning that a layout is computed only for the unpositioned items. Here, the already positioned items have fixed positions which is considered by the layout algorithms.
  3. perform the layout only on both, positioned and unpositioned items - meaning that a new layout is computed for all network components.

1.1.1.2. Selected Items

If multiple items have been selected the AutoLayout Plug-In offers to consider the selection when computing automatic layout:

  1. perform the layout only on selected items - meaning that the layout is only applied on the currently selected items. The positions of all other items are considered to be fixed.
  2. perform the layout only on unselected items - meaning that a layout is computed for all items except the selected items. The positions of all other items are considered to be fixed.
  3. perform the layout only on both, selected and unselected items - meaning that a new layout is computed for all network components.

1.1.1.3. Neighborhood

The pop-up menu of each diagram node contains the entry "Run automatic layout from here...". You can start a layout that includes the selected node and all successor nodes up to a certain connection depth. Here, the positions of the selected node as well as all other nodes that are not connected within the given depth are considered to be fixed.

This feature allows you to successively apply automatic layout on a network. In each step, only a subset of the entire network within a certain range is automatically positioned. In between, the automatic arrangement can be cured manually.

1.2. Layout Methods

The AutoLayout Plug-In provides different algorithms that are useful in different fields of application:

1.2.1. Force-Directed Layout

Force-Directed Layout places the network items based on a physics simulation of interacting forces. By default, nodes repel each other, edges act as springs, and drag forces (similar to air resistance) are applied. This algorithm can be executed as continual animation or run once (by checked/unchecked box "run animation"). When running once, the "Number of Iterations" can be configured.

The running time of Force-Directed Layout is the greater of O(N log N) and O(E), where N is the number of nodes and E the number of edges.

Using force-directed layout
Using force-directed layout


1.2.1.1. Force Parameters

The Force-Directed Layout provides different force parameters that can be configured in order to take influence on the force simulation:
  • N-Body Force - A layout function is used which computes an n-body force (such as gravity or anti-gravity). The N-Body parameters describe how the network nodes attract or repel each other:
    • Gravitational Constant - Nodes will attract each other if this value is positive, and will repel each other if it is negative.
    • Distance - the distance within which two particles will interact. If -1, the value is treated as infinite.
    • Barnes-Hut Theta - this parameter governs the accuracy of the force calculation.
  • Viscosity/Drag Force - the Drag Coefficient helps to stabilize the items.
  • Spring Force - Between all nodes spring forces act against the gravitational forces of the nodes.
    • Spring Coefficient - This will be used if the spring's own co-efficient is less than zero.
    • Default Spring Length - This will be used if the spring's own length is less than zero.

All of these force parameters can be changed during the force simulation in animated mode. You will observe the most significant effect on the dynamics when you change the gravitational constant as well as the spring length.

Beside force parameters that take effect on the dynamics of the force simulation at runtime you can decide to enforce the layout to be computed within limited bounds. Furthermore, you can specify which integrator algorithm shall be used for force simulation, Euler or Runge-Kutta.

1.2.2. Fruchterman-Reingold Layout

The Fruchterman-Reingold Layout is another method for force-directed placement of graph nodes. The computational complexity of this algorithm is quadratic O(n2) in the number of nodes, so should only be applied for relatively small networks. The algorithm requires diagram bounds which can be specified as width/height parameter. Otherwise, the current diagram bounds are used. The "Maximum Number or Iterations" specifies in how much steps the layout is computed.

Using Fruchterman-Reingold layout
Using Fruchterman-Reingold layout

1.2.3. Radial Tree Layout

The Radial Tree Layout computes a radial layout, laying out subsequent depth levels of a tree on circles of progressively increasing radius. You can optionally specify a root node of the tree layout; otherwise the root node is selected algorythmically. Furthermore, you can specify the starting angle and angular width of the radial tree as well as the total radius meaning the distance between the root node and the successor nodes most far away.

Using radial tree layout
Using radial tree layout

The Node Link Tree Layout lays out a rooted tree such that each depth level of the tree is on a shared line. The orientation of the tree can be set such that the tree goes left-to-right, right-to-left, top-to-bottom, or bottom-to-top. You can optionally specify a root node of the tree layout; otherwise the root node is selected algorythmically.
The dimenstions of the layout can be specified with respect to:
  • Breath Spacing - spacing between neighbor nodes.
  • Subtree Spacing - spacing between neighboring subtrees.
  • Depth Spacing - spacing between depth levels.
  • Root Node Offset - the offset value for placing the root node of the tree. The dimension in which this offset is applied is dependent upon the orientation of the tree. For example, in a left-to-right orientation, the offset will a horizontal offset from the left edge of the layout bounds.

Using node link tree layout
Using node link tree layout

1.2.5. Ballon-Tree Layout

The Ballon-Tree Layout computes a circular "balloon-tree" layout of a tree. This layout places children nodes radially around their parents.

1.2.6. Circle Layout

The Circle Layout positions items along a circle of given radius. Items are sorted in the order in which they iterated over.

Using circle layout
Using circle layout

1.2.7. Random Layout

The Random Layout performs a random positioning of items within the layout bounds.

Using random layout
Using random layout