MindFusion.Wpf Pack Programmer's Guide
AnnealLayout Class
Remarks See Also
 





Implements a simulated annealing graph layout algorithm.

Namespace: MindFusion.Diagramming.Wpf.Layout
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public class AnnealLayout : Layout

Visual Basic  Copy Code

Public Class AnnealLayout
    Inherits Layout

 Remarks

Simulated Annealing is a general-purpose optimization method used to solve large-scale combinatorial problems by simulating the process of heating and cooling of metal to achieve freedom from defects. Finding a nice arrangement of a graph is a combinatorial problem that can be reduced to assigning costs to graph configurations and finding the minimum cost configuration. In that case, a cost is assigned to a graph configuration by evaluating different aesthetic criteria such as distance between nodes, length of links and the number of link crossings.

The AnnealLayout class implements a Simulated Annealing graph layout algorithm that can be used to arrange Diagramming for WPF diagrams. To arrange a diagram, create an AnnealLayout instance, set its properties and call the Arrange method.

The algorithm starts the simulation with the temperature set in InitialTemperature, and runs several cooling Stages. At each stage the algorithm evaluates several graph configurations for each node, as set in IterationsPerStage. At the end of each stage, the algorithm selects the configuration that has a minimum cost and decreases the temperature by multiplying it by TemperatureScale. The relative weight of an aesthetic criterion relative to the other criteria is set by the DistributionFactor, LinkLengthFactor, BoundaryFactor and CrossingLinksCost properties.

 Inheritance Hierarchy

System.Object
    System.MarshalByRefObject
        System.ComponentModel.Component
            MindFusion.Diagramming.Wpf.Layout.Layout
                MindFusion.Diagramming.Wpf.Layout.AnnealLayout

 See Also

AnnealLayout Members
MindFusion.Diagramming.Wpf.Layout Namespace