Implement prune and branch for graph coloring. Already works better than previous solution.

This commit is contained in:
2020-01-09 16:13:47 -05:00
parent 126d7103fa
commit e84f4c6efc
4 changed files with 142 additions and 245 deletions

View File

@@ -214,7 +214,7 @@ def output(input_file, solver_file):
solution = ''
start = time.clock()
start = time.process_time()
try:
solution = pkg.solve_it(load_input_data(input_file))
except Exception as e:
@@ -224,7 +224,7 @@ def output(input_file, solver_file):
print(str(e))
print('')
return 'Local Exception =('
end = time.clock()
end = time.process_time()
if not (isinstance(solution, str) or isinstance(solution, unicode)):
print('Warning: the solver did not return a string. The given object will be converted with the str() method.')