Skip to content

Add Constrained Shortest Path Problem (CSPP) / Shortest Path Problem with Resource Constraints (SPPRC) #6155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

DenizAltunkapan
Copy link
Collaborator

Add Shortest Path Problem with Resource Constraints Algorithm on directed Graphs whith edges having costs and resources.
The algorithm uses dynamic programming to compute the shortest path while considering the resource constraints. It iterates over possible resource values and updates the minimum cost for each node, ensuring that the path does not exceed the resource limit.

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
    - There is no detailed Wikipedia entry for the Constrained Shortest Path Problem (CSPP), as it is a more specialized variant of the general Shortest Path Problem. The problem is often discussed in research papers and specialized texts on graph algorithms and optimization.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.94%. Comparing base (4d667e1) to head (e5b1527).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6155      +/-   ##
============================================
+ Coverage     73.89%   73.94%   +0.05%     
- Complexity     5151     5161      +10     
============================================
  Files           661      662       +1     
  Lines         17661    17695      +34     
  Branches       3403     3412       +9     
============================================
+ Hits          13051    13085      +34     
  Misses         4102     4102              
  Partials        508      508              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit d4b28b3 into TheAlgorithms:master Jan 28, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants