Downstream indicator


Hi everyone!

How can I create a downstream matrix for each time period by EMT?
The upstream and downstream of the nodes are determined by the flow patterns.For each flow pattern, there is a binary matrix representing the upstream and downstream of each node (downstream matrix). This matrix is called the downstream indicator matrix.

The point I mean is from the downstream matrix, which, for each time periods, created a matrix that each of its elements is as R (ijt).

R(ijt): downstream indicator, 1 if j is downstream relative to i or 0 from a flow pattern (Or time series) t

Example of downstream indicator matrix and