コード例 #1
0
ファイル: parser.py プロジェクト: psawaya/CS34-Bus-Routing
        G.layout("neato")
        G.write("fuckthis.dot")
        G.draw(output)


    def __len__(self):
        return len(self.matrix)

if __name__ == "__main__":
    #random.seed(1337)

    mapinfo = Parser().parse(sys.argv[1])
    tour = Tour(mapinfo, use_best=True)

    print "Starting tour:"
    tour.printTour()
    #mapinfo.graphvizify(tour.tour, "start.png")

    print
    print tour.score
    lscore = tour.score

    deltaE = -0.01

    iterationsOfNoChange = 0

    reheat = False

    try:
        while True:
            prevScore = tour.score