The v.label.sa module makes a label-file from a GRASS vector map with labels created from attributes in the attached table. The labels are placed in as optimal place as possible. The label file has the same syntax as the one created by v.label. And can thus be used with d.labels and others.
The module implements the algorithm presented by Edmondson, Christensen, Marks and Shieber:
A General Cartographic Labeling Algorithm, Cartographica, Vol. 33, No. 4, Winter 1996, pp. 13-23
The algorithm works by the principle of Simulated Annealing. A PDF of the paper is available at the Mitsubishi Electric Research Laboratories pages.
Progress and problems
At this point v.label.sa is capable of labelling point and line data. There is a slight problem with label positioning in d.labels. The d.labels module won't put the label on the point indicated in the label file, but a bit above it (presumably to not be over the feature, as v.label seems to place the label point on the feature it self).
Anyway I patched d.labels to not do this if the label position indicates "none none" in order to facilitate exact placement (as this module does). Here are the results:
The image above shows how d.labels places the labels a bit above the label position
The image above shows how I'd like d.labels to place the labels. Exactly on the spot I define.
I also have a fix for the ps.map module.