{"id":13857940,"url":"https://github.com/melvidoni/rsppfp","last_synced_at":"2025-10-22T04:54:35.049Z","repository":{"id":56936994,"uuid":"133817256","full_name":"melvidoni/rsppfp","owner":"melvidoni","description":"Shortest Path Problem with Forbidden Paths in R","archived":false,"fork":false,"pushed_at":"2019-10-02T03:33:58.000Z","size":935,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-11-07T04:49:04.911Z","etag":null,"topics":["graph-algorithms","graph-theory","r","rpackage","shortest-path-problem"],"latest_commit_sha":null,"homepage":"https://melvidoni.github.io/rsppfp/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melvidoni.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-17T13:26:59.000Z","updated_at":"2021-05-27T08:28:14.000Z","dependencies_parsed_at":"2022-08-21T01:10:14.680Z","dependency_job_id":null,"html_url":"https://github.com/melvidoni/rsppfp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melvidoni%2Frsppfp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melvidoni%2Frsppfp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melvidoni%2Frsppfp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melvidoni%2Frsppfp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melvidoni","download_url":"https://codeload.github.com/melvidoni/rsppfp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225920520,"owners_count":17545506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graph-algorithms","graph-theory","r","rpackage","shortest-path-problem"],"created_at":"2024-08-05T03:01:51.351Z","updated_at":"2025-10-22T04:54:34.657Z","avatar_url":"https://github.com/melvidoni.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# rsppfp \u003cimg src=\"man/figures/logo.png\" align=\"right\" alt=\"\" /\u003e\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/rsppfp)](https://cran.r-project.org/package=rsppfp)\n[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/rsppfp?color=yellow)](https://cranlogs.r-pkg.org/badges/grand-total/rsppfp?color=yellow)\n[![Travis-CI Build Status](https://travis-ci.org/melvidoni/rsppfp.svg?branch=master)](https://travis-ci.org/melvidoni/rsppfp)\n[![Coverage Status](https://img.shields.io/codecov/c/github/melvidoni/rsppfp/master.svg)](https://codecov.io/github/melvidoni/rsppfp?branch=master)\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1412539.svg)](https://doi.org/10.5281/zenodo.1412539)\n\nThe **rsppfp** package implements different algorithms for transforming graphs in the _Shortest Path Problem with Forbidden Paths_ (SPPFP). This problem is an important concept in the field of graph theories, and it is a variant of the traditional _shortest path problem_. In here, there is an additional constrait that takes the form of a finite set of forbidden paths (arc sequences of at least three nodes) that cannot be part of any solution path. \n\nThis problem is solved by transforming the original graph `G` and its set of forbidden paths `F`, generating a new graph `G*` in which traditional _shortest path_ algorithms can be applied, and obtain solutions that abide to the restrictions. This approach has a number of advantages:\n\n- It allows solving the original _shortest path problem_ in `G*` with algorithms that efficiently manage time and processing resources constraints, having been implemented in a plethora of languages.\n- The resulting `G*` is highly compatible with existing libraries, and can be used as input data for other, more complex problems and researches.\n- In many cases -i.e. logistics- `G` and `F` remain unchanged for long periods of time. Thus, the transformation is completed only once, and `G*` can be stored along with the original graph. A new conversion is required only on the rare cases where the graph, or its forbidden paths, are modified.\n- The input data is provided as common data frames, increasing the versatility of this package.\n\nThis solving process is illustrated in Figure 1, using a paper notation to indicate input and output data. Even more, rsppfp scope and key functionalities are also highlighted.\n\n```{r out.width = '100%', fig.align=\"center\", fig.cap=\"Figure 1. Flow diagram showcasing an SPPFP solving process, and highlighting rsppfp package's contribution.\", echo=FALSE}\nknitr::include_graphics(\"man/figures/fig1.png\", \n                        auto_pdf = getOption(\"knitr.graphics.auto_pdf\", FALSE), \n                        dpi = NULL)\n```\n\n\n## Algorithms\nrsppfp implements two different algorithms, each one suited for different situations:\n\n1. Villeneuve and Desaulniers (2005) proposed the first algorithm. In this case, the set `F` must be known beforehand. This transformation is slightly fast, but generates bigger graphs `G*`. Each forbidden path can be of different size, but no sub-path (of at least three nodes long) can be part of another forbidden path.\n1. Hsu et al. 'Backward Construction' (2009) solves the restriction of sub-paths in the forbidden paths, and generates smaller graphs `G*`, by adding less new nodes and arcs. However, this algorithm is slightly slower.\n\nBoth algorithms are analyzed using 27 graphs, randomly generated. The complete benchmark evaluation [can be found here](articles/benchmark.html).\n\n\n\n## Installation\n\nAs from 2018-11-22 you can install **rsppfp** directly from CRAN, using:\n\n```{r cran-install, eval = FALSE}\ninstall.packages(\"rsppfp\")\n```\n\nYou can install the development version of rsppfp from GitHub with:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"melvidoni/rsppfp\")\n```\n\n\n\n\n## References\nAvailable at [References](articles/references.html)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelvidoni%2Frsppfp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelvidoni%2Frsppfp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelvidoni%2Frsppfp/lists"}