Assigning serial number to the pipe as water move in the pipe stream

I have resolve my problem using “Element in connected network” node from MEPover package.
and I am getting solution as mention in the sample file.
Hope this will give you, alternate approach to resolve your problem.