def ford_fulkerson(self):
        if not self.maxflux:
            print 'cannot apply for fulkerson, graph is not a flow graph'
        print '''warning! this algorithm takes O(m^2n)!'''
        print 'O(m^2n) = O(', self.n*len(self.edges)**2, ')'
        # fixgraph self
        self.remove_edges([[0, i]for i in self.FSs[0]])
        self.remove_edges([[i, self.n-1] for i in self.FSs[-1]])

        s_node = np.array([-.85, -.85])
        s = self.n-2
        t_node = np.array([0.85, 0.85])
        t = self.n-1

        self.add_nodes([s_node, t_node])

        for v in range(len(self.FSs)-2):
            if self.FSs[v] == []:
                self.add_edges([v, t])
                self.capacities = np.append(
                    self.capacities, sum(self.capacities[np.where(self.edges[:][1] == v)]))
                self.flux = np.append(self.flux, 0)

#                c_s.append(self.capacities[np.where(self.edges == [v])])
        for v in range(len(self.BSs)-2):
            if self.BSs[v] == []:
                self.add_edges([s, v])
                self.capacities = np.append(
                    self.capacities, sum(self.capacities[np.where(self.edges[:][0] == v)]))
                self.flux = np.append(self.flux, 0)
        max_flux = np.zeros(len(self.edges), dtype=np.int)
        v = 0
        optimal = False
        directed_edges = self.edges.copy()
        directed_capacities = self.capacities.copy()
        inverted_edges = self.edges.copy()
        inverted_edges.fill(None)
        inverted_capacities = self.capacities.copy()
        inverted_capacities.fill(0)
        fs = self.FSs.copy()
        while not optimal:
            for e in range(len(self.edges)):
                if max_flux[e] != self.capacities[e]:

                    fs[self.edges[e][0]] = np.append(
                        fs[self.edges[e][0]], self.edges[e][1])
                    directed_edges[e] = self.edges[e]
                    directed_capacities[e] = self.capacities[e] - max_flux[e]
                else:
                    directed_edges[e] = None
                    directed_capacities[e] = 0
                if max_flux[e] != 0:
                    fs[self.edges[e][1]] = np.append(
                        fs[self.edges[e][1]], self.edges[e][0])
                    inverted_edges[e] = self.edges[e]
                    inverted_capacities[e] = max_flux[e]
                else:
                    inverted_edges[e] = None
                    inverted_capacities[e] = 0
            big_p = self.BFS_path(s, t, fs)
            if len(big_p) == 0:
                optimal = True
                break

            u_list = []

            for e in range(len(directed_edges)):
                if directed_edges[e]:
                    for p in big_p:
                        if directed_edges[e] == p:
                            u_list.append(directed_capacities[e])
                if inverted_edges[e]:
                    for p in big_p:
                        if inverted_edges[e] == p:
                            u_list.append(inverted_capacities[e])
            big_fi = min(u_list)
            v = v + big_fi

            for e in range(len(directed_edges)):
                if len(np.where(directed_edges[e] == big_p)[0]) > 1:
                    max_flux[e] = max_flux[e] + big_fi
            for e in range(len(inverted_edges)):
                if len(np.where(directed_edges[e] == big_p)[0]) > 1:
                    max_flux[e] = max_flux[e] - big_fi
        return self.edges, max_flux
This sets the default transition. This defines an action and
dataset/ETHPy150Open dnlcrl/PyGraphArt/src/graph.py/Graph.ford_fulkerson--crossover with--dataset/ETHPy150Open ooici/pyon/pyon/core/governance/conversation/core/fsm.py/FSM.set_default_transition