02.10.2012 Views

5 Graph Description Language (GDL) - Absint

5 Graph Description Language (GDL) - Absint

5 Graph Description Language (GDL) - Absint

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• Gravitational forces<br />

The problem with spring forces is that they are only effective in connected graphs. In unconnected<br />

graphs simulating a spring embedder makes unconnected nodes move away from one<br />

another as there are only repulsive forces but no attractive forces. That is why gravitational<br />

forces are introduced. All nodes are attracted to the bary center of all the other nodes.<br />

• Simulated annealing<br />

The simulated annealing model is oriented to the physical process of annealing, which often<br />

leads to very regular structures (e.g. like crystals).<br />

A global energy level is computed for a graph which is the sum of all energy levels of the<br />

nodes. The energy level at a node is determined from the forces acting it, much like the<br />

elongation of the springs. The spring embedder tries to minimize the global energy level by<br />

moving the nodes in the direction of the forces.<br />

Nodes are randomly moved so as to avoid being trapped at a local energy minimum. At the<br />

beginning this is done more vigorously, with random movement being ceased towards the<br />

end in order to stabilize the final layout. The amount of random movement depends on the<br />

”temperature”, which is controlled by a temperature scheme.<br />

aiSee also supports the concept of local temperatures for a node. The temperature takes the<br />

local situation of the graph into account (see energetic graph attribute, p. 70) and regulates<br />

how much and how often a node is randomly moved.<br />

The force-directed placement algorithm consists of four phases:<br />

• Initialization phase<br />

• First iteration phase<br />

• Optional second iteration phase<br />

• Final improvement phase<br />

The two iteration phases are conceptionally the same. They simply sequentially simulate the two<br />

magnetic fields acting on the system. The second iteration phase is omitted if there is only one<br />

magnetic field.<br />

One iteration phase consists of a loop of iteration steps that are executed until the global temperature<br />

value has fallen below a specified threshold value or until a maximum number of iterations is<br />

reached.<br />

In each iteration step the new impulses of the nodes (force directions) are calculated, the nodes<br />

moved to their new positions according to the impulses, and the global temperature adjusted.<br />

In the final improvement phase, the node positions can be rastered. This is done by moving a node<br />

to its closest raster point after each iteration step.<br />

Finally the minimum x and y coordinates are calculated and the entire layout is moved so that<br />

the minimum coordinates are just zero. This step is necessary because all nodes move during the<br />

iteration phase, meaning they could have all moved away from the origin of the coordinate system.<br />

Finally the start and end points of the edges are calculated.<br />

For more details, see [Sa96].<br />

116

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!