[Tex/LaTex] How to draw two separate directed edges

tikz-pgf

I am drawing a simple graph with tikz. This works OK but when I have two edges going in opposite directions between a pair of nodes I get one arrow with two heads (for example between nodes B and D below). How can I get two arrows? Here is a MWE:

\documentclass[]{article}
\usepackage{tikz}  
\usetikzlibrary{arrows.meta,positioning}
\usepackage{tkz-graph}
\usepackage{graphicx}  
\begin{document}  
\section{}
\begin{center}
    \begin{tikzpicture}[auto,node distance=2cm,thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}, scale=2]
    \node[main node, label=$0$] (A) at (0,5) {A};
    \node[main node, label=$\infty$] (B) at (2,6.5) {B};
    \node[main node, label=$\infty$] (E) at (4,5) {E};
    \node[main node, label=$\infty$] (C) at (1,3) {C};
    \node[main node, label=$\infty$] (D) at (3,3) {D};

    \path [->] (A) edge node {$-1$} (B);
    \path [->] (B) edge node {$2$} (E);
    \path [->] (A) edge node {$4$} (C);
    \path [->] (B) edge node {$3$} (C);
    \path [->] (B) edge node {$2$} (D);
    \path [->] (D) edge node {$1$} (B);
    \path [->] (D) edge node {$5$} (C);
    \path [->] (E) edge node {$-3$} (D);
    \end{tikzpicture}
\end{center}
\end{document}

Best Answer

Here is a proposal using the calc library to shift the paths by some amount away from the center. Of course, if you do that very often, you may write a macro for that. Or you just bend the paths, as illustrated in the arrows between the B and D nodes.

\documentclass[]{article}
\usepackage{tikz}  
\usetikzlibrary{arrows.meta,positioning,calc}
\usepackage{tkz-graph}
\usepackage{graphicx}  
\begin{document}  
\section{}
\begin{center}
    \begin{tikzpicture}[auto,node distance=2cm,thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}, scale=2]
    \node[main node, label=$0$] (A) at (0,5) {A};
    \node[main node, label=$\infty$] (B) at (2,6.5) {B};
    \node[main node, label=$\infty$] (E) at (4,5) {E};
    \node[main node, label=below:$\infty$] (C) at (1,3) {C};
    \node[main node, label=below:$\infty$] (D) at (3,3) {D};

    \path [->] (A) edge node {$-1$} (B);
    \path [->] (B) edge node {$2$} (E);
    \path [->] (A) edge node {$4$} (C);
    \path [->] (B) edge node {$3$} (C);
    \path [->] let \p1=($(D)-(B)$),\n1={atan2(\y1,\x1)},\n2={180+\n1} in
     ($ (B.\n1)!2pt!90:(D.\n2) $) edge node {$2$} ($ (D.\n2)!2pt!-90:(B.\n1) $);
    \path [->] let \p1=($(B)-(D)$),\n1={atan2(\y1,\x1)},\n2={180+\n1} in
     ($ (D.\n1)!2pt!90:(B.\n2) $) edge node {$-2$} ($ (B.\n2)!2pt!-90:(D.\n1) $);
    \path [->,bend left=10] (D) edge node {$5$} (C);
    \path [->,bend left=10] (C) edge node {$-5$} (D);
    \path [->] (E) edge node {$-3$} (D);
    \end{tikzpicture}
\end{center}
\end{document}

enter image description here

Off-topic but I just saw AndréC's answer and even though I generally agree with him, I'd not use a graph for that. A very simple loop is easier IMHO and shorter.

\documentclass[]{article}
\usepackage{tikz}  
\usetikzlibrary{calc}
\begin{document}  
\begin{center}
    \begin{tikzpicture}[auto,node distance=2cm,thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}, scale=2]
    \foreach \X/\Z [count=\Y,evaluate=\Y as \angle using {90-72+72*\Y}] in {B/\infty,A/0,C/\infty,D/\infty,E/\infty}
    {\node[main node,label={\angle:$\Z$}] (\X) at (\angle:2) {\X};}

    \path [->] (A) edge node {$-1$} (B);
    \path [->] (B) edge node {$2$} (E);
    \path [->] (A) edge node {$4$} (C);
    \path [->] (B) edge node {$3$} (C);
    \path [->] let \p1=($(D)-(B)$),\n1={atan2(\y1,\x1)},\n2={180+\n1} in
     ($ (B.\n1)!2pt!90:(D.\n2) $) edge node {$2$} ($ (D.\n2)!2pt!-90:(B.\n1) $);
    \path [->] let \p1=($(B)-(D)$),\n1={atan2(\y1,\x1)},\n2={180+\n1} in
     ($ (D.\n1)!2pt!90:(B.\n2) $) edge node {$-2$} ($ (B.\n2)!2pt!-90:(D.\n1) $);
    \path [->,bend left=10] (D) edge node {$5$} (C);
    \path [->,bend left=10] (C) edge node {$-5$} (D);
    \path [->] (E) edge node {$-3$} (D);
    \end{tikzpicture}
\end{center}
\end{document}