def LongMC3(fname=None):
'''Plot a single long MC3 run to demonstrate high performance
but slow convergence.'''
if fname:
run = scipy.genfromtxt(fname)
else:
bestSol, run = tsp.TSP(200, 'MC3', 20000, 10, seed=None,
coordfile='tmp.txt')
fname = 'ExampleOutput/MC3-Long.txt'
run = scipy.array(run)
scipy.savetxt(fname, run)
# plotting
Xs = range(0, run.shape[0] * 1000, 1000)
pl.plot(Xs, run)
pl.show()
评论列表
文章目录