I have a directed graph where agents move from node1 to node2 like the following
node1 node2 flow
A B 12
B A 6
C A 1
D B 3
E A 4
A E 10
E B 1
B E 2
I would like to change this directed graph into an undirected one, summing the flow between edges, rendering a result such as
node1 node2 flow
A B 18
C A 1
D B 3
A E 14
B E 3
I tried creating individual ids base on the edges, but without success.
Any thoughts on how to do it?