Eliminating flow attribute from Edge class and considering a Matrix of flows
TSORT solution added