22
Force-Directed Force-Directed Placement Heuristics Placement Heuristics A Comparative Study A Comparative Study

Force-Directed Placement Heuristics A Comparative Study

Embed Size (px)

Citation preview

Page 1: Force-Directed Placement Heuristics A Comparative Study

Force-Directed Placement Force-Directed Placement HeuristicsHeuristics

A Comparative StudyA Comparative Study

Page 2: Force-Directed Placement Heuristics A Comparative Study

ConceptsConcepts

An attempt is made to place cells in their An attempt is made to place cells in their ideal locations by using a mechanical ideal locations by using a mechanical analogy.analogy.Two cells separated by a distance Two cells separated by a distance DD and and connected by a net of lengthconnected by a net of length L L are said to are said to have a force have a force DD x x LL acting upon them. acting upon them.The averaged sum of all such forces on a The averaged sum of all such forces on a single cell yields the single cell yields the zero-force target zero-force target locationlocation of the cell. of the cell.

Page 3: Force-Directed Placement Heuristics A Comparative Study

ConceptsConcepts

The net weights are The net weights are treated like spring treated like spring constants, and the net constants, and the net lengths are treated like lengths are treated like spring lengths in this spring lengths in this analogy to Hooke’s analogy to Hooke’s Law.Law.

Page 4: Force-Directed Placement Heuristics A Comparative Study

HeuristicsHeuristics

Once a cell’s zero-force target location is Once a cell’s zero-force target location is calculated, we must decide where it will be calculated, we must decide where it will be placed in the layout.placed in the layout.

If the target location is empty, simply place If the target location is empty, simply place it in the empty location.it in the empty location.

If the target location is already occupied, If the target location is already occupied, we must determine how to proceed.we must determine how to proceed.

Page 5: Force-Directed Placement Heuristics A Comparative Study

HeuristicsHeuristics

1.1. The selected cell is moved to the free location The selected cell is moved to the free location nearest to its zero-force target location.nearest to its zero-force target location.

2.2. The selected cell is swapped with the cell at its The selected cell is swapped with the cell at its zero-force location if the swap will reduce the zero-force location if the swap will reduce the solution cost.solution cost.

3.3. The selected cell replaces the cell at its zero-The selected cell replaces the cell at its zero-force location and the replaced cell has its force location and the replaced cell has its zero-force location computed. The replaced zero-force location computed. The replaced cell is then placed in a similar fashion, inciting a cell is then placed in a similar fashion, inciting a "ripple" of replacements until an end condition "ripple" of replacements until an end condition is met.is met.

Page 6: Force-Directed Placement Heuristics A Comparative Study

General AlgorithmGeneral Algorithm

fdpl( iterations, cells, nets, width, type )fdpl( iterations, cells, nets, width, type )Initialize the layout according to the layout typeInitialize the layout according to the layout typeand layout width.and layout width.Sort the cells in decreasing order by total weight Sort the cells in decreasing order by total weight of connected nets. i = 0of connected nets. i = 0while (i < iterations) {while (i < iterations) {

for each net apply force-directed heuristicfor each net apply force-directed heuristici = i + 1i = i + 1

}}

Page 7: Force-Directed Placement Heuristics A Comparative Study

Initial Layout TypesInitial Layout Types

Three types of initial layouts are explored for Three types of initial layouts are explored for each heuristic:each heuristic:

1.1. Solid LayoutSolid Layout

2.2. Donut LayoutDonut Layout

3.3. Random LayoutRandom Layout

Page 8: Force-Directed Placement Heuristics A Comparative Study

Solid LayoutSolid Layoutxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx--------------------------------

Page 9: Force-Directed Placement Heuristics A Comparative Study

Donut LayoutDonut Layoutxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxx-------xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx---------------x---------------

Page 10: Force-Directed Placement Heuristics A Comparative Study

Random LayoutRandom Layoutxxx-xxxxxx-xxxxxxxx-xxxxxx-xxxxxxxxxx--xxxx--xxxxxxxx--xxxx--xxxxxx-xxxx--xxxxx-xxx-xxxx--xxxxx-xxxxxxxxxxxx-xxxxxxxxxxxxxxx-xxxx-xxxxx-xxxx--xxx-xxxxx-xxxx--xxxxxxxxxxx-xxxxxxxxxxxxxxx-xxxxxx-xxxx-xx-xx-xxxx-xxxx-xx-xx-xxxxxxxxxxx-xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx-x-xxxxxxxxxxxxx-x-xxxxxx--xxxxx-x-x-xxxx--xxxxx-x-x-xxx-xxxxxxx-xxxxxxx-xxxxxxx-xxxxxxxxxxxxxxx-x-xxxxxxxxxxxxx-x-xxxxxxx-x------xx-x-xxx-x------xx-x-xx-x-x-x-xxxxxx--x-x-x-x-xxxxxx--x-x-xxxxxx-xxxxxx-x-xxxxxx-xxxxxxxxxxx-xx--xxxxxxxxxxx-xx--xxxxxxxxxxxx-xxxxxxxxxxxxxxx-xxxxxxxxxxx----xxx-xxx-xxxx----xxx-xxx-xxxxx-xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx-xx-xxxxxx-xxxxx-xx-xxxxxx-

Page 11: Force-Directed Placement Heuristics A Comparative Study

Nearest Location SelectionNearest Location Selection

If we can’t place the cell at the zero-force If we can’t place the cell at the zero-force location, how do we find the nearest location, how do we find the nearest location?location?

Page 12: Force-Directed Placement Heuristics A Comparative Study

Search Distance is 1

0

Page 13: Force-Directed Placement Heuristics A Comparative Study

Manhattan Distance is 4

Search Distance is 1

1

Page 14: Force-Directed Placement Heuristics A Comparative Study

Manhattan Distance is 4

Search Distance is 1

0

Page 15: Force-Directed Placement Heuristics A Comparative Study

Manhattan Distance is 4

Search Distance is 1

0

Page 16: Force-Directed Placement Heuristics A Comparative Study

Manhattan Distance is 2

Search Distance is 2

Search Distance == Manhattan Distance, so Quit

1

Page 17: Force-Directed Placement Heuristics A Comparative Study

Simulation ResultsSimulation Results

Layout Type Heuristic Initial Cost Final Cost Iterations Run-Time Solid Nearest 274908 241484 9 75 ms Solid Selective 274908 210714 6 90 ms Solid Ripple 247908 238722 9 80 ms

Random Nearest 312881 230713 11 85 ms Random Selective 312881 201761 10 115 ms Random Ripple 312881 230712 52 130 ms

Donut Nearest 316708 224962 1 60 ms Donut Selective 316708 194856 6 100 ms Donut Ripple 316708 230787 23 90 ms

Page 18: Force-Directed Placement Heuristics A Comparative Study

Simulation ResultsSimulation Results

Layout Type Heuristic Initial Cost Final Cost Iterations Run-Time Solid Nearest 274908 241484 9 75 ms Solid Selective 274908 210714 6 90 ms Solid Ripple 247908 238722 9 80 ms

Random Nearest 312881 230713 11 85 ms Random Selective 312881 201761 10 115 ms Random Ripple 312881 230712 52 130 ms

Donut Nearest 316708 224962 1 60 ms Donut Selective 316708 194856 6 100 ms Donut Ripple 316708 230787 23 90 ms

Page 19: Force-Directed Placement Heuristics A Comparative Study

Simulation ResultsSimulation Results

Layout Type Heuristic Initial Cost Final Cost Iterations Run-Time Solid Nearest 274908 241484 9 75 ms Solid Selective 274908 210714 6 90 ms Solid Ripple 247908 238722 9 80 ms

Random Nearest 312881 230713 11 85 ms Random Selective 312881 201761 10 115 ms Random Ripple 312881 230712 52 130 ms

Donut Nearest 316708 224962 1 60 ms Donut Selective 316708 194856 6 100 ms Donut Ripple 316708 230787 23 90 ms

Page 20: Force-Directed Placement Heuristics A Comparative Study

Simulation ResultsSimulation Results

Layout Type Heuristic Initial Cost Final Cost Iterations Run-Time Solid Nearest 274908 241484 9 75 ms Solid Selective 274908 210714 6 90 ms Solid Ripple 247908 238722 9 80 ms

Random Nearest 312881 230713 11 85 ms Random Selective 312881 201761 10 115 ms Random Ripple 312881 230712 52 130 ms

Donut Nearest 316708 224962 1 60 ms Donut Selective 316708 194856 6 100 ms Donut Ripple 316708 230787 23 90 ms

Page 21: Force-Directed Placement Heuristics A Comparative Study

Problems and Possible SolutionsProblems and Possible Solutions

Problem: Force-Directed Heuristics tend to gather Problem: Force-Directed Heuristics tend to gather all cells about the center in a circular fashion.all cells about the center in a circular fashion.

------xxx-------------xxx------------xxxxxx----------xxxxxx---------xxxxxxxx--------xxxxxxxx-------xxxxxxxxxx------xxxxxxxxxx-----xxxxxxxxxxxx----xxxxxxxxxxxx---xx-xxxxxxxxxxx--xx-xxxxxxxxxxx-xxxxxxxxxxxxxx-xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx--xxxxxxxxxx-x----xxxxxxxxxx-x----xxxxxxxxxxx-----xxxxxxxxxxx------xxxxxxxxxx------xxxxxxxxxx---

Page 22: Force-Directed Placement Heuristics A Comparative Study

Problems and Possible SolutionsProblems and Possible Solutions

Possible Solutions:Possible Solutions:Lock the position of cells that should be on the Lock the position of cells that should be on the periphery of the layout. This will help pull cells periphery of the layout. This will help pull cells away from the center.away from the center.Make outer rows and columns off-limits for Make outer rows and columns off-limits for placement after a number of iterations.placement after a number of iterations.Use negative spring constants for nets with Use negative spring constants for nets with small weights. This should push cells with small weights. This should push cells with lightweight connections away from the more lightweight connections away from the more densely connected cells.densely connected cells.