Skip to content

Commit

Permalink
(#54) remove unnecessary packages
Browse files Browse the repository at this point in the history
  • Loading branch information
SevgiAkten committed Aug 13, 2024
1 parent 25ef752 commit 77fca1a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
25 changes: 10 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
click==8.1.7
contourpy==1.2.0
cycler==0.12.1
Deprecated==1.2.14
execnet==2.1.1
fonttools==4.45.1
geographiclib==2.0
geopy==2.4.1
grip==4.6.2
iniconfig==2.0.0
kiwisolver==1.4.5
matplotlib==3.8.2
networkx==2.8.8
Markdown==3.6
Markdown-Editor==1.0.7
numpy==1.26.2
packaging==23.2
pandas==2.1.3
Pillow==10.1.0
pandoc==2.3
path-and-address==2.0.1
pluggy==1.5.0
plumbum==1.8.3
ply==3.11
Pygments==2.18.0
pymdown-extensions==7.1
pyparsing==3.1.1
pytest==8.3.2
pytest-xdist==3.6.1
python-dateutil==2.8.2
pytz==2023.3.post1
six==1.16.0
tabulate==0.8.10
tsplib95==0.7.1
tzdata==2023.3
wrapt==1.16.0
tzdata==2023.3
10 changes: 7 additions & 3 deletions src/problems/single_objective/discrete/permutation/tsp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from problems.abstract_problem import AbstractProblem
import tsplib95
from math import sqrt
import pandas as pd
from geopy.distance import geodesic
import os

Expand Down Expand Up @@ -61,8 +60,13 @@ def f(self, x: list) -> float:
node_name = []
for i in range(1, 15):
node_name.append(i)

Dist = pd.DataFrame(temp, columns=node_name, index=node_name)

Dist = {}
# Creating the dictionary of dictionaries
for i, row_name in enumerate(node_name):
Dist[row_name] = {}
for j, col_name in enumerate(node_name):
Dist[row_name][col_name] = temp[i][j]

# objective
fitness = 0.0
Expand Down

0 comments on commit 77fca1a

Please sign in to comment.