Commit f09f7012 authored by Gaetan D's avatar Gaetan D

Merge branch 'master' of gitlab.crans.org:alopez/projet-optimisation

parents 043555c2 05c578f7
...@@ -40,8 +40,10 @@ class Graph: ...@@ -40,8 +40,10 @@ class Graph:
if weights != None: if weights != None:
for i,ligne in enumerate(weights): for i,ligne in enumerate(weights):
for j,e in enumerate(ligne): for j,e in enumerate(ligne):
print ("{:04d} ".format (e), end="")
if i != j: if i != j:
self.weights[self.edge_number (i,j)] = e self.weights[self.edge_number (i,j)] = e
print ("")
logging.debug ("Calculating edges") logging.debug ("Calculating edges")
......
...@@ -216,11 +216,11 @@ def read_matrix (tsp, tspfile): ...@@ -216,11 +216,11 @@ def read_matrix (tsp, tspfile):
elif tsp["EDGE_WEIGHT_FORMAT"] == "FULL_MATRIX": elif tsp["EDGE_WEIGHT_FORMAT"] == "FULL_MATRIX":
count_sequence = (N for i in range (N)) count_sequence = (N for i in range (N))
elif tsp["EDGE_WEIGHT_FORMAT"] == "LOWER_ROW": elif tsp["EDGE_WEIGHT_FORMAT"] == "LOWER_ROW":
count_sequence = (i - 1 for i in range (N)) count_sequence = (i for i in range (N))
elif tsp["EDGE_WEIGHT_FORMAT"] == "UPPER_DIAG_ROW": elif tsp["EDGE_WEIGHT_FORMAT"] == "UPPER_DIAG_ROW":
count_sequence = (N - i for i in range (N)) count_sequence = (N - i for i in range (N))
elif tsp["EDGE_WEIGHT_FORMAT"] == "LOWER_DIAG_ROW": elif tsp["EDGE_WEIGHT_FORMAT"] == "LOWER_DIAG_ROW":
count_sequence = (i for i in range (N)) count_sequence = (i + 1 for i in range (N))
else: else:
raise ValueError ("Unkown matrix description") raise ValueError ("Unkown matrix description")
......
...@@ -280,10 +280,10 @@ ...@@ -280,10 +280,10 @@
\begin{figure} \begin{figure}
\centering \centering
\subfloat[Optimum du PL($115605$)]{ \subfloat[Optimum du PL($115605$)]{
\includegraphics[width=5cm]{../images/0CVX_ts225_separationfinie.png} \includegraphics[width=4.5cm]{../images/0CVX_ts225_separationfinie.png}
} }
\subfloat[Une approximation à $138954$]{ \subfloat[Une approximation à $138954$]{
\includegraphics[width=5cm]{../images/0CVX_ts225_approxPL.png} \includegraphics[width=4.5cm]{../images/0CVX_ts225_approxPL.png}
} }
\caption{Programme linéaire sur ts225} \caption{Programme linéaire sur ts225}
\end{figure} \end{figure}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment