Revision 7476b400

View differences:

mrai_setter/mrai_setter.py
241 241
            e['mrai1'] = float(mrai)
242 242
            e['termination2'] = j
243 243

  
244
"""for node in self.graph.nodes(data=True):
245
                self.G.add_node(node[0])
246

  
247
            for edge in self.graph.edges(data=True):
248
                e1 = str(edge[2]["customer"])
249
                if e1 == str(edge[2]["termination1"]):
250
                    e2 = str(edge[2]["termination2"])
251
                else:
252
                    e2 = str(edge[2]["termination1"])
253
                if 'fabrikant_weight' in edge[2]:
254
                    self.G.add_edge(e1, e2, customer=edge[2]['customer'], termination2=edge[2]['termination2'],
255
                               fabrikant_weight=edge[2]['fabrikant_weight'], termination1=edge[2]['termination1'],
256
                               mrai1=edge[2]['mrai1'], mrai2=edge[2]['mrai2'], type=edge[2]['type'])
257
                else:
258
                    self.G.add_edge(e1, e2, customer=edge[2]['customer'], termination2=edge[2]['termination2'],
259
                               termination1=edge[2]['termination1'], mrai1=edge[2]['mrai1'], mrai2=edge[2]['mrai2'],
260
                               type=edge[2]['type'])"""
261

  
262 244

  
263 245
def fabrikant_levels(G, adv_node):
264 246
    class FabrikantLeveler(object):

Also available in: Unified diff