flow network simulator, graph theory