private function mergeParallelEdges(Edge $newEdge)
    {
        $parallelEdges = $newEdge->getEdgesParallel();
        if ($parallelEdges) {

            $mergedCapacity = 0;

            foreach ($parallelEdges as $parallelEdge) {
                $mergedCapacity += $parallelEdge->getCapacity();
            }

            $newEdge->setCapacity($newEdge->getCapacity() + $mergedCapacity);

            foreach ($parallelEdges as $parallelEdge) {
                $parallelEdge->destroy();
            }
        }
    }