A special method has been created to handle running the algorithm. This simplifies taking measurements from the algorithm's performance.

This commit is contained in:
Remi Ehounou
2021-04-05 22:07:41 -04:00
parent 0bc7c66fb1
commit bff340453f
2 changed files with 60 additions and 33 deletions

View File

@ -31,7 +31,7 @@ def Quality(Sc,objective,func):
print("Error is: "+str(error))
return 1/abs(error)
def main(func, obj, S, args, connection):
def main(func, obj, S, args):
r.seed(int(time.time()))
route = list()
#Parsing arguments
@ -77,7 +77,7 @@ def main(func, obj, S, args, connection):
#print('the Best Quality obtained was:{}'.format(Quality(Best,y)))
print("Final Quality is: {}".format(Quality(Best,y,func)))
print("final Temperature is: {}".format(t))
connection.send(Best)
return Best