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
49767ae8
Commit
49767ae8
authored
Jan 10, 2017
by
Aliaume Lopez
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.crans.org:alopez/projet-optimisation
parents
fb91aeea
c425bb7d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
18 deletions
+86
-18
rapport/presentation.tex
rapport/presentation.tex
+56
-18
testperfs.py
testperfs.py
+30
-0
No files found.
rapport/presentation.tex
View file @
49767ae8
...
...
@@ -96,16 +96,20 @@
\frametitle
{
TSPLIB
}
\begin{block}
{
TSPLIB95
}
TSPLIB une librairie d'instances de TSP
avec entre
$
10
$
et
$
10000
$
sommets
.
TSPLIB une librairie d'instances de TSP
de valeurs optimales connues (ou tight encadrement)
.
\end{block}
\begin{exampleblock}
{
Parsing
}
Données sous forme de :
\begin{exampleblock}
{
Différentes instances
}
\begin{itemize}
\item
matrice explicite des coûts,
\item
coordonnées des sommets dans le plan (distance euclidienne)
\item
distance géodésique (lat, lon).
\end{itemize}
\item
taille variable, entre 10 et 10000 sommets
\item
différentes fonctions de coût (distance euclidienne, géodésique
\dots
).
\item
parfois empruntés à la vie réélle (circuits électroniques, cartes
\dots
)
\end{itemize}
\end{exampleblock}
\end{frame}
...
...
@@ -390,14 +394,32 @@
\section
{
Outils associés
}
\begin{frame}
\frametitle
{
Parsing de TSPLIB
}
\es
\begin{exampleblock}
{
Différentes données à parser
}
\begin{itemize}
\item
matrice explicite des coûts
\item
coordonnées des sommets dans le plan (distance euclidienne)
\item
distance géodésique
\end{itemize}
\end{exampleblock}
\ds
\begin{alertblock}
{
Représentation
}
Distance euclidienne dans le plan : dessin sur Pygame.
\end{alertblock}
\end{frame}
\begin{frame}
\frametitle
{
Algèbre linéaire
}
Ne pas utiliser de bibliothèque préexistante ?
\es
\begin{block}
{
Inversion de matrice
}
Implémentation du pivot de Gauss.
...
...
@@ -405,7 +427,17 @@ Ne pas utiliser de bibliothèque préexistante ?
\ds
Sans surprise, de très mauvaises performances.
Sans surprise, de très mauvaises performances :
$
140
$
s pour inverser 100 matrices aléatoires (dimension
$
100
\times
100
$
).
\es
\begin{block}
{
Numpy
}
\texttt
{
numpy.linalg.inv
}
\end{block}
\ds
$
0
.
9
$
s pour inverser les 100 matrices
\dots
\end{frame}
...
...
@@ -425,6 +457,12 @@ Ne pas utiliser de bibliothèque préexistante ?
Implémentation en Python de l'algorithme du simplexe.
\end{block}
\ds
Ce n'est pas très efficace. Ni très précis.
\ds
\begin{block}
{
\texttt
{
CVXPy
}}
Interface élégante de
\texttt
{
CVXopt
}
associée à Python. Très efficace.
\end{block}
...
...
@@ -432,7 +470,7 @@ Ne pas utiliser de bibliothèque préexistante ?
\begin{frame}
\frametitle
{
Stoer-Wagner
}
\frametitle
{
Coupe minimale
}
In the MinimumCutPhase, the subset A of the graphs vertices grows starting with an arbitrary single vertex until
A is equal to V. In each step, the vertex which is outside of A, but most tightly connected with A
is added to the set A.
...
...
@@ -472,11 +510,7 @@ Ne pas utiliser de bibliothèque préexistante ?
\end{figure}
\end{exampleblock}
Note pour la comparaison:
Glouton = 60110
Glouton + 2OPT = 50826
Approx2 = 66343
Approx2 + 2OPT = 54428
\end{frame}
...
...
@@ -529,8 +563,12 @@ Avec $D_{E'}$ la matirce d'incidence du graphe restreint à $E'$, et $G_{E'}$ la
\section*
{
Bibliographie
}
\begin{frame}
[allowframebreaks]
\frametitle
{
Bibliographie
}
\bibliographystyle
{
apalike
}
\bibliography
{
presentation
}
...
...
testperfs.py
0 → 100644
View file @
49767ae8
from
lineartools
import
invert
import
numpy
as
np
import
random
import
time
def
testinv
():
sumnp
=
0
sumlin
=
0
for
i
in
range
(
100
):
n
=
100
M
=
np
.
random
.
rand
(
n
,
n
)
print
(
"Iteration"
,
i
)
if
(
np
.
linalg
.
det
(
M
)
!=
0
):
a
=
time
.
clock
()
np
.
linalg
.
inv
(
M
)
b
=
time
.
clock
()
sumnp
+=
b
-
a
print
(
"numpy done"
)
a
=
time
.
clock
()
invert
(
M
)
b
=
time
.
clock
()
sumlin
+=
b
-
a
print
(
"============="
)
print
(
"Numpy :"
sumnp
)
print
(
"Gauss :"
,
sumlin
)
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