Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-optimisation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aliaume Lopez
projet-optimisation
Commits
817a39a8
Commit
817a39a8
authored
Jan 10, 2017
by
Aliaume Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prout prout mothefaka !
parent
2cb60db7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
new_separation.py
new_separation.py
+1
-1
parser.py
parser.py
+2
-2
No files found.
new_separation.py
View file @
817a39a8
...
@@ -372,4 +372,4 @@ def test_separation_on_file (filename):
...
@@ -372,4 +372,4 @@ def test_separation_on_file (filename):
test_separation_on_file
(
"
rd100
"
)
test_separation_on_file
(
"
brazil58
"
)
parser.py
View file @
817a39a8
from
collections
import
deque
from
collections
import
deque
from
city
import
GeoCoord
,
GeoCity
,
Euc_2D
from
city
import
GeoCoord
,
GeoCity
,
Euc_2D
,
Explicit_2D
from
graph
import
Graph
from
graph
import
Graph
import
logging
import
logging
...
@@ -330,7 +330,7 @@ def read_tsp_file(path):
...
@@ -330,7 +330,7 @@ def read_tsp_file(path):
g
=
Graph
(
tsp
[
"NODES"
],
None
)
g
=
Graph
(
tsp
[
"NODES"
],
None
)
elif
tsp
[
"DISPLAY"
]
==
[]:
elif
tsp
[
"DISPLAY"
]
==
[]:
# raise ValueError ("Matrice ... impossible à parser")
# raise ValueError ("Matrice ... impossible à parser")
g
=
Graph
([
Euc_2D
(
number
=
i
)
for
i
in
range
(
len
(
tsp
[
"MATRIX"
]))
],
tsp
[
"MATRIX"
])
g
=
Graph
([
Explicit_2D
(
number
=
i
)
for
i
in
range
(
len
(
tsp
[
"MATRIX"
]))
],
tsp
[
"MATRIX"
])
else
:
else
:
# raise ValueError ("Matrice ... impossible à parser")
# raise ValueError ("Matrice ... impossible à parser")
g
=
Graph
(
tsp
[
"DISPLAY"
],
tsp
[
"MATRIX"
])
g
=
Graph
(
tsp
[
"DISPLAY"
],
tsp
[
"MATRIX"
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment