zephyr-data-specs / GMNS

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

Time of day variation is complex for simple changes #14

Closed e-lo closed 4 years ago

e-lo commented 4 years ago

I'd like to flag what I think is a significant drawback of the current data mode for time of day variable. Specifically, I have found it frustrating that:

  1. a simple change by time of day requires many entries, and
  2. the same table could use a variety of foreign keys which depend on the entry; this makes merge and joins.

I propose that we have the following model to make simple things simple:

link can be overridden by link_tod which can be augmented by link_lanes_tod

Anything in a link can be overridden by a segment file.

link can be overridden by segment link_tod can be overridden by segment_tod link_lanes_tod can be overridden by_ segment_lanes_tod

Only meso/micro models will need to specify segments (likely) so you wont make simple merges between macro-scale data more complicated by having to do conditional joins depending on segments vs links.

ianberg-volpe commented 4 years ago

We have added TOD.md to the spec-as-code branch, which includes link_tod, link_lane_tod, segment_tod, segment_lane_tod files. We also created a new segment_lane table to mirror segment_lane_tod (for lane add/drops, or changes to characteristics of a lane on a segment).

See the entity-relationship diagram below: New link E-R diagram