def testAntTour(self): # Testing the presentation istance antSys = AntSystem("../jssp_instances/transparencia.txt") #antSys = AntSystem("../jssp_instances/Car5.txt") #antSys = AntSystem("../jssp_instances/abz5.txt") antSys.antTour() antSys.antTour() print "antTour:" print antSys.antScheds[0].makespan print antSys.antScheds[0].jobSched print antSys.antScheds[1].makespan print antSys.antScheds[1].jobSched return
def testFindBestJobSchedule(self): antSys = AntSystem("../jssp_instances/abz5.txt") for i in range(3): antSys.antScheds = [] for j in range(antSys.ants): antSys.antTour() #antSys.trailUpdate() antSys.findBestJobSchedule() print "Ant Schedules" for i in range(len(antSys.antScheds)): print "i: ", antSys.antScheds[i].makespan, antSys.antScheds[i].jobSched print "\nBest solution" print antSys.bestSchedule print antSys.bestSchedule.makespan, antSys.bestSchedule.jobSched return