## creat_dom_graph: teeth_surplus_bound = 0.75 node_num_upper_bd = 50000 ## find_all_teeth: epsilon = 0.1 # ''' comb_upper_bd = 2.5 total_surplus_bound = 2 # <=2 pattern_upper_bound = 530 max_teeth_num = 5 ''' start = timer() # constants: F = build_support_graph('att532.x') G = create_dom_graph('att532.dom', teeth_surplus_bound, node_num_upper_bd) handle_pool = all_handles('att532.pool.txt') viol_comb_set = find_comb(F, G, handle_pool) ''' newfilename='att532_handle_to_teeth_0.txt' newfile=open(newfilename, 'w') newfile.close() ''' end = timer() print('Total running time: %.5f' % (end - start))
# start: start = timer() newfilename = 'fl1577.pool_4.txt' # change it every time you run it! newfile = open(newfilename, 'w') newfile.write('Variables: \n') newfile.write('teeth_surplus_bound: %.5f \n' % teeth_surplus_bound) newfile.write('node_num_upper_bd: %d \n' % node_num_upper_bd) newfile.write('handle_num_bound: %d \n' % handle_num_bound) newfile.write('x_delta_H_bound: %.5f \n' % x_delta_H_bound) newfile.write('epsilon: %.5f \n' % epsilon) newfile.write('krange: %d \n \n' % krange) # constants: F = build_support_graph('fl1577.x') # you may need to change this G = create_dom_graph2('fl1577.dom', teeth_surplus_bound, node_num_upper_bd) # you may need to change this newfile.write('Constants: \n') newfile.write('Total number of dominoes: %d \n' % G.number_of_nodes()) handle_pool = all_handles('fl1577.pool.txt') # you may need to change this newfile.write('Total number of handles considered: %d \n\n' % len(handle_pool)) # main function viol_comb_list = find_comb(F, G, handle_pool) # miscellaneous end = timer()