Force Directed is a schematic layout algorithm that applies to any type of diagram.
This layout algorithm uses a physical analogy to draw graphs by identifying a force system in which it tries to locally minimize the energy. It searches for an equilibrium state of the force system—a position for each diagram junction where the total force on each junction is zero.
Because this algorithm has a tendency to emphasize loops contained in a network diagram, it is often used by operators who manage highly meshed networks, such as water, wastewater, or gas.
The images below show a sample diagram before and after applying the Force Directed layout:
Apply the Force Directed layout on an active diagram map view
When applying this layout on a network diagram, the following prerequisites must be met:
- Since this operation is transactional, edits must be saved before it is run.
- The input network diagram layer to which the layout applies must be from either a utility network or trace network in a file geodatabase or a network diagram service. When working with a utility network in an enterprise geodatabase, the input network diagram layer must be from a service.
To apply the Force Directed layout on an active diagram map view, do one of the following choices:
- On the Network Diagram tab, click the drop-down arrow on the Diagram Layouts button in the Layout group, and click the Force Directed layout item in the gallery.
- Load the Apply Force Directed Layout tool in the Geoprocessing pane.
Then, adjust the Force Directed layout parameters and click Run.
Note:
To apply the layout on a subset of features in the network diagram, use one of the Select Features tools (for example, Select By Rectangle, Select By Polygon, and so on) and select the diagram features before running.
Configure the Force Directed layout on a diagram template
To configure this layout on your diagram template, use the Add Force Directed Layout tool.
Force Directed layout parameters
The sections below clarify the main Force Directed diagram layout parameters.
Preserve container layout
Most of the layout algorithms work with the Preserve container layout option. This option allows controlling the algorithm execution so it executes either on the top graph of the diagram—Preserve container layout checked, or on both content and noncontent features in the diagram—Preserve container layout unchecked.
Number of Iterations
The number of iterations to process.
The images below show the difference in the resulting diagrams when increasing the number of iterations with the same repel factor and degree of freedom:
Repel Factor
This parameter is used to add distance between diagram junctions that are close together. The larger the repel factor, the greater the distance that will be added between nearly overlapping diagram junctions.
Degree of Freedom
This parameter is used to control the area used to move the diagram junctions during each algorithm iteration. It is a number between 0 and 100. The lower the degree of freedom is, the larger this area is.
The images below show the impact of different degrees of freedom when applying the layout to a sample diagram:
Edge Display Type and Break Point Relative Position
The Edge Display Type parameter specifies whether the algorithm will curve the diagram edges: Curved edges or Regular edges:
The Break Point Relative Position is ignored when Edge Display Type is set to Regular edges.
When Edge Display Type is set to Curved edges, the Break Point Relative Position is used to compute the relative position of the two inflection points that will be inserted along the diagram edges to compute the curved edges geometry. It is a percentage between 15 and 40. With a Break Point Relative Position (%) value of N between 15 and 40:
- X being the x-coordinate of the edge's from junction and Y being the y-coordinate of the edge's to junction for a horizontal tree:
- The first inflection point will be positioned at N% of the length of the [XY] segment.
- The second inflection point will be positioned at (100 - N)% of the length of the [XY] segment.
- Y being the y-coordinate of the edge's from junction and X being the x-coordinate of the edge's to junction for a vertical tree:
- The first inflection point will be positioned at N% of the length of the [YX] segment.
- The second inflection point will be positioned at (100 - N)% of the length of the [XY] segment.