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
2830bccc
Commit
2830bccc
authored
Jan 10, 2017
by
Aliaume Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout des images
parent
14ad2ce8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
15 deletions
+23
-15
graph.py
graph.py
+0
-1
images/.DS_Store
images/.DS_Store
+0
-0
images/0CVX_rd100_simple_1.png
images/0CVX_rd100_simple_1.png
+0
-0
images/0CVX_rd100_simple_11.png
images/0CVX_rd100_simple_11.png
+0
-0
images/0CVX_rd100_simple_21.png
images/0CVX_rd100_simple_21.png
+0
-0
images/0CVX_rd100_simple_31.png
images/0CVX_rd100_simple_31.png
+0
-0
images/0CVX_rd100_simple_41.png
images/0CVX_rd100_simple_41.png
+0
-0
new_separation.py
new_separation.py
+3
-3
parser.py
parser.py
+11
-7
rapport/presentation.tex
rapport/presentation.tex
+7
-4
rapport/rapport_projet_opti.tex
rapport/rapport_projet_opti.tex
+2
-0
No files found.
graph.py
View file @
2830bccc
...
@@ -247,4 +247,3 @@ class Graph:
...
@@ -247,4 +247,3 @@ class Graph:
pygame
.
display
.
flip
()
pygame
.
display
.
flip
()
clock
.
tick
(
1000
)
clock
.
tick
(
1000
)
images/.DS_Store
View file @
2830bccc
No preview for this file type
images/0CVX_rd100_simple_1.png
0 → 100644
View file @
2830bccc
11.2 KB
images/0CVX_rd100_simple_11.png
0 → 100644
View file @
2830bccc
12 KB
images/0CVX_rd100_simple_21.png
0 → 100644
View file @
2830bccc
11 KB
images/0CVX_rd100_simple_31.png
0 → 100644
View file @
2830bccc
11.9 KB
images/0CVX_rd100_simple_41.png
0 → 100644
View file @
2830bccc
11.9 KB
new_separation.py
View file @
2830bccc
...
@@ -270,11 +270,11 @@ def algorithme_separation(graphe, filename="default_separation_output",epsilon =
...
@@ -270,11 +270,11 @@ def algorithme_separation(graphe, filename="default_separation_output",epsilon =
oldvalue
=
value
oldvalue
=
value
chemin
=
convert_to_edges
(
graphe
,
sol
)
chemin
=
convert_to_edges
(
graphe
,
sol
)
if
(
iteration
==
1
):
if
(
iteration
%
10
==
1
):
if
(
isinstance
(
graphe
.
cities
[
0
],
city
.
Euc_2D
)):
if
(
isinstance
(
graphe
.
cities
[
0
],
city
.
Euc_2D
)):
graphe
.
draw
(
chem
=
[
u
for
(
u
,
c
)
in
chemin
],
graphe
.
draw
(
chem
=
[
u
for
(
u
,
c
)
in
chemin
],
poids
=
[
c
for
(
u
,
c
)
in
chemin
],
poids
=
[
c
for
(
u
,
c
)
in
chemin
],
filename
=
"images/0CVX_{}_simple
.png"
.
format
(
filename
))
filename
=
"images/0CVX_{}_simple
_{}.png"
.
format
(
filename
,
iteration
))
sol
=
np
.
round
(
sol
,
3
)
sol
=
np
.
round
(
sol
,
3
)
...
@@ -372,4 +372,4 @@ def test_separation_on_file (filename):
...
@@ -372,4 +372,4 @@ def test_separation_on_file (filename):
test_separation_on_file
(
"
u574
"
)
test_separation_on_file
(
"
rd100
"
)
parser.py
View file @
2830bccc
...
@@ -348,12 +348,16 @@ if __name__ == '__main__':
...
@@ -348,12 +348,16 @@ if __name__ == '__main__':
level
=
logging
.
DEBUG
,
level
=
logging
.
DEBUG
,
format
=
'%(asctime)s [%(levelname)s] %(message)s'
,
format
=
'%(asctime)s [%(levelname)s] %(message)s'
,
datefmt
=
'%m/%d/%Y %I:%M:%S %p'
)
datefmt
=
'%m/%d/%Y %I:%M:%S %p'
)
x
=
read_tsp_file
(
'problemes/bayg29.tsp'
)
# print (x["GRAPH"].weights)
chemin
=
[
1
,
200
,
198
,
197
,
195
,
194
,
218
,
193
,
196
,
192
,
191
,
205
,
189
,
27
,
188
,
187
,
186
,
185
,
184
,
182
,
181
,
180
,
179
,
178
,
177
,
176
,
174
,
173
,
172
,
171
,
170
,
169
,
168
,
212
,
214
,
167
,
166
,
165
,
164
,
213
,
158
,
163
,
162
,
161
,
160
,
159
,
157
,
156
,
155
,
154
,
153
,
152
,
151
,
150
,
149
,
148
,
147
,
146
,
145
,
144
,
143
,
201
,
142
,
141
,
140
,
139
,
138
,
137
,
136
,
183
,
135
,
134
,
215
,
132
,
131
,
211
,
130
,
222
,
129
,
128
,
127
,
126
,
125
,
124
,
123
,
122
,
121
,
175
,
120
,
119
,
118
,
117
,
116
,
223
,
115
,
114
,
113
,
112
,
111
,
110
,
109
,
108
,
107
,
106
,
105
,
220
,
104
,
103
,
102
,
101
,
100
,
99
,
98
,
97
,
96
,
95
,
209
,
94
,
93
,
92
,
91
,
90
,
89
,
88
,
87
,
210
,
86
,
85
,
84
,
83
,
82
,
221
,
81
,
80
,
79
,
78
,
77
,
217
,
219
,
216
,
76
,
75
,
74
,
73
,
72
,
71
,
70
,
69
,
68
,
67
,
66
,
65
,
64
,
63
,
62
,
61
,
60
,
59
,
58
,
57
,
56
,
55
,
54
,
53
,
52
,
50
,
51
,
49
,
207
,
2
,
47
,
225
,
190
,
133
,
199
,
224
,
48
,
45
,
46
,
44
,
43
,
42
,
41
,
40
,
39
,
38
,
37
,
36
,
34
,
33
,
35
,
32
,
31
,
206
,
202
,
30
,
29
,
28
,
204
,
26
,
25
,
208
,
24
,
23
,
22
,
21
,
20
,
203
,
19
,
18
,
17
,
16
,
15
,
14
,
13
,
12
,
11
,
10
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
1
]
M
=
x
[
"GRAPH"
].
weights
filename
=
'ts225'
probleme
=
read_tsp_file
(
"problemes/{}.tsp"
.
format
(
filename
))
graphe
=
probleme
[
"GRAPH"
]
chemin
=
graphe
.
sommets_vers_aretes
([
x
-
1
for
x
in
chemin
])
graphe
.
draw
(
chem
=
chemin
)
for
ligne
in
M
:
for
elem
in
ligne
:
print
(
"{:03d}"
.
format
(
elem
),
end
=
" "
)
print
(
""
)
rapport/presentation.tex
View file @
2830bccc
...
@@ -316,7 +316,7 @@
...
@@ -316,7 +316,7 @@
\begin{block}
{
Équivalence des contraintes
}
\begin{block}
{
Équivalence des contraintes
}
\begin{center}
\begin{center}
Contrainte violée
$
\iff
$
MinCut
< 2
Contrainte violée
$
\iff
$
MinCut
$
<
2
$
\end{center}
\end{center}
\end{block}
\end{block}
...
@@ -341,7 +341,7 @@
...
@@ -341,7 +341,7 @@
\subfloat
[Après séparation (7899)]
{
\subfloat
[Après séparation (7899)]
{
\includegraphics
[width=4cm]
{
../images/0CVX
_
rd100
_
separationfinie.png
}
\includegraphics
[width=4cm]
{
../images/0CVX
_
rd100
_
separationfinie.png
}
}
}
\caption
{
Programme linéaire sur
ts225
(7910)
}
\caption
{
Programme linéaire sur
rd100
(7910)
}
\end{figure}
\end{figure}
\end{exampleblock}
\end{exampleblock}
\end{frame}
\end{frame}
...
@@ -430,8 +430,11 @@
...
@@ -430,8 +430,11 @@
\end{figure}
\end{figure}
\end{exampleblock}
\end{exampleblock}
NOTE pour la comparaison:
Note pour la comparaison:
Glouton = 60110 / Glouton+2OPT = 50826 / Approx2 = 66343 / Approx2 + 2OPT = 54428
Glouton = 60110
Glouton + 2OPT = 50826
Approx2 = 66343
Approx2 + 2OPT = 54428
\end{frame}
\end{frame}
...
...
rapport/rapport_projet_opti.tex
View file @
2830bccc
...
@@ -904,6 +904,8 @@ ulysses16 & \textcolor{red}{$6859$}& $\textcolor{red}{6859}$& \textcolor{red}{$6
...
@@ -904,6 +904,8 @@ ulysses16 & \textcolor{red}{$6859$}& $\textcolor{red}{6859}$& \textcolor{red}{$6
ulysses22
&
\textcolor
{
red
}{$
7013
$}
&$
\textcolor
{
red
}{
7013
}$&
\textcolor
{
red
}{$
7013
$}
&
8
\\
\hline
ulysses22
&
\textcolor
{
red
}{$
7013
$}
&$
\textcolor
{
red
}{
7013
}$&
\textcolor
{
red
}{$
7013
$}
&
8
\\
\hline
u574
&
36714
&
36905
&
38572
&
125
\\
\hline
\end{tabular}
\end{tabular}
\end{center}
\end{center}
\caption
{
\label
{
tabenc
}
Encadrements obtenus a partir de la Question 5
}
\caption
{
\label
{
tabenc
}
Encadrements obtenus a partir de la Question 5
}
...
...
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