# ELK Layered

Property | Value
--- | ---
Identifier: | `org.eclipse.elk.layered`
Meta Data Provider: | `options.LayeredMetaDataProvider`

## Description

Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level.

## Category: Layered

The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called “hierarchies”, and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.

## Supported Graph Features

Name | Description
--- | ---
Self Loops | Edges connecting a node with itself.
Inside Self Loops | Self-loops routed through a node instead of around it.
Multi Edges | Multiple edges with the same source and target node.
Edge Labels | Labels that are associated with edges.
Ports | Edges are connected to nodes over ports.
Compound | Edges that connect nodes from different hierarchy levelsand are incident to compound nodes.
Clusters | Edges that connect nodes from different clusters, but not the cluster parent nodes.

## Supported Options

Option | Default Value
--- | ---
Activate Inside Self Loops | `false`
Add Unnecessary Bendpoints | `false`
Additional Port Space | `new ElkMargin(0)`
Additional Wrapped Edges Spacing | `10`
Alignment | `Alignment.AUTOMATIC`
Allow Non-Flow Ports To Switch Sides | `false`
Aspect Ratio | `1.6f`
BK Edge Straightening | `EdgeStraighteningStrategy.IMPROVE_STRAIGHTNESS`
BK Fixed Alignment | `FixedAlignment.NONE`
Comment Box | `false`
Comment Comment Spacing | `10`
Comment Node Spacing | `10`
Components Spacing | `20f`
Connected Components Compaction | `false`
Consider Model Order | `OrderingStrategy.NONE`
Consider Model Order for Components | `ComponentOrderingStrategy.NONE`
Consider Port Order | `false`
Content Alignment | `ContentAlignment.topLeft()`
Correction Factor for Wrapping | `1.0`
Crossing Counter Node Order Influence | `0`
Crossing Counter Port Order Influence | `0`
Crossing Minimization Strategy | `CrossingMinimizationStrategy.LAYER_SWEEP`
Cutting Strategy | `CuttingStrategy.MSD`
Cycle Breaking Strategy | `CycleBreakingStrategy.GREEDY`
Debug Mode | `false`
Direction | `Direction.UNDEFINED`
Direction Congruency | `DirectionCongruency.READING_DIRECTION`
Direction Priority | `0`
Distance Penalty When Improving Cuts | `2.0`
Edge Center Label Placement Strategy | `CenterEdgeLabelPlacementStrategy.MEDIAN_LAYER`
Edge Edge Between Layer Spacing | `10`
Edge Label Placement | `EdgeLabelPlacement.CENTER`
Edge Label Side Selection | `EdgeLabelSideSelection.SMART_DOWN`
Edge Label Spacing | `2`
Edge Node Between Layers Spacing | `10`
Edge Node Spacing | `10`
Edge Routing | `EdgeRouting.ORTHOGONAL`
Edge Spacing | `10`
Edge Thickness | `1`
Favor Straight Edges Over Balancing | `<not defined>`
Feedback Edges | `false`
Fixed Graph Size | `false`
Force Node Model Order | `false`
Generate Position and Layer IDs | `false`
Graph Wrapping Strategy | `WrappingStrategy.OFF`
Greedy Switch Activation Threshold | `40`
Greedy Switch Crossing Minimization | `GreedySwitchType.TWO_SIDED`
Greedy Switch Crossing Minimization (hierarchical) | `GreedySwitchType.OFF`
Hierarchical Sweepiness | `0.1`
Hierarchy Handling | `HierarchyHandling.INHERIT`
High Degree Node Maximum Tree Height | `5`
High Degree Node Threshold | `16`
High Degree Node Treatment | `false`
Horizontal spacing between Label and Port | `1`
Hypernode | `false`
Improve Cuts | `true`
Improve Wrapped Edges | `true`
In Layer Predecessor of | `null`
In Layer Successor of | `null`
Individual Spacing | `<not defined>`
Inline Edge Labels | `false`
Inside Self Loop | `false`
interactive Layout | `false`
Interactive Reference Point | `InteractiveReferencePoint.CENTER`
Junction Points | `new KVectorChain()`
Label Node Spacing | `5`
Label Spacing | `0`
Layer Bound | `Integer.MAX_VALUE`
Layer Choice Constraint | `null`
Layer Constraint | `LayerConstraint.NONE`
Layer ID | `-1`
Layout Partition | `<not defined>`
Layout Partitioning | `false`
Linear Segments Deflection Dampening | `0.3`
Long Edge Ordering Strategy | `LongEdgeOrderingStrategy.DUMMY_NODE_OVER`
Manually Specified Cuts | `<not defined>`
Margins | `new ElkMargin()`
Max Node Promotion Iterations | `0`
Merge Edges | `false`
Merge Hierarchy-Crossing Edges | `true`
MSD Freedom | `1`
No Layout | `false`
No Model Order | `false`
Node Flexibility | `<not defined>`
Node Flexibility Default | `NodeFlexibility.NONE`
Node Label Padding | `new ElkPadding(5)`
Node Label Placement | `NodeLabelPlacement.fixed()`
Node Layering Strategy | `LayeringStrategy.NETWORK_SIMPLEX`
Node Node Between Layers Spacing | `20`
Node Placement Strategy | `NodePlacementStrategy.BRANDES_KOEPF`
Node Promotion Strategy | `NodePromotionStrategy.NONE`
Node Self Loop Spacing | `10`
Node Size Constraints | `EnumSet.noneOf(SizeConstraint)`
Node Size Minimum | `new KVector(0, 0)`
Node Size Options | `EnumSet.of(SizeOptions.DEFAULT_MINIMUM_SIZE)`
Node Spacing | `20`
Padding | `new ElkPadding(12)`
Port Alignment | `PortAlignment.JUSTIFIED`
Port Alignment (East) | `<not defined>`
Port Alignment (North) | `<not defined>`
Port Alignment (South) | `<not defined>`
Port Alignment (West) | `<not defined>`
Port Anchor Offset | `<not defined>`
Port Border Offset | `0`
Port Constraints | `PortConstraints.UNDEFINED`
Port Index | `<not defined>`
Port Label Placement | `PortLabelPlacement.outside()`
Port Labels Next to Port | `false`
Port Side | `PortSide.UNDEFINED`
Port Sorting Strategy | `PortSortingStrategy.INPUT_ORDER`
Port Spacing | `10`
Position | `<not defined>`
Position Choice Constraint | `null`
Position ID | `-1`
Post Compaction Constraint Calculation | `ConstraintCalculationStrategy.SCANLINE`
Post Compaction Strategy | `GraphCompactionStrategy.NONE`
Priority | `0`
Randomization Seed | `1`
Self-Loop Distribution | `SelfLoopDistributionStrategy.NORTH`
Self-Loop Ordering | `SelfLoopOrderingStrategy.STACKED`
Semi-Interactive Crossing Minimization | `false`
Separate Connected Components | `true`
Shortness Priority | `0`
Sloped Edge Zone Width | `2.0`
Sloppy Spline Layer Spacing Factor | `0.2`
Spacing Base Value | `<not defined>`
Spline Routing Mode | `SplineRoutingMode.SLOPPY`
Straightness Priority | `0`
Thoroughness | `7`
Topdown Hierarchical Node Aspect Ratio | `1.414`
Topdown Hierarchical Node Width | `150`
Topdown Layout | `false`
Topdown Node Type | `TopdownNodeTypes.HIERARCHICAL_NODE`
Topdown Scale Factor | `1`
Treat Port Labels as Group | `true`
Upper Bound On Width [MinWidth Layerer] | `4`
Upper Layer Estimation Scaling Factor [MinWidth Layerer] | `2`
Valid Indices for Wrapping | `<not defined>`
Validification Strategy | `ValidifyStrategy.GREEDY`
Vertical spacing between Label and Port | `1`

- Algorithms
- Draw2D Layout
- ELK Box
- ELK DisCo
- ELK Fixed
- ELK Force
- ELK Layered
- ELK Mr. Tree
- ELK Radial
- ELK Randomizer
- ELK Rectangle Packing
- ELK SPOrE Compaction
- ELK SPOrE Overlap Removal
- ELK Stress
- ELK Top-down Packing
- Graphviz Circo
- Graphviz Dot
- Graphviz FDP
- Graphviz Neato
- Graphviz Twopi
- Libavoid
- Layout Options
- Activate Inside Self Loops
- Adapt Port Positions
- Add Unnecessary Bendpoints
- Additional Port Space
- Additional Wedge Space
- Additional Wrapped Edges Spacing
- Alignment
- Allow Non-Flow Ports To Switch Sides
- Angle Penalty
- Animate
- Animation Time Factor
- Annulus Wedge Criteria
- Aspect Ratio
- Bend Points
- BK Edge Straightening
- BK Fixed Alignment
- Box Layout Mode
- Center On Root
- Child Area Height
- Child Area Width
- Cluster Crossing Penalty
- Comment Box
- Comment Comment Spacing
- Comment Node Spacing
- Compaction
- Compaction iterations
- Compaction Step Size
- Compaction Strategy
- Compaction Strategy
- Components Spacing
- Concentrate Edges
- Connected Components Compaction
- Connected Components Compaction Strategy
- Connected Components Layout Algorithm
- Consider Model Order
- Consider Model Order for Components
- Consider Port Order
- Content Alignment
- Correction Factor for Wrapping
- Cost Function for Spanning Tree
- Crossing Counter Node Order Influence
- Crossing Counter Port Order Influence
- Crossing Minimization Strategy
- Crossing Penalty
- Current position of a node in the order of nodes
- Cutting Strategy
- Cycle Breaking Strategy
- DCGraph
- Debug Mode
- Desired Edge Length
- Desired index of node
- Direction
- Direction Congruency
- Direction Priority
- Distance Model
- Distance Penalty When Improving Cuts
- Eades Repulsion
- Edge Center Label Placement Strategy
- Edge Edge Between Layer Spacing
- Edge End Texture Length
- Edge Label Placement
- Edge Label Side Selection
- Edge Label Spacing
- Edge Node Between Layers Spacing
- Edge Node Spacing
- Edge Routing
- Edge Routing Mode
- Edge Spacing
- Edge Thickness
- Edge Type
- Enable Hyperedges From Common Source
- Epsilon
- Expand Nodes
- Favor Straight Edges Over Balancing
- Feedback Edges
- Fill Polyominoes
- Fixed Graph Size
- Fixed Position
- Fixed Shared Path Penalty
- Font Name
- Font Size
- Force Model
- Force Node Model Order
- FR Temperature
- Generate Position and Layer IDs
- Graph Wrapping Strategy
- Greedy Switch Activation Threshold
- Greedy Switch Crossing Minimization
- Greedy Switch Crossing Minimization (hierarchical)
- Hierarchical Sweepiness
- Hierarchy Handling
- Hierarchy Handling (Graphviz Dot)
- High Degree Node Maximum Tree Height
- High Degree Node Threshold
- High Degree Node Treatment
- Horizontal spacing between Label and Port
- Hypernode
- Ideal Nudging Distance
- Improve Cuts
- Improve Hyperedge Routes
- Improve Hyperedge Routes Add/Delete
- Improve Wrapped Edges
- In Layer Predecessor of
- In Layer Successor of
- In new Row
- Individual Spacing
- Individual Spacing (ELK Layered)
- Inline Edge Labels
- Inside Self Loop
- Interactive
- interactive Layout
- Interactive Reference Point
- Iteration Limit
- Iterations
- Iterations Factor
- Junction Points
- Label Angle
- Label Distance
- Label Manager
- Label Manager
- Label Node Spacing
- Label Spacing
- Layer Bound
- Layer Choice Constraint
- Layer Constraint
- Layer ID
- Layer Spacing Factor
- Layout Algorithm
- Layout Ancestors
- Layout Dimension
- Layout Partition
- Layout Partitioning
- Linear Segments Deflection Dampening
- List of Polyominoes
- Long Edge Ordering Strategy
- Manually Specified Cuts
- Margins
- Marks a node as a cluster
- Max Node Promotion Iterations
- Max. Iterations
- Maximal Animation Time
- Merge Edges
- Merge Hierarchy-Crossing Edges
- Minimal Animation Time
- MSD Freedom
- No Layout
- No Model Order
- Node arrangement strategy
- Node Flexibility
- Node Flexibility Default
- Node Label Padding
- Node Label Placement
- Node Layering Strategy
- Node Node Between Layers Spacing
- Node Placement Strategy
- Node Promotion Strategy
- Node Self Loop Spacing
- Node Size Constraints
- Node Size Minimum
- Node Size Options
- Node Spacing
- Nudge Orthogonal Segments
- Nudge Orthogonal Touching Colinear Segments
- Nudge Shared Paths With Common Endpoint
- Omit Node Micro Layout
- Optimization Goal
- Order ID
- Orthogonal Compaction
- Outgoing Edge Angles
- Overlap Removal
- Padding
- Penalise Orthogonal Shared Paths
- Perform Unifying Nudging Preprocessing
- Polyomino Primary Sorting Criterion
- Polyomino Secondary Sorting Criterion
- Polyomino Traversal Strategy
- Port Alignment
- Port Alignment (East)
- Port Alignment (North)
- Port Alignment (South)
- Port Alignment (West)
- Port Anchor Offset
- Port Border Offset
- Port Constraints
- Port Direction Penalty
- Port Index
- Port Label Placement
- Port Labels Next to Port
- Port Side
- Port Sorting Strategy
- Port Spacing
- Position
- Position Choice Constraint
- Position Constraint
- Position Constraint
- Position ID
- Post Compaction Constraint Calculation
- Post Compaction Strategy
- Priority
- Priority (ELK Box)
- Priority (ELK Force)
- Priority (ELK Layered)
- Priority (ELK Mr. Tree)
- Progress Bar
- Radius
- Randomization Seed
- Repulsive Power
- Resolved Layout Algorithm
- Reverse Direction Penalty
- Root node for spanning tree construction
- Root selection for spanning tree
- Rotate
- Row Height Reevaluation
- Scale Factor
- Search Order
- Segment Penalty
- Self-Loop Distribution
- Self-Loop Ordering
- Semi-Interactive Crossing Minimization
- Separate Connected Components
- Shape Buffer Distance
- Shift Last Placed.
- Shortness Priority
- Shortness Priority (ELK Layered)
- Sloped Edge Zone Width
- Sloppy Spline Layer Spacing Factor
- Sorter
- Spacing Base Value
- Spline Routing Mode
- Straightness Priority
- Stress Epsilon
- Structure Extraction Strategy
- Target Angle
- Target Width
- Thoroughness
- Topdown Hierarchical Node Aspect Ratio
- Topdown Hierarchical Node Width
- Topdown Layout
- Topdown Node Type
- Topdown Scale Cap
- Topdown Scale Factor
- Topdown Size Approximator
- Translation Optimization
- Treat Port Labels as Group
- Tree Construction Strategy
- Tree Level
- Try box layout first
- Underlying Layout Algorithm
- Upper Bound On Width [MinWidth Layerer]
- Upper Layer Estimation Scaling Factor [MinWidth Layerer]
- Upper limit for iterations of overlap removal
- Valid Indices for Wrapping
- Validate Graph
- Validate Options
- Validification Strategy
- Vertical spacing between Label and Port
- Weighting of Nodes
- Whether to run a supplementary scanline overlap check.
- White Space Approximation Strategy
- Whitespace elimination strategy
- Width Approximation Strategy
- Zoom to Fit
- Layout Option Groups
- box
- compaction
- compaction
- compaction.postCompaction
- componentCompaction
- considerModelOrder
- crossingMinimization
- crossingMinimization.greedySwitch
- crossingMinimization.greedySwitchHierarchical
- cycleBreaking
- debug
- edge
- edgeLabels
- edgeLabels
- edgeRouting
- edgeRouting.polyline
- edgeRouting.splines
- edgeRouting.splines.sloppy
- font
- highDegreeNodes
- insideSelfLoops
- layering
- layering.coffmanGraham
- layering.minWidth
- layering.nodePromotion
- nodeArrangement
- nodeLabels
- nodePlacement
- nodePlacement.bk
- nodePlacement.linearSegments
- nodePlacement.networkSimplex
- nodePlacement.networkSimplex.nodeFlexibility
- nodeSize
- overlapRemoval
- packing
- packing.compaction
- partitioning
- polyomino
- port
- portAlignment
- portLabels
- priority
- processingOrder
- rotation
- spacing
- spacing
- structure
- topdown
- whiteSpaceElimination
- whitespaceElimination
- widthApproximation
- wrapping
- wrapping.cutting
- wrapping.cutting.msd
- wrapping.multiEdge
- wrapping.singleEdge
- wrapping.validify