Abstract

The Shortest Path Problem with Forbidden Paths (SPPFP) is a variant of the original shortest path problem, where the constraints come from a set of forbidden arc sequences that cannot be part of any feasible solution. Though this problem is addressed in the academic literature and has numerous applications, there are no open-source implementations of algorithms that solve it. This article proposes “rsppfp”, an R package that offers functionalities that solve the SPPFP by transforming it into the traditional shortest path problem. Its main strengths are its parallel processing capability, and it is high compatibility with packages for other network research. In this paper, we describe the design and functionality of “rsppfp”, report an evaluation made with different graph structures, and provide guidelines and examples for its use.

Highlights

  • Motivation and significanceThe shortest path problem with forbidden paths (SPPFP) has been introduced by Villeneuve and Desaulniers [1]

  • We describe the design and functionality of ‘‘rsppfp’’, report an evaluation made with different graph structures, and provide guidelines and examples for its use

  • ‘‘rsppfp’’ provides a convenience function named get_shortest _path() that summarises the code from snippets (6, 7, 8), simplifying the process of obtaining the shortest path without incurring into forbidden paths

Read more

Summary

Motivation and significance

The shortest path problem with forbidden paths (SPPFP) has been introduced by Villeneuve and Desaulniers [1]. Software description ‘‘rsppfp’’ is a package that enables the transformation of graphs, and their sets of forbidden paths, to use them later with other tools It implements algorithms proposed and accepted from an academic point of view [1,7]. Available functions ‘‘rsppfp’’ implements two transformation algorithms In both cases, F must be known beforehand, and each forbidden path on the set can be of a different length –i.e., include a dissimilar number of nodes. Its declaration can be seen in code fragment (3): modify_graph_hsu ← function(g, f, cores = 1L) {...} As a limitation these algorithms only work with digraphs; i.e., graphs where each arc is directed from a specific node to.

Algorithms’ evaluation
Illustrative examples
Impact
Conflict of interest
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call