RSGInc / micromobility_toolset

Micromobility Travel Modeling Toolkit
Other
3 stars 2 forks source link

Use straight line distance instead of network distance #22

Open blakerosenthal opened 3 years ago

blakerosenthal commented 3 years ago

Currently we calculate shortest paths with the network distance link weight. This could be sped up by using node_x and node_y coordinates to calculate Cartesian distance, then converting to the appropriate units for the model.

We also calculate skims for all zone-zone pairs, then trim by max dist later. We can use max_dist to filter from/to nodes using the distance matrix, then only feed those nodes into the shortest paths function.

blakerosenthal commented 3 years ago

I think we could also consider not including this new distance calculation in the skims output file. skims.csv still has a max_dist to prevent the file from being huge, which means any zone-zone pairs further than this global max_dist don't get included in LDR trips (because 0 means unavailable).

If the Cartesian distance calc is fast (which I think it should be), we can calculate it on the fly every time. Or even save it to HDF/OMX. It's mostly an internal utility matrix anyway, and then skims.csv can just contain user-config'd costs.