When using the Primal Simplex Network algorithm, loop arcs
(arcs directed toward nodes from which they originate) are
prohibited.
Rather, introduce a dummy intermediate node in loop arcs.
For example, replace arc (A,A) with (A,B) and (B,A).
B is the name of a new node, and it must be distinct for each loop arc.