documentationfor yFiles for HTML 2.6

PathSearch

This is a pathfinding algorithm that calculates the shortest (i.e., the cheapest) paths for a set of edges through a GraphPartition.

Inheritance Hierarchy
PathSearch

Remarks

It is based on an A*-algorithm and uses PartitionCells as steps between source node and target node.

In each step, the algorithm takes a CellEntrance, that consists mainly of a PartitionCell and from where it was entered, from a queue with all seen CellEntrances, determines all possible neighbor cells and their enter intervals and enqueues the resulting CellEntrance. To influence the order in which the CellEntrances will be processed, the path search assigns real costs (like Dijkstra) as well as heuristic costs (A*-algorithm's heuristic) to the enqueued CellEntrances. The real costs arise from entering a neighbor cell, e.g., a bend has to be created, while the heuristic costs are an estimation of how expensive it will be to reach the target node continuing the path with this neighboring cell. Therefore, the path search prefers searching in the direction in which the target node lies. The CellEntrance with the lowest combined costs is processed next until the target cell is reached.

PathSearchExtensions modify the path search as they are able to add start entrances and weight them with costs. They also add real and heuristic costs to CellEntrances that are created for the currently entered PartitionCell and calculate shorter enter intervals that are less expensive to pass.

The algorithm gets a PathSearchContext which provides information about the graph and the currently routed edge. It stores the results of the path search that can then be retrieved calling pathSearchResult.

Type Details

yfiles module
router-polyline
yfiles-umd modules
layout-area, layout-multipage, layout-orthogonal-compact, layout, router-bus, router-polyline
Legacy UMD name
yfiles.router.PathSearch

See Also

Constructors

Methods