SEL-Columbia / networker

Network Planning Library
4 stars 4 forks source link

skipped connections between nodes with sufficient mvMax #18

Open chrisnatali opened 9 years ago

chrisnatali commented 9 years ago

In the following grid

1--/--2

With 1.mvMax: 100 2.mvMax: 100 Edge(1, 2): 50

Where the /\ represents a subnetwork with insufficient mvMax to connect to either 1 or 2

1 and 2 will NOT be connected because we interpret the edge(1,2) as creating a cycle (it intersects a subnetwork in more than 1 point). This is true in NetworkPlanner and in this code, but it doesn't seem right.

A more appropriate method of handling this needs to be thought through, but might be to find the closest projected point on the intervening subnetwork and connect nodes 1 and 2 to those points.

chrisnatali commented 9 years ago

A more elegant solution would be to lookup nearest geometry as opposed to nearest point and if it's a segment, project a candidate edge onto it.