Skip to content

Instantly share code, notes, and snippets.

@svenski
svenski / tsp_plot.py
Last active January 14, 2017 16:53 — forked from payoung/tsp_plot.py
Python function that plots the data from a traveling salesman problem that I am working on for a discrete optimization class on Coursera. It can take multiple iterations of the path between nodes and plot out the current path as well as the old paths. Helps with troubleshooting and improving the algorithms that I am working on.
import matplotlib.pyplot as plt
def plotTSP(paths, points, num_iters=1):
"""
path: List of lists with the different orders in which the nodes are visited
points: coordinates for the different nodes
num_iters: number of paths that are in the path list
"""

ODSC Europe 2017 (London)

Algorithmic Trading

With Machine & Deep Learning

Workshop by Dr. Yves J. Hilpisch | The Python Quants GmbH

London, 12. October 2017