I have to make a directed graph for a maximum flow algorithm assignment. Although I have managed to make the graph for the better part, it still needs some work.
The problem is that Mathematica automatically centers EdgeLabels. This causes overlapping text at where the edges cross.
I used the following code:
Graph[{R1 \[DirectedEdge] A, R1 \[DirectedEdge] B,
R2 \[DirectedEdge] A, R2 \[DirectedEdge] B, R2 \[DirectedEdge] C,
R3 \[DirectedEdge] B, R3 \[DirectedEdge] C, A \[DirectedEdge] D,
A \[DirectedEdge] E, B \[DirectedEdge] D, B \[DirectedEdge] E,
B \[DirectedEdge] F, C \[DirectedEdge] E, C \[DirectedEdge] F,
D \[DirectedEdge] T, E \[DirectedEdge] T, F \[DirectedEdge] T},
EdgeWeight -> {120, 115, 70, 90, 110, 140, 120, 110, 85, 130, 95, 85,
130, 160, 220, 330, 240}, EdgeLabels -> "EdgeWeight",
EdgeLabelStyle -> VertexLabels -> "Name"]
And this produces the following graph.
For completeness, R1,R2,R3 are the sources and T is the sink. No need to solve the maximum flow problem.