'Initailize cut values of edges of the feasible tree.
Edges with negative cut-values are removed from the tree to optimize rank assignment'

def init_cutvalues(self):

    self.cut_edges = {}
    self.head_nodes = []
    i = 0
    for edge in self.tree_edges:
        self.head_nodes = []
        rest_edges = []
        rest_edges += self.tree_edges
        del rest_edges[i]
        self.head_component(self.start, rest_edges)
        i += 1
        positive = 0
        negative = 0
        for source_node in self.transitions:
            if (source_node in self.head_nodes):
                for dest_node in self.transitions[source_node]:
                    if (dest_node not in self.head_nodes):
                        negative += 1
            else:
                for dest_node in self.transitions[source_node]:
                    if (dest_node in self.head_nodes):
                        positive += 1
        self.cut_edges[edge] = (positive - negative)
