Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updated the template notebook
  • Loading branch information
ab3735 committed Mar 21, 2023
1 parent 0672f5a commit 15f45d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Template.ipynb
Expand Up @@ -15,10 +15,11 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"https://github.coventry.ac.uk/380CT-2022/........"
"https://github.coventry.ac.uk/........"
]
},
{
Expand Down Expand Up @@ -81,13 +82,14 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"Four types of TSP instances will be generated by creating an **adjacency matrices** $M$ as follows:\n",
"1. **Asymmetric**: The edge weights are independent and uniformly random in an interval $[1,\\text{MAX_WEIGHT}]$, i.e the graph is assumed to be directed.\n",
"1. **Asymmetric**: The edge weights are independent and uniformly random in an interval $[1,\\text{MAX\\_WEIGHT}]$, i.e the graph is assumed to be directed.\n",
"2. **Symmetric**: Like the asymmetric case but the graph is undirected, and the matrix is therefore symmetric: $M_{ij}=M_{ji}$.\n",
"3. **Euclidean**: Generate points using $(x,y)$ coordinates, then generate the adjacency matrix by calculating all the required distances. Recall that the distance between two points $(x_1,y_1)$ and $(x_2,y_2)$ is $\\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$. The points are generated in the rectangle defined by the points $(0,0)$ and $(\\text{MAX_Y},\\text{MAX_Y})$.\n",
"3. **Euclidean**: Generate points using $(x,y)$ coordinates, then generate the adjacency matrix by calculating all the required distances. Recall that the distance between two points $(x_1,y_1)$ and $(x_2,y_2)$ is $\\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$. The points are generated in the rectangle defined by the points $(0,0)$ and $(\\text{MAX\\_Y},\\text{MAX\\_Y})$.\n",
"4. **Graphs with obvious shortest cycle**: A graph where all the distances are 2 except for the edges on a predefined cycle, where the distance is 1. Such a graph would be useful for testing/debugging the \"nearest neighbour greedy\" search."
]
},
Expand Down

0 comments on commit 15f45d5

Please sign in to comment.