# Shortest Path¶

The Shortest Path between two centroids or sections of the network can
be calculated with this tool, available in the menu *Data Analysis/Shortest
Path Calculator*.

To start, the origin section or centroid must be selected, by clicking
on it in the view. The destination section or centroid is chosen by
clicking on it while holding the *Ctrl* key pressed. Another option is
to enter the ID of the desired object directly in the text box.

The dialog has three options for the criteria to calculate the shortest path: by distance, by time and by attribute. Note that the calculation of a Shortest Path basing on Time takes into account the free flow times to go through sections and nodes. If the Attribute option is chosen, then the user must select the section attribute and the turn attribute on which the shortest path will be calculated.

The restrictions box is used to specify the vehicle type for the shortest path, so that the reserved lanes not allowed for that type are not taken into account.

Finally, the Shortest Path, if any, is shown in the view in the primary color and the cost of the path is also shown in the dialog window.