Skip to content
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

UF: Adding the traveling salesman problem (TSP) linear programming version #230

Merged
merged 14 commits into from
Jul 24, 2023

Conversation

alejomonbar
Copy link
Contributor

Unitary Fund

Adding the traveling salesman problem class with its corresponding test.
https://en.wikipedia.org/wiki/Travelling_salesman_problem

Description

Adding the traveling salesman problem combinatorial optimization problem to the set of problems. This problem comes with the function 'classical_optimization' which uses the 'docplex' solver, plot_solution which plots the 'networkx' graph for a given solution, and a get_distance function to get the total distance traveled from a given solution.

Additionally, I added a subfolder to organize the tests for the problems.

Checklist

  • I have performed a self-review of my code.
  • I have commented my code and used numpy-style docstrings
  • I have made corresponding updates to the documentation.
  • My changes generate no new warnings
  • I have added/updated tests to make sure bugfix/feature works.
  • New and existing unit tests pass locally with my changes.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

the test is inside './tests/test_problems/test_tsp.py'

@vishal-ph vishal-ph merged commit 663fda5 into entropicalabs:dev Jul 24, 2023
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