Max Weight Path in a Graph
There's a problem with terminology here.  A walk in a graph is a sequence $v_1\dots v_k$ of vertices such that $v_1v_2, v_2v_3, \dots, v_{k-1}v_k$ are edges. A path is a walk that doesn't repeat vertices.  So, a graph with a positive-weight cycle contains no longest walk (you can always walk around the cycle one more time to get a longer one) but it does contain a longest path (paths can't go all the way around cycles).

Algorithms such as Bellman&ndash;Ford actually compute shortest walks between vertices and use the fact that, as long as the graph has no negative cycles, the shortest walk is also the shortest path.  (Any walk that isn't a path must contain a cycle and, if all cycles have positive weight, then the walk without that cycle is shorter.) The graph your algorithm generates contains negative-weight cycles, so Bellman&ndash;Ford will fail: it can't use its "the shortest walk is also the shortest path" rule because there is no shortest walk.