SEL-Columbia / sequencer

Python library for sequencing the output of Network Planner csv's and shape file outputs
Other
4 stars 4 forks source link

upstream & downstream lengths -- one seems wrong #49

Open jea98 opened 9 years ago

jea98 commented 9 years ago

This may be a misunderstanding of the outputs but I noticed during work with the TZA team that the sequencer seems to produce an upstream and downstream distance column that is often duplicated, and rarely if ever zero.

My understanding of upstream and downstream distances are: -- upstream: MV length required to reach from the previous node to the current node -- downstream the MV length needed to reach from the current node to the next

If this is correct, then upstream should always (?) be positive, non-zero, and downstream should be positive only if there is a following node, but zero if the current node is the end. And I would expect the sum of all upstream to be the total MV length of the proposed network, and the sum of all downstream to be smaller than upstream (due to inclusion of zeroes for end-nodes). I would never expect to see the upstream and downstream equal for the same row. And I wouldn't expect the sums to be equal.

But in the TZA outputs, I saw lots of rows with the two equal, and few, if any, zeroes.

Could it be that end-nodes are being given the same upstream and downstream value leading to the rows with equal values?

Also, I would expect that 1/2 the upstream and 1/2 the downstream value would be (roughly?) equivalent to the old "dist" variable. (in fact, trying to figure out which variable in the new sequencer could be used in place of the old "dist" variable is what led me to notice this issue).

chrisnatali commented 9 years ago

Needs a deeper look, but there's a slight mod to your understanding of downstream distance: It also includes the distance to its parent see this