zephyr-data-specs / GMNS

General Modeling Network Specification
https://zephyr-data-specs.github.io/GMNS/
104 stars 15 forks source link

end_lr field in the segment.csv file #52

Closed jiawlu closed 2 years ago

jiawlu commented 2 years ago

Is it possible to leave the filed 'end_lr' empty (or other marks) if a segment reaches the end of the corresponding link. In the current definition, each segment has a 'start_lr' and a 'end_lr', which may cause some issues and bring extra checking efforts in certain cases.

For example, in the Small_Network_Examples/Arlington_Signals, the 'end_lr' of segment 5 and 6 are both 300. However, the length of the corresponding link (link_id 31) is 330 from the link.csv file. Based on the definition, the link return back to 2 lanes in 300-330, which may be wrong. Therefore, extra checking efforts are needed in this case.

ssmith55 commented 2 years ago

Good point. Thank you for raising it. We will fix the example, and more importantly, see if allowing end_lr to be empty at the end of the link would create other problems. Proposed logic could be as follows:

  1. If ref_node_id = from_node_id (i.e., is the node at the start of the link), then If end_lr is blank, it refers to the end of the link
  2. If ref_node_id = to_node_id (i.e., is the node at the end of the link), then if start_lr is blank, it refers to the start of the link.
    @ianberg-volpe, would you agree with this solution?
ianberg-volpe commented 2 years ago

Hi @ssmith55, I agree that we need to check the Arlington network; the ref_node_id on the segments that are referenced above is neither the associated link's from_node_id or to_node_id... would that ever be a valid choice, or should we restrict ref_node_id to be the from or to node for the link?

I think your proposed logic makes sense.

ssmith55 commented 2 years ago

@ianberg-volpe , thank you for making the corrections to the segment.csv file in the fix_example_networks branch. @jiawlu , it should make more sense now. Thank you for raising the issue.