C

EdgeRouterBusDescriptor

A EdgeRouterBusDescriptor defines settings for edges routed on a common bus by EdgeRouter.
Inheritance Hierarchy

Remarks

Edges mapped to the same EdgeRouterBusDescriptor instance form a bus. The mapping is retrieved from buses. A bus consists of a set of backbone segments shared by multiple edges to which shorter segments that connect to the actual nodes are attached. This descriptor allows to specify settings about the bus, for example, the location of the bus may be user-specified - see busPoints.

With buses, the routing algorithm tries to produce routes where the edges share as much of their paths as possible. It yields long line segments (so-called backbone segments) where ideally all but the first and last segments of all edge paths are drawn on top of each other (forming the bus), with short connections branching off to the nodes (bus connections).

Edges that are fixed (i.e. are not marked for routing) may also belong to a bus. Then, the bus segments will be derived using the existing path of the fixed edges. This way, buses can be incrementally updated, e.g., when a new edge should be added to an existing bus structure. Carefully note that fixed edges must have a correct orthogonal path for this feature to work properly.

Routing result containing three different bus structures

Routing result with a user-specified bus assigned to all edges (single vertical segment on the left-hand side)

Default Values of Properties

NameDefaultDescription
automaticEdgeGroupingtrue
Edges ending at the same node are automatically grouped.
busPointsnull
The algorithm automatically detects a suitable bus.
minimumBackboneSegmentLength100.0
multipleBackboneSegmentstrue
The algorithm may create buses that consist of multiple backbone segments.

See Also

Developer's Guide

API

buses

Members

No filters for this type

Constructors

Parameters

Properties

Gets or sets whether or not bus edges ending at the same node are automatically grouped such that they share a common bus connection.
This setting affects the bus connections of edges that belong to the same bus and end/start at the same node. Manually defined edge groups are considered, too. See sourceGroupIds and targetGroupIds. There are generally three scenarios:
  1. All edges share the same bus connections. Simply enable this property and define no other edge groupings.
  2. Each edge is routed individually between the bus and the end node. Disable this property and define no other edge groupings.
  3. A mixture of the first two scenarios. Define the desired edge groupings and they will be considered. For edges that have no grouping information, the value of this property is considered. This way multiple edges may share a bus connections while others use their individual routes.
Manual edge grouping definitions are always stronger than this setting.
final

Property Value

true if bus edges ending at the same node are automatically grouped, false otherwise

Default Value

The default value is: true
Edges ending at the same node are automatically grouped.

Sample Graphs

ShownSetting: true - edges to the same node use the same bus connection

See Also

API
sourceGroupIds, targetGroupIds
Gets or sets the user-specified bus path that represents the backbone for edges associated with this bus.
If the user does not specify the bus path, the algorithm automatically detects a suitable bus path. Similar to an edge path, a bus path is specified by an array of Points.
The user-specified path has to be orthogonal.
final

Property Value

the user-specified bus path or null if the path is determined automatically

Default Value

The default value is: null
The algorithm automatically detects a suitable bus.
Gets the point path that describes the bus computed by the EdgeRouter.
The computed path of a bus is always orthogonal and connected. The bus path represents the backbone of the edges associated with the bus and the edges use parts of the bus path in their own path.
Querying the computed bus points can be useful if the bus backbone should be explicitly visualized.
If the bus path was user-specified, the returned point path is equal to that returned by method busPoints.
readonlyfinal

Property Value

the point path that describes the computed bus

See Also

API
busPoints
Gets or sets the preferred minimum length of backbone segments.

This number defines the minimum length of backbone segments which are computed during the selection of backbone segments. Final backbone segments might actually be shorter because not the full segment is used by bus connections; such dead-ends are not drawn.

The minimum length is defined to be a value greater than or equal to 1.0.

The minimum length should be at least as large as the typical distance between nodes to avoid small backbone segments. It is reasonable to set this according to the dimension of the bounds of the whole graph.
final

Property Value

the preferred minimum length of a backbone segment

Throws

Exception ({ name: 'ArgumentError' })
if the given minimum length is smaller than 1.0

Default Value

The default value is: 100.0

Sample Graphs

ShownSetting: 100.0 - a backbone segment fits in the middle
Gets or sets whether or not the algorithm may create buses that consist of multiple backbone segments.
For edges routed on a bus, a preferred outcome is that the part of the edge that is not on the bus is short and has few bends. Of course, for buses that may consist of multiple backbone segments (instead of just a single backbone) this is usually easier to achieve. Hence, if this option is enabled, the algorithm automatically may decide to use multiple backbone segments in order to produce more suitable results.
This option is only considered if the user does not specify a custom bus path.
final

Property Value

true if the algorithm may create buses that consist of multiple backbone segments, false otherwise

Default Value

The default value is: true
The algorithm may create buses that consist of multiple backbone segments.

Sample Graphs

ShownSetting: true - the bus consist of multiple backbone segments

See Also

Developer's Guide
API
busPoints, minimumBackboneSegmentLength