def do_automata(N,K,nk_automata=None,ordinal_number=-1): draw_graph_object = DrawGraph() current_folder_path = os.path.dirname(__file__) if nk_automata == None: nk_automata = NK_Automata(N, K) nk_automata.generate_random_automata() nk_automata.ordinal_number = ordinal_number print nk_automata nk_automata.span_automata() print "satespan",nk_automata.state_span nk_automata.analyse_automata() print nk_automata.state_list nk_automata.make_attractor_stat_dictionary() print nk_automata.attractor_dict nk_automata.count_stability() print "Stability:", nk_automata.stability nk_automata.count_expected_return_time() print "ExpectedReturnTime:", nk_automata.expected_return_time draw_graph_object.draw_gene_connecions_graph(nk_automata.links_list, current_folder_path) draw_graph_object.draw_states_graph(nk_automata.state_span, current_folder_path) draw_graph_object.draw_simplfied_states_graph(nk_automata.attractor_dict,2**nk_automata.N,current_folder_path)
def do_automata(N, K, draw_graph_object, nk_automata=None, ordinal_number=-1): current_folder_path = os.path.dirname(__file__) if nk_automata == None: nk_automata = NK_Automata(N, K) nk_automata.generate_random_automata() nk_automata.ordinal_number = ordinal_number draw_graph_object.draw_gene_connecions_graph(nk_automata.links_list, current_folder_path) #print nk_automata nk_automata.span_automata() # print "satespan",nk_automata.state_span nk_automata.analyse_automata() # print nk_automata.state_list nk_automata.make_attractor_stat_dictionary() # print nk_automata.attractor_dict # print "state_list", nk_automata.state_list nk_automata.count_stability() nk_automata.count_expected_return_time() draw_graph_object.draw_simplfied_states_graph( nk_automata.make_attractors_dictionary(), 2**nk_automata.N, current_folder_path) draw_graph_object.draw_states_graph(nk_automata.state_span, current_folder_path) SaveLoad.save_n_k_automata(current_folder_path, nk_automata, True)
def doAutomata(N,K,drawGraphObject,nkAutomata=None,ordinalNumber=-1): currentFolderPath = os.path.dirname(__file__) if nkAutomata == None: nkAutomata = NK_Automata(N, K) nkAutomata.generateRandomAutomata() nkAutomata.ordinalNumber = ordinalNumber drawGraphObject.drawGeneConnecionsGraph(nkAutomata.linksList, currentFolderPath) #print nkAutomata nkAutomata.spanAutomata() # print "satespan",nkAutomata.stateSpan nkAutomata.analyseAutomata() # print nkAutomata.stateList nkAutomata.makeAttractorStatDictionary() # print nkAutomata.attractorDict # print "stateList", nkAutomata.stateList nkAutomata.countStability() nkAutomata.countExpectedReturnTime() drawGraphObject.drawSimplfiedStatesGraph(nkAutomata.makeAttractorsDictionary(),2**nkAutomata.N,currentFolderPath) drawGraphObject.drawStatesGraph(nkAutomata.stateSpan, currentFolderPath) SaveLoad.saveNKAutomata(currentFolderPath, nkAutomata, True)
def doAutomata(N,K,nkAutomata=None,ordinalNumber=-1): drawGraphObject = DrawGraph() currentFolderPath = os.path.dirname(__file__) if nkAutomata == None: nkAutomata = NK_Automata(N, K) nkAutomata.generateRandomAutomata() nkAutomata.ordinalNumber = ordinalNumber print nkAutomata nkAutomata.spanAutomata() print "satespan",nkAutomata.stateSpan nkAutomata.analyseAutomata() print nkAutomata.stateList nkAutomata.makeAttractorStatDictionary() print nkAutomata.attractorDict nkAutomata.countStability() print "Stability:", nkAutomata.stability nkAutomata.countExpectedReturnTime() print "ExpectedReturnTime:", nkAutomata.expectedReturnTime drawGraphObject.drawGeneConnecionsGraph(nkAutomata.linksList, currentFolderPath) drawGraphObject.drawStatesGraph(nkAutomata.stateSpan, currentFolderPath) drawGraphObject.drawSimplfiedStatesGraph(nkAutomata.attractorDict,2**nkAutomata.N,currentFolderPath)
def do_automata(N, K, nk_automata=None, ordinal_number=-1): draw_graph_object = DrawGraph() current_folder_path = os.path.dirname(__file__) if nk_automata == None: nk_automata = NK_Automata(N, K) nk_automata.generate_random_automata() nk_automata.ordinal_number = ordinal_number print nk_automata nk_automata.span_automata() print "satespan", nk_automata.state_span nk_automata.analyse_automata() print nk_automata.state_list nk_automata.make_attractor_stat_dictionary() print nk_automata.attractor_dict nk_automata.count_stability() print "Stability:", nk_automata.stability nk_automata.count_expected_return_time() print "ExpectedReturnTime:", nk_automata.expected_return_time draw_graph_object.draw_gene_connecions_graph(nk_automata.links_list, current_folder_path) draw_graph_object.draw_states_graph(nk_automata.state_span, current_folder_path) draw_graph_object.draw_simplfied_states_graph(nk_automata.attractor_dict, 2**nk_automata.N, current_folder_path)
def doAutomata(N, K, drawGraphObject, nkAutomata=None, ordinalNumber=-1): currentFolderPath = os.path.dirname(__file__) if nkAutomata == None: nkAutomata = NK_Automata(N, K) nkAutomata.generateRandomAutomata() nkAutomata.ordinalNumber = ordinalNumber drawGraphObject.drawGeneConnecionsGraph(nkAutomata.linksList, currentFolderPath) #print nkAutomata nkAutomata.spanAutomata() # print "satespan",nkAutomata.stateSpan nkAutomata.analyseAutomata() # print nkAutomata.stateList nkAutomata.makeAttractorStatDictionary() # print nkAutomata.attractorDict # print "stateList", nkAutomata.stateList nkAutomata.countStability() nkAutomata.countExpectedReturnTime() drawGraphObject.drawSimplfiedStatesGraph( nkAutomata.makeAttractorsDictionary(), 2**nkAutomata.N, currentFolderPath) drawGraphObject.drawStatesGraph(nkAutomata.stateSpan, currentFolderPath) SaveLoad.saveNKAutomata(currentFolderPath, nkAutomata, True)
def do_automata(N,K,draw_graph_object,nk_automata=None,ordinal_number=-1): current_folder_path = os.path.dirname(__file__) if nk_automata == None: nk_automata = NK_Automata(N, K) nk_automata.generate_random_automata() nk_automata.ordinal_number = ordinal_number draw_graph_object.draw_gene_connecions_graph(nk_automata.links_list, current_folder_path) #print nk_automata nk_automata.span_automata() # print "satespan",nk_automata.state_span nk_automata.analyse_automata() # print nk_automata.state_list nk_automata.make_attractor_stat_dictionary() # print nk_automata.attractor_dict # print "state_list", nk_automata.state_list nk_automata.count_stability() nk_automata.count_expected_return_time() draw_graph_object.draw_simplfied_states_graph(nk_automata.make_attractors_dictionary(),2**nk_automata.N,current_folder_path) draw_graph_object.draw_states_graph(nk_automata.state_span, current_folder_path) SaveLoad.save_n_k_automata(current_folder_path, nk_automata, True)